Subversion Repositories SmartDukaan

Rev

Rev 7410 | Rev 9829 | 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
7672 rajveer 203
     * @param nlc
6762 amar.kumar 204
     * @param itemId
205
     */
7672 rajveer 206
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException;
6762 amar.kumar 207
 
208
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
209
 
7410 amar.kumar 210
    /**
211
     * Marks a purchase order as closedcomplete and updates the receivedOn time.
212
     * 
213
     * @param poId
214
     */
215
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException;
216
 
217
    /**
218
     * Check if invoice is already received with given supplierId and invoiceNumber
219
     * 
220
     * @param invoiceNumber
221
     * @param supplierId
222
     */
223
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
224
 
4496 mandeep.dh 225
  }
226
 
227
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
228
 
229
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
230
 
231
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
232
 
233
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
234
 
235
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
236
 
237
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
238
 
239
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
240
 
241
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
242
 
6385 amar.kumar 243
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
244
 
4555 mandeep.dh 245
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 246
 
4754 mandeep.dh 247
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
248
 
249
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
250
 
251
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
252
 
253
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
254
 
5185 mandeep.dh 255
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
256
 
5443 mandeep.dh 257
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
258
 
7410 amar.kumar 259
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
260
 
5443 mandeep.dh 261
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
262
 
5591 mandeep.dh 263
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
264
 
265
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
266
 
6467 amar.kumar 267
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
268
 
269
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
270
 
271
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
272
 
6630 amar.kumar 273
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
274
 
7672 rajveer 275
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException;
6762 amar.kumar 276
 
277
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
278
 
7410 amar.kumar 279
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
280
 
281
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
282
 
4496 mandeep.dh 283
  }
284
 
285
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
286
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
287
      public Factory() {}
288
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
289
        return new Client(prot);
290
      }
291
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
292
        return new Client(iprot, oprot);
293
      }
294
    }
295
 
296
    public Client(org.apache.thrift.protocol.TProtocol prot)
297
    {
298
      super(prot, prot);
299
    }
300
 
301
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
302
      super(iprot, oprot);
303
    }
304
 
305
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
306
    {
307
      send_createPurchaseOrder(purchaseOrder);
308
      return recv_createPurchaseOrder();
309
    }
310
 
311
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
312
    {
313
      createPurchaseOrder_args args = new createPurchaseOrder_args();
314
      args.setPurchaseOrder(purchaseOrder);
315
      sendBase("createPurchaseOrder", args);
316
    }
317
 
318
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
319
    {
320
      createPurchaseOrder_result result = new createPurchaseOrder_result();
321
      receiveBase(result, "createPurchaseOrder");
322
      if (result.isSetSuccess()) {
323
        return result.success;
324
      }
325
      if (result.e != null) {
326
        throw result.e;
327
      }
328
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
329
    }
330
 
331
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
332
    {
333
      send_getPurchaseOrder(id);
334
      return recv_getPurchaseOrder();
335
    }
336
 
337
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
338
    {
339
      getPurchaseOrder_args args = new getPurchaseOrder_args();
340
      args.setId(id);
341
      sendBase("getPurchaseOrder", args);
342
    }
343
 
344
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
345
    {
346
      getPurchaseOrder_result result = new getPurchaseOrder_result();
347
      receiveBase(result, "getPurchaseOrder");
348
      if (result.isSetSuccess()) {
349
        return result.success;
350
      }
351
      if (result.e != null) {
352
        throw result.e;
353
      }
354
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
355
    }
356
 
357
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
358
    {
359
      send_getAllPurchaseOrders(status);
360
      return recv_getAllPurchaseOrders();
361
    }
362
 
363
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
364
    {
365
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
366
      args.setStatus(status);
367
      sendBase("getAllPurchaseOrders", args);
368
    }
369
 
370
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
371
    {
372
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
373
      receiveBase(result, "getAllPurchaseOrders");
374
      if (result.isSetSuccess()) {
375
        return result.success;
376
      }
377
      if (result.e != null) {
378
        throw result.e;
379
      }
380
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
381
    }
382
 
383
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
384
    {
385
      send_getSupplier(id);
386
      return recv_getSupplier();
387
    }
388
 
389
    public void send_getSupplier(long id) throws org.apache.thrift.TException
390
    {
391
      getSupplier_args args = new getSupplier_args();
392
      args.setId(id);
393
      sendBase("getSupplier", args);
394
    }
395
 
396
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
397
    {
398
      getSupplier_result result = new getSupplier_result();
399
      receiveBase(result, "getSupplier");
400
      if (result.isSetSuccess()) {
401
        return result.success;
402
      }
403
      if (result.e != null) {
404
        throw result.e;
405
      }
406
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
407
    }
408
 
409
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
410
    {
411
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
412
      return recv_startPurchase();
413
    }
414
 
415
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
416
    {
417
      startPurchase_args args = new startPurchase_args();
418
      args.setPurchaseOrderId(purchaseOrderId);
419
      args.setInvoiceNumber(invoiceNumber);
420
      args.setFreightCharges(freightCharges);
421
      sendBase("startPurchase", args);
422
    }
423
 
424
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
425
    {
426
      startPurchase_result result = new startPurchase_result();
427
      receiveBase(result, "startPurchase");
428
      if (result.isSetSuccess()) {
429
        return result.success;
430
      }
431
      if (result.e != null) {
432
        throw result.e;
433
      }
434
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
435
    }
436
 
437
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
438
    {
439
      send_closePurchase(purchaseId);
440
      return recv_closePurchase();
441
    }
442
 
443
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
444
    {
445
      closePurchase_args args = new closePurchase_args();
446
      args.setPurchaseId(purchaseId);
447
      sendBase("closePurchase", args);
448
    }
449
 
450
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
451
    {
452
      closePurchase_result result = new closePurchase_result();
453
      receiveBase(result, "closePurchase");
454
      if (result.isSetSuccess()) {
455
        return result.success;
456
      }
457
      if (result.e != null) {
458
        throw result.e;
459
      }
460
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
461
    }
462
 
463
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
464
    {
465
      send_getAllPurchases(purchaseOrderId, open);
466
      return recv_getAllPurchases();
467
    }
468
 
469
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
470
    {
471
      getAllPurchases_args args = new getAllPurchases_args();
472
      args.setPurchaseOrderId(purchaseOrderId);
473
      args.setOpen(open);
474
      sendBase("getAllPurchases", args);
475
    }
476
 
477
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
478
    {
479
      getAllPurchases_result result = new getAllPurchases_result();
480
      receiveBase(result, "getAllPurchases");
481
      if (result.isSetSuccess()) {
482
        return result.success;
483
      }
484
      if (result.e != null) {
485
        throw result.e;
486
      }
487
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
488
    }
489
 
6385 amar.kumar 490
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
491
    {
492
      send_getPurchasesForPO(purchaseOrderId);
493
      return recv_getPurchasesForPO();
494
    }
495
 
496
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
497
    {
498
      getPurchasesForPO_args args = new getPurchasesForPO_args();
499
      args.setPurchaseOrderId(purchaseOrderId);
500
      sendBase("getPurchasesForPO", args);
501
    }
502
 
503
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
504
    {
505
      getPurchasesForPO_result result = new getPurchasesForPO_result();
506
      receiveBase(result, "getPurchasesForPO");
507
      if (result.isSetSuccess()) {
508
        return result.success;
509
      }
510
      if (result.e != null) {
511
        throw result.e;
512
      }
513
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
514
    }
515
 
4555 mandeep.dh 516
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 517
    {
4555 mandeep.dh 518
      send_getPurchaseOrderForPurchase(purchaseId);
519
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 520
    }
521
 
4555 mandeep.dh 522
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 523
    {
4555 mandeep.dh 524
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 525
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 526
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 527
    }
528
 
4555 mandeep.dh 529
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 530
    {
4555 mandeep.dh 531
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
532
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 533
      if (result.isSetSuccess()) {
534
        return result.success;
535
      }
4555 mandeep.dh 536
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 537
    }
538
 
4754 mandeep.dh 539
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
540
    {
541
      send_getPendingPurchaseOrders(warehouseId);
542
      return recv_getPendingPurchaseOrders();
543
    }
544
 
545
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
546
    {
547
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
548
      args.setWarehouseId(warehouseId);
549
      sendBase("getPendingPurchaseOrders", args);
550
    }
551
 
552
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
553
    {
554
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
555
      receiveBase(result, "getPendingPurchaseOrders");
556
      if (result.isSetSuccess()) {
557
        return result.success;
558
      }
559
      if (result.e != null) {
560
        throw result.e;
561
      }
562
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
563
    }
564
 
565
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
566
    {
567
      send_getSuppliers();
568
      return recv_getSuppliers();
569
    }
570
 
571
    public void send_getSuppliers() throws org.apache.thrift.TException
572
    {
573
      getSuppliers_args args = new getSuppliers_args();
574
      sendBase("getSuppliers", args);
575
    }
576
 
577
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
578
    {
579
      getSuppliers_result result = new getSuppliers_result();
580
      receiveBase(result, "getSuppliers");
581
      if (result.isSetSuccess()) {
582
        return result.success;
583
      }
584
      if (result.e != null) {
585
        throw result.e;
586
      }
587
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
588
    }
589
 
590
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
591
    {
592
      send_fulfillPO(purchaseOrderId, itemId, quantity);
593
      recv_fulfillPO();
594
    }
595
 
596
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
597
    {
598
      fulfillPO_args args = new fulfillPO_args();
599
      args.setPurchaseOrderId(purchaseOrderId);
600
      args.setItemId(itemId);
601
      args.setQuantity(quantity);
602
      sendBase("fulfillPO", args);
603
    }
604
 
605
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
606
    {
607
      fulfillPO_result result = new fulfillPO_result();
608
      receiveBase(result, "fulfillPO");
609
      if (result.e != null) {
610
        throw result.e;
611
      }
612
      return;
613
    }
614
 
615
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
616
    {
617
      send_updatePurchaseOrder(purchaseOrder);
618
      recv_updatePurchaseOrder();
619
    }
620
 
621
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
622
    {
623
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
624
      args.setPurchaseOrder(purchaseOrder);
625
      sendBase("updatePurchaseOrder", args);
626
    }
627
 
628
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
629
    {
630
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
631
      receiveBase(result, "updatePurchaseOrder");
632
      if (result.e != null) {
633
        throw result.e;
634
      }
635
      return;
636
    }
637
 
5185 mandeep.dh 638
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
639
    {
640
      send_unFulfillPO(purchaseId, itemId, quantity);
641
      recv_unFulfillPO();
642
    }
643
 
644
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
645
    {
646
      unFulfillPO_args args = new unFulfillPO_args();
647
      args.setPurchaseId(purchaseId);
648
      args.setItemId(itemId);
649
      args.setQuantity(quantity);
650
      sendBase("unFulfillPO", args);
651
    }
652
 
653
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
654
    {
655
      unFulfillPO_result result = new unFulfillPO_result();
656
      receiveBase(result, "unFulfillPO");
657
      if (result.e != null) {
658
        throw result.e;
659
      }
660
      return;
661
    }
662
 
5443 mandeep.dh 663
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
664
    {
665
      send_getInvoices(date);
666
      return recv_getInvoices();
667
    }
668
 
669
    public void send_getInvoices(long date) throws org.apache.thrift.TException
670
    {
671
      getInvoices_args args = new getInvoices_args();
672
      args.setDate(date);
673
      sendBase("getInvoices", args);
674
    }
675
 
676
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
677
    {
678
      getInvoices_result result = new getInvoices_result();
679
      receiveBase(result, "getInvoices");
680
      if (result.isSetSuccess()) {
681
        return result.success;
682
      }
683
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
684
    }
685
 
7410 amar.kumar 686
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
687
    {
688
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
689
      return recv_getInvoicesForWarehouse();
690
    }
691
 
692
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
693
    {
694
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
695
      args.setWarehouseId(warehouseId);
696
      args.setSupplierId(supplierId);
697
      args.setDate(date);
698
      sendBase("getInvoicesForWarehouse", args);
699
    }
700
 
701
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
702
    {
703
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
704
      receiveBase(result, "getInvoicesForWarehouse");
705
      if (result.isSetSuccess()) {
706
        return result.success;
707
      }
708
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
709
    }
710
 
5443 mandeep.dh 711
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
712
    {
713
      send_createInvoice(invoice);
714
      recv_createInvoice();
715
    }
716
 
717
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
718
    {
719
      createInvoice_args args = new createInvoice_args();
720
      args.setInvoice(invoice);
721
      sendBase("createInvoice", args);
722
    }
723
 
724
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
725
    {
726
      createInvoice_result result = new createInvoice_result();
727
      receiveBase(result, "createInvoice");
728
      if (result.e != null) {
729
        throw result.e;
730
      }
731
      return;
732
    }
733
 
5591 mandeep.dh 734
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
735
    {
736
      send_addSupplier(supplier);
737
      return recv_addSupplier();
738
    }
739
 
740
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
741
    {
742
      addSupplier_args args = new addSupplier_args();
743
      args.setSupplier(supplier);
744
      sendBase("addSupplier", args);
745
    }
746
 
747
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
748
    {
749
      addSupplier_result result = new addSupplier_result();
750
      receiveBase(result, "addSupplier");
751
      if (result.isSetSuccess()) {
752
        return result.success;
753
      }
754
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
755
    }
756
 
757
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
758
    {
759
      send_updateSupplier(supplier);
760
      recv_updateSupplier();
761
    }
762
 
763
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
764
    {
765
      updateSupplier_args args = new updateSupplier_args();
766
      args.setSupplier(supplier);
767
      sendBase("updateSupplier", args);
768
    }
769
 
770
    public void recv_updateSupplier() throws org.apache.thrift.TException
771
    {
772
      updateSupplier_result result = new updateSupplier_result();
773
      receiveBase(result, "updateSupplier");
774
      return;
775
    }
776
 
6467 amar.kumar 777
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
778
    {
779
      send_createPurchaseReturn(purchaseReturn);
780
      return recv_createPurchaseReturn();
781
    }
782
 
783
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
784
    {
785
      createPurchaseReturn_args args = new createPurchaseReturn_args();
786
      args.setPurchaseReturn(purchaseReturn);
787
      sendBase("createPurchaseReturn", args);
788
    }
789
 
790
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
791
    {
792
      createPurchaseReturn_result result = new createPurchaseReturn_result();
793
      receiveBase(result, "createPurchaseReturn");
794
      if (result.isSetSuccess()) {
795
        return result.success;
796
      }
797
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
798
    }
799
 
800
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
801
    {
802
      send_settlePurchaseReturn(id);
803
      recv_settlePurchaseReturn();
804
    }
805
 
806
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
807
    {
808
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
809
      args.setId(id);
810
      sendBase("settlePurchaseReturn", args);
811
    }
812
 
813
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
814
    {
815
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
816
      receiveBase(result, "settlePurchaseReturn");
817
      return;
818
    }
819
 
820
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
821
    {
822
      send_getUnsettledPurchaseReturns();
823
      return recv_getUnsettledPurchaseReturns();
824
    }
825
 
826
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
827
    {
828
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
829
      sendBase("getUnsettledPurchaseReturns", args);
830
    }
831
 
832
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
833
    {
834
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
835
      receiveBase(result, "getUnsettledPurchaseReturns");
836
      if (result.isSetSuccess()) {
837
        return result.success;
838
      }
839
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
840
    }
841
 
6630 amar.kumar 842
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
843
    {
844
      send_getInvoice(invoiceNumber, supplierId);
845
      return recv_getInvoice();
846
    }
847
 
848
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
849
    {
850
      getInvoice_args args = new getInvoice_args();
851
      args.setInvoiceNumber(invoiceNumber);
852
      args.setSupplierId(supplierId);
853
      sendBase("getInvoice", args);
854
    }
855
 
856
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
857
    {
858
      getInvoice_result result = new getInvoice_result();
859
      receiveBase(result, "getInvoice");
860
      if (result.isSetSuccess()) {
861
        return result.success;
862
      }
863
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
864
    }
865
 
7672 rajveer 866
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 867
    {
7672 rajveer 868
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 869
      return recv_createPurchaseForOurExtBilling();
870
    }
871
 
7672 rajveer 872
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 873
    {
874
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
875
      args.setInvoiceNumber(invoiceNumber);
876
      args.setUnitPrice(unitPrice);
7672 rajveer 877
      args.setNlc(nlc);
6762 amar.kumar 878
      args.setItemId(itemId);
879
      sendBase("createPurchaseForOurExtBilling", args);
880
    }
881
 
882
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
883
    {
884
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
885
      receiveBase(result, "createPurchaseForOurExtBilling");
886
      if (result.isSetSuccess()) {
887
        return result.success;
888
      }
889
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
890
    }
891
 
892
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
893
    {
894
      send_fulfillPOForExtBilling(itemId, quantity);
895
      recv_fulfillPOForExtBilling();
896
    }
897
 
898
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
899
    {
900
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
901
      args.setItemId(itemId);
902
      args.setQuantity(quantity);
903
      sendBase("fulfillPOForExtBilling", args);
904
    }
905
 
906
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
907
    {
908
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
909
      receiveBase(result, "fulfillPOForExtBilling");
910
      return;
911
    }
912
 
7410 amar.kumar 913
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
914
    {
915
      send_closePO(poId);
916
      recv_closePO();
917
    }
918
 
919
    public void send_closePO(long poId) throws org.apache.thrift.TException
920
    {
921
      closePO_args args = new closePO_args();
922
      args.setPoId(poId);
923
      sendBase("closePO", args);
924
    }
925
 
926
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
927
    {
928
      closePO_result result = new closePO_result();
929
      receiveBase(result, "closePO");
930
      if (result.e != null) {
931
        throw result.e;
932
      }
933
      return;
934
    }
935
 
936
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
937
    {
938
      send_isInvoiceReceived(invoiceNumber, supplierId);
939
      return recv_isInvoiceReceived();
940
    }
941
 
942
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
943
    {
944
      isInvoiceReceived_args args = new isInvoiceReceived_args();
945
      args.setInvoiceNumber(invoiceNumber);
946
      args.setSupplierId(supplierId);
947
      sendBase("isInvoiceReceived", args);
948
    }
949
 
950
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
951
    {
952
      isInvoiceReceived_result result = new isInvoiceReceived_result();
953
      receiveBase(result, "isInvoiceReceived");
954
      if (result.isSetSuccess()) {
955
        return result.success;
956
      }
957
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
958
    }
959
 
4496 mandeep.dh 960
  }
961
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
962
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
963
      private org.apache.thrift.async.TAsyncClientManager clientManager;
964
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
965
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
966
        this.clientManager = clientManager;
967
        this.protocolFactory = protocolFactory;
968
      }
969
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
970
        return new AsyncClient(protocolFactory, clientManager, transport);
971
      }
972
    }
973
 
974
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
975
      super(protocolFactory, clientManager, transport);
976
    }
977
 
978
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
979
      checkReady();
980
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
981
      this.___currentMethod = method_call;
982
      ___manager.call(method_call);
983
    }
984
 
985
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
986
      private PurchaseOrder purchaseOrder;
987
      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 {
988
        super(client, protocolFactory, transport, resultHandler, false);
989
        this.purchaseOrder = purchaseOrder;
990
      }
991
 
992
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
993
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
994
        createPurchaseOrder_args args = new createPurchaseOrder_args();
995
        args.setPurchaseOrder(purchaseOrder);
996
        args.write(prot);
997
        prot.writeMessageEnd();
998
      }
999
 
1000
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1001
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1002
          throw new IllegalStateException("Method call not finished!");
1003
        }
1004
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1005
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1006
        return (new Client(prot)).recv_createPurchaseOrder();
1007
      }
1008
    }
1009
 
1010
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1011
      checkReady();
1012
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1013
      this.___currentMethod = method_call;
1014
      ___manager.call(method_call);
1015
    }
1016
 
1017
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1018
      private long id;
1019
      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 {
1020
        super(client, protocolFactory, transport, resultHandler, false);
1021
        this.id = id;
1022
      }
1023
 
1024
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1025
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1026
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1027
        args.setId(id);
1028
        args.write(prot);
1029
        prot.writeMessageEnd();
1030
      }
1031
 
1032
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1033
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1034
          throw new IllegalStateException("Method call not finished!");
1035
        }
1036
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1037
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1038
        return (new Client(prot)).recv_getPurchaseOrder();
1039
      }
1040
    }
1041
 
1042
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1043
      checkReady();
1044
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1045
      this.___currentMethod = method_call;
1046
      ___manager.call(method_call);
1047
    }
1048
 
1049
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1050
      private POStatus status;
1051
      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 {
1052
        super(client, protocolFactory, transport, resultHandler, false);
1053
        this.status = status;
1054
      }
1055
 
1056
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1057
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1058
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1059
        args.setStatus(status);
1060
        args.write(prot);
1061
        prot.writeMessageEnd();
1062
      }
1063
 
1064
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1065
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1066
          throw new IllegalStateException("Method call not finished!");
1067
        }
1068
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1069
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1070
        return (new Client(prot)).recv_getAllPurchaseOrders();
1071
      }
1072
    }
1073
 
1074
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1075
      checkReady();
1076
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1077
      this.___currentMethod = method_call;
1078
      ___manager.call(method_call);
1079
    }
1080
 
1081
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1082
      private long id;
1083
      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 {
1084
        super(client, protocolFactory, transport, resultHandler, false);
1085
        this.id = id;
1086
      }
1087
 
1088
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1089
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1090
        getSupplier_args args = new getSupplier_args();
1091
        args.setId(id);
1092
        args.write(prot);
1093
        prot.writeMessageEnd();
1094
      }
1095
 
1096
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1097
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1098
          throw new IllegalStateException("Method call not finished!");
1099
        }
1100
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1101
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1102
        return (new Client(prot)).recv_getSupplier();
1103
      }
1104
    }
1105
 
1106
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1107
      checkReady();
1108
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1109
      this.___currentMethod = method_call;
1110
      ___manager.call(method_call);
1111
    }
1112
 
1113
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1114
      private long purchaseOrderId;
1115
      private String invoiceNumber;
1116
      private double freightCharges;
1117
      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 {
1118
        super(client, protocolFactory, transport, resultHandler, false);
1119
        this.purchaseOrderId = purchaseOrderId;
1120
        this.invoiceNumber = invoiceNumber;
1121
        this.freightCharges = freightCharges;
1122
      }
1123
 
1124
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1125
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1126
        startPurchase_args args = new startPurchase_args();
1127
        args.setPurchaseOrderId(purchaseOrderId);
1128
        args.setInvoiceNumber(invoiceNumber);
1129
        args.setFreightCharges(freightCharges);
1130
        args.write(prot);
1131
        prot.writeMessageEnd();
1132
      }
1133
 
1134
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1135
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1136
          throw new IllegalStateException("Method call not finished!");
1137
        }
1138
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1139
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1140
        return (new Client(prot)).recv_startPurchase();
1141
      }
1142
    }
1143
 
1144
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1145
      checkReady();
1146
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1147
      this.___currentMethod = method_call;
1148
      ___manager.call(method_call);
1149
    }
1150
 
1151
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1152
      private long purchaseId;
1153
      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 {
1154
        super(client, protocolFactory, transport, resultHandler, false);
1155
        this.purchaseId = purchaseId;
1156
      }
1157
 
1158
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1159
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1160
        closePurchase_args args = new closePurchase_args();
1161
        args.setPurchaseId(purchaseId);
1162
        args.write(prot);
1163
        prot.writeMessageEnd();
1164
      }
1165
 
1166
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1167
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1168
          throw new IllegalStateException("Method call not finished!");
1169
        }
1170
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1171
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1172
        return (new Client(prot)).recv_closePurchase();
1173
      }
1174
    }
1175
 
1176
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1177
      checkReady();
1178
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1179
      this.___currentMethod = method_call;
1180
      ___manager.call(method_call);
1181
    }
1182
 
1183
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1184
      private long purchaseOrderId;
1185
      private boolean open;
1186
      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 {
1187
        super(client, protocolFactory, transport, resultHandler, false);
1188
        this.purchaseOrderId = purchaseOrderId;
1189
        this.open = open;
1190
      }
1191
 
1192
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1193
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1194
        getAllPurchases_args args = new getAllPurchases_args();
1195
        args.setPurchaseOrderId(purchaseOrderId);
1196
        args.setOpen(open);
1197
        args.write(prot);
1198
        prot.writeMessageEnd();
1199
      }
1200
 
1201
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1202
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1203
          throw new IllegalStateException("Method call not finished!");
1204
        }
1205
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1206
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1207
        return (new Client(prot)).recv_getAllPurchases();
1208
      }
1209
    }
1210
 
6385 amar.kumar 1211
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1212
      checkReady();
1213
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1214
      this.___currentMethod = method_call;
1215
      ___manager.call(method_call);
1216
    }
1217
 
1218
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1219
      private long purchaseOrderId;
1220
      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 {
1221
        super(client, protocolFactory, transport, resultHandler, false);
1222
        this.purchaseOrderId = purchaseOrderId;
1223
      }
1224
 
1225
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1226
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1227
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1228
        args.setPurchaseOrderId(purchaseOrderId);
1229
        args.write(prot);
1230
        prot.writeMessageEnd();
1231
      }
1232
 
1233
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1234
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1235
          throw new IllegalStateException("Method call not finished!");
1236
        }
1237
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1238
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1239
        return (new Client(prot)).recv_getPurchasesForPO();
1240
      }
1241
    }
1242
 
4555 mandeep.dh 1243
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1244
      checkReady();
4555 mandeep.dh 1245
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1246
      this.___currentMethod = method_call;
1247
      ___manager.call(method_call);
1248
    }
1249
 
4555 mandeep.dh 1250
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1251
      private long purchaseId;
4555 mandeep.dh 1252
      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 1253
        super(client, protocolFactory, transport, resultHandler, false);
1254
        this.purchaseId = purchaseId;
1255
      }
1256
 
1257
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1258
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1259
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1260
        args.setPurchaseId(purchaseId);
1261
        args.write(prot);
1262
        prot.writeMessageEnd();
1263
      }
1264
 
4555 mandeep.dh 1265
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1266
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1267
          throw new IllegalStateException("Method call not finished!");
1268
        }
1269
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1270
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1271
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1272
      }
1273
    }
1274
 
4754 mandeep.dh 1275
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1276
      checkReady();
1277
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1278
      this.___currentMethod = method_call;
1279
      ___manager.call(method_call);
1280
    }
1281
 
1282
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1283
      private long warehouseId;
1284
      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 {
1285
        super(client, protocolFactory, transport, resultHandler, false);
1286
        this.warehouseId = warehouseId;
1287
      }
1288
 
1289
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1290
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1291
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1292
        args.setWarehouseId(warehouseId);
1293
        args.write(prot);
1294
        prot.writeMessageEnd();
1295
      }
1296
 
1297
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1298
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1299
          throw new IllegalStateException("Method call not finished!");
1300
        }
1301
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1302
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1303
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1304
      }
1305
    }
1306
 
1307
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1308
      checkReady();
1309
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1310
      this.___currentMethod = method_call;
1311
      ___manager.call(method_call);
1312
    }
1313
 
1314
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1315
      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 {
1316
        super(client, protocolFactory, transport, resultHandler, false);
1317
      }
1318
 
1319
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1320
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1321
        getSuppliers_args args = new getSuppliers_args();
1322
        args.write(prot);
1323
        prot.writeMessageEnd();
1324
      }
1325
 
1326
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1327
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1328
          throw new IllegalStateException("Method call not finished!");
1329
        }
1330
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1331
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1332
        return (new Client(prot)).recv_getSuppliers();
1333
      }
1334
    }
1335
 
1336
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1337
      checkReady();
1338
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1339
      this.___currentMethod = method_call;
1340
      ___manager.call(method_call);
1341
    }
1342
 
1343
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1344
      private long purchaseOrderId;
1345
      private long itemId;
1346
      private long quantity;
1347
      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 {
1348
        super(client, protocolFactory, transport, resultHandler, false);
1349
        this.purchaseOrderId = purchaseOrderId;
1350
        this.itemId = itemId;
1351
        this.quantity = quantity;
1352
      }
1353
 
1354
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1355
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1356
        fulfillPO_args args = new fulfillPO_args();
1357
        args.setPurchaseOrderId(purchaseOrderId);
1358
        args.setItemId(itemId);
1359
        args.setQuantity(quantity);
1360
        args.write(prot);
1361
        prot.writeMessageEnd();
1362
      }
1363
 
1364
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1365
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1366
          throw new IllegalStateException("Method call not finished!");
1367
        }
1368
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1369
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1370
        (new Client(prot)).recv_fulfillPO();
1371
      }
1372
    }
1373
 
1374
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1375
      checkReady();
1376
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1377
      this.___currentMethod = method_call;
1378
      ___manager.call(method_call);
1379
    }
1380
 
1381
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1382
      private PurchaseOrder purchaseOrder;
1383
      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 {
1384
        super(client, protocolFactory, transport, resultHandler, false);
1385
        this.purchaseOrder = purchaseOrder;
1386
      }
1387
 
1388
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1389
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1390
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1391
        args.setPurchaseOrder(purchaseOrder);
1392
        args.write(prot);
1393
        prot.writeMessageEnd();
1394
      }
1395
 
1396
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1397
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1398
          throw new IllegalStateException("Method call not finished!");
1399
        }
1400
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1401
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1402
        (new Client(prot)).recv_updatePurchaseOrder();
1403
      }
1404
    }
1405
 
5185 mandeep.dh 1406
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1407
      checkReady();
1408
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1409
      this.___currentMethod = method_call;
1410
      ___manager.call(method_call);
1411
    }
1412
 
1413
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1414
      private long purchaseId;
1415
      private long itemId;
1416
      private long quantity;
1417
      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 {
1418
        super(client, protocolFactory, transport, resultHandler, false);
1419
        this.purchaseId = purchaseId;
1420
        this.itemId = itemId;
1421
        this.quantity = quantity;
1422
      }
1423
 
1424
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1425
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1426
        unFulfillPO_args args = new unFulfillPO_args();
1427
        args.setPurchaseId(purchaseId);
1428
        args.setItemId(itemId);
1429
        args.setQuantity(quantity);
1430
        args.write(prot);
1431
        prot.writeMessageEnd();
1432
      }
1433
 
1434
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1435
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1436
          throw new IllegalStateException("Method call not finished!");
1437
        }
1438
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1439
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1440
        (new Client(prot)).recv_unFulfillPO();
1441
      }
1442
    }
1443
 
5443 mandeep.dh 1444
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1445
      checkReady();
1446
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1447
      this.___currentMethod = method_call;
1448
      ___manager.call(method_call);
1449
    }
1450
 
1451
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1452
      private long date;
1453
      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 {
1454
        super(client, protocolFactory, transport, resultHandler, false);
1455
        this.date = date;
1456
      }
1457
 
1458
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1459
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1460
        getInvoices_args args = new getInvoices_args();
1461
        args.setDate(date);
1462
        args.write(prot);
1463
        prot.writeMessageEnd();
1464
      }
1465
 
1466
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1467
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1468
          throw new IllegalStateException("Method call not finished!");
1469
        }
1470
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1471
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1472
        return (new Client(prot)).recv_getInvoices();
1473
      }
1474
    }
1475
 
7410 amar.kumar 1476
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1477
      checkReady();
1478
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1479
      this.___currentMethod = method_call;
1480
      ___manager.call(method_call);
1481
    }
1482
 
1483
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1484
      private long warehouseId;
1485
      private long supplierId;
1486
      private long date;
1487
      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 {
1488
        super(client, protocolFactory, transport, resultHandler, false);
1489
        this.warehouseId = warehouseId;
1490
        this.supplierId = supplierId;
1491
        this.date = date;
1492
      }
1493
 
1494
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1495
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1496
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1497
        args.setWarehouseId(warehouseId);
1498
        args.setSupplierId(supplierId);
1499
        args.setDate(date);
1500
        args.write(prot);
1501
        prot.writeMessageEnd();
1502
      }
1503
 
1504
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1505
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1506
          throw new IllegalStateException("Method call not finished!");
1507
        }
1508
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1509
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1510
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1511
      }
1512
    }
1513
 
5443 mandeep.dh 1514
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1515
      checkReady();
1516
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1517
      this.___currentMethod = method_call;
1518
      ___manager.call(method_call);
1519
    }
1520
 
1521
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1522
      private Invoice invoice;
1523
      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 {
1524
        super(client, protocolFactory, transport, resultHandler, false);
1525
        this.invoice = invoice;
1526
      }
1527
 
1528
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1529
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1530
        createInvoice_args args = new createInvoice_args();
1531
        args.setInvoice(invoice);
1532
        args.write(prot);
1533
        prot.writeMessageEnd();
1534
      }
1535
 
1536
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1537
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1538
          throw new IllegalStateException("Method call not finished!");
1539
        }
1540
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1541
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1542
        (new Client(prot)).recv_createInvoice();
1543
      }
1544
    }
1545
 
5591 mandeep.dh 1546
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1547
      checkReady();
1548
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1549
      this.___currentMethod = method_call;
1550
      ___manager.call(method_call);
1551
    }
1552
 
1553
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1554
      private Supplier supplier;
1555
      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 {
1556
        super(client, protocolFactory, transport, resultHandler, false);
1557
        this.supplier = supplier;
1558
      }
1559
 
1560
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1561
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1562
        addSupplier_args args = new addSupplier_args();
1563
        args.setSupplier(supplier);
1564
        args.write(prot);
1565
        prot.writeMessageEnd();
1566
      }
1567
 
1568
      public Supplier getResult() throws org.apache.thrift.TException {
1569
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1570
          throw new IllegalStateException("Method call not finished!");
1571
        }
1572
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1573
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1574
        return (new Client(prot)).recv_addSupplier();
1575
      }
1576
    }
1577
 
1578
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1579
      checkReady();
1580
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1581
      this.___currentMethod = method_call;
1582
      ___manager.call(method_call);
1583
    }
1584
 
1585
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1586
      private Supplier supplier;
1587
      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 {
1588
        super(client, protocolFactory, transport, resultHandler, false);
1589
        this.supplier = supplier;
1590
      }
1591
 
1592
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1593
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1594
        updateSupplier_args args = new updateSupplier_args();
1595
        args.setSupplier(supplier);
1596
        args.write(prot);
1597
        prot.writeMessageEnd();
1598
      }
1599
 
1600
      public void getResult() throws org.apache.thrift.TException {
1601
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1602
          throw new IllegalStateException("Method call not finished!");
1603
        }
1604
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1605
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1606
        (new Client(prot)).recv_updateSupplier();
1607
      }
1608
    }
1609
 
6467 amar.kumar 1610
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1611
      checkReady();
1612
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1613
      this.___currentMethod = method_call;
1614
      ___manager.call(method_call);
1615
    }
1616
 
1617
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1618
      private PurchaseReturn purchaseReturn;
1619
      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 {
1620
        super(client, protocolFactory, transport, resultHandler, false);
1621
        this.purchaseReturn = purchaseReturn;
1622
      }
1623
 
1624
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1625
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1626
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1627
        args.setPurchaseReturn(purchaseReturn);
1628
        args.write(prot);
1629
        prot.writeMessageEnd();
1630
      }
1631
 
1632
      public long getResult() throws org.apache.thrift.TException {
1633
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1634
          throw new IllegalStateException("Method call not finished!");
1635
        }
1636
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1637
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1638
        return (new Client(prot)).recv_createPurchaseReturn();
1639
      }
1640
    }
1641
 
1642
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1643
      checkReady();
1644
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1645
      this.___currentMethod = method_call;
1646
      ___manager.call(method_call);
1647
    }
1648
 
1649
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1650
      private long id;
1651
      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 {
1652
        super(client, protocolFactory, transport, resultHandler, false);
1653
        this.id = id;
1654
      }
1655
 
1656
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1657
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1658
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1659
        args.setId(id);
1660
        args.write(prot);
1661
        prot.writeMessageEnd();
1662
      }
1663
 
1664
      public void getResult() throws org.apache.thrift.TException {
1665
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1666
          throw new IllegalStateException("Method call not finished!");
1667
        }
1668
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1669
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1670
        (new Client(prot)).recv_settlePurchaseReturn();
1671
      }
1672
    }
1673
 
1674
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1675
      checkReady();
1676
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1677
      this.___currentMethod = method_call;
1678
      ___manager.call(method_call);
1679
    }
1680
 
1681
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1682
      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 {
1683
        super(client, protocolFactory, transport, resultHandler, false);
1684
      }
1685
 
1686
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1687
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1688
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1689
        args.write(prot);
1690
        prot.writeMessageEnd();
1691
      }
1692
 
1693
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1694
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1695
          throw new IllegalStateException("Method call not finished!");
1696
        }
1697
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1698
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1699
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1700
      }
1701
    }
1702
 
6630 amar.kumar 1703
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1704
      checkReady();
1705
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1706
      this.___currentMethod = method_call;
1707
      ___manager.call(method_call);
1708
    }
1709
 
1710
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1711
      private String invoiceNumber;
1712
      private long supplierId;
1713
      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 {
1714
        super(client, protocolFactory, transport, resultHandler, false);
1715
        this.invoiceNumber = invoiceNumber;
1716
        this.supplierId = supplierId;
1717
      }
1718
 
1719
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1720
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1721
        getInvoice_args args = new getInvoice_args();
1722
        args.setInvoiceNumber(invoiceNumber);
1723
        args.setSupplierId(supplierId);
1724
        args.write(prot);
1725
        prot.writeMessageEnd();
1726
      }
1727
 
1728
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1729
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1730
          throw new IllegalStateException("Method call not finished!");
1731
        }
1732
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1733
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1734
        return (new Client(prot)).recv_getInvoice();
1735
      }
1736
    }
1737
 
7672 rajveer 1738
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException {
6762 amar.kumar 1739
      checkReady();
7672 rajveer 1740
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1741
      this.___currentMethod = method_call;
1742
      ___manager.call(method_call);
1743
    }
1744
 
1745
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1746
      private String invoiceNumber;
1747
      private double unitPrice;
7672 rajveer 1748
      private double nlc;
6762 amar.kumar 1749
      private long itemId;
7672 rajveer 1750
      public createPurchaseForOurExtBilling_call(String invoiceNumber, double unitPrice, double nlc, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
6762 amar.kumar 1751
        super(client, protocolFactory, transport, resultHandler, false);
1752
        this.invoiceNumber = invoiceNumber;
1753
        this.unitPrice = unitPrice;
7672 rajveer 1754
        this.nlc = nlc;
6762 amar.kumar 1755
        this.itemId = itemId;
1756
      }
1757
 
1758
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1759
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1760
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1761
        args.setInvoiceNumber(invoiceNumber);
1762
        args.setUnitPrice(unitPrice);
7672 rajveer 1763
        args.setNlc(nlc);
6762 amar.kumar 1764
        args.setItemId(itemId);
1765
        args.write(prot);
1766
        prot.writeMessageEnd();
1767
      }
1768
 
1769
      public long getResult() throws org.apache.thrift.TException {
1770
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1771
          throw new IllegalStateException("Method call not finished!");
1772
        }
1773
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1774
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1775
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1776
      }
1777
    }
1778
 
1779
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1780
      checkReady();
1781
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1782
      this.___currentMethod = method_call;
1783
      ___manager.call(method_call);
1784
    }
1785
 
1786
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1787
      private long itemId;
1788
      private long quantity;
1789
      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 {
1790
        super(client, protocolFactory, transport, resultHandler, false);
1791
        this.itemId = itemId;
1792
        this.quantity = quantity;
1793
      }
1794
 
1795
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1796
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1797
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1798
        args.setItemId(itemId);
1799
        args.setQuantity(quantity);
1800
        args.write(prot);
1801
        prot.writeMessageEnd();
1802
      }
1803
 
1804
      public void getResult() throws org.apache.thrift.TException {
1805
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1806
          throw new IllegalStateException("Method call not finished!");
1807
        }
1808
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1809
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1810
        (new Client(prot)).recv_fulfillPOForExtBilling();
1811
      }
1812
    }
1813
 
7410 amar.kumar 1814
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
1815
      checkReady();
1816
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
1817
      this.___currentMethod = method_call;
1818
      ___manager.call(method_call);
1819
    }
1820
 
1821
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
1822
      private long poId;
1823
      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 {
1824
        super(client, protocolFactory, transport, resultHandler, false);
1825
        this.poId = poId;
1826
      }
1827
 
1828
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1829
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1830
        closePO_args args = new closePO_args();
1831
        args.setPoId(poId);
1832
        args.write(prot);
1833
        prot.writeMessageEnd();
1834
      }
1835
 
1836
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1837
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1838
          throw new IllegalStateException("Method call not finished!");
1839
        }
1840
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1841
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1842
        (new Client(prot)).recv_closePO();
1843
      }
1844
    }
1845
 
1846
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
1847
      checkReady();
1848
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1849
      this.___currentMethod = method_call;
1850
      ___manager.call(method_call);
1851
    }
1852
 
1853
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
1854
      private String invoiceNumber;
1855
      private long supplierId;
1856
      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 {
1857
        super(client, protocolFactory, transport, resultHandler, false);
1858
        this.invoiceNumber = invoiceNumber;
1859
        this.supplierId = supplierId;
1860
      }
1861
 
1862
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1863
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
1864
        isInvoiceReceived_args args = new isInvoiceReceived_args();
1865
        args.setInvoiceNumber(invoiceNumber);
1866
        args.setSupplierId(supplierId);
1867
        args.write(prot);
1868
        prot.writeMessageEnd();
1869
      }
1870
 
1871
      public boolean getResult() throws org.apache.thrift.TException {
1872
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1873
          throw new IllegalStateException("Method call not finished!");
1874
        }
1875
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1876
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1877
        return (new Client(prot)).recv_isInvoiceReceived();
1878
      }
1879
    }
1880
 
4496 mandeep.dh 1881
  }
1882
 
1883
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1884
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1885
    public Processor(I iface) {
1886
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1887
    }
1888
 
1889
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1890
      super(iface, getProcessMap(processMap));
1891
    }
1892
 
1893
    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) {
1894
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1895
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1896
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1897
      processMap.put("getSupplier", new getSupplier());
1898
      processMap.put("startPurchase", new startPurchase());
1899
      processMap.put("closePurchase", new closePurchase());
1900
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 1901
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 1902
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1903
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1904
      processMap.put("getSuppliers", new getSuppliers());
1905
      processMap.put("fulfillPO", new fulfillPO());
1906
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1907
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1908
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 1909
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 1910
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1911
      processMap.put("addSupplier", new addSupplier());
1912
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 1913
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1914
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1915
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 1916
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 1917
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
1918
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 1919
      processMap.put("closePO", new closePO());
1920
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
4496 mandeep.dh 1921
      return processMap;
1922
    }
1923
 
1924
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1925
      public createPurchaseOrder() {
1926
        super("createPurchaseOrder");
1927
      }
1928
 
1929
      protected createPurchaseOrder_args getEmptyArgsInstance() {
1930
        return new createPurchaseOrder_args();
1931
      }
1932
 
1933
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1934
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1935
        try {
1936
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1937
          result.setSuccessIsSet(true);
1938
        } catch (PurchaseServiceException e) {
1939
          result.e = e;
1940
        }
1941
        return result;
1942
      }
1943
    }
1944
 
1945
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1946
      public getPurchaseOrder() {
1947
        super("getPurchaseOrder");
1948
      }
1949
 
1950
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1951
        return new getPurchaseOrder_args();
1952
      }
1953
 
1954
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1955
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1956
        try {
1957
          result.success = iface.getPurchaseOrder(args.id);
1958
        } catch (PurchaseServiceException e) {
1959
          result.e = e;
1960
        }
1961
        return result;
1962
      }
1963
    }
1964
 
1965
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1966
      public getAllPurchaseOrders() {
1967
        super("getAllPurchaseOrders");
1968
      }
1969
 
1970
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1971
        return new getAllPurchaseOrders_args();
1972
      }
1973
 
1974
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1975
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1976
        try {
1977
          result.success = iface.getAllPurchaseOrders(args.status);
1978
        } catch (PurchaseServiceException e) {
1979
          result.e = e;
1980
        }
1981
        return result;
1982
      }
1983
    }
1984
 
1985
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1986
      public getSupplier() {
1987
        super("getSupplier");
1988
      }
1989
 
1990
      protected getSupplier_args getEmptyArgsInstance() {
1991
        return new getSupplier_args();
1992
      }
1993
 
1994
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1995
        getSupplier_result result = new getSupplier_result();
1996
        try {
1997
          result.success = iface.getSupplier(args.id);
1998
        } catch (PurchaseServiceException e) {
1999
          result.e = e;
2000
        }
2001
        return result;
2002
      }
2003
    }
2004
 
2005
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2006
      public startPurchase() {
2007
        super("startPurchase");
2008
      }
2009
 
2010
      protected startPurchase_args getEmptyArgsInstance() {
2011
        return new startPurchase_args();
2012
      }
2013
 
2014
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2015
        startPurchase_result result = new startPurchase_result();
2016
        try {
2017
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
2018
          result.setSuccessIsSet(true);
2019
        } catch (PurchaseServiceException e) {
2020
          result.e = e;
2021
        }
2022
        return result;
2023
      }
2024
    }
2025
 
2026
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2027
      public closePurchase() {
2028
        super("closePurchase");
2029
      }
2030
 
2031
      protected closePurchase_args getEmptyArgsInstance() {
2032
        return new closePurchase_args();
2033
      }
2034
 
2035
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2036
        closePurchase_result result = new closePurchase_result();
2037
        try {
2038
          result.success = iface.closePurchase(args.purchaseId);
2039
          result.setSuccessIsSet(true);
2040
        } catch (PurchaseServiceException e) {
2041
          result.e = e;
2042
        }
2043
        return result;
2044
      }
2045
    }
2046
 
2047
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2048
      public getAllPurchases() {
2049
        super("getAllPurchases");
2050
      }
2051
 
2052
      protected getAllPurchases_args getEmptyArgsInstance() {
2053
        return new getAllPurchases_args();
2054
      }
2055
 
2056
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2057
        getAllPurchases_result result = new getAllPurchases_result();
2058
        try {
2059
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2060
        } catch (PurchaseServiceException e) {
2061
          result.e = e;
2062
        }
2063
        return result;
2064
      }
2065
    }
2066
 
6385 amar.kumar 2067
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2068
      public getPurchasesForPO() {
2069
        super("getPurchasesForPO");
2070
      }
2071
 
2072
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2073
        return new getPurchasesForPO_args();
2074
      }
2075
 
2076
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2077
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2078
        try {
2079
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2080
        } catch (PurchaseServiceException e) {
2081
          result.e = e;
2082
        }
2083
        return result;
2084
      }
2085
    }
2086
 
4555 mandeep.dh 2087
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2088
      public getPurchaseOrderForPurchase() {
2089
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2090
      }
2091
 
4555 mandeep.dh 2092
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2093
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2094
      }
2095
 
4555 mandeep.dh 2096
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2097
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2098
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2099
        return result;
2100
      }
2101
    }
2102
 
4754 mandeep.dh 2103
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2104
      public getPendingPurchaseOrders() {
2105
        super("getPendingPurchaseOrders");
2106
      }
2107
 
2108
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2109
        return new getPendingPurchaseOrders_args();
2110
      }
2111
 
2112
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2113
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2114
        try {
2115
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2116
        } catch (PurchaseServiceException e) {
2117
          result.e = e;
2118
        }
2119
        return result;
2120
      }
2121
    }
2122
 
2123
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2124
      public getSuppliers() {
2125
        super("getSuppliers");
2126
      }
2127
 
2128
      protected getSuppliers_args getEmptyArgsInstance() {
2129
        return new getSuppliers_args();
2130
      }
2131
 
2132
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2133
        getSuppliers_result result = new getSuppliers_result();
2134
        try {
2135
          result.success = iface.getSuppliers();
2136
        } catch (PurchaseServiceException e) {
2137
          result.e = e;
2138
        }
2139
        return result;
2140
      }
2141
    }
2142
 
2143
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2144
      public fulfillPO() {
2145
        super("fulfillPO");
2146
      }
2147
 
2148
      protected fulfillPO_args getEmptyArgsInstance() {
2149
        return new fulfillPO_args();
2150
      }
2151
 
2152
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2153
        fulfillPO_result result = new fulfillPO_result();
2154
        try {
2155
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2156
        } catch (PurchaseServiceException e) {
2157
          result.e = e;
2158
        }
2159
        return result;
2160
      }
2161
    }
2162
 
2163
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2164
      public updatePurchaseOrder() {
2165
        super("updatePurchaseOrder");
2166
      }
2167
 
2168
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2169
        return new updatePurchaseOrder_args();
2170
      }
2171
 
2172
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2173
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2174
        try {
2175
          iface.updatePurchaseOrder(args.purchaseOrder);
2176
        } catch (PurchaseServiceException e) {
2177
          result.e = e;
2178
        }
2179
        return result;
2180
      }
2181
    }
2182
 
5185 mandeep.dh 2183
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2184
      public unFulfillPO() {
2185
        super("unFulfillPO");
2186
      }
2187
 
2188
      protected unFulfillPO_args getEmptyArgsInstance() {
2189
        return new unFulfillPO_args();
2190
      }
2191
 
2192
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2193
        unFulfillPO_result result = new unFulfillPO_result();
2194
        try {
2195
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2196
        } catch (PurchaseServiceException e) {
2197
          result.e = e;
2198
        }
2199
        return result;
2200
      }
2201
    }
2202
 
5443 mandeep.dh 2203
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2204
      public getInvoices() {
2205
        super("getInvoices");
2206
      }
2207
 
2208
      protected getInvoices_args getEmptyArgsInstance() {
2209
        return new getInvoices_args();
2210
      }
2211
 
2212
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2213
        getInvoices_result result = new getInvoices_result();
2214
        result.success = iface.getInvoices(args.date);
2215
        return result;
2216
      }
2217
    }
2218
 
7410 amar.kumar 2219
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2220
      public getInvoicesForWarehouse() {
2221
        super("getInvoicesForWarehouse");
2222
      }
2223
 
2224
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2225
        return new getInvoicesForWarehouse_args();
2226
      }
2227
 
2228
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2229
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2230
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2231
        return result;
2232
      }
2233
    }
2234
 
5443 mandeep.dh 2235
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2236
      public createInvoice() {
2237
        super("createInvoice");
2238
      }
2239
 
2240
      protected createInvoice_args getEmptyArgsInstance() {
2241
        return new createInvoice_args();
2242
      }
2243
 
2244
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2245
        createInvoice_result result = new createInvoice_result();
2246
        try {
2247
          iface.createInvoice(args.invoice);
2248
        } catch (PurchaseServiceException e) {
2249
          result.e = e;
2250
        }
2251
        return result;
2252
      }
2253
    }
2254
 
5591 mandeep.dh 2255
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2256
      public addSupplier() {
2257
        super("addSupplier");
2258
      }
2259
 
2260
      protected addSupplier_args getEmptyArgsInstance() {
2261
        return new addSupplier_args();
2262
      }
2263
 
2264
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2265
        addSupplier_result result = new addSupplier_result();
2266
        result.success = iface.addSupplier(args.supplier);
2267
        return result;
2268
      }
2269
    }
2270
 
2271
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2272
      public updateSupplier() {
2273
        super("updateSupplier");
2274
      }
2275
 
2276
      protected updateSupplier_args getEmptyArgsInstance() {
2277
        return new updateSupplier_args();
2278
      }
2279
 
2280
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2281
        updateSupplier_result result = new updateSupplier_result();
2282
        iface.updateSupplier(args.supplier);
2283
        return result;
2284
      }
2285
    }
2286
 
6467 amar.kumar 2287
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2288
      public createPurchaseReturn() {
2289
        super("createPurchaseReturn");
2290
      }
2291
 
2292
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2293
        return new createPurchaseReturn_args();
2294
      }
2295
 
2296
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2297
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2298
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2299
        result.setSuccessIsSet(true);
2300
        return result;
2301
      }
2302
    }
2303
 
2304
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2305
      public settlePurchaseReturn() {
2306
        super("settlePurchaseReturn");
2307
      }
2308
 
2309
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2310
        return new settlePurchaseReturn_args();
2311
      }
2312
 
2313
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2314
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2315
        iface.settlePurchaseReturn(args.id);
2316
        return result;
2317
      }
2318
    }
2319
 
2320
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2321
      public getUnsettledPurchaseReturns() {
2322
        super("getUnsettledPurchaseReturns");
2323
      }
2324
 
2325
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2326
        return new getUnsettledPurchaseReturns_args();
2327
      }
2328
 
2329
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2330
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2331
        result.success = iface.getUnsettledPurchaseReturns();
2332
        return result;
2333
      }
2334
    }
2335
 
6630 amar.kumar 2336
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2337
      public getInvoice() {
2338
        super("getInvoice");
2339
      }
2340
 
2341
      protected getInvoice_args getEmptyArgsInstance() {
2342
        return new getInvoice_args();
2343
      }
2344
 
2345
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2346
        getInvoice_result result = new getInvoice_result();
2347
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2348
        return result;
2349
      }
2350
    }
2351
 
6762 amar.kumar 2352
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2353
      public createPurchaseForOurExtBilling() {
2354
        super("createPurchaseForOurExtBilling");
2355
      }
2356
 
2357
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2358
        return new createPurchaseForOurExtBilling_args();
2359
      }
2360
 
2361
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2362
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2363
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2364
        result.setSuccessIsSet(true);
2365
        return result;
2366
      }
2367
    }
2368
 
2369
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2370
      public fulfillPOForExtBilling() {
2371
        super("fulfillPOForExtBilling");
2372
      }
2373
 
2374
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2375
        return new fulfillPOForExtBilling_args();
2376
      }
2377
 
2378
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2379
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2380
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2381
        return result;
2382
      }
2383
    }
2384
 
7410 amar.kumar 2385
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2386
      public closePO() {
2387
        super("closePO");
2388
      }
2389
 
2390
      protected closePO_args getEmptyArgsInstance() {
2391
        return new closePO_args();
2392
      }
2393
 
2394
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2395
        closePO_result result = new closePO_result();
2396
        try {
2397
          iface.closePO(args.poId);
2398
        } catch (PurchaseServiceException e) {
2399
          result.e = e;
2400
        }
2401
        return result;
2402
      }
2403
    }
2404
 
2405
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2406
      public isInvoiceReceived() {
2407
        super("isInvoiceReceived");
2408
      }
2409
 
2410
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2411
        return new isInvoiceReceived_args();
2412
      }
2413
 
2414
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2415
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2416
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2417
        result.setSuccessIsSet(true);
2418
        return result;
2419
      }
2420
    }
2421
 
4496 mandeep.dh 2422
  }
2423
 
2424
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2425
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2426
 
2427
    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);
2428
 
2429
    private PurchaseOrder purchaseOrder; // required
2430
 
2431
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2432
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2433
      PURCHASE_ORDER((short)1, "purchaseOrder");
2434
 
2435
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2436
 
2437
      static {
2438
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2439
          byName.put(field.getFieldName(), field);
2440
        }
2441
      }
2442
 
2443
      /**
2444
       * Find the _Fields constant that matches fieldId, or null if its not found.
2445
       */
2446
      public static _Fields findByThriftId(int fieldId) {
2447
        switch(fieldId) {
2448
          case 1: // PURCHASE_ORDER
2449
            return PURCHASE_ORDER;
2450
          default:
2451
            return null;
2452
        }
2453
      }
2454
 
2455
      /**
2456
       * Find the _Fields constant that matches fieldId, throwing an exception
2457
       * if it is not found.
2458
       */
2459
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2460
        _Fields fields = findByThriftId(fieldId);
2461
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2462
        return fields;
2463
      }
2464
 
2465
      /**
2466
       * Find the _Fields constant that matches name, or null if its not found.
2467
       */
2468
      public static _Fields findByName(String name) {
2469
        return byName.get(name);
2470
      }
2471
 
2472
      private final short _thriftId;
2473
      private final String _fieldName;
2474
 
2475
      _Fields(short thriftId, String fieldName) {
2476
        _thriftId = thriftId;
2477
        _fieldName = fieldName;
2478
      }
2479
 
2480
      public short getThriftFieldId() {
2481
        return _thriftId;
2482
      }
2483
 
2484
      public String getFieldName() {
2485
        return _fieldName;
2486
      }
2487
    }
2488
 
2489
    // isset id assignments
2490
 
2491
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2492
    static {
2493
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2494
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2495
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2496
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2497
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2498
    }
2499
 
2500
    public createPurchaseOrder_args() {
2501
    }
2502
 
2503
    public createPurchaseOrder_args(
2504
      PurchaseOrder purchaseOrder)
2505
    {
2506
      this();
2507
      this.purchaseOrder = purchaseOrder;
2508
    }
2509
 
2510
    /**
2511
     * Performs a deep copy on <i>other</i>.
2512
     */
2513
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2514
      if (other.isSetPurchaseOrder()) {
2515
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2516
      }
2517
    }
2518
 
2519
    public createPurchaseOrder_args deepCopy() {
2520
      return new createPurchaseOrder_args(this);
2521
    }
2522
 
2523
    @Override
2524
    public void clear() {
2525
      this.purchaseOrder = null;
2526
    }
2527
 
2528
    public PurchaseOrder getPurchaseOrder() {
2529
      return this.purchaseOrder;
2530
    }
2531
 
2532
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2533
      this.purchaseOrder = purchaseOrder;
2534
    }
2535
 
2536
    public void unsetPurchaseOrder() {
2537
      this.purchaseOrder = null;
2538
    }
2539
 
2540
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2541
    public boolean isSetPurchaseOrder() {
2542
      return this.purchaseOrder != null;
2543
    }
2544
 
2545
    public void setPurchaseOrderIsSet(boolean value) {
2546
      if (!value) {
2547
        this.purchaseOrder = null;
2548
      }
2549
    }
2550
 
2551
    public void setFieldValue(_Fields field, Object value) {
2552
      switch (field) {
2553
      case PURCHASE_ORDER:
2554
        if (value == null) {
2555
          unsetPurchaseOrder();
2556
        } else {
2557
          setPurchaseOrder((PurchaseOrder)value);
2558
        }
2559
        break;
2560
 
2561
      }
2562
    }
2563
 
2564
    public Object getFieldValue(_Fields field) {
2565
      switch (field) {
2566
      case PURCHASE_ORDER:
2567
        return getPurchaseOrder();
2568
 
2569
      }
2570
      throw new IllegalStateException();
2571
    }
2572
 
2573
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2574
    public boolean isSet(_Fields field) {
2575
      if (field == null) {
2576
        throw new IllegalArgumentException();
2577
      }
2578
 
2579
      switch (field) {
2580
      case PURCHASE_ORDER:
2581
        return isSetPurchaseOrder();
2582
      }
2583
      throw new IllegalStateException();
2584
    }
2585
 
2586
    @Override
2587
    public boolean equals(Object that) {
2588
      if (that == null)
2589
        return false;
2590
      if (that instanceof createPurchaseOrder_args)
2591
        return this.equals((createPurchaseOrder_args)that);
2592
      return false;
2593
    }
2594
 
2595
    public boolean equals(createPurchaseOrder_args that) {
2596
      if (that == null)
2597
        return false;
2598
 
2599
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2600
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2601
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2602
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2603
          return false;
2604
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2605
          return false;
2606
      }
2607
 
2608
      return true;
2609
    }
2610
 
2611
    @Override
2612
    public int hashCode() {
2613
      return 0;
2614
    }
2615
 
2616
    public int compareTo(createPurchaseOrder_args other) {
2617
      if (!getClass().equals(other.getClass())) {
2618
        return getClass().getName().compareTo(other.getClass().getName());
2619
      }
2620
 
2621
      int lastComparison = 0;
2622
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2623
 
2624
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2625
      if (lastComparison != 0) {
2626
        return lastComparison;
2627
      }
2628
      if (isSetPurchaseOrder()) {
2629
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2630
        if (lastComparison != 0) {
2631
          return lastComparison;
2632
        }
2633
      }
2634
      return 0;
2635
    }
2636
 
2637
    public _Fields fieldForId(int fieldId) {
2638
      return _Fields.findByThriftId(fieldId);
2639
    }
2640
 
2641
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2642
      org.apache.thrift.protocol.TField field;
2643
      iprot.readStructBegin();
2644
      while (true)
2645
      {
2646
        field = iprot.readFieldBegin();
2647
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2648
          break;
2649
        }
2650
        switch (field.id) {
2651
          case 1: // PURCHASE_ORDER
2652
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2653
              this.purchaseOrder = new PurchaseOrder();
2654
              this.purchaseOrder.read(iprot);
2655
            } else { 
2656
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2657
            }
2658
            break;
2659
          default:
2660
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2661
        }
2662
        iprot.readFieldEnd();
2663
      }
2664
      iprot.readStructEnd();
2665
      validate();
2666
    }
2667
 
2668
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2669
      validate();
2670
 
2671
      oprot.writeStructBegin(STRUCT_DESC);
2672
      if (this.purchaseOrder != null) {
2673
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2674
        this.purchaseOrder.write(oprot);
2675
        oprot.writeFieldEnd();
2676
      }
2677
      oprot.writeFieldStop();
2678
      oprot.writeStructEnd();
2679
    }
2680
 
2681
    @Override
2682
    public String toString() {
2683
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2684
      boolean first = true;
2685
 
2686
      sb.append("purchaseOrder:");
2687
      if (this.purchaseOrder == null) {
2688
        sb.append("null");
2689
      } else {
2690
        sb.append(this.purchaseOrder);
2691
      }
2692
      first = false;
2693
      sb.append(")");
2694
      return sb.toString();
2695
    }
2696
 
2697
    public void validate() throws org.apache.thrift.TException {
2698
      // check for required fields
2699
    }
2700
 
2701
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2702
      try {
2703
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2704
      } catch (org.apache.thrift.TException te) {
2705
        throw new java.io.IOException(te);
2706
      }
2707
    }
2708
 
2709
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2710
      try {
2711
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2712
      } catch (org.apache.thrift.TException te) {
2713
        throw new java.io.IOException(te);
2714
      }
2715
    }
2716
 
2717
  }
2718
 
2719
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2720
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2721
 
2722
    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);
2723
    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);
2724
 
2725
    private long success; // required
2726
    private PurchaseServiceException e; // required
2727
 
2728
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2729
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2730
      SUCCESS((short)0, "success"),
2731
      E((short)1, "e");
2732
 
2733
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2734
 
2735
      static {
2736
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2737
          byName.put(field.getFieldName(), field);
2738
        }
2739
      }
2740
 
2741
      /**
2742
       * Find the _Fields constant that matches fieldId, or null if its not found.
2743
       */
2744
      public static _Fields findByThriftId(int fieldId) {
2745
        switch(fieldId) {
2746
          case 0: // SUCCESS
2747
            return SUCCESS;
2748
          case 1: // E
2749
            return E;
2750
          default:
2751
            return null;
2752
        }
2753
      }
2754
 
2755
      /**
2756
       * Find the _Fields constant that matches fieldId, throwing an exception
2757
       * if it is not found.
2758
       */
2759
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2760
        _Fields fields = findByThriftId(fieldId);
2761
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2762
        return fields;
2763
      }
2764
 
2765
      /**
2766
       * Find the _Fields constant that matches name, or null if its not found.
2767
       */
2768
      public static _Fields findByName(String name) {
2769
        return byName.get(name);
2770
      }
2771
 
2772
      private final short _thriftId;
2773
      private final String _fieldName;
2774
 
2775
      _Fields(short thriftId, String fieldName) {
2776
        _thriftId = thriftId;
2777
        _fieldName = fieldName;
2778
      }
2779
 
2780
      public short getThriftFieldId() {
2781
        return _thriftId;
2782
      }
2783
 
2784
      public String getFieldName() {
2785
        return _fieldName;
2786
      }
2787
    }
2788
 
2789
    // isset id assignments
2790
    private static final int __SUCCESS_ISSET_ID = 0;
2791
    private BitSet __isset_bit_vector = new BitSet(1);
2792
 
2793
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2794
    static {
2795
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2796
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2797
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2798
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2799
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2800
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2801
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2802
    }
2803
 
2804
    public createPurchaseOrder_result() {
2805
    }
2806
 
2807
    public createPurchaseOrder_result(
2808
      long success,
2809
      PurchaseServiceException e)
2810
    {
2811
      this();
2812
      this.success = success;
2813
      setSuccessIsSet(true);
2814
      this.e = e;
2815
    }
2816
 
2817
    /**
2818
     * Performs a deep copy on <i>other</i>.
2819
     */
2820
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
2821
      __isset_bit_vector.clear();
2822
      __isset_bit_vector.or(other.__isset_bit_vector);
2823
      this.success = other.success;
2824
      if (other.isSetE()) {
2825
        this.e = new PurchaseServiceException(other.e);
2826
      }
2827
    }
2828
 
2829
    public createPurchaseOrder_result deepCopy() {
2830
      return new createPurchaseOrder_result(this);
2831
    }
2832
 
2833
    @Override
2834
    public void clear() {
2835
      setSuccessIsSet(false);
2836
      this.success = 0;
2837
      this.e = null;
2838
    }
2839
 
2840
    public long getSuccess() {
2841
      return this.success;
2842
    }
2843
 
2844
    public void setSuccess(long success) {
2845
      this.success = success;
2846
      setSuccessIsSet(true);
2847
    }
2848
 
2849
    public void unsetSuccess() {
2850
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2851
    }
2852
 
2853
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2854
    public boolean isSetSuccess() {
2855
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2856
    }
2857
 
2858
    public void setSuccessIsSet(boolean value) {
2859
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2860
    }
2861
 
2862
    public PurchaseServiceException getE() {
2863
      return this.e;
2864
    }
2865
 
2866
    public void setE(PurchaseServiceException e) {
2867
      this.e = e;
2868
    }
2869
 
2870
    public void unsetE() {
2871
      this.e = null;
2872
    }
2873
 
2874
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2875
    public boolean isSetE() {
2876
      return this.e != null;
2877
    }
2878
 
2879
    public void setEIsSet(boolean value) {
2880
      if (!value) {
2881
        this.e = null;
2882
      }
2883
    }
2884
 
2885
    public void setFieldValue(_Fields field, Object value) {
2886
      switch (field) {
2887
      case SUCCESS:
2888
        if (value == null) {
2889
          unsetSuccess();
2890
        } else {
2891
          setSuccess((Long)value);
2892
        }
2893
        break;
2894
 
2895
      case E:
2896
        if (value == null) {
2897
          unsetE();
2898
        } else {
2899
          setE((PurchaseServiceException)value);
2900
        }
2901
        break;
2902
 
2903
      }
2904
    }
2905
 
2906
    public Object getFieldValue(_Fields field) {
2907
      switch (field) {
2908
      case SUCCESS:
2909
        return Long.valueOf(getSuccess());
2910
 
2911
      case E:
2912
        return getE();
2913
 
2914
      }
2915
      throw new IllegalStateException();
2916
    }
2917
 
2918
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2919
    public boolean isSet(_Fields field) {
2920
      if (field == null) {
2921
        throw new IllegalArgumentException();
2922
      }
2923
 
2924
      switch (field) {
2925
      case SUCCESS:
2926
        return isSetSuccess();
2927
      case E:
2928
        return isSetE();
2929
      }
2930
      throw new IllegalStateException();
2931
    }
2932
 
2933
    @Override
2934
    public boolean equals(Object that) {
2935
      if (that == null)
2936
        return false;
2937
      if (that instanceof createPurchaseOrder_result)
2938
        return this.equals((createPurchaseOrder_result)that);
2939
      return false;
2940
    }
2941
 
2942
    public boolean equals(createPurchaseOrder_result that) {
2943
      if (that == null)
2944
        return false;
2945
 
2946
      boolean this_present_success = true;
2947
      boolean that_present_success = true;
2948
      if (this_present_success || that_present_success) {
2949
        if (!(this_present_success && that_present_success))
2950
          return false;
2951
        if (this.success != that.success)
2952
          return false;
2953
      }
2954
 
2955
      boolean this_present_e = true && this.isSetE();
2956
      boolean that_present_e = true && that.isSetE();
2957
      if (this_present_e || that_present_e) {
2958
        if (!(this_present_e && that_present_e))
2959
          return false;
2960
        if (!this.e.equals(that.e))
2961
          return false;
2962
      }
2963
 
2964
      return true;
2965
    }
2966
 
2967
    @Override
2968
    public int hashCode() {
2969
      return 0;
2970
    }
2971
 
2972
    public int compareTo(createPurchaseOrder_result other) {
2973
      if (!getClass().equals(other.getClass())) {
2974
        return getClass().getName().compareTo(other.getClass().getName());
2975
      }
2976
 
2977
      int lastComparison = 0;
2978
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
2979
 
2980
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2981
      if (lastComparison != 0) {
2982
        return lastComparison;
2983
      }
2984
      if (isSetSuccess()) {
2985
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2986
        if (lastComparison != 0) {
2987
          return lastComparison;
2988
        }
2989
      }
2990
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2991
      if (lastComparison != 0) {
2992
        return lastComparison;
2993
      }
2994
      if (isSetE()) {
2995
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2996
        if (lastComparison != 0) {
2997
          return lastComparison;
2998
        }
2999
      }
3000
      return 0;
3001
    }
3002
 
3003
    public _Fields fieldForId(int fieldId) {
3004
      return _Fields.findByThriftId(fieldId);
3005
    }
3006
 
3007
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3008
      org.apache.thrift.protocol.TField field;
3009
      iprot.readStructBegin();
3010
      while (true)
3011
      {
3012
        field = iprot.readFieldBegin();
3013
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3014
          break;
3015
        }
3016
        switch (field.id) {
3017
          case 0: // SUCCESS
3018
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3019
              this.success = iprot.readI64();
3020
              setSuccessIsSet(true);
3021
            } else { 
3022
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3023
            }
3024
            break;
3025
          case 1: // E
3026
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3027
              this.e = new PurchaseServiceException();
3028
              this.e.read(iprot);
3029
            } else { 
3030
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3031
            }
3032
            break;
3033
          default:
3034
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3035
        }
3036
        iprot.readFieldEnd();
3037
      }
3038
      iprot.readStructEnd();
3039
      validate();
3040
    }
3041
 
3042
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3043
      oprot.writeStructBegin(STRUCT_DESC);
3044
 
3045
      if (this.isSetSuccess()) {
3046
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3047
        oprot.writeI64(this.success);
3048
        oprot.writeFieldEnd();
3049
      } else if (this.isSetE()) {
3050
        oprot.writeFieldBegin(E_FIELD_DESC);
3051
        this.e.write(oprot);
3052
        oprot.writeFieldEnd();
3053
      }
3054
      oprot.writeFieldStop();
3055
      oprot.writeStructEnd();
3056
    }
3057
 
3058
    @Override
3059
    public String toString() {
3060
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3061
      boolean first = true;
3062
 
3063
      sb.append("success:");
3064
      sb.append(this.success);
3065
      first = false;
3066
      if (!first) sb.append(", ");
3067
      sb.append("e:");
3068
      if (this.e == null) {
3069
        sb.append("null");
3070
      } else {
3071
        sb.append(this.e);
3072
      }
3073
      first = false;
3074
      sb.append(")");
3075
      return sb.toString();
3076
    }
3077
 
3078
    public void validate() throws org.apache.thrift.TException {
3079
      // check for required fields
3080
    }
3081
 
3082
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3083
      try {
3084
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3085
      } catch (org.apache.thrift.TException te) {
3086
        throw new java.io.IOException(te);
3087
      }
3088
    }
3089
 
3090
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3091
      try {
3092
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3093
      } catch (org.apache.thrift.TException te) {
3094
        throw new java.io.IOException(te);
3095
      }
3096
    }
3097
 
3098
  }
3099
 
3100
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3101
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3102
 
3103
    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);
3104
 
3105
    private long id; // required
3106
 
3107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3108
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3109
      ID((short)1, "id");
3110
 
3111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3112
 
3113
      static {
3114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3115
          byName.put(field.getFieldName(), field);
3116
        }
3117
      }
3118
 
3119
      /**
3120
       * Find the _Fields constant that matches fieldId, or null if its not found.
3121
       */
3122
      public static _Fields findByThriftId(int fieldId) {
3123
        switch(fieldId) {
3124
          case 1: // ID
3125
            return ID;
3126
          default:
3127
            return null;
3128
        }
3129
      }
3130
 
3131
      /**
3132
       * Find the _Fields constant that matches fieldId, throwing an exception
3133
       * if it is not found.
3134
       */
3135
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3136
        _Fields fields = findByThriftId(fieldId);
3137
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3138
        return fields;
3139
      }
3140
 
3141
      /**
3142
       * Find the _Fields constant that matches name, or null if its not found.
3143
       */
3144
      public static _Fields findByName(String name) {
3145
        return byName.get(name);
3146
      }
3147
 
3148
      private final short _thriftId;
3149
      private final String _fieldName;
3150
 
3151
      _Fields(short thriftId, String fieldName) {
3152
        _thriftId = thriftId;
3153
        _fieldName = fieldName;
3154
      }
3155
 
3156
      public short getThriftFieldId() {
3157
        return _thriftId;
3158
      }
3159
 
3160
      public String getFieldName() {
3161
        return _fieldName;
3162
      }
3163
    }
3164
 
3165
    // isset id assignments
3166
    private static final int __ID_ISSET_ID = 0;
3167
    private BitSet __isset_bit_vector = new BitSet(1);
3168
 
3169
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3170
    static {
3171
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3172
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3173
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3174
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3175
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3176
    }
3177
 
3178
    public getPurchaseOrder_args() {
3179
    }
3180
 
3181
    public getPurchaseOrder_args(
3182
      long id)
3183
    {
3184
      this();
3185
      this.id = id;
3186
      setIdIsSet(true);
3187
    }
3188
 
3189
    /**
3190
     * Performs a deep copy on <i>other</i>.
3191
     */
3192
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3193
      __isset_bit_vector.clear();
3194
      __isset_bit_vector.or(other.__isset_bit_vector);
3195
      this.id = other.id;
3196
    }
3197
 
3198
    public getPurchaseOrder_args deepCopy() {
3199
      return new getPurchaseOrder_args(this);
3200
    }
3201
 
3202
    @Override
3203
    public void clear() {
3204
      setIdIsSet(false);
3205
      this.id = 0;
3206
    }
3207
 
3208
    public long getId() {
3209
      return this.id;
3210
    }
3211
 
3212
    public void setId(long id) {
3213
      this.id = id;
3214
      setIdIsSet(true);
3215
    }
3216
 
3217
    public void unsetId() {
3218
      __isset_bit_vector.clear(__ID_ISSET_ID);
3219
    }
3220
 
3221
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3222
    public boolean isSetId() {
3223
      return __isset_bit_vector.get(__ID_ISSET_ID);
3224
    }
3225
 
3226
    public void setIdIsSet(boolean value) {
3227
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3228
    }
3229
 
3230
    public void setFieldValue(_Fields field, Object value) {
3231
      switch (field) {
3232
      case ID:
3233
        if (value == null) {
3234
          unsetId();
3235
        } else {
3236
          setId((Long)value);
3237
        }
3238
        break;
3239
 
3240
      }
3241
    }
3242
 
3243
    public Object getFieldValue(_Fields field) {
3244
      switch (field) {
3245
      case ID:
3246
        return Long.valueOf(getId());
3247
 
3248
      }
3249
      throw new IllegalStateException();
3250
    }
3251
 
3252
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3253
    public boolean isSet(_Fields field) {
3254
      if (field == null) {
3255
        throw new IllegalArgumentException();
3256
      }
3257
 
3258
      switch (field) {
3259
      case ID:
3260
        return isSetId();
3261
      }
3262
      throw new IllegalStateException();
3263
    }
3264
 
3265
    @Override
3266
    public boolean equals(Object that) {
3267
      if (that == null)
3268
        return false;
3269
      if (that instanceof getPurchaseOrder_args)
3270
        return this.equals((getPurchaseOrder_args)that);
3271
      return false;
3272
    }
3273
 
3274
    public boolean equals(getPurchaseOrder_args that) {
3275
      if (that == null)
3276
        return false;
3277
 
3278
      boolean this_present_id = true;
3279
      boolean that_present_id = true;
3280
      if (this_present_id || that_present_id) {
3281
        if (!(this_present_id && that_present_id))
3282
          return false;
3283
        if (this.id != that.id)
3284
          return false;
3285
      }
3286
 
3287
      return true;
3288
    }
3289
 
3290
    @Override
3291
    public int hashCode() {
3292
      return 0;
3293
    }
3294
 
3295
    public int compareTo(getPurchaseOrder_args other) {
3296
      if (!getClass().equals(other.getClass())) {
3297
        return getClass().getName().compareTo(other.getClass().getName());
3298
      }
3299
 
3300
      int lastComparison = 0;
3301
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3302
 
3303
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3304
      if (lastComparison != 0) {
3305
        return lastComparison;
3306
      }
3307
      if (isSetId()) {
3308
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3309
        if (lastComparison != 0) {
3310
          return lastComparison;
3311
        }
3312
      }
3313
      return 0;
3314
    }
3315
 
3316
    public _Fields fieldForId(int fieldId) {
3317
      return _Fields.findByThriftId(fieldId);
3318
    }
3319
 
3320
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3321
      org.apache.thrift.protocol.TField field;
3322
      iprot.readStructBegin();
3323
      while (true)
3324
      {
3325
        field = iprot.readFieldBegin();
3326
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3327
          break;
3328
        }
3329
        switch (field.id) {
3330
          case 1: // ID
3331
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3332
              this.id = iprot.readI64();
3333
              setIdIsSet(true);
3334
            } else { 
3335
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3336
            }
3337
            break;
3338
          default:
3339
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3340
        }
3341
        iprot.readFieldEnd();
3342
      }
3343
      iprot.readStructEnd();
3344
      validate();
3345
    }
3346
 
3347
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3348
      validate();
3349
 
3350
      oprot.writeStructBegin(STRUCT_DESC);
3351
      oprot.writeFieldBegin(ID_FIELD_DESC);
3352
      oprot.writeI64(this.id);
3353
      oprot.writeFieldEnd();
3354
      oprot.writeFieldStop();
3355
      oprot.writeStructEnd();
3356
    }
3357
 
3358
    @Override
3359
    public String toString() {
3360
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3361
      boolean first = true;
3362
 
3363
      sb.append("id:");
3364
      sb.append(this.id);
3365
      first = false;
3366
      sb.append(")");
3367
      return sb.toString();
3368
    }
3369
 
3370
    public void validate() throws org.apache.thrift.TException {
3371
      // check for required fields
3372
    }
3373
 
3374
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3375
      try {
3376
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3377
      } catch (org.apache.thrift.TException te) {
3378
        throw new java.io.IOException(te);
3379
      }
3380
    }
3381
 
3382
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3383
      try {
3384
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3385
      } catch (org.apache.thrift.TException te) {
3386
        throw new java.io.IOException(te);
3387
      }
3388
    }
3389
 
3390
  }
3391
 
3392
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3393
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3394
 
3395
    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);
3396
    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);
3397
 
3398
    private PurchaseOrder success; // required
3399
    private PurchaseServiceException e; // required
3400
 
3401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3402
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3403
      SUCCESS((short)0, "success"),
3404
      E((short)1, "e");
3405
 
3406
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3407
 
3408
      static {
3409
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3410
          byName.put(field.getFieldName(), field);
3411
        }
3412
      }
3413
 
3414
      /**
3415
       * Find the _Fields constant that matches fieldId, or null if its not found.
3416
       */
3417
      public static _Fields findByThriftId(int fieldId) {
3418
        switch(fieldId) {
3419
          case 0: // SUCCESS
3420
            return SUCCESS;
3421
          case 1: // E
3422
            return E;
3423
          default:
3424
            return null;
3425
        }
3426
      }
3427
 
3428
      /**
3429
       * Find the _Fields constant that matches fieldId, throwing an exception
3430
       * if it is not found.
3431
       */
3432
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3433
        _Fields fields = findByThriftId(fieldId);
3434
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3435
        return fields;
3436
      }
3437
 
3438
      /**
3439
       * Find the _Fields constant that matches name, or null if its not found.
3440
       */
3441
      public static _Fields findByName(String name) {
3442
        return byName.get(name);
3443
      }
3444
 
3445
      private final short _thriftId;
3446
      private final String _fieldName;
3447
 
3448
      _Fields(short thriftId, String fieldName) {
3449
        _thriftId = thriftId;
3450
        _fieldName = fieldName;
3451
      }
3452
 
3453
      public short getThriftFieldId() {
3454
        return _thriftId;
3455
      }
3456
 
3457
      public String getFieldName() {
3458
        return _fieldName;
3459
      }
3460
    }
3461
 
3462
    // isset id assignments
3463
 
3464
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3465
    static {
3466
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3467
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3468
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3469
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3470
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3471
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3472
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3473
    }
3474
 
3475
    public getPurchaseOrder_result() {
3476
    }
3477
 
3478
    public getPurchaseOrder_result(
3479
      PurchaseOrder success,
3480
      PurchaseServiceException e)
3481
    {
3482
      this();
3483
      this.success = success;
3484
      this.e = e;
3485
    }
3486
 
3487
    /**
3488
     * Performs a deep copy on <i>other</i>.
3489
     */
3490
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3491
      if (other.isSetSuccess()) {
3492
        this.success = new PurchaseOrder(other.success);
3493
      }
3494
      if (other.isSetE()) {
3495
        this.e = new PurchaseServiceException(other.e);
3496
      }
3497
    }
3498
 
3499
    public getPurchaseOrder_result deepCopy() {
3500
      return new getPurchaseOrder_result(this);
3501
    }
3502
 
3503
    @Override
3504
    public void clear() {
3505
      this.success = null;
3506
      this.e = null;
3507
    }
3508
 
3509
    public PurchaseOrder getSuccess() {
3510
      return this.success;
3511
    }
3512
 
3513
    public void setSuccess(PurchaseOrder success) {
3514
      this.success = success;
3515
    }
3516
 
3517
    public void unsetSuccess() {
3518
      this.success = null;
3519
    }
3520
 
3521
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3522
    public boolean isSetSuccess() {
3523
      return this.success != null;
3524
    }
3525
 
3526
    public void setSuccessIsSet(boolean value) {
3527
      if (!value) {
3528
        this.success = null;
3529
      }
3530
    }
3531
 
3532
    public PurchaseServiceException getE() {
3533
      return this.e;
3534
    }
3535
 
3536
    public void setE(PurchaseServiceException e) {
3537
      this.e = e;
3538
    }
3539
 
3540
    public void unsetE() {
3541
      this.e = null;
3542
    }
3543
 
3544
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3545
    public boolean isSetE() {
3546
      return this.e != null;
3547
    }
3548
 
3549
    public void setEIsSet(boolean value) {
3550
      if (!value) {
3551
        this.e = null;
3552
      }
3553
    }
3554
 
3555
    public void setFieldValue(_Fields field, Object value) {
3556
      switch (field) {
3557
      case SUCCESS:
3558
        if (value == null) {
3559
          unsetSuccess();
3560
        } else {
3561
          setSuccess((PurchaseOrder)value);
3562
        }
3563
        break;
3564
 
3565
      case E:
3566
        if (value == null) {
3567
          unsetE();
3568
        } else {
3569
          setE((PurchaseServiceException)value);
3570
        }
3571
        break;
3572
 
3573
      }
3574
    }
3575
 
3576
    public Object getFieldValue(_Fields field) {
3577
      switch (field) {
3578
      case SUCCESS:
3579
        return getSuccess();
3580
 
3581
      case E:
3582
        return getE();
3583
 
3584
      }
3585
      throw new IllegalStateException();
3586
    }
3587
 
3588
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3589
    public boolean isSet(_Fields field) {
3590
      if (field == null) {
3591
        throw new IllegalArgumentException();
3592
      }
3593
 
3594
      switch (field) {
3595
      case SUCCESS:
3596
        return isSetSuccess();
3597
      case E:
3598
        return isSetE();
3599
      }
3600
      throw new IllegalStateException();
3601
    }
3602
 
3603
    @Override
3604
    public boolean equals(Object that) {
3605
      if (that == null)
3606
        return false;
3607
      if (that instanceof getPurchaseOrder_result)
3608
        return this.equals((getPurchaseOrder_result)that);
3609
      return false;
3610
    }
3611
 
3612
    public boolean equals(getPurchaseOrder_result that) {
3613
      if (that == null)
3614
        return false;
3615
 
3616
      boolean this_present_success = true && this.isSetSuccess();
3617
      boolean that_present_success = true && that.isSetSuccess();
3618
      if (this_present_success || that_present_success) {
3619
        if (!(this_present_success && that_present_success))
3620
          return false;
3621
        if (!this.success.equals(that.success))
3622
          return false;
3623
      }
3624
 
3625
      boolean this_present_e = true && this.isSetE();
3626
      boolean that_present_e = true && that.isSetE();
3627
      if (this_present_e || that_present_e) {
3628
        if (!(this_present_e && that_present_e))
3629
          return false;
3630
        if (!this.e.equals(that.e))
3631
          return false;
3632
      }
3633
 
3634
      return true;
3635
    }
3636
 
3637
    @Override
3638
    public int hashCode() {
3639
      return 0;
3640
    }
3641
 
3642
    public int compareTo(getPurchaseOrder_result other) {
3643
      if (!getClass().equals(other.getClass())) {
3644
        return getClass().getName().compareTo(other.getClass().getName());
3645
      }
3646
 
3647
      int lastComparison = 0;
3648
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3649
 
3650
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3651
      if (lastComparison != 0) {
3652
        return lastComparison;
3653
      }
3654
      if (isSetSuccess()) {
3655
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3656
        if (lastComparison != 0) {
3657
          return lastComparison;
3658
        }
3659
      }
3660
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3661
      if (lastComparison != 0) {
3662
        return lastComparison;
3663
      }
3664
      if (isSetE()) {
3665
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3666
        if (lastComparison != 0) {
3667
          return lastComparison;
3668
        }
3669
      }
3670
      return 0;
3671
    }
3672
 
3673
    public _Fields fieldForId(int fieldId) {
3674
      return _Fields.findByThriftId(fieldId);
3675
    }
3676
 
3677
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3678
      org.apache.thrift.protocol.TField field;
3679
      iprot.readStructBegin();
3680
      while (true)
3681
      {
3682
        field = iprot.readFieldBegin();
3683
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3684
          break;
3685
        }
3686
        switch (field.id) {
3687
          case 0: // SUCCESS
3688
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3689
              this.success = new PurchaseOrder();
3690
              this.success.read(iprot);
3691
            } else { 
3692
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3693
            }
3694
            break;
3695
          case 1: // E
3696
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3697
              this.e = new PurchaseServiceException();
3698
              this.e.read(iprot);
3699
            } else { 
3700
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3701
            }
3702
            break;
3703
          default:
3704
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3705
        }
3706
        iprot.readFieldEnd();
3707
      }
3708
      iprot.readStructEnd();
3709
      validate();
3710
    }
3711
 
3712
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3713
      oprot.writeStructBegin(STRUCT_DESC);
3714
 
3715
      if (this.isSetSuccess()) {
3716
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3717
        this.success.write(oprot);
3718
        oprot.writeFieldEnd();
3719
      } else if (this.isSetE()) {
3720
        oprot.writeFieldBegin(E_FIELD_DESC);
3721
        this.e.write(oprot);
3722
        oprot.writeFieldEnd();
3723
      }
3724
      oprot.writeFieldStop();
3725
      oprot.writeStructEnd();
3726
    }
3727
 
3728
    @Override
3729
    public String toString() {
3730
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3731
      boolean first = true;
3732
 
3733
      sb.append("success:");
3734
      if (this.success == null) {
3735
        sb.append("null");
3736
      } else {
3737
        sb.append(this.success);
3738
      }
3739
      first = false;
3740
      if (!first) sb.append(", ");
3741
      sb.append("e:");
3742
      if (this.e == null) {
3743
        sb.append("null");
3744
      } else {
3745
        sb.append(this.e);
3746
      }
3747
      first = false;
3748
      sb.append(")");
3749
      return sb.toString();
3750
    }
3751
 
3752
    public void validate() throws org.apache.thrift.TException {
3753
      // check for required fields
3754
    }
3755
 
3756
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3757
      try {
3758
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3759
      } catch (org.apache.thrift.TException te) {
3760
        throw new java.io.IOException(te);
3761
      }
3762
    }
3763
 
3764
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3765
      try {
3766
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3767
      } catch (org.apache.thrift.TException te) {
3768
        throw new java.io.IOException(te);
3769
      }
3770
    }
3771
 
3772
  }
3773
 
3774
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3775
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3776
 
3777
    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);
3778
 
3779
    private POStatus status; // required
3780
 
3781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3782
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3783
      /**
3784
       * 
3785
       * @see POStatus
3786
       */
3787
      STATUS((short)1, "status");
3788
 
3789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3790
 
3791
      static {
3792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3793
          byName.put(field.getFieldName(), field);
3794
        }
3795
      }
3796
 
3797
      /**
3798
       * Find the _Fields constant that matches fieldId, or null if its not found.
3799
       */
3800
      public static _Fields findByThriftId(int fieldId) {
3801
        switch(fieldId) {
3802
          case 1: // STATUS
3803
            return STATUS;
3804
          default:
3805
            return null;
3806
        }
3807
      }
3808
 
3809
      /**
3810
       * Find the _Fields constant that matches fieldId, throwing an exception
3811
       * if it is not found.
3812
       */
3813
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3814
        _Fields fields = findByThriftId(fieldId);
3815
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3816
        return fields;
3817
      }
3818
 
3819
      /**
3820
       * Find the _Fields constant that matches name, or null if its not found.
3821
       */
3822
      public static _Fields findByName(String name) {
3823
        return byName.get(name);
3824
      }
3825
 
3826
      private final short _thriftId;
3827
      private final String _fieldName;
3828
 
3829
      _Fields(short thriftId, String fieldName) {
3830
        _thriftId = thriftId;
3831
        _fieldName = fieldName;
3832
      }
3833
 
3834
      public short getThriftFieldId() {
3835
        return _thriftId;
3836
      }
3837
 
3838
      public String getFieldName() {
3839
        return _fieldName;
3840
      }
3841
    }
3842
 
3843
    // isset id assignments
3844
 
3845
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3846
    static {
3847
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3848
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3849
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3850
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3851
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3852
    }
3853
 
3854
    public getAllPurchaseOrders_args() {
3855
    }
3856
 
3857
    public getAllPurchaseOrders_args(
3858
      POStatus status)
3859
    {
3860
      this();
3861
      this.status = status;
3862
    }
3863
 
3864
    /**
3865
     * Performs a deep copy on <i>other</i>.
3866
     */
3867
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3868
      if (other.isSetStatus()) {
3869
        this.status = other.status;
3870
      }
3871
    }
3872
 
3873
    public getAllPurchaseOrders_args deepCopy() {
3874
      return new getAllPurchaseOrders_args(this);
3875
    }
3876
 
3877
    @Override
3878
    public void clear() {
3879
      this.status = null;
3880
    }
3881
 
3882
    /**
3883
     * 
3884
     * @see POStatus
3885
     */
3886
    public POStatus getStatus() {
3887
      return this.status;
3888
    }
3889
 
3890
    /**
3891
     * 
3892
     * @see POStatus
3893
     */
3894
    public void setStatus(POStatus status) {
3895
      this.status = status;
3896
    }
3897
 
3898
    public void unsetStatus() {
3899
      this.status = null;
3900
    }
3901
 
3902
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3903
    public boolean isSetStatus() {
3904
      return this.status != null;
3905
    }
3906
 
3907
    public void setStatusIsSet(boolean value) {
3908
      if (!value) {
3909
        this.status = null;
3910
      }
3911
    }
3912
 
3913
    public void setFieldValue(_Fields field, Object value) {
3914
      switch (field) {
3915
      case STATUS:
3916
        if (value == null) {
3917
          unsetStatus();
3918
        } else {
3919
          setStatus((POStatus)value);
3920
        }
3921
        break;
3922
 
3923
      }
3924
    }
3925
 
3926
    public Object getFieldValue(_Fields field) {
3927
      switch (field) {
3928
      case STATUS:
3929
        return getStatus();
3930
 
3931
      }
3932
      throw new IllegalStateException();
3933
    }
3934
 
3935
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3936
    public boolean isSet(_Fields field) {
3937
      if (field == null) {
3938
        throw new IllegalArgumentException();
3939
      }
3940
 
3941
      switch (field) {
3942
      case STATUS:
3943
        return isSetStatus();
3944
      }
3945
      throw new IllegalStateException();
3946
    }
3947
 
3948
    @Override
3949
    public boolean equals(Object that) {
3950
      if (that == null)
3951
        return false;
3952
      if (that instanceof getAllPurchaseOrders_args)
3953
        return this.equals((getAllPurchaseOrders_args)that);
3954
      return false;
3955
    }
3956
 
3957
    public boolean equals(getAllPurchaseOrders_args that) {
3958
      if (that == null)
3959
        return false;
3960
 
3961
      boolean this_present_status = true && this.isSetStatus();
3962
      boolean that_present_status = true && that.isSetStatus();
3963
      if (this_present_status || that_present_status) {
3964
        if (!(this_present_status && that_present_status))
3965
          return false;
3966
        if (!this.status.equals(that.status))
3967
          return false;
3968
      }
3969
 
3970
      return true;
3971
    }
3972
 
3973
    @Override
3974
    public int hashCode() {
3975
      return 0;
3976
    }
3977
 
3978
    public int compareTo(getAllPurchaseOrders_args other) {
3979
      if (!getClass().equals(other.getClass())) {
3980
        return getClass().getName().compareTo(other.getClass().getName());
3981
      }
3982
 
3983
      int lastComparison = 0;
3984
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
3985
 
3986
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
3987
      if (lastComparison != 0) {
3988
        return lastComparison;
3989
      }
3990
      if (isSetStatus()) {
3991
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3992
        if (lastComparison != 0) {
3993
          return lastComparison;
3994
        }
3995
      }
3996
      return 0;
3997
    }
3998
 
3999
    public _Fields fieldForId(int fieldId) {
4000
      return _Fields.findByThriftId(fieldId);
4001
    }
4002
 
4003
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4004
      org.apache.thrift.protocol.TField field;
4005
      iprot.readStructBegin();
4006
      while (true)
4007
      {
4008
        field = iprot.readFieldBegin();
4009
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4010
          break;
4011
        }
4012
        switch (field.id) {
4013
          case 1: // STATUS
4014
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4015
              this.status = POStatus.findByValue(iprot.readI32());
4016
            } else { 
4017
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4018
            }
4019
            break;
4020
          default:
4021
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4022
        }
4023
        iprot.readFieldEnd();
4024
      }
4025
      iprot.readStructEnd();
4026
      validate();
4027
    }
4028
 
4029
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4030
      validate();
4031
 
4032
      oprot.writeStructBegin(STRUCT_DESC);
4033
      if (this.status != null) {
4034
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4035
        oprot.writeI32(this.status.getValue());
4036
        oprot.writeFieldEnd();
4037
      }
4038
      oprot.writeFieldStop();
4039
      oprot.writeStructEnd();
4040
    }
4041
 
4042
    @Override
4043
    public String toString() {
4044
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4045
      boolean first = true;
4046
 
4047
      sb.append("status:");
4048
      if (this.status == null) {
4049
        sb.append("null");
4050
      } else {
4051
        sb.append(this.status);
4052
      }
4053
      first = false;
4054
      sb.append(")");
4055
      return sb.toString();
4056
    }
4057
 
4058
    public void validate() throws org.apache.thrift.TException {
4059
      // check for required fields
4060
    }
4061
 
4062
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4063
      try {
4064
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4065
      } catch (org.apache.thrift.TException te) {
4066
        throw new java.io.IOException(te);
4067
      }
4068
    }
4069
 
4070
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4071
      try {
4072
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4073
      } catch (org.apache.thrift.TException te) {
4074
        throw new java.io.IOException(te);
4075
      }
4076
    }
4077
 
4078
  }
4079
 
4080
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4081
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4082
 
4083
    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);
4084
    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);
4085
 
4086
    private List<PurchaseOrder> success; // required
4087
    private PurchaseServiceException e; // required
4088
 
4089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4090
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4091
      SUCCESS((short)0, "success"),
4092
      E((short)1, "e");
4093
 
4094
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4095
 
4096
      static {
4097
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4098
          byName.put(field.getFieldName(), field);
4099
        }
4100
      }
4101
 
4102
      /**
4103
       * Find the _Fields constant that matches fieldId, or null if its not found.
4104
       */
4105
      public static _Fields findByThriftId(int fieldId) {
4106
        switch(fieldId) {
4107
          case 0: // SUCCESS
4108
            return SUCCESS;
4109
          case 1: // E
4110
            return E;
4111
          default:
4112
            return null;
4113
        }
4114
      }
4115
 
4116
      /**
4117
       * Find the _Fields constant that matches fieldId, throwing an exception
4118
       * if it is not found.
4119
       */
4120
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4121
        _Fields fields = findByThriftId(fieldId);
4122
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4123
        return fields;
4124
      }
4125
 
4126
      /**
4127
       * Find the _Fields constant that matches name, or null if its not found.
4128
       */
4129
      public static _Fields findByName(String name) {
4130
        return byName.get(name);
4131
      }
4132
 
4133
      private final short _thriftId;
4134
      private final String _fieldName;
4135
 
4136
      _Fields(short thriftId, String fieldName) {
4137
        _thriftId = thriftId;
4138
        _fieldName = fieldName;
4139
      }
4140
 
4141
      public short getThriftFieldId() {
4142
        return _thriftId;
4143
      }
4144
 
4145
      public String getFieldName() {
4146
        return _fieldName;
4147
      }
4148
    }
4149
 
4150
    // isset id assignments
4151
 
4152
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4153
    static {
4154
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4155
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4156
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4157
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4158
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4159
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4160
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4161
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4162
    }
4163
 
4164
    public getAllPurchaseOrders_result() {
4165
    }
4166
 
4167
    public getAllPurchaseOrders_result(
4168
      List<PurchaseOrder> success,
4169
      PurchaseServiceException e)
4170
    {
4171
      this();
4172
      this.success = success;
4173
      this.e = e;
4174
    }
4175
 
4176
    /**
4177
     * Performs a deep copy on <i>other</i>.
4178
     */
4179
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4180
      if (other.isSetSuccess()) {
4181
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4182
        for (PurchaseOrder other_element : other.success) {
4183
          __this__success.add(new PurchaseOrder(other_element));
4184
        }
4185
        this.success = __this__success;
4186
      }
4187
      if (other.isSetE()) {
4188
        this.e = new PurchaseServiceException(other.e);
4189
      }
4190
    }
4191
 
4192
    public getAllPurchaseOrders_result deepCopy() {
4193
      return new getAllPurchaseOrders_result(this);
4194
    }
4195
 
4196
    @Override
4197
    public void clear() {
4198
      this.success = null;
4199
      this.e = null;
4200
    }
4201
 
4202
    public int getSuccessSize() {
4203
      return (this.success == null) ? 0 : this.success.size();
4204
    }
4205
 
4206
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4207
      return (this.success == null) ? null : this.success.iterator();
4208
    }
4209
 
4210
    public void addToSuccess(PurchaseOrder elem) {
4211
      if (this.success == null) {
4212
        this.success = new ArrayList<PurchaseOrder>();
4213
      }
4214
      this.success.add(elem);
4215
    }
4216
 
4217
    public List<PurchaseOrder> getSuccess() {
4218
      return this.success;
4219
    }
4220
 
4221
    public void setSuccess(List<PurchaseOrder> success) {
4222
      this.success = success;
4223
    }
4224
 
4225
    public void unsetSuccess() {
4226
      this.success = null;
4227
    }
4228
 
4229
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4230
    public boolean isSetSuccess() {
4231
      return this.success != null;
4232
    }
4233
 
4234
    public void setSuccessIsSet(boolean value) {
4235
      if (!value) {
4236
        this.success = null;
4237
      }
4238
    }
4239
 
4240
    public PurchaseServiceException getE() {
4241
      return this.e;
4242
    }
4243
 
4244
    public void setE(PurchaseServiceException e) {
4245
      this.e = e;
4246
    }
4247
 
4248
    public void unsetE() {
4249
      this.e = null;
4250
    }
4251
 
4252
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4253
    public boolean isSetE() {
4254
      return this.e != null;
4255
    }
4256
 
4257
    public void setEIsSet(boolean value) {
4258
      if (!value) {
4259
        this.e = null;
4260
      }
4261
    }
4262
 
4263
    public void setFieldValue(_Fields field, Object value) {
4264
      switch (field) {
4265
      case SUCCESS:
4266
        if (value == null) {
4267
          unsetSuccess();
4268
        } else {
4269
          setSuccess((List<PurchaseOrder>)value);
4270
        }
4271
        break;
4272
 
4273
      case E:
4274
        if (value == null) {
4275
          unsetE();
4276
        } else {
4277
          setE((PurchaseServiceException)value);
4278
        }
4279
        break;
4280
 
4281
      }
4282
    }
4283
 
4284
    public Object getFieldValue(_Fields field) {
4285
      switch (field) {
4286
      case SUCCESS:
4287
        return getSuccess();
4288
 
4289
      case E:
4290
        return getE();
4291
 
4292
      }
4293
      throw new IllegalStateException();
4294
    }
4295
 
4296
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4297
    public boolean isSet(_Fields field) {
4298
      if (field == null) {
4299
        throw new IllegalArgumentException();
4300
      }
4301
 
4302
      switch (field) {
4303
      case SUCCESS:
4304
        return isSetSuccess();
4305
      case E:
4306
        return isSetE();
4307
      }
4308
      throw new IllegalStateException();
4309
    }
4310
 
4311
    @Override
4312
    public boolean equals(Object that) {
4313
      if (that == null)
4314
        return false;
4315
      if (that instanceof getAllPurchaseOrders_result)
4316
        return this.equals((getAllPurchaseOrders_result)that);
4317
      return false;
4318
    }
4319
 
4320
    public boolean equals(getAllPurchaseOrders_result that) {
4321
      if (that == null)
4322
        return false;
4323
 
4324
      boolean this_present_success = true && this.isSetSuccess();
4325
      boolean that_present_success = true && that.isSetSuccess();
4326
      if (this_present_success || that_present_success) {
4327
        if (!(this_present_success && that_present_success))
4328
          return false;
4329
        if (!this.success.equals(that.success))
4330
          return false;
4331
      }
4332
 
4333
      boolean this_present_e = true && this.isSetE();
4334
      boolean that_present_e = true && that.isSetE();
4335
      if (this_present_e || that_present_e) {
4336
        if (!(this_present_e && that_present_e))
4337
          return false;
4338
        if (!this.e.equals(that.e))
4339
          return false;
4340
      }
4341
 
4342
      return true;
4343
    }
4344
 
4345
    @Override
4346
    public int hashCode() {
4347
      return 0;
4348
    }
4349
 
4350
    public int compareTo(getAllPurchaseOrders_result other) {
4351
      if (!getClass().equals(other.getClass())) {
4352
        return getClass().getName().compareTo(other.getClass().getName());
4353
      }
4354
 
4355
      int lastComparison = 0;
4356
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4357
 
4358
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4359
      if (lastComparison != 0) {
4360
        return lastComparison;
4361
      }
4362
      if (isSetSuccess()) {
4363
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4364
        if (lastComparison != 0) {
4365
          return lastComparison;
4366
        }
4367
      }
4368
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4369
      if (lastComparison != 0) {
4370
        return lastComparison;
4371
      }
4372
      if (isSetE()) {
4373
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4374
        if (lastComparison != 0) {
4375
          return lastComparison;
4376
        }
4377
      }
4378
      return 0;
4379
    }
4380
 
4381
    public _Fields fieldForId(int fieldId) {
4382
      return _Fields.findByThriftId(fieldId);
4383
    }
4384
 
4385
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4386
      org.apache.thrift.protocol.TField field;
4387
      iprot.readStructBegin();
4388
      while (true)
4389
      {
4390
        field = iprot.readFieldBegin();
4391
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4392
          break;
4393
        }
4394
        switch (field.id) {
4395
          case 0: // SUCCESS
4396
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4397
              {
4398
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4399
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4400
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4401
                {
4402
                  PurchaseOrder _elem6; // required
4403
                  _elem6 = new PurchaseOrder();
4404
                  _elem6.read(iprot);
4405
                  this.success.add(_elem6);
4406
                }
4407
                iprot.readListEnd();
4408
              }
4409
            } else { 
4410
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4411
            }
4412
            break;
4413
          case 1: // E
4414
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4415
              this.e = new PurchaseServiceException();
4416
              this.e.read(iprot);
4417
            } else { 
4418
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4419
            }
4420
            break;
4421
          default:
4422
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4423
        }
4424
        iprot.readFieldEnd();
4425
      }
4426
      iprot.readStructEnd();
4427
      validate();
4428
    }
4429
 
4430
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4431
      oprot.writeStructBegin(STRUCT_DESC);
4432
 
4433
      if (this.isSetSuccess()) {
4434
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4435
        {
4436
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4437
          for (PurchaseOrder _iter7 : this.success)
4438
          {
4439
            _iter7.write(oprot);
4440
          }
4441
          oprot.writeListEnd();
4442
        }
4443
        oprot.writeFieldEnd();
4444
      } else if (this.isSetE()) {
4445
        oprot.writeFieldBegin(E_FIELD_DESC);
4446
        this.e.write(oprot);
4447
        oprot.writeFieldEnd();
4448
      }
4449
      oprot.writeFieldStop();
4450
      oprot.writeStructEnd();
4451
    }
4452
 
4453
    @Override
4454
    public String toString() {
4455
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4456
      boolean first = true;
4457
 
4458
      sb.append("success:");
4459
      if (this.success == null) {
4460
        sb.append("null");
4461
      } else {
4462
        sb.append(this.success);
4463
      }
4464
      first = false;
4465
      if (!first) sb.append(", ");
4466
      sb.append("e:");
4467
      if (this.e == null) {
4468
        sb.append("null");
4469
      } else {
4470
        sb.append(this.e);
4471
      }
4472
      first = false;
4473
      sb.append(")");
4474
      return sb.toString();
4475
    }
4476
 
4477
    public void validate() throws org.apache.thrift.TException {
4478
      // check for required fields
4479
    }
4480
 
4481
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4482
      try {
4483
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4484
      } catch (org.apache.thrift.TException te) {
4485
        throw new java.io.IOException(te);
4486
      }
4487
    }
4488
 
4489
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4490
      try {
4491
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4492
      } catch (org.apache.thrift.TException te) {
4493
        throw new java.io.IOException(te);
4494
      }
4495
    }
4496
 
4497
  }
4498
 
4499
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4500
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4501
 
4502
    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);
4503
 
4504
    private long id; // required
4505
 
4506
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4507
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4508
      ID((short)1, "id");
4509
 
4510
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4511
 
4512
      static {
4513
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4514
          byName.put(field.getFieldName(), field);
4515
        }
4516
      }
4517
 
4518
      /**
4519
       * Find the _Fields constant that matches fieldId, or null if its not found.
4520
       */
4521
      public static _Fields findByThriftId(int fieldId) {
4522
        switch(fieldId) {
4523
          case 1: // ID
4524
            return ID;
4525
          default:
4526
            return null;
4527
        }
4528
      }
4529
 
4530
      /**
4531
       * Find the _Fields constant that matches fieldId, throwing an exception
4532
       * if it is not found.
4533
       */
4534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4535
        _Fields fields = findByThriftId(fieldId);
4536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4537
        return fields;
4538
      }
4539
 
4540
      /**
4541
       * Find the _Fields constant that matches name, or null if its not found.
4542
       */
4543
      public static _Fields findByName(String name) {
4544
        return byName.get(name);
4545
      }
4546
 
4547
      private final short _thriftId;
4548
      private final String _fieldName;
4549
 
4550
      _Fields(short thriftId, String fieldName) {
4551
        _thriftId = thriftId;
4552
        _fieldName = fieldName;
4553
      }
4554
 
4555
      public short getThriftFieldId() {
4556
        return _thriftId;
4557
      }
4558
 
4559
      public String getFieldName() {
4560
        return _fieldName;
4561
      }
4562
    }
4563
 
4564
    // isset id assignments
4565
    private static final int __ID_ISSET_ID = 0;
4566
    private BitSet __isset_bit_vector = new BitSet(1);
4567
 
4568
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4569
    static {
4570
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4571
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4572
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4573
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4574
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4575
    }
4576
 
4577
    public getSupplier_args() {
4578
    }
4579
 
4580
    public getSupplier_args(
4581
      long id)
4582
    {
4583
      this();
4584
      this.id = id;
4585
      setIdIsSet(true);
4586
    }
4587
 
4588
    /**
4589
     * Performs a deep copy on <i>other</i>.
4590
     */
4591
    public getSupplier_args(getSupplier_args other) {
4592
      __isset_bit_vector.clear();
4593
      __isset_bit_vector.or(other.__isset_bit_vector);
4594
      this.id = other.id;
4595
    }
4596
 
4597
    public getSupplier_args deepCopy() {
4598
      return new getSupplier_args(this);
4599
    }
4600
 
4601
    @Override
4602
    public void clear() {
4603
      setIdIsSet(false);
4604
      this.id = 0;
4605
    }
4606
 
4607
    public long getId() {
4608
      return this.id;
4609
    }
4610
 
4611
    public void setId(long id) {
4612
      this.id = id;
4613
      setIdIsSet(true);
4614
    }
4615
 
4616
    public void unsetId() {
4617
      __isset_bit_vector.clear(__ID_ISSET_ID);
4618
    }
4619
 
4620
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4621
    public boolean isSetId() {
4622
      return __isset_bit_vector.get(__ID_ISSET_ID);
4623
    }
4624
 
4625
    public void setIdIsSet(boolean value) {
4626
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4627
    }
4628
 
4629
    public void setFieldValue(_Fields field, Object value) {
4630
      switch (field) {
4631
      case ID:
4632
        if (value == null) {
4633
          unsetId();
4634
        } else {
4635
          setId((Long)value);
4636
        }
4637
        break;
4638
 
4639
      }
4640
    }
4641
 
4642
    public Object getFieldValue(_Fields field) {
4643
      switch (field) {
4644
      case ID:
4645
        return Long.valueOf(getId());
4646
 
4647
      }
4648
      throw new IllegalStateException();
4649
    }
4650
 
4651
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4652
    public boolean isSet(_Fields field) {
4653
      if (field == null) {
4654
        throw new IllegalArgumentException();
4655
      }
4656
 
4657
      switch (field) {
4658
      case ID:
4659
        return isSetId();
4660
      }
4661
      throw new IllegalStateException();
4662
    }
4663
 
4664
    @Override
4665
    public boolean equals(Object that) {
4666
      if (that == null)
4667
        return false;
4668
      if (that instanceof getSupplier_args)
4669
        return this.equals((getSupplier_args)that);
4670
      return false;
4671
    }
4672
 
4673
    public boolean equals(getSupplier_args that) {
4674
      if (that == null)
4675
        return false;
4676
 
4677
      boolean this_present_id = true;
4678
      boolean that_present_id = true;
4679
      if (this_present_id || that_present_id) {
4680
        if (!(this_present_id && that_present_id))
4681
          return false;
4682
        if (this.id != that.id)
4683
          return false;
4684
      }
4685
 
4686
      return true;
4687
    }
4688
 
4689
    @Override
4690
    public int hashCode() {
4691
      return 0;
4692
    }
4693
 
4694
    public int compareTo(getSupplier_args other) {
4695
      if (!getClass().equals(other.getClass())) {
4696
        return getClass().getName().compareTo(other.getClass().getName());
4697
      }
4698
 
4699
      int lastComparison = 0;
4700
      getSupplier_args typedOther = (getSupplier_args)other;
4701
 
4702
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4703
      if (lastComparison != 0) {
4704
        return lastComparison;
4705
      }
4706
      if (isSetId()) {
4707
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4708
        if (lastComparison != 0) {
4709
          return lastComparison;
4710
        }
4711
      }
4712
      return 0;
4713
    }
4714
 
4715
    public _Fields fieldForId(int fieldId) {
4716
      return _Fields.findByThriftId(fieldId);
4717
    }
4718
 
4719
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4720
      org.apache.thrift.protocol.TField field;
4721
      iprot.readStructBegin();
4722
      while (true)
4723
      {
4724
        field = iprot.readFieldBegin();
4725
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4726
          break;
4727
        }
4728
        switch (field.id) {
4729
          case 1: // ID
4730
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4731
              this.id = iprot.readI64();
4732
              setIdIsSet(true);
4733
            } else { 
4734
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4735
            }
4736
            break;
4737
          default:
4738
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4739
        }
4740
        iprot.readFieldEnd();
4741
      }
4742
      iprot.readStructEnd();
4743
      validate();
4744
    }
4745
 
4746
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4747
      validate();
4748
 
4749
      oprot.writeStructBegin(STRUCT_DESC);
4750
      oprot.writeFieldBegin(ID_FIELD_DESC);
4751
      oprot.writeI64(this.id);
4752
      oprot.writeFieldEnd();
4753
      oprot.writeFieldStop();
4754
      oprot.writeStructEnd();
4755
    }
4756
 
4757
    @Override
4758
    public String toString() {
4759
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4760
      boolean first = true;
4761
 
4762
      sb.append("id:");
4763
      sb.append(this.id);
4764
      first = false;
4765
      sb.append(")");
4766
      return sb.toString();
4767
    }
4768
 
4769
    public void validate() throws org.apache.thrift.TException {
4770
      // check for required fields
4771
    }
4772
 
4773
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4774
      try {
4775
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4776
      } catch (org.apache.thrift.TException te) {
4777
        throw new java.io.IOException(te);
4778
      }
4779
    }
4780
 
4781
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4782
      try {
4783
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4784
        __isset_bit_vector = new BitSet(1);
4785
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4786
      } catch (org.apache.thrift.TException te) {
4787
        throw new java.io.IOException(te);
4788
      }
4789
    }
4790
 
4791
  }
4792
 
4793
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4794
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4795
 
4796
    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);
4797
    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);
4798
 
4799
    private Supplier success; // required
4800
    private PurchaseServiceException e; // required
4801
 
4802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4803
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4804
      SUCCESS((short)0, "success"),
4805
      E((short)1, "e");
4806
 
4807
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4808
 
4809
      static {
4810
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4811
          byName.put(field.getFieldName(), field);
4812
        }
4813
      }
4814
 
4815
      /**
4816
       * Find the _Fields constant that matches fieldId, or null if its not found.
4817
       */
4818
      public static _Fields findByThriftId(int fieldId) {
4819
        switch(fieldId) {
4820
          case 0: // SUCCESS
4821
            return SUCCESS;
4822
          case 1: // E
4823
            return E;
4824
          default:
4825
            return null;
4826
        }
4827
      }
4828
 
4829
      /**
4830
       * Find the _Fields constant that matches fieldId, throwing an exception
4831
       * if it is not found.
4832
       */
4833
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4834
        _Fields fields = findByThriftId(fieldId);
4835
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4836
        return fields;
4837
      }
4838
 
4839
      /**
4840
       * Find the _Fields constant that matches name, or null if its not found.
4841
       */
4842
      public static _Fields findByName(String name) {
4843
        return byName.get(name);
4844
      }
4845
 
4846
      private final short _thriftId;
4847
      private final String _fieldName;
4848
 
4849
      _Fields(short thriftId, String fieldName) {
4850
        _thriftId = thriftId;
4851
        _fieldName = fieldName;
4852
      }
4853
 
4854
      public short getThriftFieldId() {
4855
        return _thriftId;
4856
      }
4857
 
4858
      public String getFieldName() {
4859
        return _fieldName;
4860
      }
4861
    }
4862
 
4863
    // isset id assignments
4864
 
4865
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4866
    static {
4867
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4868
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4869
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4870
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4871
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4872
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4873
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4874
    }
4875
 
4876
    public getSupplier_result() {
4877
    }
4878
 
4879
    public getSupplier_result(
4880
      Supplier success,
4881
      PurchaseServiceException e)
4882
    {
4883
      this();
4884
      this.success = success;
4885
      this.e = e;
4886
    }
4887
 
4888
    /**
4889
     * Performs a deep copy on <i>other</i>.
4890
     */
4891
    public getSupplier_result(getSupplier_result other) {
4892
      if (other.isSetSuccess()) {
4893
        this.success = new Supplier(other.success);
4894
      }
4895
      if (other.isSetE()) {
4896
        this.e = new PurchaseServiceException(other.e);
4897
      }
4898
    }
4899
 
4900
    public getSupplier_result deepCopy() {
4901
      return new getSupplier_result(this);
4902
    }
4903
 
4904
    @Override
4905
    public void clear() {
4906
      this.success = null;
4907
      this.e = null;
4908
    }
4909
 
4910
    public Supplier getSuccess() {
4911
      return this.success;
4912
    }
4913
 
4914
    public void setSuccess(Supplier success) {
4915
      this.success = success;
4916
    }
4917
 
4918
    public void unsetSuccess() {
4919
      this.success = null;
4920
    }
4921
 
4922
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4923
    public boolean isSetSuccess() {
4924
      return this.success != null;
4925
    }
4926
 
4927
    public void setSuccessIsSet(boolean value) {
4928
      if (!value) {
4929
        this.success = null;
4930
      }
4931
    }
4932
 
4933
    public PurchaseServiceException getE() {
4934
      return this.e;
4935
    }
4936
 
4937
    public void setE(PurchaseServiceException e) {
4938
      this.e = e;
4939
    }
4940
 
4941
    public void unsetE() {
4942
      this.e = null;
4943
    }
4944
 
4945
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4946
    public boolean isSetE() {
4947
      return this.e != null;
4948
    }
4949
 
4950
    public void setEIsSet(boolean value) {
4951
      if (!value) {
4952
        this.e = null;
4953
      }
4954
    }
4955
 
4956
    public void setFieldValue(_Fields field, Object value) {
4957
      switch (field) {
4958
      case SUCCESS:
4959
        if (value == null) {
4960
          unsetSuccess();
4961
        } else {
4962
          setSuccess((Supplier)value);
4963
        }
4964
        break;
4965
 
4966
      case E:
4967
        if (value == null) {
4968
          unsetE();
4969
        } else {
4970
          setE((PurchaseServiceException)value);
4971
        }
4972
        break;
4973
 
4974
      }
4975
    }
4976
 
4977
    public Object getFieldValue(_Fields field) {
4978
      switch (field) {
4979
      case SUCCESS:
4980
        return getSuccess();
4981
 
4982
      case E:
4983
        return getE();
4984
 
4985
      }
4986
      throw new IllegalStateException();
4987
    }
4988
 
4989
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4990
    public boolean isSet(_Fields field) {
4991
      if (field == null) {
4992
        throw new IllegalArgumentException();
4993
      }
4994
 
4995
      switch (field) {
4996
      case SUCCESS:
4997
        return isSetSuccess();
4998
      case E:
4999
        return isSetE();
5000
      }
5001
      throw new IllegalStateException();
5002
    }
5003
 
5004
    @Override
5005
    public boolean equals(Object that) {
5006
      if (that == null)
5007
        return false;
5008
      if (that instanceof getSupplier_result)
5009
        return this.equals((getSupplier_result)that);
5010
      return false;
5011
    }
5012
 
5013
    public boolean equals(getSupplier_result that) {
5014
      if (that == null)
5015
        return false;
5016
 
5017
      boolean this_present_success = true && this.isSetSuccess();
5018
      boolean that_present_success = true && that.isSetSuccess();
5019
      if (this_present_success || that_present_success) {
5020
        if (!(this_present_success && that_present_success))
5021
          return false;
5022
        if (!this.success.equals(that.success))
5023
          return false;
5024
      }
5025
 
5026
      boolean this_present_e = true && this.isSetE();
5027
      boolean that_present_e = true && that.isSetE();
5028
      if (this_present_e || that_present_e) {
5029
        if (!(this_present_e && that_present_e))
5030
          return false;
5031
        if (!this.e.equals(that.e))
5032
          return false;
5033
      }
5034
 
5035
      return true;
5036
    }
5037
 
5038
    @Override
5039
    public int hashCode() {
5040
      return 0;
5041
    }
5042
 
5043
    public int compareTo(getSupplier_result other) {
5044
      if (!getClass().equals(other.getClass())) {
5045
        return getClass().getName().compareTo(other.getClass().getName());
5046
      }
5047
 
5048
      int lastComparison = 0;
5049
      getSupplier_result typedOther = (getSupplier_result)other;
5050
 
5051
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5052
      if (lastComparison != 0) {
5053
        return lastComparison;
5054
      }
5055
      if (isSetSuccess()) {
5056
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5057
        if (lastComparison != 0) {
5058
          return lastComparison;
5059
        }
5060
      }
5061
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5062
      if (lastComparison != 0) {
5063
        return lastComparison;
5064
      }
5065
      if (isSetE()) {
5066
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5067
        if (lastComparison != 0) {
5068
          return lastComparison;
5069
        }
5070
      }
5071
      return 0;
5072
    }
5073
 
5074
    public _Fields fieldForId(int fieldId) {
5075
      return _Fields.findByThriftId(fieldId);
5076
    }
5077
 
5078
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5079
      org.apache.thrift.protocol.TField field;
5080
      iprot.readStructBegin();
5081
      while (true)
5082
      {
5083
        field = iprot.readFieldBegin();
5084
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5085
          break;
5086
        }
5087
        switch (field.id) {
5088
          case 0: // SUCCESS
5089
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5090
              this.success = new Supplier();
5091
              this.success.read(iprot);
5092
            } else { 
5093
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5094
            }
5095
            break;
5096
          case 1: // E
5097
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5098
              this.e = new PurchaseServiceException();
5099
              this.e.read(iprot);
5100
            } else { 
5101
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5102
            }
5103
            break;
5104
          default:
5105
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5106
        }
5107
        iprot.readFieldEnd();
5108
      }
5109
      iprot.readStructEnd();
5110
      validate();
5111
    }
5112
 
5113
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5114
      oprot.writeStructBegin(STRUCT_DESC);
5115
 
5116
      if (this.isSetSuccess()) {
5117
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5118
        this.success.write(oprot);
5119
        oprot.writeFieldEnd();
5120
      } else if (this.isSetE()) {
5121
        oprot.writeFieldBegin(E_FIELD_DESC);
5122
        this.e.write(oprot);
5123
        oprot.writeFieldEnd();
5124
      }
5125
      oprot.writeFieldStop();
5126
      oprot.writeStructEnd();
5127
    }
5128
 
5129
    @Override
5130
    public String toString() {
5131
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5132
      boolean first = true;
5133
 
5134
      sb.append("success:");
5135
      if (this.success == null) {
5136
        sb.append("null");
5137
      } else {
5138
        sb.append(this.success);
5139
      }
5140
      first = false;
5141
      if (!first) sb.append(", ");
5142
      sb.append("e:");
5143
      if (this.e == null) {
5144
        sb.append("null");
5145
      } else {
5146
        sb.append(this.e);
5147
      }
5148
      first = false;
5149
      sb.append(")");
5150
      return sb.toString();
5151
    }
5152
 
5153
    public void validate() throws org.apache.thrift.TException {
5154
      // check for required fields
5155
    }
5156
 
5157
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5158
      try {
5159
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5160
      } catch (org.apache.thrift.TException te) {
5161
        throw new java.io.IOException(te);
5162
      }
5163
    }
5164
 
5165
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5166
      try {
5167
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5168
      } catch (org.apache.thrift.TException te) {
5169
        throw new java.io.IOException(te);
5170
      }
5171
    }
5172
 
5173
  }
5174
 
5175
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5176
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5177
 
5178
    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);
5179
    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);
5180
    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);
5181
 
5182
    private long purchaseOrderId; // required
5183
    private String invoiceNumber; // required
5184
    private double freightCharges; // required
5185
 
5186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5187
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5188
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5189
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5190
      FREIGHT_CHARGES((short)3, "freightCharges");
5191
 
5192
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5193
 
5194
      static {
5195
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5196
          byName.put(field.getFieldName(), field);
5197
        }
5198
      }
5199
 
5200
      /**
5201
       * Find the _Fields constant that matches fieldId, or null if its not found.
5202
       */
5203
      public static _Fields findByThriftId(int fieldId) {
5204
        switch(fieldId) {
5205
          case 1: // PURCHASE_ORDER_ID
5206
            return PURCHASE_ORDER_ID;
5207
          case 2: // INVOICE_NUMBER
5208
            return INVOICE_NUMBER;
5209
          case 3: // FREIGHT_CHARGES
5210
            return FREIGHT_CHARGES;
5211
          default:
5212
            return null;
5213
        }
5214
      }
5215
 
5216
      /**
5217
       * Find the _Fields constant that matches fieldId, throwing an exception
5218
       * if it is not found.
5219
       */
5220
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5221
        _Fields fields = findByThriftId(fieldId);
5222
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5223
        return fields;
5224
      }
5225
 
5226
      /**
5227
       * Find the _Fields constant that matches name, or null if its not found.
5228
       */
5229
      public static _Fields findByName(String name) {
5230
        return byName.get(name);
5231
      }
5232
 
5233
      private final short _thriftId;
5234
      private final String _fieldName;
5235
 
5236
      _Fields(short thriftId, String fieldName) {
5237
        _thriftId = thriftId;
5238
        _fieldName = fieldName;
5239
      }
5240
 
5241
      public short getThriftFieldId() {
5242
        return _thriftId;
5243
      }
5244
 
5245
      public String getFieldName() {
5246
        return _fieldName;
5247
      }
5248
    }
5249
 
5250
    // isset id assignments
5251
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5252
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5253
    private BitSet __isset_bit_vector = new BitSet(2);
5254
 
5255
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5256
    static {
5257
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5258
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5259
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5260
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5261
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5262
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5263
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5264
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5265
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5266
    }
5267
 
5268
    public startPurchase_args() {
5269
    }
5270
 
5271
    public startPurchase_args(
5272
      long purchaseOrderId,
5273
      String invoiceNumber,
5274
      double freightCharges)
5275
    {
5276
      this();
5277
      this.purchaseOrderId = purchaseOrderId;
5278
      setPurchaseOrderIdIsSet(true);
5279
      this.invoiceNumber = invoiceNumber;
5280
      this.freightCharges = freightCharges;
5281
      setFreightChargesIsSet(true);
5282
    }
5283
 
5284
    /**
5285
     * Performs a deep copy on <i>other</i>.
5286
     */
5287
    public startPurchase_args(startPurchase_args other) {
5288
      __isset_bit_vector.clear();
5289
      __isset_bit_vector.or(other.__isset_bit_vector);
5290
      this.purchaseOrderId = other.purchaseOrderId;
5291
      if (other.isSetInvoiceNumber()) {
5292
        this.invoiceNumber = other.invoiceNumber;
5293
      }
5294
      this.freightCharges = other.freightCharges;
5295
    }
5296
 
5297
    public startPurchase_args deepCopy() {
5298
      return new startPurchase_args(this);
5299
    }
5300
 
5301
    @Override
5302
    public void clear() {
5303
      setPurchaseOrderIdIsSet(false);
5304
      this.purchaseOrderId = 0;
5305
      this.invoiceNumber = null;
5306
      setFreightChargesIsSet(false);
5307
      this.freightCharges = 0.0;
5308
    }
5309
 
5310
    public long getPurchaseOrderId() {
5311
      return this.purchaseOrderId;
5312
    }
5313
 
5314
    public void setPurchaseOrderId(long purchaseOrderId) {
5315
      this.purchaseOrderId = purchaseOrderId;
5316
      setPurchaseOrderIdIsSet(true);
5317
    }
5318
 
5319
    public void unsetPurchaseOrderId() {
5320
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5321
    }
5322
 
5323
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5324
    public boolean isSetPurchaseOrderId() {
5325
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5326
    }
5327
 
5328
    public void setPurchaseOrderIdIsSet(boolean value) {
5329
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5330
    }
5331
 
5332
    public String getInvoiceNumber() {
5333
      return this.invoiceNumber;
5334
    }
5335
 
5336
    public void setInvoiceNumber(String invoiceNumber) {
5337
      this.invoiceNumber = invoiceNumber;
5338
    }
5339
 
5340
    public void unsetInvoiceNumber() {
5341
      this.invoiceNumber = null;
5342
    }
5343
 
5344
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5345
    public boolean isSetInvoiceNumber() {
5346
      return this.invoiceNumber != null;
5347
    }
5348
 
5349
    public void setInvoiceNumberIsSet(boolean value) {
5350
      if (!value) {
5351
        this.invoiceNumber = null;
5352
      }
5353
    }
5354
 
5355
    public double getFreightCharges() {
5356
      return this.freightCharges;
5357
    }
5358
 
5359
    public void setFreightCharges(double freightCharges) {
5360
      this.freightCharges = freightCharges;
5361
      setFreightChargesIsSet(true);
5362
    }
5363
 
5364
    public void unsetFreightCharges() {
5365
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5366
    }
5367
 
5368
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5369
    public boolean isSetFreightCharges() {
5370
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5371
    }
5372
 
5373
    public void setFreightChargesIsSet(boolean value) {
5374
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5375
    }
5376
 
5377
    public void setFieldValue(_Fields field, Object value) {
5378
      switch (field) {
5379
      case PURCHASE_ORDER_ID:
5380
        if (value == null) {
5381
          unsetPurchaseOrderId();
5382
        } else {
5383
          setPurchaseOrderId((Long)value);
5384
        }
5385
        break;
5386
 
5387
      case INVOICE_NUMBER:
5388
        if (value == null) {
5389
          unsetInvoiceNumber();
5390
        } else {
5391
          setInvoiceNumber((String)value);
5392
        }
5393
        break;
5394
 
5395
      case FREIGHT_CHARGES:
5396
        if (value == null) {
5397
          unsetFreightCharges();
5398
        } else {
5399
          setFreightCharges((Double)value);
5400
        }
5401
        break;
5402
 
5403
      }
5404
    }
5405
 
5406
    public Object getFieldValue(_Fields field) {
5407
      switch (field) {
5408
      case PURCHASE_ORDER_ID:
5409
        return Long.valueOf(getPurchaseOrderId());
5410
 
5411
      case INVOICE_NUMBER:
5412
        return getInvoiceNumber();
5413
 
5414
      case FREIGHT_CHARGES:
5415
        return Double.valueOf(getFreightCharges());
5416
 
5417
      }
5418
      throw new IllegalStateException();
5419
    }
5420
 
5421
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5422
    public boolean isSet(_Fields field) {
5423
      if (field == null) {
5424
        throw new IllegalArgumentException();
5425
      }
5426
 
5427
      switch (field) {
5428
      case PURCHASE_ORDER_ID:
5429
        return isSetPurchaseOrderId();
5430
      case INVOICE_NUMBER:
5431
        return isSetInvoiceNumber();
5432
      case FREIGHT_CHARGES:
5433
        return isSetFreightCharges();
5434
      }
5435
      throw new IllegalStateException();
5436
    }
5437
 
5438
    @Override
5439
    public boolean equals(Object that) {
5440
      if (that == null)
5441
        return false;
5442
      if (that instanceof startPurchase_args)
5443
        return this.equals((startPurchase_args)that);
5444
      return false;
5445
    }
5446
 
5447
    public boolean equals(startPurchase_args that) {
5448
      if (that == null)
5449
        return false;
5450
 
5451
      boolean this_present_purchaseOrderId = true;
5452
      boolean that_present_purchaseOrderId = true;
5453
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5454
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5455
          return false;
5456
        if (this.purchaseOrderId != that.purchaseOrderId)
5457
          return false;
5458
      }
5459
 
5460
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5461
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5462
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5463
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5464
          return false;
5465
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5466
          return false;
5467
      }
5468
 
5469
      boolean this_present_freightCharges = true;
5470
      boolean that_present_freightCharges = true;
5471
      if (this_present_freightCharges || that_present_freightCharges) {
5472
        if (!(this_present_freightCharges && that_present_freightCharges))
5473
          return false;
5474
        if (this.freightCharges != that.freightCharges)
5475
          return false;
5476
      }
5477
 
5478
      return true;
5479
    }
5480
 
5481
    @Override
5482
    public int hashCode() {
5483
      return 0;
5484
    }
5485
 
5486
    public int compareTo(startPurchase_args other) {
5487
      if (!getClass().equals(other.getClass())) {
5488
        return getClass().getName().compareTo(other.getClass().getName());
5489
      }
5490
 
5491
      int lastComparison = 0;
5492
      startPurchase_args typedOther = (startPurchase_args)other;
5493
 
5494
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5495
      if (lastComparison != 0) {
5496
        return lastComparison;
5497
      }
5498
      if (isSetPurchaseOrderId()) {
5499
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5500
        if (lastComparison != 0) {
5501
          return lastComparison;
5502
        }
5503
      }
5504
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5505
      if (lastComparison != 0) {
5506
        return lastComparison;
5507
      }
5508
      if (isSetInvoiceNumber()) {
5509
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5510
        if (lastComparison != 0) {
5511
          return lastComparison;
5512
        }
5513
      }
5514
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5515
      if (lastComparison != 0) {
5516
        return lastComparison;
5517
      }
5518
      if (isSetFreightCharges()) {
5519
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5520
        if (lastComparison != 0) {
5521
          return lastComparison;
5522
        }
5523
      }
5524
      return 0;
5525
    }
5526
 
5527
    public _Fields fieldForId(int fieldId) {
5528
      return _Fields.findByThriftId(fieldId);
5529
    }
5530
 
5531
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5532
      org.apache.thrift.protocol.TField field;
5533
      iprot.readStructBegin();
5534
      while (true)
5535
      {
5536
        field = iprot.readFieldBegin();
5537
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5538
          break;
5539
        }
5540
        switch (field.id) {
5541
          case 1: // PURCHASE_ORDER_ID
5542
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5543
              this.purchaseOrderId = iprot.readI64();
5544
              setPurchaseOrderIdIsSet(true);
5545
            } else { 
5546
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5547
            }
5548
            break;
5549
          case 2: // INVOICE_NUMBER
5550
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5551
              this.invoiceNumber = iprot.readString();
5552
            } else { 
5553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5554
            }
5555
            break;
5556
          case 3: // FREIGHT_CHARGES
5557
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5558
              this.freightCharges = iprot.readDouble();
5559
              setFreightChargesIsSet(true);
5560
            } else { 
5561
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5562
            }
5563
            break;
5564
          default:
5565
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5566
        }
5567
        iprot.readFieldEnd();
5568
      }
5569
      iprot.readStructEnd();
5570
      validate();
5571
    }
5572
 
5573
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5574
      validate();
5575
 
5576
      oprot.writeStructBegin(STRUCT_DESC);
5577
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5578
      oprot.writeI64(this.purchaseOrderId);
5579
      oprot.writeFieldEnd();
5580
      if (this.invoiceNumber != null) {
5581
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5582
        oprot.writeString(this.invoiceNumber);
5583
        oprot.writeFieldEnd();
5584
      }
5585
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5586
      oprot.writeDouble(this.freightCharges);
5587
      oprot.writeFieldEnd();
5588
      oprot.writeFieldStop();
5589
      oprot.writeStructEnd();
5590
    }
5591
 
5592
    @Override
5593
    public String toString() {
5594
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5595
      boolean first = true;
5596
 
5597
      sb.append("purchaseOrderId:");
5598
      sb.append(this.purchaseOrderId);
5599
      first = false;
5600
      if (!first) sb.append(", ");
5601
      sb.append("invoiceNumber:");
5602
      if (this.invoiceNumber == null) {
5603
        sb.append("null");
5604
      } else {
5605
        sb.append(this.invoiceNumber);
5606
      }
5607
      first = false;
5608
      if (!first) sb.append(", ");
5609
      sb.append("freightCharges:");
5610
      sb.append(this.freightCharges);
5611
      first = false;
5612
      sb.append(")");
5613
      return sb.toString();
5614
    }
5615
 
5616
    public void validate() throws org.apache.thrift.TException {
5617
      // check for required fields
5618
    }
5619
 
5620
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5621
      try {
5622
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5623
      } catch (org.apache.thrift.TException te) {
5624
        throw new java.io.IOException(te);
5625
      }
5626
    }
5627
 
5628
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5629
      try {
5630
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5631
      } catch (org.apache.thrift.TException te) {
5632
        throw new java.io.IOException(te);
5633
      }
5634
    }
5635
 
5636
  }
5637
 
5638
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5639
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5640
 
5641
    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);
5642
    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);
5643
 
5644
    private long success; // required
5645
    private PurchaseServiceException e; // required
5646
 
5647
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5648
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5649
      SUCCESS((short)0, "success"),
5650
      E((short)1, "e");
5651
 
5652
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5653
 
5654
      static {
5655
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5656
          byName.put(field.getFieldName(), field);
5657
        }
5658
      }
5659
 
5660
      /**
5661
       * Find the _Fields constant that matches fieldId, or null if its not found.
5662
       */
5663
      public static _Fields findByThriftId(int fieldId) {
5664
        switch(fieldId) {
5665
          case 0: // SUCCESS
5666
            return SUCCESS;
5667
          case 1: // E
5668
            return E;
5669
          default:
5670
            return null;
5671
        }
5672
      }
5673
 
5674
      /**
5675
       * Find the _Fields constant that matches fieldId, throwing an exception
5676
       * if it is not found.
5677
       */
5678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5679
        _Fields fields = findByThriftId(fieldId);
5680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5681
        return fields;
5682
      }
5683
 
5684
      /**
5685
       * Find the _Fields constant that matches name, or null if its not found.
5686
       */
5687
      public static _Fields findByName(String name) {
5688
        return byName.get(name);
5689
      }
5690
 
5691
      private final short _thriftId;
5692
      private final String _fieldName;
5693
 
5694
      _Fields(short thriftId, String fieldName) {
5695
        _thriftId = thriftId;
5696
        _fieldName = fieldName;
5697
      }
5698
 
5699
      public short getThriftFieldId() {
5700
        return _thriftId;
5701
      }
5702
 
5703
      public String getFieldName() {
5704
        return _fieldName;
5705
      }
5706
    }
5707
 
5708
    // isset id assignments
5709
    private static final int __SUCCESS_ISSET_ID = 0;
5710
    private BitSet __isset_bit_vector = new BitSet(1);
5711
 
5712
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5713
    static {
5714
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5715
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5716
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5717
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5718
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5719
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5720
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5721
    }
5722
 
5723
    public startPurchase_result() {
5724
    }
5725
 
5726
    public startPurchase_result(
5727
      long success,
5728
      PurchaseServiceException e)
5729
    {
5730
      this();
5731
      this.success = success;
5732
      setSuccessIsSet(true);
5733
      this.e = e;
5734
    }
5735
 
5736
    /**
5737
     * Performs a deep copy on <i>other</i>.
5738
     */
5739
    public startPurchase_result(startPurchase_result other) {
5740
      __isset_bit_vector.clear();
5741
      __isset_bit_vector.or(other.__isset_bit_vector);
5742
      this.success = other.success;
5743
      if (other.isSetE()) {
5744
        this.e = new PurchaseServiceException(other.e);
5745
      }
5746
    }
5747
 
5748
    public startPurchase_result deepCopy() {
5749
      return new startPurchase_result(this);
5750
    }
5751
 
5752
    @Override
5753
    public void clear() {
5754
      setSuccessIsSet(false);
5755
      this.success = 0;
5756
      this.e = null;
5757
    }
5758
 
5759
    public long getSuccess() {
5760
      return this.success;
5761
    }
5762
 
5763
    public void setSuccess(long success) {
5764
      this.success = success;
5765
      setSuccessIsSet(true);
5766
    }
5767
 
5768
    public void unsetSuccess() {
5769
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5770
    }
5771
 
5772
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5773
    public boolean isSetSuccess() {
5774
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5775
    }
5776
 
5777
    public void setSuccessIsSet(boolean value) {
5778
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5779
    }
5780
 
5781
    public PurchaseServiceException getE() {
5782
      return this.e;
5783
    }
5784
 
5785
    public void setE(PurchaseServiceException e) {
5786
      this.e = e;
5787
    }
5788
 
5789
    public void unsetE() {
5790
      this.e = null;
5791
    }
5792
 
5793
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5794
    public boolean isSetE() {
5795
      return this.e != null;
5796
    }
5797
 
5798
    public void setEIsSet(boolean value) {
5799
      if (!value) {
5800
        this.e = null;
5801
      }
5802
    }
5803
 
5804
    public void setFieldValue(_Fields field, Object value) {
5805
      switch (field) {
5806
      case SUCCESS:
5807
        if (value == null) {
5808
          unsetSuccess();
5809
        } else {
5810
          setSuccess((Long)value);
5811
        }
5812
        break;
5813
 
5814
      case E:
5815
        if (value == null) {
5816
          unsetE();
5817
        } else {
5818
          setE((PurchaseServiceException)value);
5819
        }
5820
        break;
5821
 
5822
      }
5823
    }
5824
 
5825
    public Object getFieldValue(_Fields field) {
5826
      switch (field) {
5827
      case SUCCESS:
5828
        return Long.valueOf(getSuccess());
5829
 
5830
      case E:
5831
        return getE();
5832
 
5833
      }
5834
      throw new IllegalStateException();
5835
    }
5836
 
5837
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5838
    public boolean isSet(_Fields field) {
5839
      if (field == null) {
5840
        throw new IllegalArgumentException();
5841
      }
5842
 
5843
      switch (field) {
5844
      case SUCCESS:
5845
        return isSetSuccess();
5846
      case E:
5847
        return isSetE();
5848
      }
5849
      throw new IllegalStateException();
5850
    }
5851
 
5852
    @Override
5853
    public boolean equals(Object that) {
5854
      if (that == null)
5855
        return false;
5856
      if (that instanceof startPurchase_result)
5857
        return this.equals((startPurchase_result)that);
5858
      return false;
5859
    }
5860
 
5861
    public boolean equals(startPurchase_result that) {
5862
      if (that == null)
5863
        return false;
5864
 
5865
      boolean this_present_success = true;
5866
      boolean that_present_success = true;
5867
      if (this_present_success || that_present_success) {
5868
        if (!(this_present_success && that_present_success))
5869
          return false;
5870
        if (this.success != that.success)
5871
          return false;
5872
      }
5873
 
5874
      boolean this_present_e = true && this.isSetE();
5875
      boolean that_present_e = true && that.isSetE();
5876
      if (this_present_e || that_present_e) {
5877
        if (!(this_present_e && that_present_e))
5878
          return false;
5879
        if (!this.e.equals(that.e))
5880
          return false;
5881
      }
5882
 
5883
      return true;
5884
    }
5885
 
5886
    @Override
5887
    public int hashCode() {
5888
      return 0;
5889
    }
5890
 
5891
    public int compareTo(startPurchase_result other) {
5892
      if (!getClass().equals(other.getClass())) {
5893
        return getClass().getName().compareTo(other.getClass().getName());
5894
      }
5895
 
5896
      int lastComparison = 0;
5897
      startPurchase_result typedOther = (startPurchase_result)other;
5898
 
5899
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5900
      if (lastComparison != 0) {
5901
        return lastComparison;
5902
      }
5903
      if (isSetSuccess()) {
5904
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5905
        if (lastComparison != 0) {
5906
          return lastComparison;
5907
        }
5908
      }
5909
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5910
      if (lastComparison != 0) {
5911
        return lastComparison;
5912
      }
5913
      if (isSetE()) {
5914
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5915
        if (lastComparison != 0) {
5916
          return lastComparison;
5917
        }
5918
      }
5919
      return 0;
5920
    }
5921
 
5922
    public _Fields fieldForId(int fieldId) {
5923
      return _Fields.findByThriftId(fieldId);
5924
    }
5925
 
5926
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5927
      org.apache.thrift.protocol.TField field;
5928
      iprot.readStructBegin();
5929
      while (true)
5930
      {
5931
        field = iprot.readFieldBegin();
5932
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5933
          break;
5934
        }
5935
        switch (field.id) {
5936
          case 0: // SUCCESS
5937
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5938
              this.success = iprot.readI64();
5939
              setSuccessIsSet(true);
5940
            } else { 
5941
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5942
            }
5943
            break;
5944
          case 1: // E
5945
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5946
              this.e = new PurchaseServiceException();
5947
              this.e.read(iprot);
5948
            } else { 
5949
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5950
            }
5951
            break;
5952
          default:
5953
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5954
        }
5955
        iprot.readFieldEnd();
5956
      }
5957
      iprot.readStructEnd();
5958
      validate();
5959
    }
5960
 
5961
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5962
      oprot.writeStructBegin(STRUCT_DESC);
5963
 
5964
      if (this.isSetSuccess()) {
5965
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5966
        oprot.writeI64(this.success);
5967
        oprot.writeFieldEnd();
5968
      } else if (this.isSetE()) {
5969
        oprot.writeFieldBegin(E_FIELD_DESC);
5970
        this.e.write(oprot);
5971
        oprot.writeFieldEnd();
5972
      }
5973
      oprot.writeFieldStop();
5974
      oprot.writeStructEnd();
5975
    }
5976
 
5977
    @Override
5978
    public String toString() {
5979
      StringBuilder sb = new StringBuilder("startPurchase_result(");
5980
      boolean first = true;
5981
 
5982
      sb.append("success:");
5983
      sb.append(this.success);
5984
      first = false;
5985
      if (!first) sb.append(", ");
5986
      sb.append("e:");
5987
      if (this.e == null) {
5988
        sb.append("null");
5989
      } else {
5990
        sb.append(this.e);
5991
      }
5992
      first = false;
5993
      sb.append(")");
5994
      return sb.toString();
5995
    }
5996
 
5997
    public void validate() throws org.apache.thrift.TException {
5998
      // check for required fields
5999
    }
6000
 
6001
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6002
      try {
6003
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6004
      } catch (org.apache.thrift.TException te) {
6005
        throw new java.io.IOException(te);
6006
      }
6007
    }
6008
 
6009
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6010
      try {
6011
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6012
      } catch (org.apache.thrift.TException te) {
6013
        throw new java.io.IOException(te);
6014
      }
6015
    }
6016
 
6017
  }
6018
 
6019
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6020
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6021
 
6022
    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);
6023
 
6024
    private long purchaseId; // required
6025
 
6026
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6027
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6028
      PURCHASE_ID((short)1, "purchaseId");
6029
 
6030
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6031
 
6032
      static {
6033
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6034
          byName.put(field.getFieldName(), field);
6035
        }
6036
      }
6037
 
6038
      /**
6039
       * Find the _Fields constant that matches fieldId, or null if its not found.
6040
       */
6041
      public static _Fields findByThriftId(int fieldId) {
6042
        switch(fieldId) {
6043
          case 1: // PURCHASE_ID
6044
            return PURCHASE_ID;
6045
          default:
6046
            return null;
6047
        }
6048
      }
6049
 
6050
      /**
6051
       * Find the _Fields constant that matches fieldId, throwing an exception
6052
       * if it is not found.
6053
       */
6054
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6055
        _Fields fields = findByThriftId(fieldId);
6056
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6057
        return fields;
6058
      }
6059
 
6060
      /**
6061
       * Find the _Fields constant that matches name, or null if its not found.
6062
       */
6063
      public static _Fields findByName(String name) {
6064
        return byName.get(name);
6065
      }
6066
 
6067
      private final short _thriftId;
6068
      private final String _fieldName;
6069
 
6070
      _Fields(short thriftId, String fieldName) {
6071
        _thriftId = thriftId;
6072
        _fieldName = fieldName;
6073
      }
6074
 
6075
      public short getThriftFieldId() {
6076
        return _thriftId;
6077
      }
6078
 
6079
      public String getFieldName() {
6080
        return _fieldName;
6081
      }
6082
    }
6083
 
6084
    // isset id assignments
6085
    private static final int __PURCHASEID_ISSET_ID = 0;
6086
    private BitSet __isset_bit_vector = new BitSet(1);
6087
 
6088
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6089
    static {
6090
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6091
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6092
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6093
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6094
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6095
    }
6096
 
6097
    public closePurchase_args() {
6098
    }
6099
 
6100
    public closePurchase_args(
6101
      long purchaseId)
6102
    {
6103
      this();
6104
      this.purchaseId = purchaseId;
6105
      setPurchaseIdIsSet(true);
6106
    }
6107
 
6108
    /**
6109
     * Performs a deep copy on <i>other</i>.
6110
     */
6111
    public closePurchase_args(closePurchase_args other) {
6112
      __isset_bit_vector.clear();
6113
      __isset_bit_vector.or(other.__isset_bit_vector);
6114
      this.purchaseId = other.purchaseId;
6115
    }
6116
 
6117
    public closePurchase_args deepCopy() {
6118
      return new closePurchase_args(this);
6119
    }
6120
 
6121
    @Override
6122
    public void clear() {
6123
      setPurchaseIdIsSet(false);
6124
      this.purchaseId = 0;
6125
    }
6126
 
6127
    public long getPurchaseId() {
6128
      return this.purchaseId;
6129
    }
6130
 
6131
    public void setPurchaseId(long purchaseId) {
6132
      this.purchaseId = purchaseId;
6133
      setPurchaseIdIsSet(true);
6134
    }
6135
 
6136
    public void unsetPurchaseId() {
6137
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6138
    }
6139
 
6140
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6141
    public boolean isSetPurchaseId() {
6142
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6143
    }
6144
 
6145
    public void setPurchaseIdIsSet(boolean value) {
6146
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6147
    }
6148
 
6149
    public void setFieldValue(_Fields field, Object value) {
6150
      switch (field) {
6151
      case PURCHASE_ID:
6152
        if (value == null) {
6153
          unsetPurchaseId();
6154
        } else {
6155
          setPurchaseId((Long)value);
6156
        }
6157
        break;
6158
 
6159
      }
6160
    }
6161
 
6162
    public Object getFieldValue(_Fields field) {
6163
      switch (field) {
6164
      case PURCHASE_ID:
6165
        return Long.valueOf(getPurchaseId());
6166
 
6167
      }
6168
      throw new IllegalStateException();
6169
    }
6170
 
6171
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6172
    public boolean isSet(_Fields field) {
6173
      if (field == null) {
6174
        throw new IllegalArgumentException();
6175
      }
6176
 
6177
      switch (field) {
6178
      case PURCHASE_ID:
6179
        return isSetPurchaseId();
6180
      }
6181
      throw new IllegalStateException();
6182
    }
6183
 
6184
    @Override
6185
    public boolean equals(Object that) {
6186
      if (that == null)
6187
        return false;
6188
      if (that instanceof closePurchase_args)
6189
        return this.equals((closePurchase_args)that);
6190
      return false;
6191
    }
6192
 
6193
    public boolean equals(closePurchase_args that) {
6194
      if (that == null)
6195
        return false;
6196
 
6197
      boolean this_present_purchaseId = true;
6198
      boolean that_present_purchaseId = true;
6199
      if (this_present_purchaseId || that_present_purchaseId) {
6200
        if (!(this_present_purchaseId && that_present_purchaseId))
6201
          return false;
6202
        if (this.purchaseId != that.purchaseId)
6203
          return false;
6204
      }
6205
 
6206
      return true;
6207
    }
6208
 
6209
    @Override
6210
    public int hashCode() {
6211
      return 0;
6212
    }
6213
 
6214
    public int compareTo(closePurchase_args other) {
6215
      if (!getClass().equals(other.getClass())) {
6216
        return getClass().getName().compareTo(other.getClass().getName());
6217
      }
6218
 
6219
      int lastComparison = 0;
6220
      closePurchase_args typedOther = (closePurchase_args)other;
6221
 
6222
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6223
      if (lastComparison != 0) {
6224
        return lastComparison;
6225
      }
6226
      if (isSetPurchaseId()) {
6227
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6228
        if (lastComparison != 0) {
6229
          return lastComparison;
6230
        }
6231
      }
6232
      return 0;
6233
    }
6234
 
6235
    public _Fields fieldForId(int fieldId) {
6236
      return _Fields.findByThriftId(fieldId);
6237
    }
6238
 
6239
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6240
      org.apache.thrift.protocol.TField field;
6241
      iprot.readStructBegin();
6242
      while (true)
6243
      {
6244
        field = iprot.readFieldBegin();
6245
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6246
          break;
6247
        }
6248
        switch (field.id) {
6249
          case 1: // PURCHASE_ID
6250
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6251
              this.purchaseId = iprot.readI64();
6252
              setPurchaseIdIsSet(true);
6253
            } else { 
6254
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6255
            }
6256
            break;
6257
          default:
6258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6259
        }
6260
        iprot.readFieldEnd();
6261
      }
6262
      iprot.readStructEnd();
6263
      validate();
6264
    }
6265
 
6266
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6267
      validate();
6268
 
6269
      oprot.writeStructBegin(STRUCT_DESC);
6270
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6271
      oprot.writeI64(this.purchaseId);
6272
      oprot.writeFieldEnd();
6273
      oprot.writeFieldStop();
6274
      oprot.writeStructEnd();
6275
    }
6276
 
6277
    @Override
6278
    public String toString() {
6279
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6280
      boolean first = true;
6281
 
6282
      sb.append("purchaseId:");
6283
      sb.append(this.purchaseId);
6284
      first = false;
6285
      sb.append(")");
6286
      return sb.toString();
6287
    }
6288
 
6289
    public void validate() throws org.apache.thrift.TException {
6290
      // check for required fields
6291
    }
6292
 
6293
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6294
      try {
6295
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6296
      } catch (org.apache.thrift.TException te) {
6297
        throw new java.io.IOException(te);
6298
      }
6299
    }
6300
 
6301
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6302
      try {
6303
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6304
      } catch (org.apache.thrift.TException te) {
6305
        throw new java.io.IOException(te);
6306
      }
6307
    }
6308
 
6309
  }
6310
 
6311
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6312
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6313
 
6314
    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);
6315
    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);
6316
 
6317
    private long success; // required
6318
    private PurchaseServiceException e; // required
6319
 
6320
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6321
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6322
      SUCCESS((short)0, "success"),
6323
      E((short)1, "e");
6324
 
6325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6326
 
6327
      static {
6328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6329
          byName.put(field.getFieldName(), field);
6330
        }
6331
      }
6332
 
6333
      /**
6334
       * Find the _Fields constant that matches fieldId, or null if its not found.
6335
       */
6336
      public static _Fields findByThriftId(int fieldId) {
6337
        switch(fieldId) {
6338
          case 0: // SUCCESS
6339
            return SUCCESS;
6340
          case 1: // E
6341
            return E;
6342
          default:
6343
            return null;
6344
        }
6345
      }
6346
 
6347
      /**
6348
       * Find the _Fields constant that matches fieldId, throwing an exception
6349
       * if it is not found.
6350
       */
6351
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6352
        _Fields fields = findByThriftId(fieldId);
6353
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6354
        return fields;
6355
      }
6356
 
6357
      /**
6358
       * Find the _Fields constant that matches name, or null if its not found.
6359
       */
6360
      public static _Fields findByName(String name) {
6361
        return byName.get(name);
6362
      }
6363
 
6364
      private final short _thriftId;
6365
      private final String _fieldName;
6366
 
6367
      _Fields(short thriftId, String fieldName) {
6368
        _thriftId = thriftId;
6369
        _fieldName = fieldName;
6370
      }
6371
 
6372
      public short getThriftFieldId() {
6373
        return _thriftId;
6374
      }
6375
 
6376
      public String getFieldName() {
6377
        return _fieldName;
6378
      }
6379
    }
6380
 
6381
    // isset id assignments
6382
    private static final int __SUCCESS_ISSET_ID = 0;
6383
    private BitSet __isset_bit_vector = new BitSet(1);
6384
 
6385
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6386
    static {
6387
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6388
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6389
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6390
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6391
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6392
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6393
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6394
    }
6395
 
6396
    public closePurchase_result() {
6397
    }
6398
 
6399
    public closePurchase_result(
6400
      long success,
6401
      PurchaseServiceException e)
6402
    {
6403
      this();
6404
      this.success = success;
6405
      setSuccessIsSet(true);
6406
      this.e = e;
6407
    }
6408
 
6409
    /**
6410
     * Performs a deep copy on <i>other</i>.
6411
     */
6412
    public closePurchase_result(closePurchase_result other) {
6413
      __isset_bit_vector.clear();
6414
      __isset_bit_vector.or(other.__isset_bit_vector);
6415
      this.success = other.success;
6416
      if (other.isSetE()) {
6417
        this.e = new PurchaseServiceException(other.e);
6418
      }
6419
    }
6420
 
6421
    public closePurchase_result deepCopy() {
6422
      return new closePurchase_result(this);
6423
    }
6424
 
6425
    @Override
6426
    public void clear() {
6427
      setSuccessIsSet(false);
6428
      this.success = 0;
6429
      this.e = null;
6430
    }
6431
 
6432
    public long getSuccess() {
6433
      return this.success;
6434
    }
6435
 
6436
    public void setSuccess(long success) {
6437
      this.success = success;
6438
      setSuccessIsSet(true);
6439
    }
6440
 
6441
    public void unsetSuccess() {
6442
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6443
    }
6444
 
6445
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6446
    public boolean isSetSuccess() {
6447
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6448
    }
6449
 
6450
    public void setSuccessIsSet(boolean value) {
6451
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6452
    }
6453
 
6454
    public PurchaseServiceException getE() {
6455
      return this.e;
6456
    }
6457
 
6458
    public void setE(PurchaseServiceException e) {
6459
      this.e = e;
6460
    }
6461
 
6462
    public void unsetE() {
6463
      this.e = null;
6464
    }
6465
 
6466
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6467
    public boolean isSetE() {
6468
      return this.e != null;
6469
    }
6470
 
6471
    public void setEIsSet(boolean value) {
6472
      if (!value) {
6473
        this.e = null;
6474
      }
6475
    }
6476
 
6477
    public void setFieldValue(_Fields field, Object value) {
6478
      switch (field) {
6479
      case SUCCESS:
6480
        if (value == null) {
6481
          unsetSuccess();
6482
        } else {
6483
          setSuccess((Long)value);
6484
        }
6485
        break;
6486
 
6487
      case E:
6488
        if (value == null) {
6489
          unsetE();
6490
        } else {
6491
          setE((PurchaseServiceException)value);
6492
        }
6493
        break;
6494
 
6495
      }
6496
    }
6497
 
6498
    public Object getFieldValue(_Fields field) {
6499
      switch (field) {
6500
      case SUCCESS:
6501
        return Long.valueOf(getSuccess());
6502
 
6503
      case E:
6504
        return getE();
6505
 
6506
      }
6507
      throw new IllegalStateException();
6508
    }
6509
 
6510
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6511
    public boolean isSet(_Fields field) {
6512
      if (field == null) {
6513
        throw new IllegalArgumentException();
6514
      }
6515
 
6516
      switch (field) {
6517
      case SUCCESS:
6518
        return isSetSuccess();
6519
      case E:
6520
        return isSetE();
6521
      }
6522
      throw new IllegalStateException();
6523
    }
6524
 
6525
    @Override
6526
    public boolean equals(Object that) {
6527
      if (that == null)
6528
        return false;
6529
      if (that instanceof closePurchase_result)
6530
        return this.equals((closePurchase_result)that);
6531
      return false;
6532
    }
6533
 
6534
    public boolean equals(closePurchase_result that) {
6535
      if (that == null)
6536
        return false;
6537
 
6538
      boolean this_present_success = true;
6539
      boolean that_present_success = true;
6540
      if (this_present_success || that_present_success) {
6541
        if (!(this_present_success && that_present_success))
6542
          return false;
6543
        if (this.success != that.success)
6544
          return false;
6545
      }
6546
 
6547
      boolean this_present_e = true && this.isSetE();
6548
      boolean that_present_e = true && that.isSetE();
6549
      if (this_present_e || that_present_e) {
6550
        if (!(this_present_e && that_present_e))
6551
          return false;
6552
        if (!this.e.equals(that.e))
6553
          return false;
6554
      }
6555
 
6556
      return true;
6557
    }
6558
 
6559
    @Override
6560
    public int hashCode() {
6561
      return 0;
6562
    }
6563
 
6564
    public int compareTo(closePurchase_result other) {
6565
      if (!getClass().equals(other.getClass())) {
6566
        return getClass().getName().compareTo(other.getClass().getName());
6567
      }
6568
 
6569
      int lastComparison = 0;
6570
      closePurchase_result typedOther = (closePurchase_result)other;
6571
 
6572
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6573
      if (lastComparison != 0) {
6574
        return lastComparison;
6575
      }
6576
      if (isSetSuccess()) {
6577
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6578
        if (lastComparison != 0) {
6579
          return lastComparison;
6580
        }
6581
      }
6582
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6583
      if (lastComparison != 0) {
6584
        return lastComparison;
6585
      }
6586
      if (isSetE()) {
6587
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6588
        if (lastComparison != 0) {
6589
          return lastComparison;
6590
        }
6591
      }
6592
      return 0;
6593
    }
6594
 
6595
    public _Fields fieldForId(int fieldId) {
6596
      return _Fields.findByThriftId(fieldId);
6597
    }
6598
 
6599
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6600
      org.apache.thrift.protocol.TField field;
6601
      iprot.readStructBegin();
6602
      while (true)
6603
      {
6604
        field = iprot.readFieldBegin();
6605
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6606
          break;
6607
        }
6608
        switch (field.id) {
6609
          case 0: // SUCCESS
6610
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6611
              this.success = iprot.readI64();
6612
              setSuccessIsSet(true);
6613
            } else { 
6614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6615
            }
6616
            break;
6617
          case 1: // E
6618
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6619
              this.e = new PurchaseServiceException();
6620
              this.e.read(iprot);
6621
            } else { 
6622
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6623
            }
6624
            break;
6625
          default:
6626
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6627
        }
6628
        iprot.readFieldEnd();
6629
      }
6630
      iprot.readStructEnd();
6631
      validate();
6632
    }
6633
 
6634
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6635
      oprot.writeStructBegin(STRUCT_DESC);
6636
 
6637
      if (this.isSetSuccess()) {
6638
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6639
        oprot.writeI64(this.success);
6640
        oprot.writeFieldEnd();
6641
      } else if (this.isSetE()) {
6642
        oprot.writeFieldBegin(E_FIELD_DESC);
6643
        this.e.write(oprot);
6644
        oprot.writeFieldEnd();
6645
      }
6646
      oprot.writeFieldStop();
6647
      oprot.writeStructEnd();
6648
    }
6649
 
6650
    @Override
6651
    public String toString() {
6652
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6653
      boolean first = true;
6654
 
6655
      sb.append("success:");
6656
      sb.append(this.success);
6657
      first = false;
6658
      if (!first) sb.append(", ");
6659
      sb.append("e:");
6660
      if (this.e == null) {
6661
        sb.append("null");
6662
      } else {
6663
        sb.append(this.e);
6664
      }
6665
      first = false;
6666
      sb.append(")");
6667
      return sb.toString();
6668
    }
6669
 
6670
    public void validate() throws org.apache.thrift.TException {
6671
      // check for required fields
6672
    }
6673
 
6674
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6675
      try {
6676
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6677
      } catch (org.apache.thrift.TException te) {
6678
        throw new java.io.IOException(te);
6679
      }
6680
    }
6681
 
6682
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6683
      try {
6684
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6685
      } catch (org.apache.thrift.TException te) {
6686
        throw new java.io.IOException(te);
6687
      }
6688
    }
6689
 
6690
  }
6691
 
6692
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6693
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6694
 
6695
    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);
6696
    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);
6697
 
6698
    private long purchaseOrderId; // required
6699
    private boolean open; // required
6700
 
6701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6702
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6703
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6704
      OPEN((short)2, "open");
6705
 
6706
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6707
 
6708
      static {
6709
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6710
          byName.put(field.getFieldName(), field);
6711
        }
6712
      }
6713
 
6714
      /**
6715
       * Find the _Fields constant that matches fieldId, or null if its not found.
6716
       */
6717
      public static _Fields findByThriftId(int fieldId) {
6718
        switch(fieldId) {
6719
          case 1: // PURCHASE_ORDER_ID
6720
            return PURCHASE_ORDER_ID;
6721
          case 2: // OPEN
6722
            return OPEN;
6723
          default:
6724
            return null;
6725
        }
6726
      }
6727
 
6728
      /**
6729
       * Find the _Fields constant that matches fieldId, throwing an exception
6730
       * if it is not found.
6731
       */
6732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6733
        _Fields fields = findByThriftId(fieldId);
6734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6735
        return fields;
6736
      }
6737
 
6738
      /**
6739
       * Find the _Fields constant that matches name, or null if its not found.
6740
       */
6741
      public static _Fields findByName(String name) {
6742
        return byName.get(name);
6743
      }
6744
 
6745
      private final short _thriftId;
6746
      private final String _fieldName;
6747
 
6748
      _Fields(short thriftId, String fieldName) {
6749
        _thriftId = thriftId;
6750
        _fieldName = fieldName;
6751
      }
6752
 
6753
      public short getThriftFieldId() {
6754
        return _thriftId;
6755
      }
6756
 
6757
      public String getFieldName() {
6758
        return _fieldName;
6759
      }
6760
    }
6761
 
6762
    // isset id assignments
6763
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6764
    private static final int __OPEN_ISSET_ID = 1;
6765
    private BitSet __isset_bit_vector = new BitSet(2);
6766
 
6767
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6768
    static {
6769
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6770
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6771
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6772
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6773
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6774
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6775
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6776
    }
6777
 
6778
    public getAllPurchases_args() {
6779
    }
6780
 
6781
    public getAllPurchases_args(
6782
      long purchaseOrderId,
6783
      boolean open)
6784
    {
6785
      this();
6786
      this.purchaseOrderId = purchaseOrderId;
6787
      setPurchaseOrderIdIsSet(true);
6788
      this.open = open;
6789
      setOpenIsSet(true);
6790
    }
6791
 
6792
    /**
6793
     * Performs a deep copy on <i>other</i>.
6794
     */
6795
    public getAllPurchases_args(getAllPurchases_args other) {
6796
      __isset_bit_vector.clear();
6797
      __isset_bit_vector.or(other.__isset_bit_vector);
6798
      this.purchaseOrderId = other.purchaseOrderId;
6799
      this.open = other.open;
6800
    }
6801
 
6802
    public getAllPurchases_args deepCopy() {
6803
      return new getAllPurchases_args(this);
6804
    }
6805
 
6806
    @Override
6807
    public void clear() {
6808
      setPurchaseOrderIdIsSet(false);
6809
      this.purchaseOrderId = 0;
6810
      setOpenIsSet(false);
6811
      this.open = false;
6812
    }
6813
 
6814
    public long getPurchaseOrderId() {
6815
      return this.purchaseOrderId;
6816
    }
6817
 
6818
    public void setPurchaseOrderId(long purchaseOrderId) {
6819
      this.purchaseOrderId = purchaseOrderId;
6820
      setPurchaseOrderIdIsSet(true);
6821
    }
6822
 
6823
    public void unsetPurchaseOrderId() {
6824
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
6825
    }
6826
 
6827
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
6828
    public boolean isSetPurchaseOrderId() {
6829
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
6830
    }
6831
 
6832
    public void setPurchaseOrderIdIsSet(boolean value) {
6833
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
6834
    }
6835
 
6836
    public boolean isOpen() {
6837
      return this.open;
6838
    }
6839
 
6840
    public void setOpen(boolean open) {
6841
      this.open = open;
6842
      setOpenIsSet(true);
6843
    }
6844
 
6845
    public void unsetOpen() {
6846
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6847
    }
6848
 
6849
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6850
    public boolean isSetOpen() {
6851
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6852
    }
6853
 
6854
    public void setOpenIsSet(boolean value) {
6855
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6856
    }
6857
 
6858
    public void setFieldValue(_Fields field, Object value) {
6859
      switch (field) {
6860
      case PURCHASE_ORDER_ID:
6861
        if (value == null) {
6862
          unsetPurchaseOrderId();
6863
        } else {
6864
          setPurchaseOrderId((Long)value);
6865
        }
6866
        break;
6867
 
6868
      case OPEN:
6869
        if (value == null) {
6870
          unsetOpen();
6871
        } else {
6872
          setOpen((Boolean)value);
6873
        }
6874
        break;
6875
 
6876
      }
6877
    }
6878
 
6879
    public Object getFieldValue(_Fields field) {
6880
      switch (field) {
6881
      case PURCHASE_ORDER_ID:
6882
        return Long.valueOf(getPurchaseOrderId());
6883
 
6884
      case OPEN:
6885
        return Boolean.valueOf(isOpen());
6886
 
6887
      }
6888
      throw new IllegalStateException();
6889
    }
6890
 
6891
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6892
    public boolean isSet(_Fields field) {
6893
      if (field == null) {
6894
        throw new IllegalArgumentException();
6895
      }
6896
 
6897
      switch (field) {
6898
      case PURCHASE_ORDER_ID:
6899
        return isSetPurchaseOrderId();
6900
      case OPEN:
6901
        return isSetOpen();
6902
      }
6903
      throw new IllegalStateException();
6904
    }
6905
 
6906
    @Override
6907
    public boolean equals(Object that) {
6908
      if (that == null)
6909
        return false;
6910
      if (that instanceof getAllPurchases_args)
6911
        return this.equals((getAllPurchases_args)that);
6912
      return false;
6913
    }
6914
 
6915
    public boolean equals(getAllPurchases_args that) {
6916
      if (that == null)
6917
        return false;
6918
 
6919
      boolean this_present_purchaseOrderId = true;
6920
      boolean that_present_purchaseOrderId = true;
6921
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6922
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6923
          return false;
6924
        if (this.purchaseOrderId != that.purchaseOrderId)
6925
          return false;
6926
      }
6927
 
6928
      boolean this_present_open = true;
6929
      boolean that_present_open = true;
6930
      if (this_present_open || that_present_open) {
6931
        if (!(this_present_open && that_present_open))
6932
          return false;
6933
        if (this.open != that.open)
6934
          return false;
6935
      }
6936
 
6937
      return true;
6938
    }
6939
 
6940
    @Override
6941
    public int hashCode() {
6942
      return 0;
6943
    }
6944
 
6945
    public int compareTo(getAllPurchases_args other) {
6946
      if (!getClass().equals(other.getClass())) {
6947
        return getClass().getName().compareTo(other.getClass().getName());
6948
      }
6949
 
6950
      int lastComparison = 0;
6951
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
6952
 
6953
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6954
      if (lastComparison != 0) {
6955
        return lastComparison;
6956
      }
6957
      if (isSetPurchaseOrderId()) {
6958
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6959
        if (lastComparison != 0) {
6960
          return lastComparison;
6961
        }
6962
      }
6963
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
6964
      if (lastComparison != 0) {
6965
        return lastComparison;
6966
      }
6967
      if (isSetOpen()) {
6968
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
6969
        if (lastComparison != 0) {
6970
          return lastComparison;
6971
        }
6972
      }
6973
      return 0;
6974
    }
6975
 
6976
    public _Fields fieldForId(int fieldId) {
6977
      return _Fields.findByThriftId(fieldId);
6978
    }
6979
 
6980
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6981
      org.apache.thrift.protocol.TField field;
6982
      iprot.readStructBegin();
6983
      while (true)
6984
      {
6985
        field = iprot.readFieldBegin();
6986
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6987
          break;
6988
        }
6989
        switch (field.id) {
6990
          case 1: // PURCHASE_ORDER_ID
6991
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6992
              this.purchaseOrderId = iprot.readI64();
6993
              setPurchaseOrderIdIsSet(true);
6994
            } else { 
6995
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6996
            }
6997
            break;
6998
          case 2: // OPEN
6999
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7000
              this.open = iprot.readBool();
7001
              setOpenIsSet(true);
7002
            } else { 
7003
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7004
            }
7005
            break;
7006
          default:
7007
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7008
        }
7009
        iprot.readFieldEnd();
7010
      }
7011
      iprot.readStructEnd();
7012
      validate();
7013
    }
7014
 
7015
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7016
      validate();
7017
 
7018
      oprot.writeStructBegin(STRUCT_DESC);
7019
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7020
      oprot.writeI64(this.purchaseOrderId);
7021
      oprot.writeFieldEnd();
7022
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7023
      oprot.writeBool(this.open);
7024
      oprot.writeFieldEnd();
7025
      oprot.writeFieldStop();
7026
      oprot.writeStructEnd();
7027
    }
7028
 
7029
    @Override
7030
    public String toString() {
7031
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7032
      boolean first = true;
7033
 
7034
      sb.append("purchaseOrderId:");
7035
      sb.append(this.purchaseOrderId);
7036
      first = false;
7037
      if (!first) sb.append(", ");
7038
      sb.append("open:");
7039
      sb.append(this.open);
7040
      first = false;
7041
      sb.append(")");
7042
      return sb.toString();
7043
    }
7044
 
7045
    public void validate() throws org.apache.thrift.TException {
7046
      // check for required fields
7047
    }
7048
 
7049
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7050
      try {
7051
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7052
      } catch (org.apache.thrift.TException te) {
7053
        throw new java.io.IOException(te);
7054
      }
7055
    }
7056
 
7057
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7058
      try {
7059
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7060
      } catch (org.apache.thrift.TException te) {
7061
        throw new java.io.IOException(te);
7062
      }
7063
    }
7064
 
7065
  }
7066
 
7067
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7068
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7069
 
7070
    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);
7071
    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);
7072
 
7073
    private List<Purchase> success; // required
7074
    private PurchaseServiceException e; // required
7075
 
7076
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7077
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7078
      SUCCESS((short)0, "success"),
7079
      E((short)1, "e");
7080
 
7081
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7082
 
7083
      static {
7084
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7085
          byName.put(field.getFieldName(), field);
7086
        }
7087
      }
7088
 
7089
      /**
7090
       * Find the _Fields constant that matches fieldId, or null if its not found.
7091
       */
7092
      public static _Fields findByThriftId(int fieldId) {
7093
        switch(fieldId) {
7094
          case 0: // SUCCESS
7095
            return SUCCESS;
7096
          case 1: // E
7097
            return E;
7098
          default:
7099
            return null;
7100
        }
7101
      }
7102
 
7103
      /**
7104
       * Find the _Fields constant that matches fieldId, throwing an exception
7105
       * if it is not found.
7106
       */
7107
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7108
        _Fields fields = findByThriftId(fieldId);
7109
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7110
        return fields;
7111
      }
7112
 
7113
      /**
7114
       * Find the _Fields constant that matches name, or null if its not found.
7115
       */
7116
      public static _Fields findByName(String name) {
7117
        return byName.get(name);
7118
      }
7119
 
7120
      private final short _thriftId;
7121
      private final String _fieldName;
7122
 
7123
      _Fields(short thriftId, String fieldName) {
7124
        _thriftId = thriftId;
7125
        _fieldName = fieldName;
7126
      }
7127
 
7128
      public short getThriftFieldId() {
7129
        return _thriftId;
7130
      }
7131
 
7132
      public String getFieldName() {
7133
        return _fieldName;
7134
      }
7135
    }
7136
 
7137
    // isset id assignments
7138
 
7139
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7140
    static {
7141
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7142
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7143
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7144
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7145
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7146
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7147
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7148
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7149
    }
7150
 
7151
    public getAllPurchases_result() {
7152
    }
7153
 
7154
    public getAllPurchases_result(
7155
      List<Purchase> success,
7156
      PurchaseServiceException e)
7157
    {
7158
      this();
7159
      this.success = success;
7160
      this.e = e;
7161
    }
7162
 
7163
    /**
7164
     * Performs a deep copy on <i>other</i>.
7165
     */
7166
    public getAllPurchases_result(getAllPurchases_result other) {
7167
      if (other.isSetSuccess()) {
7168
        List<Purchase> __this__success = new ArrayList<Purchase>();
7169
        for (Purchase other_element : other.success) {
7170
          __this__success.add(new Purchase(other_element));
7171
        }
7172
        this.success = __this__success;
7173
      }
7174
      if (other.isSetE()) {
7175
        this.e = new PurchaseServiceException(other.e);
7176
      }
7177
    }
7178
 
7179
    public getAllPurchases_result deepCopy() {
7180
      return new getAllPurchases_result(this);
7181
    }
7182
 
7183
    @Override
7184
    public void clear() {
7185
      this.success = null;
7186
      this.e = null;
7187
    }
7188
 
7189
    public int getSuccessSize() {
7190
      return (this.success == null) ? 0 : this.success.size();
7191
    }
7192
 
7193
    public java.util.Iterator<Purchase> getSuccessIterator() {
7194
      return (this.success == null) ? null : this.success.iterator();
7195
    }
7196
 
7197
    public void addToSuccess(Purchase elem) {
7198
      if (this.success == null) {
7199
        this.success = new ArrayList<Purchase>();
7200
      }
7201
      this.success.add(elem);
7202
    }
7203
 
7204
    public List<Purchase> getSuccess() {
7205
      return this.success;
7206
    }
7207
 
7208
    public void setSuccess(List<Purchase> success) {
7209
      this.success = success;
7210
    }
7211
 
7212
    public void unsetSuccess() {
7213
      this.success = null;
7214
    }
7215
 
7216
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7217
    public boolean isSetSuccess() {
7218
      return this.success != null;
7219
    }
7220
 
7221
    public void setSuccessIsSet(boolean value) {
7222
      if (!value) {
7223
        this.success = null;
7224
      }
7225
    }
7226
 
7227
    public PurchaseServiceException getE() {
7228
      return this.e;
7229
    }
7230
 
7231
    public void setE(PurchaseServiceException e) {
7232
      this.e = e;
7233
    }
7234
 
7235
    public void unsetE() {
7236
      this.e = null;
7237
    }
7238
 
7239
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7240
    public boolean isSetE() {
7241
      return this.e != null;
7242
    }
7243
 
7244
    public void setEIsSet(boolean value) {
7245
      if (!value) {
7246
        this.e = null;
7247
      }
7248
    }
7249
 
7250
    public void setFieldValue(_Fields field, Object value) {
7251
      switch (field) {
7252
      case SUCCESS:
7253
        if (value == null) {
7254
          unsetSuccess();
7255
        } else {
7256
          setSuccess((List<Purchase>)value);
7257
        }
7258
        break;
7259
 
7260
      case E:
7261
        if (value == null) {
7262
          unsetE();
7263
        } else {
7264
          setE((PurchaseServiceException)value);
7265
        }
7266
        break;
7267
 
7268
      }
7269
    }
7270
 
7271
    public Object getFieldValue(_Fields field) {
7272
      switch (field) {
7273
      case SUCCESS:
7274
        return getSuccess();
7275
 
7276
      case E:
7277
        return getE();
7278
 
7279
      }
7280
      throw new IllegalStateException();
7281
    }
7282
 
7283
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7284
    public boolean isSet(_Fields field) {
7285
      if (field == null) {
7286
        throw new IllegalArgumentException();
7287
      }
7288
 
7289
      switch (field) {
7290
      case SUCCESS:
7291
        return isSetSuccess();
7292
      case E:
7293
        return isSetE();
7294
      }
7295
      throw new IllegalStateException();
7296
    }
7297
 
7298
    @Override
7299
    public boolean equals(Object that) {
7300
      if (that == null)
7301
        return false;
7302
      if (that instanceof getAllPurchases_result)
7303
        return this.equals((getAllPurchases_result)that);
7304
      return false;
7305
    }
7306
 
7307
    public boolean equals(getAllPurchases_result that) {
7308
      if (that == null)
7309
        return false;
7310
 
7311
      boolean this_present_success = true && this.isSetSuccess();
7312
      boolean that_present_success = true && that.isSetSuccess();
7313
      if (this_present_success || that_present_success) {
7314
        if (!(this_present_success && that_present_success))
7315
          return false;
7316
        if (!this.success.equals(that.success))
7317
          return false;
7318
      }
7319
 
7320
      boolean this_present_e = true && this.isSetE();
7321
      boolean that_present_e = true && that.isSetE();
7322
      if (this_present_e || that_present_e) {
7323
        if (!(this_present_e && that_present_e))
7324
          return false;
7325
        if (!this.e.equals(that.e))
7326
          return false;
7327
      }
7328
 
7329
      return true;
7330
    }
7331
 
7332
    @Override
7333
    public int hashCode() {
7334
      return 0;
7335
    }
7336
 
7337
    public int compareTo(getAllPurchases_result other) {
7338
      if (!getClass().equals(other.getClass())) {
7339
        return getClass().getName().compareTo(other.getClass().getName());
7340
      }
7341
 
7342
      int lastComparison = 0;
7343
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7344
 
7345
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7346
      if (lastComparison != 0) {
7347
        return lastComparison;
7348
      }
7349
      if (isSetSuccess()) {
7350
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7351
        if (lastComparison != 0) {
7352
          return lastComparison;
7353
        }
7354
      }
7355
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7356
      if (lastComparison != 0) {
7357
        return lastComparison;
7358
      }
7359
      if (isSetE()) {
7360
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7361
        if (lastComparison != 0) {
7362
          return lastComparison;
7363
        }
7364
      }
7365
      return 0;
7366
    }
7367
 
7368
    public _Fields fieldForId(int fieldId) {
7369
      return _Fields.findByThriftId(fieldId);
7370
    }
7371
 
7372
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7373
      org.apache.thrift.protocol.TField field;
7374
      iprot.readStructBegin();
7375
      while (true)
7376
      {
7377
        field = iprot.readFieldBegin();
7378
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7379
          break;
7380
        }
7381
        switch (field.id) {
7382
          case 0: // SUCCESS
7383
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7384
              {
7385
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7386
                this.success = new ArrayList<Purchase>(_list8.size);
7387
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7388
                {
7389
                  Purchase _elem10; // required
7390
                  _elem10 = new Purchase();
7391
                  _elem10.read(iprot);
7392
                  this.success.add(_elem10);
7393
                }
7394
                iprot.readListEnd();
7395
              }
7396
            } else { 
7397
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7398
            }
7399
            break;
7400
          case 1: // E
7401
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7402
              this.e = new PurchaseServiceException();
7403
              this.e.read(iprot);
7404
            } else { 
7405
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7406
            }
7407
            break;
7408
          default:
7409
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7410
        }
7411
        iprot.readFieldEnd();
7412
      }
7413
      iprot.readStructEnd();
7414
      validate();
7415
    }
7416
 
7417
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7418
      oprot.writeStructBegin(STRUCT_DESC);
7419
 
7420
      if (this.isSetSuccess()) {
7421
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7422
        {
7423
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7424
          for (Purchase _iter11 : this.success)
7425
          {
7426
            _iter11.write(oprot);
7427
          }
7428
          oprot.writeListEnd();
7429
        }
7430
        oprot.writeFieldEnd();
7431
      } else if (this.isSetE()) {
7432
        oprot.writeFieldBegin(E_FIELD_DESC);
7433
        this.e.write(oprot);
7434
        oprot.writeFieldEnd();
7435
      }
7436
      oprot.writeFieldStop();
7437
      oprot.writeStructEnd();
7438
    }
7439
 
7440
    @Override
7441
    public String toString() {
7442
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7443
      boolean first = true;
7444
 
7445
      sb.append("success:");
7446
      if (this.success == null) {
7447
        sb.append("null");
7448
      } else {
7449
        sb.append(this.success);
7450
      }
7451
      first = false;
7452
      if (!first) sb.append(", ");
7453
      sb.append("e:");
7454
      if (this.e == null) {
7455
        sb.append("null");
7456
      } else {
7457
        sb.append(this.e);
7458
      }
7459
      first = false;
7460
      sb.append(")");
7461
      return sb.toString();
7462
    }
7463
 
7464
    public void validate() throws org.apache.thrift.TException {
7465
      // check for required fields
7466
    }
7467
 
7468
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7469
      try {
7470
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7471
      } catch (org.apache.thrift.TException te) {
7472
        throw new java.io.IOException(te);
7473
      }
7474
    }
7475
 
7476
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7477
      try {
7478
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7479
      } catch (org.apache.thrift.TException te) {
7480
        throw new java.io.IOException(te);
7481
      }
7482
    }
7483
 
7484
  }
7485
 
6385 amar.kumar 7486
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7487
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7488
 
7489
    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);
7490
 
7491
    private long purchaseOrderId; // required
7492
 
7493
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7494
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7495
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7496
 
7497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7498
 
7499
      static {
7500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7501
          byName.put(field.getFieldName(), field);
7502
        }
7503
      }
7504
 
7505
      /**
7506
       * Find the _Fields constant that matches fieldId, or null if its not found.
7507
       */
7508
      public static _Fields findByThriftId(int fieldId) {
7509
        switch(fieldId) {
7510
          case 1: // PURCHASE_ORDER_ID
7511
            return PURCHASE_ORDER_ID;
7512
          default:
7513
            return null;
7514
        }
7515
      }
7516
 
7517
      /**
7518
       * Find the _Fields constant that matches fieldId, throwing an exception
7519
       * if it is not found.
7520
       */
7521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7522
        _Fields fields = findByThriftId(fieldId);
7523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7524
        return fields;
7525
      }
7526
 
7527
      /**
7528
       * Find the _Fields constant that matches name, or null if its not found.
7529
       */
7530
      public static _Fields findByName(String name) {
7531
        return byName.get(name);
7532
      }
7533
 
7534
      private final short _thriftId;
7535
      private final String _fieldName;
7536
 
7537
      _Fields(short thriftId, String fieldName) {
7538
        _thriftId = thriftId;
7539
        _fieldName = fieldName;
7540
      }
7541
 
7542
      public short getThriftFieldId() {
7543
        return _thriftId;
7544
      }
7545
 
7546
      public String getFieldName() {
7547
        return _fieldName;
7548
      }
7549
    }
7550
 
7551
    // isset id assignments
7552
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7553
    private BitSet __isset_bit_vector = new BitSet(1);
7554
 
7555
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7556
    static {
7557
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7558
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7559
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7560
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7561
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7562
    }
7563
 
7564
    public getPurchasesForPO_args() {
7565
    }
7566
 
7567
    public getPurchasesForPO_args(
7568
      long purchaseOrderId)
7569
    {
7570
      this();
7571
      this.purchaseOrderId = purchaseOrderId;
7572
      setPurchaseOrderIdIsSet(true);
7573
    }
7574
 
7575
    /**
7576
     * Performs a deep copy on <i>other</i>.
7577
     */
7578
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7579
      __isset_bit_vector.clear();
7580
      __isset_bit_vector.or(other.__isset_bit_vector);
7581
      this.purchaseOrderId = other.purchaseOrderId;
7582
    }
7583
 
7584
    public getPurchasesForPO_args deepCopy() {
7585
      return new getPurchasesForPO_args(this);
7586
    }
7587
 
7588
    @Override
7589
    public void clear() {
7590
      setPurchaseOrderIdIsSet(false);
7591
      this.purchaseOrderId = 0;
7592
    }
7593
 
7594
    public long getPurchaseOrderId() {
7595
      return this.purchaseOrderId;
7596
    }
7597
 
7598
    public void setPurchaseOrderId(long purchaseOrderId) {
7599
      this.purchaseOrderId = purchaseOrderId;
7600
      setPurchaseOrderIdIsSet(true);
7601
    }
7602
 
7603
    public void unsetPurchaseOrderId() {
7604
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7605
    }
7606
 
7607
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7608
    public boolean isSetPurchaseOrderId() {
7609
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7610
    }
7611
 
7612
    public void setPurchaseOrderIdIsSet(boolean value) {
7613
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7614
    }
7615
 
7616
    public void setFieldValue(_Fields field, Object value) {
7617
      switch (field) {
7618
      case PURCHASE_ORDER_ID:
7619
        if (value == null) {
7620
          unsetPurchaseOrderId();
7621
        } else {
7622
          setPurchaseOrderId((Long)value);
7623
        }
7624
        break;
7625
 
7626
      }
7627
    }
7628
 
7629
    public Object getFieldValue(_Fields field) {
7630
      switch (field) {
7631
      case PURCHASE_ORDER_ID:
7632
        return Long.valueOf(getPurchaseOrderId());
7633
 
7634
      }
7635
      throw new IllegalStateException();
7636
    }
7637
 
7638
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7639
    public boolean isSet(_Fields field) {
7640
      if (field == null) {
7641
        throw new IllegalArgumentException();
7642
      }
7643
 
7644
      switch (field) {
7645
      case PURCHASE_ORDER_ID:
7646
        return isSetPurchaseOrderId();
7647
      }
7648
      throw new IllegalStateException();
7649
    }
7650
 
7651
    @Override
7652
    public boolean equals(Object that) {
7653
      if (that == null)
7654
        return false;
7655
      if (that instanceof getPurchasesForPO_args)
7656
        return this.equals((getPurchasesForPO_args)that);
7657
      return false;
7658
    }
7659
 
7660
    public boolean equals(getPurchasesForPO_args that) {
7661
      if (that == null)
7662
        return false;
7663
 
7664
      boolean this_present_purchaseOrderId = true;
7665
      boolean that_present_purchaseOrderId = true;
7666
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7667
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7668
          return false;
7669
        if (this.purchaseOrderId != that.purchaseOrderId)
7670
          return false;
7671
      }
7672
 
7673
      return true;
7674
    }
7675
 
7676
    @Override
7677
    public int hashCode() {
7678
      return 0;
7679
    }
7680
 
7681
    public int compareTo(getPurchasesForPO_args other) {
7682
      if (!getClass().equals(other.getClass())) {
7683
        return getClass().getName().compareTo(other.getClass().getName());
7684
      }
7685
 
7686
      int lastComparison = 0;
7687
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7688
 
7689
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7690
      if (lastComparison != 0) {
7691
        return lastComparison;
7692
      }
7693
      if (isSetPurchaseOrderId()) {
7694
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7695
        if (lastComparison != 0) {
7696
          return lastComparison;
7697
        }
7698
      }
7699
      return 0;
7700
    }
7701
 
7702
    public _Fields fieldForId(int fieldId) {
7703
      return _Fields.findByThriftId(fieldId);
7704
    }
7705
 
7706
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7707
      org.apache.thrift.protocol.TField field;
7708
      iprot.readStructBegin();
7709
      while (true)
7710
      {
7711
        field = iprot.readFieldBegin();
7712
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7713
          break;
7714
        }
7715
        switch (field.id) {
7716
          case 1: // PURCHASE_ORDER_ID
7717
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7718
              this.purchaseOrderId = iprot.readI64();
7719
              setPurchaseOrderIdIsSet(true);
7720
            } else { 
7721
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7722
            }
7723
            break;
7724
          default:
7725
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7726
        }
7727
        iprot.readFieldEnd();
7728
      }
7729
      iprot.readStructEnd();
7730
      validate();
7731
    }
7732
 
7733
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7734
      validate();
7735
 
7736
      oprot.writeStructBegin(STRUCT_DESC);
7737
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7738
      oprot.writeI64(this.purchaseOrderId);
7739
      oprot.writeFieldEnd();
7740
      oprot.writeFieldStop();
7741
      oprot.writeStructEnd();
7742
    }
7743
 
7744
    @Override
7745
    public String toString() {
7746
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7747
      boolean first = true;
7748
 
7749
      sb.append("purchaseOrderId:");
7750
      sb.append(this.purchaseOrderId);
7751
      first = false;
7752
      sb.append(")");
7753
      return sb.toString();
7754
    }
7755
 
7756
    public void validate() throws org.apache.thrift.TException {
7757
      // check for required fields
7758
    }
7759
 
7760
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7761
      try {
7762
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7763
      } catch (org.apache.thrift.TException te) {
7764
        throw new java.io.IOException(te);
7765
      }
7766
    }
7767
 
7768
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7769
      try {
7770
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7771
        __isset_bit_vector = new BitSet(1);
7772
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7773
      } catch (org.apache.thrift.TException te) {
7774
        throw new java.io.IOException(te);
7775
      }
7776
    }
7777
 
7778
  }
7779
 
7780
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7781
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7782
 
7783
    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);
7784
    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);
7785
 
7786
    private List<Purchase> success; // required
7787
    private PurchaseServiceException e; // required
7788
 
7789
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7790
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7791
      SUCCESS((short)0, "success"),
7792
      E((short)1, "e");
7793
 
7794
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7795
 
7796
      static {
7797
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7798
          byName.put(field.getFieldName(), field);
7799
        }
7800
      }
7801
 
7802
      /**
7803
       * Find the _Fields constant that matches fieldId, or null if its not found.
7804
       */
7805
      public static _Fields findByThriftId(int fieldId) {
7806
        switch(fieldId) {
7807
          case 0: // SUCCESS
7808
            return SUCCESS;
7809
          case 1: // E
7810
            return E;
7811
          default:
7812
            return null;
7813
        }
7814
      }
7815
 
7816
      /**
7817
       * Find the _Fields constant that matches fieldId, throwing an exception
7818
       * if it is not found.
7819
       */
7820
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7821
        _Fields fields = findByThriftId(fieldId);
7822
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7823
        return fields;
7824
      }
7825
 
7826
      /**
7827
       * Find the _Fields constant that matches name, or null if its not found.
7828
       */
7829
      public static _Fields findByName(String name) {
7830
        return byName.get(name);
7831
      }
7832
 
7833
      private final short _thriftId;
7834
      private final String _fieldName;
7835
 
7836
      _Fields(short thriftId, String fieldName) {
7837
        _thriftId = thriftId;
7838
        _fieldName = fieldName;
7839
      }
7840
 
7841
      public short getThriftFieldId() {
7842
        return _thriftId;
7843
      }
7844
 
7845
      public String getFieldName() {
7846
        return _fieldName;
7847
      }
7848
    }
7849
 
7850
    // isset id assignments
7851
 
7852
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7853
    static {
7854
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7855
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7856
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7857
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7858
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7859
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7860
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7861
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
7862
    }
7863
 
7864
    public getPurchasesForPO_result() {
7865
    }
7866
 
7867
    public getPurchasesForPO_result(
7868
      List<Purchase> success,
7869
      PurchaseServiceException e)
7870
    {
7871
      this();
7872
      this.success = success;
7873
      this.e = e;
7874
    }
7875
 
7876
    /**
7877
     * Performs a deep copy on <i>other</i>.
7878
     */
7879
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
7880
      if (other.isSetSuccess()) {
7881
        List<Purchase> __this__success = new ArrayList<Purchase>();
7882
        for (Purchase other_element : other.success) {
7883
          __this__success.add(new Purchase(other_element));
7884
        }
7885
        this.success = __this__success;
7886
      }
7887
      if (other.isSetE()) {
7888
        this.e = new PurchaseServiceException(other.e);
7889
      }
7890
    }
7891
 
7892
    public getPurchasesForPO_result deepCopy() {
7893
      return new getPurchasesForPO_result(this);
7894
    }
7895
 
7896
    @Override
7897
    public void clear() {
7898
      this.success = null;
7899
      this.e = null;
7900
    }
7901
 
7902
    public int getSuccessSize() {
7903
      return (this.success == null) ? 0 : this.success.size();
7904
    }
7905
 
7906
    public java.util.Iterator<Purchase> getSuccessIterator() {
7907
      return (this.success == null) ? null : this.success.iterator();
7908
    }
7909
 
7910
    public void addToSuccess(Purchase elem) {
7911
      if (this.success == null) {
7912
        this.success = new ArrayList<Purchase>();
7913
      }
7914
      this.success.add(elem);
7915
    }
7916
 
7917
    public List<Purchase> getSuccess() {
7918
      return this.success;
7919
    }
7920
 
7921
    public void setSuccess(List<Purchase> success) {
7922
      this.success = success;
7923
    }
7924
 
7925
    public void unsetSuccess() {
7926
      this.success = null;
7927
    }
7928
 
7929
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7930
    public boolean isSetSuccess() {
7931
      return this.success != null;
7932
    }
7933
 
7934
    public void setSuccessIsSet(boolean value) {
7935
      if (!value) {
7936
        this.success = null;
7937
      }
7938
    }
7939
 
7940
    public PurchaseServiceException getE() {
7941
      return this.e;
7942
    }
7943
 
7944
    public void setE(PurchaseServiceException e) {
7945
      this.e = e;
7946
    }
7947
 
7948
    public void unsetE() {
7949
      this.e = null;
7950
    }
7951
 
7952
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7953
    public boolean isSetE() {
7954
      return this.e != null;
7955
    }
7956
 
7957
    public void setEIsSet(boolean value) {
7958
      if (!value) {
7959
        this.e = null;
7960
      }
7961
    }
7962
 
7963
    public void setFieldValue(_Fields field, Object value) {
7964
      switch (field) {
7965
      case SUCCESS:
7966
        if (value == null) {
7967
          unsetSuccess();
7968
        } else {
7969
          setSuccess((List<Purchase>)value);
7970
        }
7971
        break;
7972
 
7973
      case E:
7974
        if (value == null) {
7975
          unsetE();
7976
        } else {
7977
          setE((PurchaseServiceException)value);
7978
        }
7979
        break;
7980
 
7981
      }
7982
    }
7983
 
7984
    public Object getFieldValue(_Fields field) {
7985
      switch (field) {
7986
      case SUCCESS:
7987
        return getSuccess();
7988
 
7989
      case E:
7990
        return getE();
7991
 
7992
      }
7993
      throw new IllegalStateException();
7994
    }
7995
 
7996
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7997
    public boolean isSet(_Fields field) {
7998
      if (field == null) {
7999
        throw new IllegalArgumentException();
8000
      }
8001
 
8002
      switch (field) {
8003
      case SUCCESS:
8004
        return isSetSuccess();
8005
      case E:
8006
        return isSetE();
8007
      }
8008
      throw new IllegalStateException();
8009
    }
8010
 
8011
    @Override
8012
    public boolean equals(Object that) {
8013
      if (that == null)
8014
        return false;
8015
      if (that instanceof getPurchasesForPO_result)
8016
        return this.equals((getPurchasesForPO_result)that);
8017
      return false;
8018
    }
8019
 
8020
    public boolean equals(getPurchasesForPO_result that) {
8021
      if (that == null)
8022
        return false;
8023
 
8024
      boolean this_present_success = true && this.isSetSuccess();
8025
      boolean that_present_success = true && that.isSetSuccess();
8026
      if (this_present_success || that_present_success) {
8027
        if (!(this_present_success && that_present_success))
8028
          return false;
8029
        if (!this.success.equals(that.success))
8030
          return false;
8031
      }
8032
 
8033
      boolean this_present_e = true && this.isSetE();
8034
      boolean that_present_e = true && that.isSetE();
8035
      if (this_present_e || that_present_e) {
8036
        if (!(this_present_e && that_present_e))
8037
          return false;
8038
        if (!this.e.equals(that.e))
8039
          return false;
8040
      }
8041
 
8042
      return true;
8043
    }
8044
 
8045
    @Override
8046
    public int hashCode() {
8047
      return 0;
8048
    }
8049
 
8050
    public int compareTo(getPurchasesForPO_result other) {
8051
      if (!getClass().equals(other.getClass())) {
8052
        return getClass().getName().compareTo(other.getClass().getName());
8053
      }
8054
 
8055
      int lastComparison = 0;
8056
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8057
 
8058
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8059
      if (lastComparison != 0) {
8060
        return lastComparison;
8061
      }
8062
      if (isSetSuccess()) {
8063
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8064
        if (lastComparison != 0) {
8065
          return lastComparison;
8066
        }
8067
      }
8068
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8069
      if (lastComparison != 0) {
8070
        return lastComparison;
8071
      }
8072
      if (isSetE()) {
8073
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8074
        if (lastComparison != 0) {
8075
          return lastComparison;
8076
        }
8077
      }
8078
      return 0;
8079
    }
8080
 
8081
    public _Fields fieldForId(int fieldId) {
8082
      return _Fields.findByThriftId(fieldId);
8083
    }
8084
 
8085
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8086
      org.apache.thrift.protocol.TField field;
8087
      iprot.readStructBegin();
8088
      while (true)
8089
      {
8090
        field = iprot.readFieldBegin();
8091
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8092
          break;
8093
        }
8094
        switch (field.id) {
8095
          case 0: // SUCCESS
8096
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8097
              {
8098
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8099
                this.success = new ArrayList<Purchase>(_list12.size);
8100
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8101
                {
8102
                  Purchase _elem14; // required
8103
                  _elem14 = new Purchase();
8104
                  _elem14.read(iprot);
8105
                  this.success.add(_elem14);
8106
                }
8107
                iprot.readListEnd();
8108
              }
8109
            } else { 
8110
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8111
            }
8112
            break;
8113
          case 1: // E
8114
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8115
              this.e = new PurchaseServiceException();
8116
              this.e.read(iprot);
8117
            } else { 
8118
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8119
            }
8120
            break;
8121
          default:
8122
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8123
        }
8124
        iprot.readFieldEnd();
8125
      }
8126
      iprot.readStructEnd();
8127
      validate();
8128
    }
8129
 
8130
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8131
      oprot.writeStructBegin(STRUCT_DESC);
8132
 
8133
      if (this.isSetSuccess()) {
8134
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8135
        {
8136
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8137
          for (Purchase _iter15 : this.success)
8138
          {
8139
            _iter15.write(oprot);
8140
          }
8141
          oprot.writeListEnd();
8142
        }
8143
        oprot.writeFieldEnd();
8144
      } else if (this.isSetE()) {
8145
        oprot.writeFieldBegin(E_FIELD_DESC);
8146
        this.e.write(oprot);
8147
        oprot.writeFieldEnd();
8148
      }
8149
      oprot.writeFieldStop();
8150
      oprot.writeStructEnd();
8151
    }
8152
 
8153
    @Override
8154
    public String toString() {
8155
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8156
      boolean first = true;
8157
 
8158
      sb.append("success:");
8159
      if (this.success == null) {
8160
        sb.append("null");
8161
      } else {
8162
        sb.append(this.success);
8163
      }
8164
      first = false;
8165
      if (!first) sb.append(", ");
8166
      sb.append("e:");
8167
      if (this.e == null) {
8168
        sb.append("null");
8169
      } else {
8170
        sb.append(this.e);
8171
      }
8172
      first = false;
8173
      sb.append(")");
8174
      return sb.toString();
8175
    }
8176
 
8177
    public void validate() throws org.apache.thrift.TException {
8178
      // check for required fields
8179
    }
8180
 
8181
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8182
      try {
8183
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8184
      } catch (org.apache.thrift.TException te) {
8185
        throw new java.io.IOException(te);
8186
      }
8187
    }
8188
 
8189
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8190
      try {
8191
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8192
      } catch (org.apache.thrift.TException te) {
8193
        throw new java.io.IOException(te);
8194
      }
8195
    }
8196
 
8197
  }
8198
 
4555 mandeep.dh 8199
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8200
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8201
 
8202
    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);
8203
 
8204
    private long purchaseId; // required
8205
 
8206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8207
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8208
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8209
 
8210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8211
 
8212
      static {
8213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8214
          byName.put(field.getFieldName(), field);
8215
        }
8216
      }
8217
 
8218
      /**
8219
       * Find the _Fields constant that matches fieldId, or null if its not found.
8220
       */
8221
      public static _Fields findByThriftId(int fieldId) {
8222
        switch(fieldId) {
8223
          case 1: // PURCHASE_ID
8224
            return PURCHASE_ID;
8225
          default:
8226
            return null;
8227
        }
8228
      }
8229
 
8230
      /**
8231
       * Find the _Fields constant that matches fieldId, throwing an exception
8232
       * if it is not found.
8233
       */
8234
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8235
        _Fields fields = findByThriftId(fieldId);
8236
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8237
        return fields;
8238
      }
8239
 
8240
      /**
8241
       * Find the _Fields constant that matches name, or null if its not found.
8242
       */
8243
      public static _Fields findByName(String name) {
8244
        return byName.get(name);
8245
      }
8246
 
8247
      private final short _thriftId;
8248
      private final String _fieldName;
8249
 
8250
      _Fields(short thriftId, String fieldName) {
8251
        _thriftId = thriftId;
8252
        _fieldName = fieldName;
8253
      }
8254
 
8255
      public short getThriftFieldId() {
8256
        return _thriftId;
8257
      }
8258
 
8259
      public String getFieldName() {
8260
        return _fieldName;
8261
      }
8262
    }
8263
 
8264
    // isset id assignments
8265
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8266
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8267
 
8268
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8269
    static {
8270
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8271
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8272
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8273
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8274
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8275
    }
8276
 
4555 mandeep.dh 8277
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8278
    }
8279
 
4555 mandeep.dh 8280
    public getPurchaseOrderForPurchase_args(
8281
      long purchaseId)
4496 mandeep.dh 8282
    {
8283
      this();
8284
      this.purchaseId = purchaseId;
8285
      setPurchaseIdIsSet(true);
8286
    }
8287
 
8288
    /**
8289
     * Performs a deep copy on <i>other</i>.
8290
     */
4555 mandeep.dh 8291
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8292
      __isset_bit_vector.clear();
8293
      __isset_bit_vector.or(other.__isset_bit_vector);
8294
      this.purchaseId = other.purchaseId;
8295
    }
8296
 
4555 mandeep.dh 8297
    public getPurchaseOrderForPurchase_args deepCopy() {
8298
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8299
    }
8300
 
8301
    @Override
8302
    public void clear() {
8303
      setPurchaseIdIsSet(false);
8304
      this.purchaseId = 0;
8305
    }
8306
 
8307
    public long getPurchaseId() {
8308
      return this.purchaseId;
8309
    }
8310
 
8311
    public void setPurchaseId(long purchaseId) {
8312
      this.purchaseId = purchaseId;
8313
      setPurchaseIdIsSet(true);
8314
    }
8315
 
8316
    public void unsetPurchaseId() {
8317
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8318
    }
8319
 
8320
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8321
    public boolean isSetPurchaseId() {
8322
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8323
    }
8324
 
8325
    public void setPurchaseIdIsSet(boolean value) {
8326
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8327
    }
8328
 
8329
    public void setFieldValue(_Fields field, Object value) {
8330
      switch (field) {
8331
      case PURCHASE_ID:
8332
        if (value == null) {
8333
          unsetPurchaseId();
8334
        } else {
8335
          setPurchaseId((Long)value);
8336
        }
8337
        break;
8338
 
8339
      }
8340
    }
8341
 
8342
    public Object getFieldValue(_Fields field) {
8343
      switch (field) {
8344
      case PURCHASE_ID:
8345
        return Long.valueOf(getPurchaseId());
8346
 
8347
      }
8348
      throw new IllegalStateException();
8349
    }
8350
 
8351
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8352
    public boolean isSet(_Fields field) {
8353
      if (field == null) {
8354
        throw new IllegalArgumentException();
8355
      }
8356
 
8357
      switch (field) {
8358
      case PURCHASE_ID:
8359
        return isSetPurchaseId();
8360
      }
8361
      throw new IllegalStateException();
8362
    }
8363
 
8364
    @Override
8365
    public boolean equals(Object that) {
8366
      if (that == null)
8367
        return false;
4555 mandeep.dh 8368
      if (that instanceof getPurchaseOrderForPurchase_args)
8369
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8370
      return false;
8371
    }
8372
 
4555 mandeep.dh 8373
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8374
      if (that == null)
8375
        return false;
8376
 
8377
      boolean this_present_purchaseId = true;
8378
      boolean that_present_purchaseId = true;
8379
      if (this_present_purchaseId || that_present_purchaseId) {
8380
        if (!(this_present_purchaseId && that_present_purchaseId))
8381
          return false;
8382
        if (this.purchaseId != that.purchaseId)
8383
          return false;
8384
      }
8385
 
8386
      return true;
8387
    }
8388
 
8389
    @Override
8390
    public int hashCode() {
8391
      return 0;
8392
    }
8393
 
4555 mandeep.dh 8394
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8395
      if (!getClass().equals(other.getClass())) {
8396
        return getClass().getName().compareTo(other.getClass().getName());
8397
      }
8398
 
8399
      int lastComparison = 0;
4555 mandeep.dh 8400
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8401
 
8402
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8403
      if (lastComparison != 0) {
8404
        return lastComparison;
8405
      }
8406
      if (isSetPurchaseId()) {
8407
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8408
        if (lastComparison != 0) {
8409
          return lastComparison;
8410
        }
8411
      }
8412
      return 0;
8413
    }
8414
 
8415
    public _Fields fieldForId(int fieldId) {
8416
      return _Fields.findByThriftId(fieldId);
8417
    }
8418
 
8419
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8420
      org.apache.thrift.protocol.TField field;
8421
      iprot.readStructBegin();
8422
      while (true)
8423
      {
8424
        field = iprot.readFieldBegin();
8425
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8426
          break;
8427
        }
8428
        switch (field.id) {
8429
          case 1: // PURCHASE_ID
8430
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8431
              this.purchaseId = iprot.readI64();
8432
              setPurchaseIdIsSet(true);
8433
            } else { 
8434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8435
            }
8436
            break;
8437
          default:
8438
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8439
        }
8440
        iprot.readFieldEnd();
8441
      }
8442
      iprot.readStructEnd();
8443
      validate();
8444
    }
8445
 
8446
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8447
      validate();
8448
 
8449
      oprot.writeStructBegin(STRUCT_DESC);
8450
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8451
      oprot.writeI64(this.purchaseId);
8452
      oprot.writeFieldEnd();
8453
      oprot.writeFieldStop();
8454
      oprot.writeStructEnd();
8455
    }
8456
 
8457
    @Override
8458
    public String toString() {
4555 mandeep.dh 8459
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8460
      boolean first = true;
8461
 
8462
      sb.append("purchaseId:");
8463
      sb.append(this.purchaseId);
8464
      first = false;
8465
      sb.append(")");
8466
      return sb.toString();
8467
    }
8468
 
8469
    public void validate() throws org.apache.thrift.TException {
8470
      // check for required fields
8471
    }
8472
 
8473
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8474
      try {
8475
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8476
      } catch (org.apache.thrift.TException te) {
8477
        throw new java.io.IOException(te);
8478
      }
8479
    }
8480
 
8481
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8482
      try {
4555 mandeep.dh 8483
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8484
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8485
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8486
      } catch (org.apache.thrift.TException te) {
8487
        throw new java.io.IOException(te);
8488
      }
8489
    }
8490
 
8491
  }
8492
 
4555 mandeep.dh 8493
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8494
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8495
 
4555 mandeep.dh 8496
    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 8497
 
4555 mandeep.dh 8498
    private PurchaseOrder success; // required
4496 mandeep.dh 8499
 
8500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8501
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8502
      SUCCESS((short)0, "success");
8503
 
8504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8505
 
8506
      static {
8507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8508
          byName.put(field.getFieldName(), field);
8509
        }
8510
      }
8511
 
8512
      /**
8513
       * Find the _Fields constant that matches fieldId, or null if its not found.
8514
       */
8515
      public static _Fields findByThriftId(int fieldId) {
8516
        switch(fieldId) {
8517
          case 0: // SUCCESS
8518
            return SUCCESS;
8519
          default:
8520
            return null;
8521
        }
8522
      }
8523
 
8524
      /**
8525
       * Find the _Fields constant that matches fieldId, throwing an exception
8526
       * if it is not found.
8527
       */
8528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8529
        _Fields fields = findByThriftId(fieldId);
8530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8531
        return fields;
8532
      }
8533
 
8534
      /**
8535
       * Find the _Fields constant that matches name, or null if its not found.
8536
       */
8537
      public static _Fields findByName(String name) {
8538
        return byName.get(name);
8539
      }
8540
 
8541
      private final short _thriftId;
8542
      private final String _fieldName;
8543
 
8544
      _Fields(short thriftId, String fieldName) {
8545
        _thriftId = thriftId;
8546
        _fieldName = fieldName;
8547
      }
8548
 
8549
      public short getThriftFieldId() {
8550
        return _thriftId;
8551
      }
8552
 
8553
      public String getFieldName() {
8554
        return _fieldName;
8555
      }
8556
    }
8557
 
8558
    // isset id assignments
8559
 
8560
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8561
    static {
8562
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8563
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8564
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8565
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8566
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8567
    }
8568
 
4555 mandeep.dh 8569
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8570
    }
8571
 
4555 mandeep.dh 8572
    public getPurchaseOrderForPurchase_result(
8573
      PurchaseOrder success)
4496 mandeep.dh 8574
    {
8575
      this();
8576
      this.success = success;
8577
    }
8578
 
8579
    /**
8580
     * Performs a deep copy on <i>other</i>.
8581
     */
4555 mandeep.dh 8582
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8583
      if (other.isSetSuccess()) {
8584
        this.success = new PurchaseOrder(other.success);
8585
      }
4496 mandeep.dh 8586
    }
8587
 
4555 mandeep.dh 8588
    public getPurchaseOrderForPurchase_result deepCopy() {
8589
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8590
    }
8591
 
8592
    @Override
8593
    public void clear() {
4555 mandeep.dh 8594
      this.success = null;
4496 mandeep.dh 8595
    }
8596
 
4555 mandeep.dh 8597
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8598
      return this.success;
8599
    }
8600
 
4555 mandeep.dh 8601
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8602
      this.success = success;
8603
    }
8604
 
8605
    public void unsetSuccess() {
4555 mandeep.dh 8606
      this.success = null;
4496 mandeep.dh 8607
    }
8608
 
8609
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8610
    public boolean isSetSuccess() {
4555 mandeep.dh 8611
      return this.success != null;
4496 mandeep.dh 8612
    }
8613
 
8614
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8615
      if (!value) {
8616
        this.success = null;
8617
      }
4496 mandeep.dh 8618
    }
8619
 
8620
    public void setFieldValue(_Fields field, Object value) {
8621
      switch (field) {
8622
      case SUCCESS:
8623
        if (value == null) {
8624
          unsetSuccess();
8625
        } else {
4555 mandeep.dh 8626
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8627
        }
8628
        break;
8629
 
8630
      }
8631
    }
8632
 
8633
    public Object getFieldValue(_Fields field) {
8634
      switch (field) {
8635
      case SUCCESS:
4555 mandeep.dh 8636
        return getSuccess();
4496 mandeep.dh 8637
 
8638
      }
8639
      throw new IllegalStateException();
8640
    }
8641
 
8642
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8643
    public boolean isSet(_Fields field) {
8644
      if (field == null) {
8645
        throw new IllegalArgumentException();
8646
      }
8647
 
8648
      switch (field) {
8649
      case SUCCESS:
8650
        return isSetSuccess();
8651
      }
8652
      throw new IllegalStateException();
8653
    }
8654
 
8655
    @Override
8656
    public boolean equals(Object that) {
8657
      if (that == null)
8658
        return false;
4555 mandeep.dh 8659
      if (that instanceof getPurchaseOrderForPurchase_result)
8660
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8661
      return false;
8662
    }
8663
 
4555 mandeep.dh 8664
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8665
      if (that == null)
8666
        return false;
8667
 
4555 mandeep.dh 8668
      boolean this_present_success = true && this.isSetSuccess();
8669
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8670
      if (this_present_success || that_present_success) {
8671
        if (!(this_present_success && that_present_success))
8672
          return false;
4555 mandeep.dh 8673
        if (!this.success.equals(that.success))
4496 mandeep.dh 8674
          return false;
8675
      }
8676
 
8677
      return true;
8678
    }
8679
 
8680
    @Override
8681
    public int hashCode() {
8682
      return 0;
8683
    }
8684
 
4555 mandeep.dh 8685
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8686
      if (!getClass().equals(other.getClass())) {
8687
        return getClass().getName().compareTo(other.getClass().getName());
8688
      }
8689
 
8690
      int lastComparison = 0;
4555 mandeep.dh 8691
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8692
 
8693
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8694
      if (lastComparison != 0) {
8695
        return lastComparison;
8696
      }
8697
      if (isSetSuccess()) {
8698
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8699
        if (lastComparison != 0) {
8700
          return lastComparison;
8701
        }
8702
      }
8703
      return 0;
8704
    }
8705
 
8706
    public _Fields fieldForId(int fieldId) {
8707
      return _Fields.findByThriftId(fieldId);
8708
    }
8709
 
8710
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8711
      org.apache.thrift.protocol.TField field;
8712
      iprot.readStructBegin();
8713
      while (true)
8714
      {
8715
        field = iprot.readFieldBegin();
8716
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8717
          break;
8718
        }
8719
        switch (field.id) {
8720
          case 0: // SUCCESS
4555 mandeep.dh 8721
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8722
              this.success = new PurchaseOrder();
8723
              this.success.read(iprot);
4496 mandeep.dh 8724
            } else { 
8725
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8726
            }
8727
            break;
8728
          default:
8729
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8730
        }
8731
        iprot.readFieldEnd();
8732
      }
8733
      iprot.readStructEnd();
8734
      validate();
8735
    }
8736
 
8737
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8738
      oprot.writeStructBegin(STRUCT_DESC);
8739
 
8740
      if (this.isSetSuccess()) {
8741
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8742
        this.success.write(oprot);
4496 mandeep.dh 8743
        oprot.writeFieldEnd();
8744
      }
8745
      oprot.writeFieldStop();
8746
      oprot.writeStructEnd();
8747
    }
8748
 
8749
    @Override
8750
    public String toString() {
4555 mandeep.dh 8751
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8752
      boolean first = true;
8753
 
8754
      sb.append("success:");
4555 mandeep.dh 8755
      if (this.success == null) {
8756
        sb.append("null");
8757
      } else {
8758
        sb.append(this.success);
8759
      }
4496 mandeep.dh 8760
      first = false;
8761
      sb.append(")");
8762
      return sb.toString();
8763
    }
8764
 
8765
    public void validate() throws org.apache.thrift.TException {
8766
      // check for required fields
8767
    }
8768
 
8769
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8770
      try {
8771
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8772
      } catch (org.apache.thrift.TException te) {
8773
        throw new java.io.IOException(te);
8774
      }
8775
    }
8776
 
8777
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8778
      try {
8779
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8780
      } catch (org.apache.thrift.TException te) {
8781
        throw new java.io.IOException(te);
8782
      }
8783
    }
8784
 
8785
  }
8786
 
4754 mandeep.dh 8787
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8788
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8789
 
8790
    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);
8791
 
8792
    private long warehouseId; // required
8793
 
8794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8795
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8796
      WAREHOUSE_ID((short)1, "warehouseId");
8797
 
8798
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8799
 
8800
      static {
8801
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8802
          byName.put(field.getFieldName(), field);
8803
        }
8804
      }
8805
 
8806
      /**
8807
       * Find the _Fields constant that matches fieldId, or null if its not found.
8808
       */
8809
      public static _Fields findByThriftId(int fieldId) {
8810
        switch(fieldId) {
8811
          case 1: // WAREHOUSE_ID
8812
            return WAREHOUSE_ID;
8813
          default:
8814
            return null;
8815
        }
8816
      }
8817
 
8818
      /**
8819
       * Find the _Fields constant that matches fieldId, throwing an exception
8820
       * if it is not found.
8821
       */
8822
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8823
        _Fields fields = findByThriftId(fieldId);
8824
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8825
        return fields;
8826
      }
8827
 
8828
      /**
8829
       * Find the _Fields constant that matches name, or null if its not found.
8830
       */
8831
      public static _Fields findByName(String name) {
8832
        return byName.get(name);
8833
      }
8834
 
8835
      private final short _thriftId;
8836
      private final String _fieldName;
8837
 
8838
      _Fields(short thriftId, String fieldName) {
8839
        _thriftId = thriftId;
8840
        _fieldName = fieldName;
8841
      }
8842
 
8843
      public short getThriftFieldId() {
8844
        return _thriftId;
8845
      }
8846
 
8847
      public String getFieldName() {
8848
        return _fieldName;
8849
      }
8850
    }
8851
 
8852
    // isset id assignments
8853
    private static final int __WAREHOUSEID_ISSET_ID = 0;
8854
    private BitSet __isset_bit_vector = new BitSet(1);
8855
 
8856
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8857
    static {
8858
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8859
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8860
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8861
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8862
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
8863
    }
8864
 
8865
    public getPendingPurchaseOrders_args() {
8866
    }
8867
 
8868
    public getPendingPurchaseOrders_args(
8869
      long warehouseId)
8870
    {
8871
      this();
8872
      this.warehouseId = warehouseId;
8873
      setWarehouseIdIsSet(true);
8874
    }
8875
 
8876
    /**
8877
     * Performs a deep copy on <i>other</i>.
8878
     */
8879
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
8880
      __isset_bit_vector.clear();
8881
      __isset_bit_vector.or(other.__isset_bit_vector);
8882
      this.warehouseId = other.warehouseId;
8883
    }
8884
 
8885
    public getPendingPurchaseOrders_args deepCopy() {
8886
      return new getPendingPurchaseOrders_args(this);
8887
    }
8888
 
8889
    @Override
8890
    public void clear() {
8891
      setWarehouseIdIsSet(false);
8892
      this.warehouseId = 0;
8893
    }
8894
 
8895
    public long getWarehouseId() {
8896
      return this.warehouseId;
8897
    }
8898
 
8899
    public void setWarehouseId(long warehouseId) {
8900
      this.warehouseId = warehouseId;
8901
      setWarehouseIdIsSet(true);
8902
    }
8903
 
8904
    public void unsetWarehouseId() {
8905
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8906
    }
8907
 
8908
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8909
    public boolean isSetWarehouseId() {
8910
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
8911
    }
8912
 
8913
    public void setWarehouseIdIsSet(boolean value) {
8914
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
8915
    }
8916
 
8917
    public void setFieldValue(_Fields field, Object value) {
8918
      switch (field) {
8919
      case WAREHOUSE_ID:
8920
        if (value == null) {
8921
          unsetWarehouseId();
8922
        } else {
8923
          setWarehouseId((Long)value);
8924
        }
8925
        break;
8926
 
8927
      }
8928
    }
8929
 
8930
    public Object getFieldValue(_Fields field) {
8931
      switch (field) {
8932
      case WAREHOUSE_ID:
8933
        return Long.valueOf(getWarehouseId());
8934
 
8935
      }
8936
      throw new IllegalStateException();
8937
    }
8938
 
8939
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8940
    public boolean isSet(_Fields field) {
8941
      if (field == null) {
8942
        throw new IllegalArgumentException();
8943
      }
8944
 
8945
      switch (field) {
8946
      case WAREHOUSE_ID:
8947
        return isSetWarehouseId();
8948
      }
8949
      throw new IllegalStateException();
8950
    }
8951
 
8952
    @Override
8953
    public boolean equals(Object that) {
8954
      if (that == null)
8955
        return false;
8956
      if (that instanceof getPendingPurchaseOrders_args)
8957
        return this.equals((getPendingPurchaseOrders_args)that);
8958
      return false;
8959
    }
8960
 
8961
    public boolean equals(getPendingPurchaseOrders_args that) {
8962
      if (that == null)
8963
        return false;
8964
 
8965
      boolean this_present_warehouseId = true;
8966
      boolean that_present_warehouseId = true;
8967
      if (this_present_warehouseId || that_present_warehouseId) {
8968
        if (!(this_present_warehouseId && that_present_warehouseId))
8969
          return false;
8970
        if (this.warehouseId != that.warehouseId)
8971
          return false;
8972
      }
8973
 
8974
      return true;
8975
    }
8976
 
8977
    @Override
8978
    public int hashCode() {
8979
      return 0;
8980
    }
8981
 
8982
    public int compareTo(getPendingPurchaseOrders_args other) {
8983
      if (!getClass().equals(other.getClass())) {
8984
        return getClass().getName().compareTo(other.getClass().getName());
8985
      }
8986
 
8987
      int lastComparison = 0;
8988
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
8989
 
8990
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
8991
      if (lastComparison != 0) {
8992
        return lastComparison;
8993
      }
8994
      if (isSetWarehouseId()) {
8995
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
8996
        if (lastComparison != 0) {
8997
          return lastComparison;
8998
        }
8999
      }
9000
      return 0;
9001
    }
9002
 
9003
    public _Fields fieldForId(int fieldId) {
9004
      return _Fields.findByThriftId(fieldId);
9005
    }
9006
 
9007
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9008
      org.apache.thrift.protocol.TField field;
9009
      iprot.readStructBegin();
9010
      while (true)
9011
      {
9012
        field = iprot.readFieldBegin();
9013
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9014
          break;
9015
        }
9016
        switch (field.id) {
9017
          case 1: // WAREHOUSE_ID
9018
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9019
              this.warehouseId = iprot.readI64();
9020
              setWarehouseIdIsSet(true);
9021
            } else { 
9022
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9023
            }
9024
            break;
9025
          default:
9026
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9027
        }
9028
        iprot.readFieldEnd();
9029
      }
9030
      iprot.readStructEnd();
9031
      validate();
9032
    }
9033
 
9034
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9035
      validate();
9036
 
9037
      oprot.writeStructBegin(STRUCT_DESC);
9038
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9039
      oprot.writeI64(this.warehouseId);
9040
      oprot.writeFieldEnd();
9041
      oprot.writeFieldStop();
9042
      oprot.writeStructEnd();
9043
    }
9044
 
9045
    @Override
9046
    public String toString() {
9047
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9048
      boolean first = true;
9049
 
9050
      sb.append("warehouseId:");
9051
      sb.append(this.warehouseId);
9052
      first = false;
9053
      sb.append(")");
9054
      return sb.toString();
9055
    }
9056
 
9057
    public void validate() throws org.apache.thrift.TException {
9058
      // check for required fields
9059
    }
9060
 
9061
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9062
      try {
9063
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9064
      } catch (org.apache.thrift.TException te) {
9065
        throw new java.io.IOException(te);
9066
      }
9067
    }
9068
 
9069
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9070
      try {
9071
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9072
        __isset_bit_vector = new BitSet(1);
9073
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9074
      } catch (org.apache.thrift.TException te) {
9075
        throw new java.io.IOException(te);
9076
      }
9077
    }
9078
 
9079
  }
9080
 
9081
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9082
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9083
 
9084
    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);
9085
    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);
9086
 
9087
    private List<PurchaseOrder> success; // required
9088
    private PurchaseServiceException e; // required
9089
 
9090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9091
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9092
      SUCCESS((short)0, "success"),
9093
      E((short)1, "e");
9094
 
9095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9096
 
9097
      static {
9098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9099
          byName.put(field.getFieldName(), field);
9100
        }
9101
      }
9102
 
9103
      /**
9104
       * Find the _Fields constant that matches fieldId, or null if its not found.
9105
       */
9106
      public static _Fields findByThriftId(int fieldId) {
9107
        switch(fieldId) {
9108
          case 0: // SUCCESS
9109
            return SUCCESS;
9110
          case 1: // E
9111
            return E;
9112
          default:
9113
            return null;
9114
        }
9115
      }
9116
 
9117
      /**
9118
       * Find the _Fields constant that matches fieldId, throwing an exception
9119
       * if it is not found.
9120
       */
9121
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9122
        _Fields fields = findByThriftId(fieldId);
9123
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9124
        return fields;
9125
      }
9126
 
9127
      /**
9128
       * Find the _Fields constant that matches name, or null if its not found.
9129
       */
9130
      public static _Fields findByName(String name) {
9131
        return byName.get(name);
9132
      }
9133
 
9134
      private final short _thriftId;
9135
      private final String _fieldName;
9136
 
9137
      _Fields(short thriftId, String fieldName) {
9138
        _thriftId = thriftId;
9139
        _fieldName = fieldName;
9140
      }
9141
 
9142
      public short getThriftFieldId() {
9143
        return _thriftId;
9144
      }
9145
 
9146
      public String getFieldName() {
9147
        return _fieldName;
9148
      }
9149
    }
9150
 
9151
    // isset id assignments
9152
 
9153
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9154
    static {
9155
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9156
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9157
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9158
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9159
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9160
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9161
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9162
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9163
    }
9164
 
9165
    public getPendingPurchaseOrders_result() {
9166
    }
9167
 
9168
    public getPendingPurchaseOrders_result(
9169
      List<PurchaseOrder> success,
9170
      PurchaseServiceException e)
9171
    {
9172
      this();
9173
      this.success = success;
9174
      this.e = e;
9175
    }
9176
 
9177
    /**
9178
     * Performs a deep copy on <i>other</i>.
9179
     */
9180
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9181
      if (other.isSetSuccess()) {
9182
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9183
        for (PurchaseOrder other_element : other.success) {
9184
          __this__success.add(new PurchaseOrder(other_element));
9185
        }
9186
        this.success = __this__success;
9187
      }
9188
      if (other.isSetE()) {
9189
        this.e = new PurchaseServiceException(other.e);
9190
      }
9191
    }
9192
 
9193
    public getPendingPurchaseOrders_result deepCopy() {
9194
      return new getPendingPurchaseOrders_result(this);
9195
    }
9196
 
9197
    @Override
9198
    public void clear() {
9199
      this.success = null;
9200
      this.e = null;
9201
    }
9202
 
9203
    public int getSuccessSize() {
9204
      return (this.success == null) ? 0 : this.success.size();
9205
    }
9206
 
9207
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9208
      return (this.success == null) ? null : this.success.iterator();
9209
    }
9210
 
9211
    public void addToSuccess(PurchaseOrder elem) {
9212
      if (this.success == null) {
9213
        this.success = new ArrayList<PurchaseOrder>();
9214
      }
9215
      this.success.add(elem);
9216
    }
9217
 
9218
    public List<PurchaseOrder> getSuccess() {
9219
      return this.success;
9220
    }
9221
 
9222
    public void setSuccess(List<PurchaseOrder> success) {
9223
      this.success = success;
9224
    }
9225
 
9226
    public void unsetSuccess() {
9227
      this.success = null;
9228
    }
9229
 
9230
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9231
    public boolean isSetSuccess() {
9232
      return this.success != null;
9233
    }
9234
 
9235
    public void setSuccessIsSet(boolean value) {
9236
      if (!value) {
9237
        this.success = null;
9238
      }
9239
    }
9240
 
9241
    public PurchaseServiceException getE() {
9242
      return this.e;
9243
    }
9244
 
9245
    public void setE(PurchaseServiceException e) {
9246
      this.e = e;
9247
    }
9248
 
9249
    public void unsetE() {
9250
      this.e = null;
9251
    }
9252
 
9253
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9254
    public boolean isSetE() {
9255
      return this.e != null;
9256
    }
9257
 
9258
    public void setEIsSet(boolean value) {
9259
      if (!value) {
9260
        this.e = null;
9261
      }
9262
    }
9263
 
9264
    public void setFieldValue(_Fields field, Object value) {
9265
      switch (field) {
9266
      case SUCCESS:
9267
        if (value == null) {
9268
          unsetSuccess();
9269
        } else {
9270
          setSuccess((List<PurchaseOrder>)value);
9271
        }
9272
        break;
9273
 
9274
      case E:
9275
        if (value == null) {
9276
          unsetE();
9277
        } else {
9278
          setE((PurchaseServiceException)value);
9279
        }
9280
        break;
9281
 
9282
      }
9283
    }
9284
 
9285
    public Object getFieldValue(_Fields field) {
9286
      switch (field) {
9287
      case SUCCESS:
9288
        return getSuccess();
9289
 
9290
      case E:
9291
        return getE();
9292
 
9293
      }
9294
      throw new IllegalStateException();
9295
    }
9296
 
9297
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9298
    public boolean isSet(_Fields field) {
9299
      if (field == null) {
9300
        throw new IllegalArgumentException();
9301
      }
9302
 
9303
      switch (field) {
9304
      case SUCCESS:
9305
        return isSetSuccess();
9306
      case E:
9307
        return isSetE();
9308
      }
9309
      throw new IllegalStateException();
9310
    }
9311
 
9312
    @Override
9313
    public boolean equals(Object that) {
9314
      if (that == null)
9315
        return false;
9316
      if (that instanceof getPendingPurchaseOrders_result)
9317
        return this.equals((getPendingPurchaseOrders_result)that);
9318
      return false;
9319
    }
9320
 
9321
    public boolean equals(getPendingPurchaseOrders_result that) {
9322
      if (that == null)
9323
        return false;
9324
 
9325
      boolean this_present_success = true && this.isSetSuccess();
9326
      boolean that_present_success = true && that.isSetSuccess();
9327
      if (this_present_success || that_present_success) {
9328
        if (!(this_present_success && that_present_success))
9329
          return false;
9330
        if (!this.success.equals(that.success))
9331
          return false;
9332
      }
9333
 
9334
      boolean this_present_e = true && this.isSetE();
9335
      boolean that_present_e = true && that.isSetE();
9336
      if (this_present_e || that_present_e) {
9337
        if (!(this_present_e && that_present_e))
9338
          return false;
9339
        if (!this.e.equals(that.e))
9340
          return false;
9341
      }
9342
 
9343
      return true;
9344
    }
9345
 
9346
    @Override
9347
    public int hashCode() {
9348
      return 0;
9349
    }
9350
 
9351
    public int compareTo(getPendingPurchaseOrders_result other) {
9352
      if (!getClass().equals(other.getClass())) {
9353
        return getClass().getName().compareTo(other.getClass().getName());
9354
      }
9355
 
9356
      int lastComparison = 0;
9357
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9358
 
9359
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9360
      if (lastComparison != 0) {
9361
        return lastComparison;
9362
      }
9363
      if (isSetSuccess()) {
9364
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9365
        if (lastComparison != 0) {
9366
          return lastComparison;
9367
        }
9368
      }
9369
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9370
      if (lastComparison != 0) {
9371
        return lastComparison;
9372
      }
9373
      if (isSetE()) {
9374
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9375
        if (lastComparison != 0) {
9376
          return lastComparison;
9377
        }
9378
      }
9379
      return 0;
9380
    }
9381
 
9382
    public _Fields fieldForId(int fieldId) {
9383
      return _Fields.findByThriftId(fieldId);
9384
    }
9385
 
9386
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9387
      org.apache.thrift.protocol.TField field;
9388
      iprot.readStructBegin();
9389
      while (true)
9390
      {
9391
        field = iprot.readFieldBegin();
9392
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9393
          break;
9394
        }
9395
        switch (field.id) {
9396
          case 0: // SUCCESS
9397
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9398
              {
6385 amar.kumar 9399
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9400
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9401
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9402
                {
6385 amar.kumar 9403
                  PurchaseOrder _elem18; // required
9404
                  _elem18 = new PurchaseOrder();
9405
                  _elem18.read(iprot);
9406
                  this.success.add(_elem18);
4754 mandeep.dh 9407
                }
9408
                iprot.readListEnd();
9409
              }
9410
            } else { 
9411
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9412
            }
9413
            break;
9414
          case 1: // E
9415
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9416
              this.e = new PurchaseServiceException();
9417
              this.e.read(iprot);
9418
            } else { 
9419
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9420
            }
9421
            break;
9422
          default:
9423
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9424
        }
9425
        iprot.readFieldEnd();
9426
      }
9427
      iprot.readStructEnd();
9428
      validate();
9429
    }
9430
 
9431
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9432
      oprot.writeStructBegin(STRUCT_DESC);
9433
 
9434
      if (this.isSetSuccess()) {
9435
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9436
        {
9437
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9438
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9439
          {
6385 amar.kumar 9440
            _iter19.write(oprot);
4754 mandeep.dh 9441
          }
9442
          oprot.writeListEnd();
9443
        }
9444
        oprot.writeFieldEnd();
9445
      } else if (this.isSetE()) {
9446
        oprot.writeFieldBegin(E_FIELD_DESC);
9447
        this.e.write(oprot);
9448
        oprot.writeFieldEnd();
9449
      }
9450
      oprot.writeFieldStop();
9451
      oprot.writeStructEnd();
9452
    }
9453
 
9454
    @Override
9455
    public String toString() {
9456
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9457
      boolean first = true;
9458
 
9459
      sb.append("success:");
9460
      if (this.success == null) {
9461
        sb.append("null");
9462
      } else {
9463
        sb.append(this.success);
9464
      }
9465
      first = false;
9466
      if (!first) sb.append(", ");
9467
      sb.append("e:");
9468
      if (this.e == null) {
9469
        sb.append("null");
9470
      } else {
9471
        sb.append(this.e);
9472
      }
9473
      first = false;
9474
      sb.append(")");
9475
      return sb.toString();
9476
    }
9477
 
9478
    public void validate() throws org.apache.thrift.TException {
9479
      // check for required fields
9480
    }
9481
 
9482
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9483
      try {
9484
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9485
      } catch (org.apache.thrift.TException te) {
9486
        throw new java.io.IOException(te);
9487
      }
9488
    }
9489
 
9490
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9491
      try {
9492
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9493
      } catch (org.apache.thrift.TException te) {
9494
        throw new java.io.IOException(te);
9495
      }
9496
    }
9497
 
9498
  }
9499
 
9500
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9501
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9502
 
9503
 
9504
 
9505
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9506
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9507
;
9508
 
9509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9510
 
9511
      static {
9512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9513
          byName.put(field.getFieldName(), field);
9514
        }
9515
      }
9516
 
9517
      /**
9518
       * Find the _Fields constant that matches fieldId, or null if its not found.
9519
       */
9520
      public static _Fields findByThriftId(int fieldId) {
9521
        switch(fieldId) {
9522
          default:
9523
            return null;
9524
        }
9525
      }
9526
 
9527
      /**
9528
       * Find the _Fields constant that matches fieldId, throwing an exception
9529
       * if it is not found.
9530
       */
9531
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9532
        _Fields fields = findByThriftId(fieldId);
9533
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9534
        return fields;
9535
      }
9536
 
9537
      /**
9538
       * Find the _Fields constant that matches name, or null if its not found.
9539
       */
9540
      public static _Fields findByName(String name) {
9541
        return byName.get(name);
9542
      }
9543
 
9544
      private final short _thriftId;
9545
      private final String _fieldName;
9546
 
9547
      _Fields(short thriftId, String fieldName) {
9548
        _thriftId = thriftId;
9549
        _fieldName = fieldName;
9550
      }
9551
 
9552
      public short getThriftFieldId() {
9553
        return _thriftId;
9554
      }
9555
 
9556
      public String getFieldName() {
9557
        return _fieldName;
9558
      }
9559
    }
9560
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9561
    static {
9562
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9563
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9564
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9565
    }
9566
 
9567
    public getSuppliers_args() {
9568
    }
9569
 
9570
    /**
9571
     * Performs a deep copy on <i>other</i>.
9572
     */
9573
    public getSuppliers_args(getSuppliers_args other) {
9574
    }
9575
 
9576
    public getSuppliers_args deepCopy() {
9577
      return new getSuppliers_args(this);
9578
    }
9579
 
9580
    @Override
9581
    public void clear() {
9582
    }
9583
 
9584
    public void setFieldValue(_Fields field, Object value) {
9585
      switch (field) {
9586
      }
9587
    }
9588
 
9589
    public Object getFieldValue(_Fields field) {
9590
      switch (field) {
9591
      }
9592
      throw new IllegalStateException();
9593
    }
9594
 
9595
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9596
    public boolean isSet(_Fields field) {
9597
      if (field == null) {
9598
        throw new IllegalArgumentException();
9599
      }
9600
 
9601
      switch (field) {
9602
      }
9603
      throw new IllegalStateException();
9604
    }
9605
 
9606
    @Override
9607
    public boolean equals(Object that) {
9608
      if (that == null)
9609
        return false;
9610
      if (that instanceof getSuppliers_args)
9611
        return this.equals((getSuppliers_args)that);
9612
      return false;
9613
    }
9614
 
9615
    public boolean equals(getSuppliers_args that) {
9616
      if (that == null)
9617
        return false;
9618
 
9619
      return true;
9620
    }
9621
 
9622
    @Override
9623
    public int hashCode() {
9624
      return 0;
9625
    }
9626
 
9627
    public int compareTo(getSuppliers_args other) {
9628
      if (!getClass().equals(other.getClass())) {
9629
        return getClass().getName().compareTo(other.getClass().getName());
9630
      }
9631
 
9632
      int lastComparison = 0;
9633
      getSuppliers_args typedOther = (getSuppliers_args)other;
9634
 
9635
      return 0;
9636
    }
9637
 
9638
    public _Fields fieldForId(int fieldId) {
9639
      return _Fields.findByThriftId(fieldId);
9640
    }
9641
 
9642
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9643
      org.apache.thrift.protocol.TField field;
9644
      iprot.readStructBegin();
9645
      while (true)
9646
      {
9647
        field = iprot.readFieldBegin();
9648
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9649
          break;
9650
        }
9651
        switch (field.id) {
9652
          default:
9653
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9654
        }
9655
        iprot.readFieldEnd();
9656
      }
9657
      iprot.readStructEnd();
9658
      validate();
9659
    }
9660
 
9661
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9662
      validate();
9663
 
9664
      oprot.writeStructBegin(STRUCT_DESC);
9665
      oprot.writeFieldStop();
9666
      oprot.writeStructEnd();
9667
    }
9668
 
9669
    @Override
9670
    public String toString() {
9671
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9672
      boolean first = true;
9673
 
9674
      sb.append(")");
9675
      return sb.toString();
9676
    }
9677
 
9678
    public void validate() throws org.apache.thrift.TException {
9679
      // check for required fields
9680
    }
9681
 
9682
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9683
      try {
9684
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9685
      } catch (org.apache.thrift.TException te) {
9686
        throw new java.io.IOException(te);
9687
      }
9688
    }
9689
 
9690
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9691
      try {
9692
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9693
      } catch (org.apache.thrift.TException te) {
9694
        throw new java.io.IOException(te);
9695
      }
9696
    }
9697
 
9698
  }
9699
 
9700
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9701
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9702
 
9703
    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);
9704
    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);
9705
 
9706
    private List<Supplier> success; // required
9707
    private PurchaseServiceException e; // required
9708
 
9709
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9710
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9711
      SUCCESS((short)0, "success"),
9712
      E((short)1, "e");
9713
 
9714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9715
 
9716
      static {
9717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9718
          byName.put(field.getFieldName(), field);
9719
        }
9720
      }
9721
 
9722
      /**
9723
       * Find the _Fields constant that matches fieldId, or null if its not found.
9724
       */
9725
      public static _Fields findByThriftId(int fieldId) {
9726
        switch(fieldId) {
9727
          case 0: // SUCCESS
9728
            return SUCCESS;
9729
          case 1: // E
9730
            return E;
9731
          default:
9732
            return null;
9733
        }
9734
      }
9735
 
9736
      /**
9737
       * Find the _Fields constant that matches fieldId, throwing an exception
9738
       * if it is not found.
9739
       */
9740
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9741
        _Fields fields = findByThriftId(fieldId);
9742
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9743
        return fields;
9744
      }
9745
 
9746
      /**
9747
       * Find the _Fields constant that matches name, or null if its not found.
9748
       */
9749
      public static _Fields findByName(String name) {
9750
        return byName.get(name);
9751
      }
9752
 
9753
      private final short _thriftId;
9754
      private final String _fieldName;
9755
 
9756
      _Fields(short thriftId, String fieldName) {
9757
        _thriftId = thriftId;
9758
        _fieldName = fieldName;
9759
      }
9760
 
9761
      public short getThriftFieldId() {
9762
        return _thriftId;
9763
      }
9764
 
9765
      public String getFieldName() {
9766
        return _fieldName;
9767
      }
9768
    }
9769
 
9770
    // isset id assignments
9771
 
9772
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9773
    static {
9774
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9775
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9776
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9777
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9778
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9779
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9780
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9781
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9782
    }
9783
 
9784
    public getSuppliers_result() {
9785
    }
9786
 
9787
    public getSuppliers_result(
9788
      List<Supplier> success,
9789
      PurchaseServiceException e)
9790
    {
9791
      this();
9792
      this.success = success;
9793
      this.e = e;
9794
    }
9795
 
9796
    /**
9797
     * Performs a deep copy on <i>other</i>.
9798
     */
9799
    public getSuppliers_result(getSuppliers_result other) {
9800
      if (other.isSetSuccess()) {
9801
        List<Supplier> __this__success = new ArrayList<Supplier>();
9802
        for (Supplier other_element : other.success) {
9803
          __this__success.add(new Supplier(other_element));
9804
        }
9805
        this.success = __this__success;
9806
      }
9807
      if (other.isSetE()) {
9808
        this.e = new PurchaseServiceException(other.e);
9809
      }
9810
    }
9811
 
9812
    public getSuppliers_result deepCopy() {
9813
      return new getSuppliers_result(this);
9814
    }
9815
 
9816
    @Override
9817
    public void clear() {
9818
      this.success = null;
9819
      this.e = null;
9820
    }
9821
 
9822
    public int getSuccessSize() {
9823
      return (this.success == null) ? 0 : this.success.size();
9824
    }
9825
 
9826
    public java.util.Iterator<Supplier> getSuccessIterator() {
9827
      return (this.success == null) ? null : this.success.iterator();
9828
    }
9829
 
9830
    public void addToSuccess(Supplier elem) {
9831
      if (this.success == null) {
9832
        this.success = new ArrayList<Supplier>();
9833
      }
9834
      this.success.add(elem);
9835
    }
9836
 
9837
    public List<Supplier> getSuccess() {
9838
      return this.success;
9839
    }
9840
 
9841
    public void setSuccess(List<Supplier> success) {
9842
      this.success = success;
9843
    }
9844
 
9845
    public void unsetSuccess() {
9846
      this.success = null;
9847
    }
9848
 
9849
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9850
    public boolean isSetSuccess() {
9851
      return this.success != null;
9852
    }
9853
 
9854
    public void setSuccessIsSet(boolean value) {
9855
      if (!value) {
9856
        this.success = null;
9857
      }
9858
    }
9859
 
9860
    public PurchaseServiceException getE() {
9861
      return this.e;
9862
    }
9863
 
9864
    public void setE(PurchaseServiceException e) {
9865
      this.e = e;
9866
    }
9867
 
9868
    public void unsetE() {
9869
      this.e = null;
9870
    }
9871
 
9872
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9873
    public boolean isSetE() {
9874
      return this.e != null;
9875
    }
9876
 
9877
    public void setEIsSet(boolean value) {
9878
      if (!value) {
9879
        this.e = null;
9880
      }
9881
    }
9882
 
9883
    public void setFieldValue(_Fields field, Object value) {
9884
      switch (field) {
9885
      case SUCCESS:
9886
        if (value == null) {
9887
          unsetSuccess();
9888
        } else {
9889
          setSuccess((List<Supplier>)value);
9890
        }
9891
        break;
9892
 
9893
      case E:
9894
        if (value == null) {
9895
          unsetE();
9896
        } else {
9897
          setE((PurchaseServiceException)value);
9898
        }
9899
        break;
9900
 
9901
      }
9902
    }
9903
 
9904
    public Object getFieldValue(_Fields field) {
9905
      switch (field) {
9906
      case SUCCESS:
9907
        return getSuccess();
9908
 
9909
      case E:
9910
        return getE();
9911
 
9912
      }
9913
      throw new IllegalStateException();
9914
    }
9915
 
9916
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9917
    public boolean isSet(_Fields field) {
9918
      if (field == null) {
9919
        throw new IllegalArgumentException();
9920
      }
9921
 
9922
      switch (field) {
9923
      case SUCCESS:
9924
        return isSetSuccess();
9925
      case E:
9926
        return isSetE();
9927
      }
9928
      throw new IllegalStateException();
9929
    }
9930
 
9931
    @Override
9932
    public boolean equals(Object that) {
9933
      if (that == null)
9934
        return false;
9935
      if (that instanceof getSuppliers_result)
9936
        return this.equals((getSuppliers_result)that);
9937
      return false;
9938
    }
9939
 
9940
    public boolean equals(getSuppliers_result that) {
9941
      if (that == null)
9942
        return false;
9943
 
9944
      boolean this_present_success = true && this.isSetSuccess();
9945
      boolean that_present_success = true && that.isSetSuccess();
9946
      if (this_present_success || that_present_success) {
9947
        if (!(this_present_success && that_present_success))
9948
          return false;
9949
        if (!this.success.equals(that.success))
9950
          return false;
9951
      }
9952
 
9953
      boolean this_present_e = true && this.isSetE();
9954
      boolean that_present_e = true && that.isSetE();
9955
      if (this_present_e || that_present_e) {
9956
        if (!(this_present_e && that_present_e))
9957
          return false;
9958
        if (!this.e.equals(that.e))
9959
          return false;
9960
      }
9961
 
9962
      return true;
9963
    }
9964
 
9965
    @Override
9966
    public int hashCode() {
9967
      return 0;
9968
    }
9969
 
9970
    public int compareTo(getSuppliers_result other) {
9971
      if (!getClass().equals(other.getClass())) {
9972
        return getClass().getName().compareTo(other.getClass().getName());
9973
      }
9974
 
9975
      int lastComparison = 0;
9976
      getSuppliers_result typedOther = (getSuppliers_result)other;
9977
 
9978
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9979
      if (lastComparison != 0) {
9980
        return lastComparison;
9981
      }
9982
      if (isSetSuccess()) {
9983
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9984
        if (lastComparison != 0) {
9985
          return lastComparison;
9986
        }
9987
      }
9988
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9989
      if (lastComparison != 0) {
9990
        return lastComparison;
9991
      }
9992
      if (isSetE()) {
9993
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9994
        if (lastComparison != 0) {
9995
          return lastComparison;
9996
        }
9997
      }
9998
      return 0;
9999
    }
10000
 
10001
    public _Fields fieldForId(int fieldId) {
10002
      return _Fields.findByThriftId(fieldId);
10003
    }
10004
 
10005
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10006
      org.apache.thrift.protocol.TField field;
10007
      iprot.readStructBegin();
10008
      while (true)
10009
      {
10010
        field = iprot.readFieldBegin();
10011
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10012
          break;
10013
        }
10014
        switch (field.id) {
10015
          case 0: // SUCCESS
10016
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10017
              {
6385 amar.kumar 10018
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10019
                this.success = new ArrayList<Supplier>(_list20.size);
10020
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10021
                {
6385 amar.kumar 10022
                  Supplier _elem22; // required
10023
                  _elem22 = new Supplier();
10024
                  _elem22.read(iprot);
10025
                  this.success.add(_elem22);
4754 mandeep.dh 10026
                }
10027
                iprot.readListEnd();
10028
              }
10029
            } else { 
10030
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10031
            }
10032
            break;
10033
          case 1: // E
10034
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10035
              this.e = new PurchaseServiceException();
10036
              this.e.read(iprot);
10037
            } else { 
10038
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10039
            }
10040
            break;
10041
          default:
10042
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10043
        }
10044
        iprot.readFieldEnd();
10045
      }
10046
      iprot.readStructEnd();
10047
      validate();
10048
    }
10049
 
10050
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10051
      oprot.writeStructBegin(STRUCT_DESC);
10052
 
10053
      if (this.isSetSuccess()) {
10054
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10055
        {
10056
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10057
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10058
          {
6385 amar.kumar 10059
            _iter23.write(oprot);
4754 mandeep.dh 10060
          }
10061
          oprot.writeListEnd();
10062
        }
10063
        oprot.writeFieldEnd();
10064
      } else if (this.isSetE()) {
10065
        oprot.writeFieldBegin(E_FIELD_DESC);
10066
        this.e.write(oprot);
10067
        oprot.writeFieldEnd();
10068
      }
10069
      oprot.writeFieldStop();
10070
      oprot.writeStructEnd();
10071
    }
10072
 
10073
    @Override
10074
    public String toString() {
10075
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10076
      boolean first = true;
10077
 
10078
      sb.append("success:");
10079
      if (this.success == null) {
10080
        sb.append("null");
10081
      } else {
10082
        sb.append(this.success);
10083
      }
10084
      first = false;
10085
      if (!first) sb.append(", ");
10086
      sb.append("e:");
10087
      if (this.e == null) {
10088
        sb.append("null");
10089
      } else {
10090
        sb.append(this.e);
10091
      }
10092
      first = false;
10093
      sb.append(")");
10094
      return sb.toString();
10095
    }
10096
 
10097
    public void validate() throws org.apache.thrift.TException {
10098
      // check for required fields
10099
    }
10100
 
10101
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10102
      try {
10103
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10104
      } catch (org.apache.thrift.TException te) {
10105
        throw new java.io.IOException(te);
10106
      }
10107
    }
10108
 
10109
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10110
      try {
10111
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10112
      } catch (org.apache.thrift.TException te) {
10113
        throw new java.io.IOException(te);
10114
      }
10115
    }
10116
 
10117
  }
10118
 
10119
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10120
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10121
 
10122
    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);
10123
    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);
10124
    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);
10125
 
10126
    private long purchaseOrderId; // required
10127
    private long itemId; // required
10128
    private long quantity; // required
10129
 
10130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10131
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10132
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10133
      ITEM_ID((short)2, "itemId"),
10134
      QUANTITY((short)3, "quantity");
10135
 
10136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10137
 
10138
      static {
10139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10140
          byName.put(field.getFieldName(), field);
10141
        }
10142
      }
10143
 
10144
      /**
10145
       * Find the _Fields constant that matches fieldId, or null if its not found.
10146
       */
10147
      public static _Fields findByThriftId(int fieldId) {
10148
        switch(fieldId) {
10149
          case 1: // PURCHASE_ORDER_ID
10150
            return PURCHASE_ORDER_ID;
10151
          case 2: // ITEM_ID
10152
            return ITEM_ID;
10153
          case 3: // QUANTITY
10154
            return QUANTITY;
10155
          default:
10156
            return null;
10157
        }
10158
      }
10159
 
10160
      /**
10161
       * Find the _Fields constant that matches fieldId, throwing an exception
10162
       * if it is not found.
10163
       */
10164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10165
        _Fields fields = findByThriftId(fieldId);
10166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10167
        return fields;
10168
      }
10169
 
10170
      /**
10171
       * Find the _Fields constant that matches name, or null if its not found.
10172
       */
10173
      public static _Fields findByName(String name) {
10174
        return byName.get(name);
10175
      }
10176
 
10177
      private final short _thriftId;
10178
      private final String _fieldName;
10179
 
10180
      _Fields(short thriftId, String fieldName) {
10181
        _thriftId = thriftId;
10182
        _fieldName = fieldName;
10183
      }
10184
 
10185
      public short getThriftFieldId() {
10186
        return _thriftId;
10187
      }
10188
 
10189
      public String getFieldName() {
10190
        return _fieldName;
10191
      }
10192
    }
10193
 
10194
    // isset id assignments
10195
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10196
    private static final int __ITEMID_ISSET_ID = 1;
10197
    private static final int __QUANTITY_ISSET_ID = 2;
10198
    private BitSet __isset_bit_vector = new BitSet(3);
10199
 
10200
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10201
    static {
10202
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10203
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10204
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10205
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10206
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10207
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10208
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10209
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10210
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10211
    }
10212
 
10213
    public fulfillPO_args() {
10214
    }
10215
 
10216
    public fulfillPO_args(
10217
      long purchaseOrderId,
10218
      long itemId,
10219
      long quantity)
10220
    {
10221
      this();
10222
      this.purchaseOrderId = purchaseOrderId;
10223
      setPurchaseOrderIdIsSet(true);
10224
      this.itemId = itemId;
10225
      setItemIdIsSet(true);
10226
      this.quantity = quantity;
10227
      setQuantityIsSet(true);
10228
    }
10229
 
10230
    /**
10231
     * Performs a deep copy on <i>other</i>.
10232
     */
10233
    public fulfillPO_args(fulfillPO_args other) {
10234
      __isset_bit_vector.clear();
10235
      __isset_bit_vector.or(other.__isset_bit_vector);
10236
      this.purchaseOrderId = other.purchaseOrderId;
10237
      this.itemId = other.itemId;
10238
      this.quantity = other.quantity;
10239
    }
10240
 
10241
    public fulfillPO_args deepCopy() {
10242
      return new fulfillPO_args(this);
10243
    }
10244
 
10245
    @Override
10246
    public void clear() {
10247
      setPurchaseOrderIdIsSet(false);
10248
      this.purchaseOrderId = 0;
10249
      setItemIdIsSet(false);
10250
      this.itemId = 0;
10251
      setQuantityIsSet(false);
10252
      this.quantity = 0;
10253
    }
10254
 
10255
    public long getPurchaseOrderId() {
10256
      return this.purchaseOrderId;
10257
    }
10258
 
10259
    public void setPurchaseOrderId(long purchaseOrderId) {
10260
      this.purchaseOrderId = purchaseOrderId;
10261
      setPurchaseOrderIdIsSet(true);
10262
    }
10263
 
10264
    public void unsetPurchaseOrderId() {
10265
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10266
    }
10267
 
10268
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10269
    public boolean isSetPurchaseOrderId() {
10270
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10271
    }
10272
 
10273
    public void setPurchaseOrderIdIsSet(boolean value) {
10274
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10275
    }
10276
 
10277
    public long getItemId() {
10278
      return this.itemId;
10279
    }
10280
 
10281
    public void setItemId(long itemId) {
10282
      this.itemId = itemId;
10283
      setItemIdIsSet(true);
10284
    }
10285
 
10286
    public void unsetItemId() {
10287
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10288
    }
10289
 
10290
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10291
    public boolean isSetItemId() {
10292
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10293
    }
10294
 
10295
    public void setItemIdIsSet(boolean value) {
10296
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10297
    }
10298
 
10299
    public long getQuantity() {
10300
      return this.quantity;
10301
    }
10302
 
10303
    public void setQuantity(long quantity) {
10304
      this.quantity = quantity;
10305
      setQuantityIsSet(true);
10306
    }
10307
 
10308
    public void unsetQuantity() {
10309
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10310
    }
10311
 
10312
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10313
    public boolean isSetQuantity() {
10314
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10315
    }
10316
 
10317
    public void setQuantityIsSet(boolean value) {
10318
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10319
    }
10320
 
10321
    public void setFieldValue(_Fields field, Object value) {
10322
      switch (field) {
10323
      case PURCHASE_ORDER_ID:
10324
        if (value == null) {
10325
          unsetPurchaseOrderId();
10326
        } else {
10327
          setPurchaseOrderId((Long)value);
10328
        }
10329
        break;
10330
 
10331
      case ITEM_ID:
10332
        if (value == null) {
10333
          unsetItemId();
10334
        } else {
10335
          setItemId((Long)value);
10336
        }
10337
        break;
10338
 
10339
      case QUANTITY:
10340
        if (value == null) {
10341
          unsetQuantity();
10342
        } else {
10343
          setQuantity((Long)value);
10344
        }
10345
        break;
10346
 
10347
      }
10348
    }
10349
 
10350
    public Object getFieldValue(_Fields field) {
10351
      switch (field) {
10352
      case PURCHASE_ORDER_ID:
10353
        return Long.valueOf(getPurchaseOrderId());
10354
 
10355
      case ITEM_ID:
10356
        return Long.valueOf(getItemId());
10357
 
10358
      case QUANTITY:
10359
        return Long.valueOf(getQuantity());
10360
 
10361
      }
10362
      throw new IllegalStateException();
10363
    }
10364
 
10365
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10366
    public boolean isSet(_Fields field) {
10367
      if (field == null) {
10368
        throw new IllegalArgumentException();
10369
      }
10370
 
10371
      switch (field) {
10372
      case PURCHASE_ORDER_ID:
10373
        return isSetPurchaseOrderId();
10374
      case ITEM_ID:
10375
        return isSetItemId();
10376
      case QUANTITY:
10377
        return isSetQuantity();
10378
      }
10379
      throw new IllegalStateException();
10380
    }
10381
 
10382
    @Override
10383
    public boolean equals(Object that) {
10384
      if (that == null)
10385
        return false;
10386
      if (that instanceof fulfillPO_args)
10387
        return this.equals((fulfillPO_args)that);
10388
      return false;
10389
    }
10390
 
10391
    public boolean equals(fulfillPO_args that) {
10392
      if (that == null)
10393
        return false;
10394
 
10395
      boolean this_present_purchaseOrderId = true;
10396
      boolean that_present_purchaseOrderId = true;
10397
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10398
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10399
          return false;
10400
        if (this.purchaseOrderId != that.purchaseOrderId)
10401
          return false;
10402
      }
10403
 
10404
      boolean this_present_itemId = true;
10405
      boolean that_present_itemId = true;
10406
      if (this_present_itemId || that_present_itemId) {
10407
        if (!(this_present_itemId && that_present_itemId))
10408
          return false;
10409
        if (this.itemId != that.itemId)
10410
          return false;
10411
      }
10412
 
10413
      boolean this_present_quantity = true;
10414
      boolean that_present_quantity = true;
10415
      if (this_present_quantity || that_present_quantity) {
10416
        if (!(this_present_quantity && that_present_quantity))
10417
          return false;
10418
        if (this.quantity != that.quantity)
10419
          return false;
10420
      }
10421
 
10422
      return true;
10423
    }
10424
 
10425
    @Override
10426
    public int hashCode() {
10427
      return 0;
10428
    }
10429
 
10430
    public int compareTo(fulfillPO_args other) {
10431
      if (!getClass().equals(other.getClass())) {
10432
        return getClass().getName().compareTo(other.getClass().getName());
10433
      }
10434
 
10435
      int lastComparison = 0;
10436
      fulfillPO_args typedOther = (fulfillPO_args)other;
10437
 
10438
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10439
      if (lastComparison != 0) {
10440
        return lastComparison;
10441
      }
10442
      if (isSetPurchaseOrderId()) {
10443
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10444
        if (lastComparison != 0) {
10445
          return lastComparison;
10446
        }
10447
      }
10448
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10449
      if (lastComparison != 0) {
10450
        return lastComparison;
10451
      }
10452
      if (isSetItemId()) {
10453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10454
        if (lastComparison != 0) {
10455
          return lastComparison;
10456
        }
10457
      }
10458
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10459
      if (lastComparison != 0) {
10460
        return lastComparison;
10461
      }
10462
      if (isSetQuantity()) {
10463
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10464
        if (lastComparison != 0) {
10465
          return lastComparison;
10466
        }
10467
      }
10468
      return 0;
10469
    }
10470
 
10471
    public _Fields fieldForId(int fieldId) {
10472
      return _Fields.findByThriftId(fieldId);
10473
    }
10474
 
10475
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10476
      org.apache.thrift.protocol.TField field;
10477
      iprot.readStructBegin();
10478
      while (true)
10479
      {
10480
        field = iprot.readFieldBegin();
10481
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10482
          break;
10483
        }
10484
        switch (field.id) {
10485
          case 1: // PURCHASE_ORDER_ID
10486
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10487
              this.purchaseOrderId = iprot.readI64();
10488
              setPurchaseOrderIdIsSet(true);
10489
            } else { 
10490
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10491
            }
10492
            break;
10493
          case 2: // ITEM_ID
10494
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10495
              this.itemId = iprot.readI64();
10496
              setItemIdIsSet(true);
10497
            } else { 
10498
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10499
            }
10500
            break;
10501
          case 3: // QUANTITY
10502
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10503
              this.quantity = iprot.readI64();
10504
              setQuantityIsSet(true);
10505
            } else { 
10506
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10507
            }
10508
            break;
10509
          default:
10510
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10511
        }
10512
        iprot.readFieldEnd();
10513
      }
10514
      iprot.readStructEnd();
10515
      validate();
10516
    }
10517
 
10518
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10519
      validate();
10520
 
10521
      oprot.writeStructBegin(STRUCT_DESC);
10522
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10523
      oprot.writeI64(this.purchaseOrderId);
10524
      oprot.writeFieldEnd();
10525
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10526
      oprot.writeI64(this.itemId);
10527
      oprot.writeFieldEnd();
10528
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10529
      oprot.writeI64(this.quantity);
10530
      oprot.writeFieldEnd();
10531
      oprot.writeFieldStop();
10532
      oprot.writeStructEnd();
10533
    }
10534
 
10535
    @Override
10536
    public String toString() {
10537
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10538
      boolean first = true;
10539
 
10540
      sb.append("purchaseOrderId:");
10541
      sb.append(this.purchaseOrderId);
10542
      first = false;
10543
      if (!first) sb.append(", ");
10544
      sb.append("itemId:");
10545
      sb.append(this.itemId);
10546
      first = false;
10547
      if (!first) sb.append(", ");
10548
      sb.append("quantity:");
10549
      sb.append(this.quantity);
10550
      first = false;
10551
      sb.append(")");
10552
      return sb.toString();
10553
    }
10554
 
10555
    public void validate() throws org.apache.thrift.TException {
10556
      // check for required fields
10557
    }
10558
 
10559
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10560
      try {
10561
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10562
      } catch (org.apache.thrift.TException te) {
10563
        throw new java.io.IOException(te);
10564
      }
10565
    }
10566
 
10567
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10568
      try {
10569
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10570
        __isset_bit_vector = new BitSet(1);
10571
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10572
      } catch (org.apache.thrift.TException te) {
10573
        throw new java.io.IOException(te);
10574
      }
10575
    }
10576
 
10577
  }
10578
 
10579
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10580
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10581
 
10582
    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);
10583
 
10584
    private PurchaseServiceException e; // required
10585
 
10586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10587
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10588
      E((short)1, "e");
10589
 
10590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10591
 
10592
      static {
10593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10594
          byName.put(field.getFieldName(), field);
10595
        }
10596
      }
10597
 
10598
      /**
10599
       * Find the _Fields constant that matches fieldId, or null if its not found.
10600
       */
10601
      public static _Fields findByThriftId(int fieldId) {
10602
        switch(fieldId) {
10603
          case 1: // E
10604
            return E;
10605
          default:
10606
            return null;
10607
        }
10608
      }
10609
 
10610
      /**
10611
       * Find the _Fields constant that matches fieldId, throwing an exception
10612
       * if it is not found.
10613
       */
10614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10615
        _Fields fields = findByThriftId(fieldId);
10616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10617
        return fields;
10618
      }
10619
 
10620
      /**
10621
       * Find the _Fields constant that matches name, or null if its not found.
10622
       */
10623
      public static _Fields findByName(String name) {
10624
        return byName.get(name);
10625
      }
10626
 
10627
      private final short _thriftId;
10628
      private final String _fieldName;
10629
 
10630
      _Fields(short thriftId, String fieldName) {
10631
        _thriftId = thriftId;
10632
        _fieldName = fieldName;
10633
      }
10634
 
10635
      public short getThriftFieldId() {
10636
        return _thriftId;
10637
      }
10638
 
10639
      public String getFieldName() {
10640
        return _fieldName;
10641
      }
10642
    }
10643
 
10644
    // isset id assignments
10645
 
10646
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10647
    static {
10648
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10649
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10650
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10651
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10652
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10653
    }
10654
 
10655
    public fulfillPO_result() {
10656
    }
10657
 
10658
    public fulfillPO_result(
10659
      PurchaseServiceException e)
10660
    {
10661
      this();
10662
      this.e = e;
10663
    }
10664
 
10665
    /**
10666
     * Performs a deep copy on <i>other</i>.
10667
     */
10668
    public fulfillPO_result(fulfillPO_result other) {
10669
      if (other.isSetE()) {
10670
        this.e = new PurchaseServiceException(other.e);
10671
      }
10672
    }
10673
 
10674
    public fulfillPO_result deepCopy() {
10675
      return new fulfillPO_result(this);
10676
    }
10677
 
10678
    @Override
10679
    public void clear() {
10680
      this.e = null;
10681
    }
10682
 
10683
    public PurchaseServiceException getE() {
10684
      return this.e;
10685
    }
10686
 
10687
    public void setE(PurchaseServiceException e) {
10688
      this.e = e;
10689
    }
10690
 
10691
    public void unsetE() {
10692
      this.e = null;
10693
    }
10694
 
10695
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10696
    public boolean isSetE() {
10697
      return this.e != null;
10698
    }
10699
 
10700
    public void setEIsSet(boolean value) {
10701
      if (!value) {
10702
        this.e = null;
10703
      }
10704
    }
10705
 
10706
    public void setFieldValue(_Fields field, Object value) {
10707
      switch (field) {
10708
      case E:
10709
        if (value == null) {
10710
          unsetE();
10711
        } else {
10712
          setE((PurchaseServiceException)value);
10713
        }
10714
        break;
10715
 
10716
      }
10717
    }
10718
 
10719
    public Object getFieldValue(_Fields field) {
10720
      switch (field) {
10721
      case E:
10722
        return getE();
10723
 
10724
      }
10725
      throw new IllegalStateException();
10726
    }
10727
 
10728
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10729
    public boolean isSet(_Fields field) {
10730
      if (field == null) {
10731
        throw new IllegalArgumentException();
10732
      }
10733
 
10734
      switch (field) {
10735
      case E:
10736
        return isSetE();
10737
      }
10738
      throw new IllegalStateException();
10739
    }
10740
 
10741
    @Override
10742
    public boolean equals(Object that) {
10743
      if (that == null)
10744
        return false;
10745
      if (that instanceof fulfillPO_result)
10746
        return this.equals((fulfillPO_result)that);
10747
      return false;
10748
    }
10749
 
10750
    public boolean equals(fulfillPO_result that) {
10751
      if (that == null)
10752
        return false;
10753
 
10754
      boolean this_present_e = true && this.isSetE();
10755
      boolean that_present_e = true && that.isSetE();
10756
      if (this_present_e || that_present_e) {
10757
        if (!(this_present_e && that_present_e))
10758
          return false;
10759
        if (!this.e.equals(that.e))
10760
          return false;
10761
      }
10762
 
10763
      return true;
10764
    }
10765
 
10766
    @Override
10767
    public int hashCode() {
10768
      return 0;
10769
    }
10770
 
10771
    public int compareTo(fulfillPO_result other) {
10772
      if (!getClass().equals(other.getClass())) {
10773
        return getClass().getName().compareTo(other.getClass().getName());
10774
      }
10775
 
10776
      int lastComparison = 0;
10777
      fulfillPO_result typedOther = (fulfillPO_result)other;
10778
 
10779
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10780
      if (lastComparison != 0) {
10781
        return lastComparison;
10782
      }
10783
      if (isSetE()) {
10784
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10785
        if (lastComparison != 0) {
10786
          return lastComparison;
10787
        }
10788
      }
10789
      return 0;
10790
    }
10791
 
10792
    public _Fields fieldForId(int fieldId) {
10793
      return _Fields.findByThriftId(fieldId);
10794
    }
10795
 
10796
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10797
      org.apache.thrift.protocol.TField field;
10798
      iprot.readStructBegin();
10799
      while (true)
10800
      {
10801
        field = iprot.readFieldBegin();
10802
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10803
          break;
10804
        }
10805
        switch (field.id) {
10806
          case 1: // E
10807
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10808
              this.e = new PurchaseServiceException();
10809
              this.e.read(iprot);
10810
            } else { 
10811
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10812
            }
10813
            break;
10814
          default:
10815
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10816
        }
10817
        iprot.readFieldEnd();
10818
      }
10819
      iprot.readStructEnd();
10820
      validate();
10821
    }
10822
 
10823
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10824
      oprot.writeStructBegin(STRUCT_DESC);
10825
 
10826
      if (this.isSetE()) {
10827
        oprot.writeFieldBegin(E_FIELD_DESC);
10828
        this.e.write(oprot);
10829
        oprot.writeFieldEnd();
10830
      }
10831
      oprot.writeFieldStop();
10832
      oprot.writeStructEnd();
10833
    }
10834
 
10835
    @Override
10836
    public String toString() {
10837
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
10838
      boolean first = true;
10839
 
10840
      sb.append("e:");
10841
      if (this.e == null) {
10842
        sb.append("null");
10843
      } else {
10844
        sb.append(this.e);
10845
      }
10846
      first = false;
10847
      sb.append(")");
10848
      return sb.toString();
10849
    }
10850
 
10851
    public void validate() throws org.apache.thrift.TException {
10852
      // check for required fields
10853
    }
10854
 
10855
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10856
      try {
10857
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10858
      } catch (org.apache.thrift.TException te) {
10859
        throw new java.io.IOException(te);
10860
      }
10861
    }
10862
 
10863
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10864
      try {
10865
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10866
      } catch (org.apache.thrift.TException te) {
10867
        throw new java.io.IOException(te);
10868
      }
10869
    }
10870
 
10871
  }
10872
 
10873
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
10874
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
10875
 
10876
    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);
10877
 
10878
    private PurchaseOrder purchaseOrder; // required
10879
 
10880
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10881
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10882
      PURCHASE_ORDER((short)1, "purchaseOrder");
10883
 
10884
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10885
 
10886
      static {
10887
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10888
          byName.put(field.getFieldName(), field);
10889
        }
10890
      }
10891
 
10892
      /**
10893
       * Find the _Fields constant that matches fieldId, or null if its not found.
10894
       */
10895
      public static _Fields findByThriftId(int fieldId) {
10896
        switch(fieldId) {
10897
          case 1: // PURCHASE_ORDER
10898
            return PURCHASE_ORDER;
10899
          default:
10900
            return null;
10901
        }
10902
      }
10903
 
10904
      /**
10905
       * Find the _Fields constant that matches fieldId, throwing an exception
10906
       * if it is not found.
10907
       */
10908
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10909
        _Fields fields = findByThriftId(fieldId);
10910
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10911
        return fields;
10912
      }
10913
 
10914
      /**
10915
       * Find the _Fields constant that matches name, or null if its not found.
10916
       */
10917
      public static _Fields findByName(String name) {
10918
        return byName.get(name);
10919
      }
10920
 
10921
      private final short _thriftId;
10922
      private final String _fieldName;
10923
 
10924
      _Fields(short thriftId, String fieldName) {
10925
        _thriftId = thriftId;
10926
        _fieldName = fieldName;
10927
      }
10928
 
10929
      public short getThriftFieldId() {
10930
        return _thriftId;
10931
      }
10932
 
10933
      public String getFieldName() {
10934
        return _fieldName;
10935
      }
10936
    }
10937
 
10938
    // isset id assignments
10939
 
10940
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10941
    static {
10942
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10943
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10944
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
10945
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10946
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
10947
    }
10948
 
10949
    public updatePurchaseOrder_args() {
10950
    }
10951
 
10952
    public updatePurchaseOrder_args(
10953
      PurchaseOrder purchaseOrder)
10954
    {
10955
      this();
10956
      this.purchaseOrder = purchaseOrder;
10957
    }
10958
 
10959
    /**
10960
     * Performs a deep copy on <i>other</i>.
10961
     */
10962
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
10963
      if (other.isSetPurchaseOrder()) {
10964
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
10965
      }
10966
    }
10967
 
10968
    public updatePurchaseOrder_args deepCopy() {
10969
      return new updatePurchaseOrder_args(this);
10970
    }
10971
 
10972
    @Override
10973
    public void clear() {
10974
      this.purchaseOrder = null;
10975
    }
10976
 
10977
    public PurchaseOrder getPurchaseOrder() {
10978
      return this.purchaseOrder;
10979
    }
10980
 
10981
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
10982
      this.purchaseOrder = purchaseOrder;
10983
    }
10984
 
10985
    public void unsetPurchaseOrder() {
10986
      this.purchaseOrder = null;
10987
    }
10988
 
10989
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
10990
    public boolean isSetPurchaseOrder() {
10991
      return this.purchaseOrder != null;
10992
    }
10993
 
10994
    public void setPurchaseOrderIsSet(boolean value) {
10995
      if (!value) {
10996
        this.purchaseOrder = null;
10997
      }
10998
    }
10999
 
11000
    public void setFieldValue(_Fields field, Object value) {
11001
      switch (field) {
11002
      case PURCHASE_ORDER:
11003
        if (value == null) {
11004
          unsetPurchaseOrder();
11005
        } else {
11006
          setPurchaseOrder((PurchaseOrder)value);
11007
        }
11008
        break;
11009
 
11010
      }
11011
    }
11012
 
11013
    public Object getFieldValue(_Fields field) {
11014
      switch (field) {
11015
      case PURCHASE_ORDER:
11016
        return getPurchaseOrder();
11017
 
11018
      }
11019
      throw new IllegalStateException();
11020
    }
11021
 
11022
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11023
    public boolean isSet(_Fields field) {
11024
      if (field == null) {
11025
        throw new IllegalArgumentException();
11026
      }
11027
 
11028
      switch (field) {
11029
      case PURCHASE_ORDER:
11030
        return isSetPurchaseOrder();
11031
      }
11032
      throw new IllegalStateException();
11033
    }
11034
 
11035
    @Override
11036
    public boolean equals(Object that) {
11037
      if (that == null)
11038
        return false;
11039
      if (that instanceof updatePurchaseOrder_args)
11040
        return this.equals((updatePurchaseOrder_args)that);
11041
      return false;
11042
    }
11043
 
11044
    public boolean equals(updatePurchaseOrder_args that) {
11045
      if (that == null)
11046
        return false;
11047
 
11048
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11049
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11050
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11051
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11052
          return false;
11053
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11054
          return false;
11055
      }
11056
 
11057
      return true;
11058
    }
11059
 
11060
    @Override
11061
    public int hashCode() {
11062
      return 0;
11063
    }
11064
 
11065
    public int compareTo(updatePurchaseOrder_args other) {
11066
      if (!getClass().equals(other.getClass())) {
11067
        return getClass().getName().compareTo(other.getClass().getName());
11068
      }
11069
 
11070
      int lastComparison = 0;
11071
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11072
 
11073
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11074
      if (lastComparison != 0) {
11075
        return lastComparison;
11076
      }
11077
      if (isSetPurchaseOrder()) {
11078
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11079
        if (lastComparison != 0) {
11080
          return lastComparison;
11081
        }
11082
      }
11083
      return 0;
11084
    }
11085
 
11086
    public _Fields fieldForId(int fieldId) {
11087
      return _Fields.findByThriftId(fieldId);
11088
    }
11089
 
11090
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11091
      org.apache.thrift.protocol.TField field;
11092
      iprot.readStructBegin();
11093
      while (true)
11094
      {
11095
        field = iprot.readFieldBegin();
11096
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11097
          break;
11098
        }
11099
        switch (field.id) {
11100
          case 1: // PURCHASE_ORDER
11101
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11102
              this.purchaseOrder = new PurchaseOrder();
11103
              this.purchaseOrder.read(iprot);
11104
            } else { 
11105
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11106
            }
11107
            break;
11108
          default:
11109
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11110
        }
11111
        iprot.readFieldEnd();
11112
      }
11113
      iprot.readStructEnd();
11114
      validate();
11115
    }
11116
 
11117
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11118
      validate();
11119
 
11120
      oprot.writeStructBegin(STRUCT_DESC);
11121
      if (this.purchaseOrder != null) {
11122
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11123
        this.purchaseOrder.write(oprot);
11124
        oprot.writeFieldEnd();
11125
      }
11126
      oprot.writeFieldStop();
11127
      oprot.writeStructEnd();
11128
    }
11129
 
11130
    @Override
11131
    public String toString() {
11132
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11133
      boolean first = true;
11134
 
11135
      sb.append("purchaseOrder:");
11136
      if (this.purchaseOrder == null) {
11137
        sb.append("null");
11138
      } else {
11139
        sb.append(this.purchaseOrder);
11140
      }
11141
      first = false;
11142
      sb.append(")");
11143
      return sb.toString();
11144
    }
11145
 
11146
    public void validate() throws org.apache.thrift.TException {
11147
      // check for required fields
11148
    }
11149
 
11150
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11151
      try {
11152
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11153
      } catch (org.apache.thrift.TException te) {
11154
        throw new java.io.IOException(te);
11155
      }
11156
    }
11157
 
11158
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11159
      try {
11160
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11161
      } catch (org.apache.thrift.TException te) {
11162
        throw new java.io.IOException(te);
11163
      }
11164
    }
11165
 
11166
  }
11167
 
11168
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11169
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11170
 
11171
    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);
11172
 
11173
    private PurchaseServiceException e; // required
11174
 
11175
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11176
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11177
      E((short)1, "e");
11178
 
11179
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11180
 
11181
      static {
11182
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11183
          byName.put(field.getFieldName(), field);
11184
        }
11185
      }
11186
 
11187
      /**
11188
       * Find the _Fields constant that matches fieldId, or null if its not found.
11189
       */
11190
      public static _Fields findByThriftId(int fieldId) {
11191
        switch(fieldId) {
11192
          case 1: // E
11193
            return E;
11194
          default:
11195
            return null;
11196
        }
11197
      }
11198
 
11199
      /**
11200
       * Find the _Fields constant that matches fieldId, throwing an exception
11201
       * if it is not found.
11202
       */
11203
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11204
        _Fields fields = findByThriftId(fieldId);
11205
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11206
        return fields;
11207
      }
11208
 
11209
      /**
11210
       * Find the _Fields constant that matches name, or null if its not found.
11211
       */
11212
      public static _Fields findByName(String name) {
11213
        return byName.get(name);
11214
      }
11215
 
11216
      private final short _thriftId;
11217
      private final String _fieldName;
11218
 
11219
      _Fields(short thriftId, String fieldName) {
11220
        _thriftId = thriftId;
11221
        _fieldName = fieldName;
11222
      }
11223
 
11224
      public short getThriftFieldId() {
11225
        return _thriftId;
11226
      }
11227
 
11228
      public String getFieldName() {
11229
        return _fieldName;
11230
      }
11231
    }
11232
 
11233
    // isset id assignments
11234
 
11235
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11236
    static {
11237
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11238
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11239
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11240
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11241
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11242
    }
11243
 
11244
    public updatePurchaseOrder_result() {
11245
    }
11246
 
11247
    public updatePurchaseOrder_result(
11248
      PurchaseServiceException e)
11249
    {
11250
      this();
11251
      this.e = e;
11252
    }
11253
 
11254
    /**
11255
     * Performs a deep copy on <i>other</i>.
11256
     */
11257
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11258
      if (other.isSetE()) {
11259
        this.e = new PurchaseServiceException(other.e);
11260
      }
11261
    }
11262
 
11263
    public updatePurchaseOrder_result deepCopy() {
11264
      return new updatePurchaseOrder_result(this);
11265
    }
11266
 
11267
    @Override
11268
    public void clear() {
11269
      this.e = null;
11270
    }
11271
 
11272
    public PurchaseServiceException getE() {
11273
      return this.e;
11274
    }
11275
 
11276
    public void setE(PurchaseServiceException e) {
11277
      this.e = e;
11278
    }
11279
 
11280
    public void unsetE() {
11281
      this.e = null;
11282
    }
11283
 
11284
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11285
    public boolean isSetE() {
11286
      return this.e != null;
11287
    }
11288
 
11289
    public void setEIsSet(boolean value) {
11290
      if (!value) {
11291
        this.e = null;
11292
      }
11293
    }
11294
 
11295
    public void setFieldValue(_Fields field, Object value) {
11296
      switch (field) {
11297
      case E:
11298
        if (value == null) {
11299
          unsetE();
11300
        } else {
11301
          setE((PurchaseServiceException)value);
11302
        }
11303
        break;
11304
 
11305
      }
11306
    }
11307
 
11308
    public Object getFieldValue(_Fields field) {
11309
      switch (field) {
11310
      case E:
11311
        return getE();
11312
 
11313
      }
11314
      throw new IllegalStateException();
11315
    }
11316
 
11317
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11318
    public boolean isSet(_Fields field) {
11319
      if (field == null) {
11320
        throw new IllegalArgumentException();
11321
      }
11322
 
11323
      switch (field) {
11324
      case E:
11325
        return isSetE();
11326
      }
11327
      throw new IllegalStateException();
11328
    }
11329
 
11330
    @Override
11331
    public boolean equals(Object that) {
11332
      if (that == null)
11333
        return false;
11334
      if (that instanceof updatePurchaseOrder_result)
11335
        return this.equals((updatePurchaseOrder_result)that);
11336
      return false;
11337
    }
11338
 
11339
    public boolean equals(updatePurchaseOrder_result that) {
11340
      if (that == null)
11341
        return false;
11342
 
11343
      boolean this_present_e = true && this.isSetE();
11344
      boolean that_present_e = true && that.isSetE();
11345
      if (this_present_e || that_present_e) {
11346
        if (!(this_present_e && that_present_e))
11347
          return false;
11348
        if (!this.e.equals(that.e))
11349
          return false;
11350
      }
11351
 
11352
      return true;
11353
    }
11354
 
11355
    @Override
11356
    public int hashCode() {
11357
      return 0;
11358
    }
11359
 
11360
    public int compareTo(updatePurchaseOrder_result other) {
11361
      if (!getClass().equals(other.getClass())) {
11362
        return getClass().getName().compareTo(other.getClass().getName());
11363
      }
11364
 
11365
      int lastComparison = 0;
11366
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11367
 
11368
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11369
      if (lastComparison != 0) {
11370
        return lastComparison;
11371
      }
11372
      if (isSetE()) {
11373
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11374
        if (lastComparison != 0) {
11375
          return lastComparison;
11376
        }
11377
      }
11378
      return 0;
11379
    }
11380
 
11381
    public _Fields fieldForId(int fieldId) {
11382
      return _Fields.findByThriftId(fieldId);
11383
    }
11384
 
11385
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11386
      org.apache.thrift.protocol.TField field;
11387
      iprot.readStructBegin();
11388
      while (true)
11389
      {
11390
        field = iprot.readFieldBegin();
11391
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11392
          break;
11393
        }
11394
        switch (field.id) {
11395
          case 1: // E
11396
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11397
              this.e = new PurchaseServiceException();
11398
              this.e.read(iprot);
11399
            } else { 
11400
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11401
            }
11402
            break;
11403
          default:
11404
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11405
        }
11406
        iprot.readFieldEnd();
11407
      }
11408
      iprot.readStructEnd();
11409
      validate();
11410
    }
11411
 
11412
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11413
      oprot.writeStructBegin(STRUCT_DESC);
11414
 
11415
      if (this.isSetE()) {
11416
        oprot.writeFieldBegin(E_FIELD_DESC);
11417
        this.e.write(oprot);
11418
        oprot.writeFieldEnd();
11419
      }
11420
      oprot.writeFieldStop();
11421
      oprot.writeStructEnd();
11422
    }
11423
 
11424
    @Override
11425
    public String toString() {
11426
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11427
      boolean first = true;
11428
 
11429
      sb.append("e:");
11430
      if (this.e == null) {
11431
        sb.append("null");
11432
      } else {
11433
        sb.append(this.e);
11434
      }
11435
      first = false;
11436
      sb.append(")");
11437
      return sb.toString();
11438
    }
11439
 
11440
    public void validate() throws org.apache.thrift.TException {
11441
      // check for required fields
11442
    }
11443
 
11444
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11445
      try {
11446
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11447
      } catch (org.apache.thrift.TException te) {
11448
        throw new java.io.IOException(te);
11449
      }
11450
    }
11451
 
11452
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11453
      try {
11454
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11455
      } catch (org.apache.thrift.TException te) {
11456
        throw new java.io.IOException(te);
11457
      }
11458
    }
11459
 
11460
  }
11461
 
5185 mandeep.dh 11462
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11463
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11464
 
11465
    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);
11466
    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);
11467
    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);
11468
 
11469
    private long purchaseId; // required
11470
    private long itemId; // required
11471
    private long quantity; // required
11472
 
11473
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11474
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11475
      PURCHASE_ID((short)1, "purchaseId"),
11476
      ITEM_ID((short)2, "itemId"),
11477
      QUANTITY((short)3, "quantity");
11478
 
11479
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11480
 
11481
      static {
11482
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11483
          byName.put(field.getFieldName(), field);
11484
        }
11485
      }
11486
 
11487
      /**
11488
       * Find the _Fields constant that matches fieldId, or null if its not found.
11489
       */
11490
      public static _Fields findByThriftId(int fieldId) {
11491
        switch(fieldId) {
11492
          case 1: // PURCHASE_ID
11493
            return PURCHASE_ID;
11494
          case 2: // ITEM_ID
11495
            return ITEM_ID;
11496
          case 3: // QUANTITY
11497
            return QUANTITY;
11498
          default:
11499
            return null;
11500
        }
11501
      }
11502
 
11503
      /**
11504
       * Find the _Fields constant that matches fieldId, throwing an exception
11505
       * if it is not found.
11506
       */
11507
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11508
        _Fields fields = findByThriftId(fieldId);
11509
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11510
        return fields;
11511
      }
11512
 
11513
      /**
11514
       * Find the _Fields constant that matches name, or null if its not found.
11515
       */
11516
      public static _Fields findByName(String name) {
11517
        return byName.get(name);
11518
      }
11519
 
11520
      private final short _thriftId;
11521
      private final String _fieldName;
11522
 
11523
      _Fields(short thriftId, String fieldName) {
11524
        _thriftId = thriftId;
11525
        _fieldName = fieldName;
11526
      }
11527
 
11528
      public short getThriftFieldId() {
11529
        return _thriftId;
11530
      }
11531
 
11532
      public String getFieldName() {
11533
        return _fieldName;
11534
      }
11535
    }
11536
 
11537
    // isset id assignments
11538
    private static final int __PURCHASEID_ISSET_ID = 0;
11539
    private static final int __ITEMID_ISSET_ID = 1;
11540
    private static final int __QUANTITY_ISSET_ID = 2;
11541
    private BitSet __isset_bit_vector = new BitSet(3);
11542
 
11543
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11544
    static {
11545
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11546
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11547
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11548
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11549
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11550
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11551
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11552
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11553
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11554
    }
11555
 
11556
    public unFulfillPO_args() {
11557
    }
11558
 
11559
    public unFulfillPO_args(
11560
      long purchaseId,
11561
      long itemId,
11562
      long quantity)
11563
    {
11564
      this();
11565
      this.purchaseId = purchaseId;
11566
      setPurchaseIdIsSet(true);
11567
      this.itemId = itemId;
11568
      setItemIdIsSet(true);
11569
      this.quantity = quantity;
11570
      setQuantityIsSet(true);
11571
    }
11572
 
11573
    /**
11574
     * Performs a deep copy on <i>other</i>.
11575
     */
11576
    public unFulfillPO_args(unFulfillPO_args other) {
11577
      __isset_bit_vector.clear();
11578
      __isset_bit_vector.or(other.__isset_bit_vector);
11579
      this.purchaseId = other.purchaseId;
11580
      this.itemId = other.itemId;
11581
      this.quantity = other.quantity;
11582
    }
11583
 
11584
    public unFulfillPO_args deepCopy() {
11585
      return new unFulfillPO_args(this);
11586
    }
11587
 
11588
    @Override
11589
    public void clear() {
11590
      setPurchaseIdIsSet(false);
11591
      this.purchaseId = 0;
11592
      setItemIdIsSet(false);
11593
      this.itemId = 0;
11594
      setQuantityIsSet(false);
11595
      this.quantity = 0;
11596
    }
11597
 
11598
    public long getPurchaseId() {
11599
      return this.purchaseId;
11600
    }
11601
 
11602
    public void setPurchaseId(long purchaseId) {
11603
      this.purchaseId = purchaseId;
11604
      setPurchaseIdIsSet(true);
11605
    }
11606
 
11607
    public void unsetPurchaseId() {
11608
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11609
    }
11610
 
11611
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11612
    public boolean isSetPurchaseId() {
11613
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11614
    }
11615
 
11616
    public void setPurchaseIdIsSet(boolean value) {
11617
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11618
    }
11619
 
11620
    public long getItemId() {
11621
      return this.itemId;
11622
    }
11623
 
11624
    public void setItemId(long itemId) {
11625
      this.itemId = itemId;
11626
      setItemIdIsSet(true);
11627
    }
11628
 
11629
    public void unsetItemId() {
11630
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11631
    }
11632
 
11633
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11634
    public boolean isSetItemId() {
11635
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11636
    }
11637
 
11638
    public void setItemIdIsSet(boolean value) {
11639
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11640
    }
11641
 
11642
    public long getQuantity() {
11643
      return this.quantity;
11644
    }
11645
 
11646
    public void setQuantity(long quantity) {
11647
      this.quantity = quantity;
11648
      setQuantityIsSet(true);
11649
    }
11650
 
11651
    public void unsetQuantity() {
11652
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11653
    }
11654
 
11655
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11656
    public boolean isSetQuantity() {
11657
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11658
    }
11659
 
11660
    public void setQuantityIsSet(boolean value) {
11661
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11662
    }
11663
 
11664
    public void setFieldValue(_Fields field, Object value) {
11665
      switch (field) {
11666
      case PURCHASE_ID:
11667
        if (value == null) {
11668
          unsetPurchaseId();
11669
        } else {
11670
          setPurchaseId((Long)value);
11671
        }
11672
        break;
11673
 
11674
      case ITEM_ID:
11675
        if (value == null) {
11676
          unsetItemId();
11677
        } else {
11678
          setItemId((Long)value);
11679
        }
11680
        break;
11681
 
11682
      case QUANTITY:
11683
        if (value == null) {
11684
          unsetQuantity();
11685
        } else {
11686
          setQuantity((Long)value);
11687
        }
11688
        break;
11689
 
11690
      }
11691
    }
11692
 
11693
    public Object getFieldValue(_Fields field) {
11694
      switch (field) {
11695
      case PURCHASE_ID:
11696
        return Long.valueOf(getPurchaseId());
11697
 
11698
      case ITEM_ID:
11699
        return Long.valueOf(getItemId());
11700
 
11701
      case QUANTITY:
11702
        return Long.valueOf(getQuantity());
11703
 
11704
      }
11705
      throw new IllegalStateException();
11706
    }
11707
 
11708
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11709
    public boolean isSet(_Fields field) {
11710
      if (field == null) {
11711
        throw new IllegalArgumentException();
11712
      }
11713
 
11714
      switch (field) {
11715
      case PURCHASE_ID:
11716
        return isSetPurchaseId();
11717
      case ITEM_ID:
11718
        return isSetItemId();
11719
      case QUANTITY:
11720
        return isSetQuantity();
11721
      }
11722
      throw new IllegalStateException();
11723
    }
11724
 
11725
    @Override
11726
    public boolean equals(Object that) {
11727
      if (that == null)
11728
        return false;
11729
      if (that instanceof unFulfillPO_args)
11730
        return this.equals((unFulfillPO_args)that);
11731
      return false;
11732
    }
11733
 
11734
    public boolean equals(unFulfillPO_args that) {
11735
      if (that == null)
11736
        return false;
11737
 
11738
      boolean this_present_purchaseId = true;
11739
      boolean that_present_purchaseId = true;
11740
      if (this_present_purchaseId || that_present_purchaseId) {
11741
        if (!(this_present_purchaseId && that_present_purchaseId))
11742
          return false;
11743
        if (this.purchaseId != that.purchaseId)
11744
          return false;
11745
      }
11746
 
11747
      boolean this_present_itemId = true;
11748
      boolean that_present_itemId = true;
11749
      if (this_present_itemId || that_present_itemId) {
11750
        if (!(this_present_itemId && that_present_itemId))
11751
          return false;
11752
        if (this.itemId != that.itemId)
11753
          return false;
11754
      }
11755
 
11756
      boolean this_present_quantity = true;
11757
      boolean that_present_quantity = true;
11758
      if (this_present_quantity || that_present_quantity) {
11759
        if (!(this_present_quantity && that_present_quantity))
11760
          return false;
11761
        if (this.quantity != that.quantity)
11762
          return false;
11763
      }
11764
 
11765
      return true;
11766
    }
11767
 
11768
    @Override
11769
    public int hashCode() {
11770
      return 0;
11771
    }
11772
 
11773
    public int compareTo(unFulfillPO_args other) {
11774
      if (!getClass().equals(other.getClass())) {
11775
        return getClass().getName().compareTo(other.getClass().getName());
11776
      }
11777
 
11778
      int lastComparison = 0;
11779
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11780
 
11781
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11782
      if (lastComparison != 0) {
11783
        return lastComparison;
11784
      }
11785
      if (isSetPurchaseId()) {
11786
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11787
        if (lastComparison != 0) {
11788
          return lastComparison;
11789
        }
11790
      }
11791
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11792
      if (lastComparison != 0) {
11793
        return lastComparison;
11794
      }
11795
      if (isSetItemId()) {
11796
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11797
        if (lastComparison != 0) {
11798
          return lastComparison;
11799
        }
11800
      }
11801
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11802
      if (lastComparison != 0) {
11803
        return lastComparison;
11804
      }
11805
      if (isSetQuantity()) {
11806
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11807
        if (lastComparison != 0) {
11808
          return lastComparison;
11809
        }
11810
      }
11811
      return 0;
11812
    }
11813
 
11814
    public _Fields fieldForId(int fieldId) {
11815
      return _Fields.findByThriftId(fieldId);
11816
    }
11817
 
11818
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11819
      org.apache.thrift.protocol.TField field;
11820
      iprot.readStructBegin();
11821
      while (true)
11822
      {
11823
        field = iprot.readFieldBegin();
11824
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11825
          break;
11826
        }
11827
        switch (field.id) {
11828
          case 1: // PURCHASE_ID
11829
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11830
              this.purchaseId = iprot.readI64();
11831
              setPurchaseIdIsSet(true);
11832
            } else { 
11833
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11834
            }
11835
            break;
11836
          case 2: // ITEM_ID
11837
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11838
              this.itemId = iprot.readI64();
11839
              setItemIdIsSet(true);
11840
            } else { 
11841
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11842
            }
11843
            break;
11844
          case 3: // QUANTITY
11845
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11846
              this.quantity = iprot.readI64();
11847
              setQuantityIsSet(true);
11848
            } else { 
11849
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11850
            }
11851
            break;
11852
          default:
11853
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11854
        }
11855
        iprot.readFieldEnd();
11856
      }
11857
      iprot.readStructEnd();
11858
      validate();
11859
    }
11860
 
11861
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11862
      validate();
11863
 
11864
      oprot.writeStructBegin(STRUCT_DESC);
11865
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
11866
      oprot.writeI64(this.purchaseId);
11867
      oprot.writeFieldEnd();
11868
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11869
      oprot.writeI64(this.itemId);
11870
      oprot.writeFieldEnd();
11871
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11872
      oprot.writeI64(this.quantity);
11873
      oprot.writeFieldEnd();
11874
      oprot.writeFieldStop();
11875
      oprot.writeStructEnd();
11876
    }
11877
 
11878
    @Override
11879
    public String toString() {
11880
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
11881
      boolean first = true;
11882
 
11883
      sb.append("purchaseId:");
11884
      sb.append(this.purchaseId);
11885
      first = false;
11886
      if (!first) sb.append(", ");
11887
      sb.append("itemId:");
11888
      sb.append(this.itemId);
11889
      first = false;
11890
      if (!first) sb.append(", ");
11891
      sb.append("quantity:");
11892
      sb.append(this.quantity);
11893
      first = false;
11894
      sb.append(")");
11895
      return sb.toString();
11896
    }
11897
 
11898
    public void validate() throws org.apache.thrift.TException {
11899
      // check for required fields
11900
    }
11901
 
11902
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11903
      try {
11904
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11905
      } catch (org.apache.thrift.TException te) {
11906
        throw new java.io.IOException(te);
11907
      }
11908
    }
11909
 
11910
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11911
      try {
11912
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11913
        __isset_bit_vector = new BitSet(1);
11914
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11915
      } catch (org.apache.thrift.TException te) {
11916
        throw new java.io.IOException(te);
11917
      }
11918
    }
11919
 
11920
  }
11921
 
11922
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11923
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
11924
 
11925
    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);
11926
 
11927
    private PurchaseServiceException e; // required
11928
 
11929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11931
      E((short)1, "e");
11932
 
11933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11934
 
11935
      static {
11936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11937
          byName.put(field.getFieldName(), field);
11938
        }
11939
      }
11940
 
11941
      /**
11942
       * Find the _Fields constant that matches fieldId, or null if its not found.
11943
       */
11944
      public static _Fields findByThriftId(int fieldId) {
11945
        switch(fieldId) {
11946
          case 1: // E
11947
            return E;
11948
          default:
11949
            return null;
11950
        }
11951
      }
11952
 
11953
      /**
11954
       * Find the _Fields constant that matches fieldId, throwing an exception
11955
       * if it is not found.
11956
       */
11957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11958
        _Fields fields = findByThriftId(fieldId);
11959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11960
        return fields;
11961
      }
11962
 
11963
      /**
11964
       * Find the _Fields constant that matches name, or null if its not found.
11965
       */
11966
      public static _Fields findByName(String name) {
11967
        return byName.get(name);
11968
      }
11969
 
11970
      private final short _thriftId;
11971
      private final String _fieldName;
11972
 
11973
      _Fields(short thriftId, String fieldName) {
11974
        _thriftId = thriftId;
11975
        _fieldName = fieldName;
11976
      }
11977
 
11978
      public short getThriftFieldId() {
11979
        return _thriftId;
11980
      }
11981
 
11982
      public String getFieldName() {
11983
        return _fieldName;
11984
      }
11985
    }
11986
 
11987
    // isset id assignments
11988
 
11989
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11990
    static {
11991
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11992
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11993
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11994
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11995
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
11996
    }
11997
 
11998
    public unFulfillPO_result() {
11999
    }
12000
 
12001
    public unFulfillPO_result(
12002
      PurchaseServiceException e)
12003
    {
12004
      this();
12005
      this.e = e;
12006
    }
12007
 
12008
    /**
12009
     * Performs a deep copy on <i>other</i>.
12010
     */
12011
    public unFulfillPO_result(unFulfillPO_result other) {
12012
      if (other.isSetE()) {
12013
        this.e = new PurchaseServiceException(other.e);
12014
      }
12015
    }
12016
 
12017
    public unFulfillPO_result deepCopy() {
12018
      return new unFulfillPO_result(this);
12019
    }
12020
 
12021
    @Override
12022
    public void clear() {
12023
      this.e = null;
12024
    }
12025
 
12026
    public PurchaseServiceException getE() {
12027
      return this.e;
12028
    }
12029
 
12030
    public void setE(PurchaseServiceException e) {
12031
      this.e = e;
12032
    }
12033
 
12034
    public void unsetE() {
12035
      this.e = null;
12036
    }
12037
 
12038
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12039
    public boolean isSetE() {
12040
      return this.e != null;
12041
    }
12042
 
12043
    public void setEIsSet(boolean value) {
12044
      if (!value) {
12045
        this.e = null;
12046
      }
12047
    }
12048
 
12049
    public void setFieldValue(_Fields field, Object value) {
12050
      switch (field) {
12051
      case E:
12052
        if (value == null) {
12053
          unsetE();
12054
        } else {
12055
          setE((PurchaseServiceException)value);
12056
        }
12057
        break;
12058
 
12059
      }
12060
    }
12061
 
12062
    public Object getFieldValue(_Fields field) {
12063
      switch (field) {
12064
      case E:
12065
        return getE();
12066
 
12067
      }
12068
      throw new IllegalStateException();
12069
    }
12070
 
12071
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12072
    public boolean isSet(_Fields field) {
12073
      if (field == null) {
12074
        throw new IllegalArgumentException();
12075
      }
12076
 
12077
      switch (field) {
12078
      case E:
12079
        return isSetE();
12080
      }
12081
      throw new IllegalStateException();
12082
    }
12083
 
12084
    @Override
12085
    public boolean equals(Object that) {
12086
      if (that == null)
12087
        return false;
12088
      if (that instanceof unFulfillPO_result)
12089
        return this.equals((unFulfillPO_result)that);
12090
      return false;
12091
    }
12092
 
12093
    public boolean equals(unFulfillPO_result that) {
12094
      if (that == null)
12095
        return false;
12096
 
12097
      boolean this_present_e = true && this.isSetE();
12098
      boolean that_present_e = true && that.isSetE();
12099
      if (this_present_e || that_present_e) {
12100
        if (!(this_present_e && that_present_e))
12101
          return false;
12102
        if (!this.e.equals(that.e))
12103
          return false;
12104
      }
12105
 
12106
      return true;
12107
    }
12108
 
12109
    @Override
12110
    public int hashCode() {
12111
      return 0;
12112
    }
12113
 
12114
    public int compareTo(unFulfillPO_result other) {
12115
      if (!getClass().equals(other.getClass())) {
12116
        return getClass().getName().compareTo(other.getClass().getName());
12117
      }
12118
 
12119
      int lastComparison = 0;
12120
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12121
 
12122
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12123
      if (lastComparison != 0) {
12124
        return lastComparison;
12125
      }
12126
      if (isSetE()) {
12127
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12128
        if (lastComparison != 0) {
12129
          return lastComparison;
12130
        }
12131
      }
12132
      return 0;
12133
    }
12134
 
12135
    public _Fields fieldForId(int fieldId) {
12136
      return _Fields.findByThriftId(fieldId);
12137
    }
12138
 
12139
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12140
      org.apache.thrift.protocol.TField field;
12141
      iprot.readStructBegin();
12142
      while (true)
12143
      {
12144
        field = iprot.readFieldBegin();
12145
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12146
          break;
12147
        }
12148
        switch (field.id) {
12149
          case 1: // E
12150
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12151
              this.e = new PurchaseServiceException();
12152
              this.e.read(iprot);
12153
            } else { 
12154
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12155
            }
12156
            break;
12157
          default:
12158
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12159
        }
12160
        iprot.readFieldEnd();
12161
      }
12162
      iprot.readStructEnd();
12163
      validate();
12164
    }
12165
 
12166
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12167
      oprot.writeStructBegin(STRUCT_DESC);
12168
 
12169
      if (this.isSetE()) {
12170
        oprot.writeFieldBegin(E_FIELD_DESC);
12171
        this.e.write(oprot);
12172
        oprot.writeFieldEnd();
12173
      }
12174
      oprot.writeFieldStop();
12175
      oprot.writeStructEnd();
12176
    }
12177
 
12178
    @Override
12179
    public String toString() {
12180
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12181
      boolean first = true;
12182
 
12183
      sb.append("e:");
12184
      if (this.e == null) {
12185
        sb.append("null");
12186
      } else {
12187
        sb.append(this.e);
12188
      }
12189
      first = false;
12190
      sb.append(")");
12191
      return sb.toString();
12192
    }
12193
 
12194
    public void validate() throws org.apache.thrift.TException {
12195
      // check for required fields
12196
    }
12197
 
12198
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12199
      try {
12200
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12201
      } catch (org.apache.thrift.TException te) {
12202
        throw new java.io.IOException(te);
12203
      }
12204
    }
12205
 
12206
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12207
      try {
12208
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12209
      } catch (org.apache.thrift.TException te) {
12210
        throw new java.io.IOException(te);
12211
      }
12212
    }
12213
 
12214
  }
12215
 
5443 mandeep.dh 12216
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12217
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12218
 
12219
    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);
12220
 
12221
    private long date; // required
12222
 
12223
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12224
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12225
      DATE((short)1, "date");
12226
 
12227
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12228
 
12229
      static {
12230
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12231
          byName.put(field.getFieldName(), field);
12232
        }
12233
      }
12234
 
12235
      /**
12236
       * Find the _Fields constant that matches fieldId, or null if its not found.
12237
       */
12238
      public static _Fields findByThriftId(int fieldId) {
12239
        switch(fieldId) {
12240
          case 1: // DATE
12241
            return DATE;
12242
          default:
12243
            return null;
12244
        }
12245
      }
12246
 
12247
      /**
12248
       * Find the _Fields constant that matches fieldId, throwing an exception
12249
       * if it is not found.
12250
       */
12251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12252
        _Fields fields = findByThriftId(fieldId);
12253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12254
        return fields;
12255
      }
12256
 
12257
      /**
12258
       * Find the _Fields constant that matches name, or null if its not found.
12259
       */
12260
      public static _Fields findByName(String name) {
12261
        return byName.get(name);
12262
      }
12263
 
12264
      private final short _thriftId;
12265
      private final String _fieldName;
12266
 
12267
      _Fields(short thriftId, String fieldName) {
12268
        _thriftId = thriftId;
12269
        _fieldName = fieldName;
12270
      }
12271
 
12272
      public short getThriftFieldId() {
12273
        return _thriftId;
12274
      }
12275
 
12276
      public String getFieldName() {
12277
        return _fieldName;
12278
      }
12279
    }
12280
 
12281
    // isset id assignments
12282
    private static final int __DATE_ISSET_ID = 0;
12283
    private BitSet __isset_bit_vector = new BitSet(1);
12284
 
12285
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12286
    static {
12287
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12288
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12289
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12290
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12291
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12292
    }
12293
 
12294
    public getInvoices_args() {
12295
    }
12296
 
12297
    public getInvoices_args(
12298
      long date)
12299
    {
12300
      this();
12301
      this.date = date;
12302
      setDateIsSet(true);
12303
    }
12304
 
12305
    /**
12306
     * Performs a deep copy on <i>other</i>.
12307
     */
12308
    public getInvoices_args(getInvoices_args other) {
12309
      __isset_bit_vector.clear();
12310
      __isset_bit_vector.or(other.__isset_bit_vector);
12311
      this.date = other.date;
12312
    }
12313
 
12314
    public getInvoices_args deepCopy() {
12315
      return new getInvoices_args(this);
12316
    }
12317
 
12318
    @Override
12319
    public void clear() {
12320
      setDateIsSet(false);
12321
      this.date = 0;
12322
    }
12323
 
12324
    public long getDate() {
12325
      return this.date;
12326
    }
12327
 
12328
    public void setDate(long date) {
12329
      this.date = date;
12330
      setDateIsSet(true);
12331
    }
12332
 
12333
    public void unsetDate() {
12334
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12335
    }
12336
 
12337
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12338
    public boolean isSetDate() {
12339
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12340
    }
12341
 
12342
    public void setDateIsSet(boolean value) {
12343
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12344
    }
12345
 
12346
    public void setFieldValue(_Fields field, Object value) {
12347
      switch (field) {
12348
      case DATE:
12349
        if (value == null) {
12350
          unsetDate();
12351
        } else {
12352
          setDate((Long)value);
12353
        }
12354
        break;
12355
 
12356
      }
12357
    }
12358
 
12359
    public Object getFieldValue(_Fields field) {
12360
      switch (field) {
12361
      case DATE:
12362
        return Long.valueOf(getDate());
12363
 
12364
      }
12365
      throw new IllegalStateException();
12366
    }
12367
 
12368
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12369
    public boolean isSet(_Fields field) {
12370
      if (field == null) {
12371
        throw new IllegalArgumentException();
12372
      }
12373
 
12374
      switch (field) {
12375
      case DATE:
12376
        return isSetDate();
12377
      }
12378
      throw new IllegalStateException();
12379
    }
12380
 
12381
    @Override
12382
    public boolean equals(Object that) {
12383
      if (that == null)
12384
        return false;
12385
      if (that instanceof getInvoices_args)
12386
        return this.equals((getInvoices_args)that);
12387
      return false;
12388
    }
12389
 
12390
    public boolean equals(getInvoices_args that) {
12391
      if (that == null)
12392
        return false;
12393
 
12394
      boolean this_present_date = true;
12395
      boolean that_present_date = true;
12396
      if (this_present_date || that_present_date) {
12397
        if (!(this_present_date && that_present_date))
12398
          return false;
12399
        if (this.date != that.date)
12400
          return false;
12401
      }
12402
 
12403
      return true;
12404
    }
12405
 
12406
    @Override
12407
    public int hashCode() {
12408
      return 0;
12409
    }
12410
 
12411
    public int compareTo(getInvoices_args other) {
12412
      if (!getClass().equals(other.getClass())) {
12413
        return getClass().getName().compareTo(other.getClass().getName());
12414
      }
12415
 
12416
      int lastComparison = 0;
12417
      getInvoices_args typedOther = (getInvoices_args)other;
12418
 
12419
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12420
      if (lastComparison != 0) {
12421
        return lastComparison;
12422
      }
12423
      if (isSetDate()) {
12424
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12425
        if (lastComparison != 0) {
12426
          return lastComparison;
12427
        }
12428
      }
12429
      return 0;
12430
    }
12431
 
12432
    public _Fields fieldForId(int fieldId) {
12433
      return _Fields.findByThriftId(fieldId);
12434
    }
12435
 
12436
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12437
      org.apache.thrift.protocol.TField field;
12438
      iprot.readStructBegin();
12439
      while (true)
12440
      {
12441
        field = iprot.readFieldBegin();
12442
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12443
          break;
12444
        }
12445
        switch (field.id) {
12446
          case 1: // DATE
12447
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12448
              this.date = iprot.readI64();
12449
              setDateIsSet(true);
12450
            } else { 
12451
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12452
            }
12453
            break;
12454
          default:
12455
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12456
        }
12457
        iprot.readFieldEnd();
12458
      }
12459
      iprot.readStructEnd();
12460
      validate();
12461
    }
12462
 
12463
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12464
      validate();
12465
 
12466
      oprot.writeStructBegin(STRUCT_DESC);
12467
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12468
      oprot.writeI64(this.date);
12469
      oprot.writeFieldEnd();
12470
      oprot.writeFieldStop();
12471
      oprot.writeStructEnd();
12472
    }
12473
 
12474
    @Override
12475
    public String toString() {
12476
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12477
      boolean first = true;
12478
 
12479
      sb.append("date:");
12480
      sb.append(this.date);
12481
      first = false;
12482
      sb.append(")");
12483
      return sb.toString();
12484
    }
12485
 
12486
    public void validate() throws org.apache.thrift.TException {
12487
      // check for required fields
12488
    }
12489
 
12490
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12491
      try {
12492
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12493
      } catch (org.apache.thrift.TException te) {
12494
        throw new java.io.IOException(te);
12495
      }
12496
    }
12497
 
12498
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12499
      try {
12500
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12501
        __isset_bit_vector = new BitSet(1);
12502
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12503
      } catch (org.apache.thrift.TException te) {
12504
        throw new java.io.IOException(te);
12505
      }
12506
    }
12507
 
12508
  }
12509
 
12510
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12511
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12512
 
12513
    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);
12514
 
12515
    private List<Invoice> success; // required
12516
 
12517
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12518
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12519
      SUCCESS((short)0, "success");
12520
 
12521
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12522
 
12523
      static {
12524
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12525
          byName.put(field.getFieldName(), field);
12526
        }
12527
      }
12528
 
12529
      /**
12530
       * Find the _Fields constant that matches fieldId, or null if its not found.
12531
       */
12532
      public static _Fields findByThriftId(int fieldId) {
12533
        switch(fieldId) {
12534
          case 0: // SUCCESS
12535
            return SUCCESS;
12536
          default:
12537
            return null;
12538
        }
12539
      }
12540
 
12541
      /**
12542
       * Find the _Fields constant that matches fieldId, throwing an exception
12543
       * if it is not found.
12544
       */
12545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12546
        _Fields fields = findByThriftId(fieldId);
12547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12548
        return fields;
12549
      }
12550
 
12551
      /**
12552
       * Find the _Fields constant that matches name, or null if its not found.
12553
       */
12554
      public static _Fields findByName(String name) {
12555
        return byName.get(name);
12556
      }
12557
 
12558
      private final short _thriftId;
12559
      private final String _fieldName;
12560
 
12561
      _Fields(short thriftId, String fieldName) {
12562
        _thriftId = thriftId;
12563
        _fieldName = fieldName;
12564
      }
12565
 
12566
      public short getThriftFieldId() {
12567
        return _thriftId;
12568
      }
12569
 
12570
      public String getFieldName() {
12571
        return _fieldName;
12572
      }
12573
    }
12574
 
12575
    // isset id assignments
12576
 
12577
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12578
    static {
12579
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12580
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12581
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12582
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12583
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12584
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12585
    }
12586
 
12587
    public getInvoices_result() {
12588
    }
12589
 
12590
    public getInvoices_result(
12591
      List<Invoice> success)
12592
    {
12593
      this();
12594
      this.success = success;
12595
    }
12596
 
12597
    /**
12598
     * Performs a deep copy on <i>other</i>.
12599
     */
12600
    public getInvoices_result(getInvoices_result other) {
12601
      if (other.isSetSuccess()) {
12602
        List<Invoice> __this__success = new ArrayList<Invoice>();
12603
        for (Invoice other_element : other.success) {
12604
          __this__success.add(new Invoice(other_element));
12605
        }
12606
        this.success = __this__success;
12607
      }
12608
    }
12609
 
12610
    public getInvoices_result deepCopy() {
12611
      return new getInvoices_result(this);
12612
    }
12613
 
12614
    @Override
12615
    public void clear() {
12616
      this.success = null;
12617
    }
12618
 
12619
    public int getSuccessSize() {
12620
      return (this.success == null) ? 0 : this.success.size();
12621
    }
12622
 
12623
    public java.util.Iterator<Invoice> getSuccessIterator() {
12624
      return (this.success == null) ? null : this.success.iterator();
12625
    }
12626
 
12627
    public void addToSuccess(Invoice elem) {
12628
      if (this.success == null) {
12629
        this.success = new ArrayList<Invoice>();
12630
      }
12631
      this.success.add(elem);
12632
    }
12633
 
12634
    public List<Invoice> getSuccess() {
12635
      return this.success;
12636
    }
12637
 
12638
    public void setSuccess(List<Invoice> success) {
12639
      this.success = success;
12640
    }
12641
 
12642
    public void unsetSuccess() {
12643
      this.success = null;
12644
    }
12645
 
12646
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12647
    public boolean isSetSuccess() {
12648
      return this.success != null;
12649
    }
12650
 
12651
    public void setSuccessIsSet(boolean value) {
12652
      if (!value) {
12653
        this.success = null;
12654
      }
12655
    }
12656
 
12657
    public void setFieldValue(_Fields field, Object value) {
12658
      switch (field) {
12659
      case SUCCESS:
12660
        if (value == null) {
12661
          unsetSuccess();
12662
        } else {
12663
          setSuccess((List<Invoice>)value);
12664
        }
12665
        break;
12666
 
12667
      }
12668
    }
12669
 
12670
    public Object getFieldValue(_Fields field) {
12671
      switch (field) {
12672
      case SUCCESS:
12673
        return getSuccess();
12674
 
12675
      }
12676
      throw new IllegalStateException();
12677
    }
12678
 
12679
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12680
    public boolean isSet(_Fields field) {
12681
      if (field == null) {
12682
        throw new IllegalArgumentException();
12683
      }
12684
 
12685
      switch (field) {
12686
      case SUCCESS:
12687
        return isSetSuccess();
12688
      }
12689
      throw new IllegalStateException();
12690
    }
12691
 
12692
    @Override
12693
    public boolean equals(Object that) {
12694
      if (that == null)
12695
        return false;
12696
      if (that instanceof getInvoices_result)
12697
        return this.equals((getInvoices_result)that);
12698
      return false;
12699
    }
12700
 
12701
    public boolean equals(getInvoices_result that) {
12702
      if (that == null)
12703
        return false;
12704
 
12705
      boolean this_present_success = true && this.isSetSuccess();
12706
      boolean that_present_success = true && that.isSetSuccess();
12707
      if (this_present_success || that_present_success) {
12708
        if (!(this_present_success && that_present_success))
12709
          return false;
12710
        if (!this.success.equals(that.success))
12711
          return false;
12712
      }
12713
 
12714
      return true;
12715
    }
12716
 
12717
    @Override
12718
    public int hashCode() {
12719
      return 0;
12720
    }
12721
 
12722
    public int compareTo(getInvoices_result other) {
12723
      if (!getClass().equals(other.getClass())) {
12724
        return getClass().getName().compareTo(other.getClass().getName());
12725
      }
12726
 
12727
      int lastComparison = 0;
12728
      getInvoices_result typedOther = (getInvoices_result)other;
12729
 
12730
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12731
      if (lastComparison != 0) {
12732
        return lastComparison;
12733
      }
12734
      if (isSetSuccess()) {
12735
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12736
        if (lastComparison != 0) {
12737
          return lastComparison;
12738
        }
12739
      }
12740
      return 0;
12741
    }
12742
 
12743
    public _Fields fieldForId(int fieldId) {
12744
      return _Fields.findByThriftId(fieldId);
12745
    }
12746
 
12747
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12748
      org.apache.thrift.protocol.TField field;
12749
      iprot.readStructBegin();
12750
      while (true)
12751
      {
12752
        field = iprot.readFieldBegin();
12753
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12754
          break;
12755
        }
12756
        switch (field.id) {
12757
          case 0: // SUCCESS
12758
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12759
              {
6385 amar.kumar 12760
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12761
                this.success = new ArrayList<Invoice>(_list24.size);
12762
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12763
                {
6385 amar.kumar 12764
                  Invoice _elem26; // required
12765
                  _elem26 = new Invoice();
12766
                  _elem26.read(iprot);
12767
                  this.success.add(_elem26);
5443 mandeep.dh 12768
                }
12769
                iprot.readListEnd();
12770
              }
12771
            } else { 
12772
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12773
            }
12774
            break;
12775
          default:
12776
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12777
        }
12778
        iprot.readFieldEnd();
12779
      }
12780
      iprot.readStructEnd();
12781
      validate();
12782
    }
12783
 
12784
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12785
      oprot.writeStructBegin(STRUCT_DESC);
12786
 
12787
      if (this.isSetSuccess()) {
12788
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12789
        {
12790
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12791
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12792
          {
6385 amar.kumar 12793
            _iter27.write(oprot);
5443 mandeep.dh 12794
          }
12795
          oprot.writeListEnd();
12796
        }
12797
        oprot.writeFieldEnd();
12798
      }
12799
      oprot.writeFieldStop();
12800
      oprot.writeStructEnd();
12801
    }
12802
 
12803
    @Override
12804
    public String toString() {
12805
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12806
      boolean first = true;
12807
 
12808
      sb.append("success:");
12809
      if (this.success == null) {
12810
        sb.append("null");
12811
      } else {
12812
        sb.append(this.success);
12813
      }
12814
      first = false;
12815
      sb.append(")");
12816
      return sb.toString();
12817
    }
12818
 
12819
    public void validate() throws org.apache.thrift.TException {
12820
      // check for required fields
12821
    }
12822
 
12823
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12824
      try {
12825
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12826
      } catch (org.apache.thrift.TException te) {
12827
        throw new java.io.IOException(te);
12828
      }
12829
    }
12830
 
12831
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12832
      try {
12833
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12834
      } catch (org.apache.thrift.TException te) {
12835
        throw new java.io.IOException(te);
12836
      }
12837
    }
12838
 
12839
  }
12840
 
7410 amar.kumar 12841
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
12842
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
12843
 
12844
    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);
12845
    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);
12846
    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);
12847
 
12848
    private long warehouseId; // required
12849
    private long supplierId; // required
12850
    private long date; // required
12851
 
12852
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12853
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12854
      WAREHOUSE_ID((short)1, "warehouseId"),
12855
      SUPPLIER_ID((short)2, "supplierId"),
12856
      DATE((short)3, "date");
12857
 
12858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12859
 
12860
      static {
12861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12862
          byName.put(field.getFieldName(), field);
12863
        }
12864
      }
12865
 
12866
      /**
12867
       * Find the _Fields constant that matches fieldId, or null if its not found.
12868
       */
12869
      public static _Fields findByThriftId(int fieldId) {
12870
        switch(fieldId) {
12871
          case 1: // WAREHOUSE_ID
12872
            return WAREHOUSE_ID;
12873
          case 2: // SUPPLIER_ID
12874
            return SUPPLIER_ID;
12875
          case 3: // DATE
12876
            return DATE;
12877
          default:
12878
            return null;
12879
        }
12880
      }
12881
 
12882
      /**
12883
       * Find the _Fields constant that matches fieldId, throwing an exception
12884
       * if it is not found.
12885
       */
12886
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12887
        _Fields fields = findByThriftId(fieldId);
12888
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12889
        return fields;
12890
      }
12891
 
12892
      /**
12893
       * Find the _Fields constant that matches name, or null if its not found.
12894
       */
12895
      public static _Fields findByName(String name) {
12896
        return byName.get(name);
12897
      }
12898
 
12899
      private final short _thriftId;
12900
      private final String _fieldName;
12901
 
12902
      _Fields(short thriftId, String fieldName) {
12903
        _thriftId = thriftId;
12904
        _fieldName = fieldName;
12905
      }
12906
 
12907
      public short getThriftFieldId() {
12908
        return _thriftId;
12909
      }
12910
 
12911
      public String getFieldName() {
12912
        return _fieldName;
12913
      }
12914
    }
12915
 
12916
    // isset id assignments
12917
    private static final int __WAREHOUSEID_ISSET_ID = 0;
12918
    private static final int __SUPPLIERID_ISSET_ID = 1;
12919
    private static final int __DATE_ISSET_ID = 2;
12920
    private BitSet __isset_bit_vector = new BitSet(3);
12921
 
12922
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12923
    static {
12924
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12925
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12926
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12927
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12928
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12929
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12930
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12931
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12932
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
12933
    }
12934
 
12935
    public getInvoicesForWarehouse_args() {
12936
    }
12937
 
12938
    public getInvoicesForWarehouse_args(
12939
      long warehouseId,
12940
      long supplierId,
12941
      long date)
12942
    {
12943
      this();
12944
      this.warehouseId = warehouseId;
12945
      setWarehouseIdIsSet(true);
12946
      this.supplierId = supplierId;
12947
      setSupplierIdIsSet(true);
12948
      this.date = date;
12949
      setDateIsSet(true);
12950
    }
12951
 
12952
    /**
12953
     * Performs a deep copy on <i>other</i>.
12954
     */
12955
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
12956
      __isset_bit_vector.clear();
12957
      __isset_bit_vector.or(other.__isset_bit_vector);
12958
      this.warehouseId = other.warehouseId;
12959
      this.supplierId = other.supplierId;
12960
      this.date = other.date;
12961
    }
12962
 
12963
    public getInvoicesForWarehouse_args deepCopy() {
12964
      return new getInvoicesForWarehouse_args(this);
12965
    }
12966
 
12967
    @Override
12968
    public void clear() {
12969
      setWarehouseIdIsSet(false);
12970
      this.warehouseId = 0;
12971
      setSupplierIdIsSet(false);
12972
      this.supplierId = 0;
12973
      setDateIsSet(false);
12974
      this.date = 0;
12975
    }
12976
 
12977
    public long getWarehouseId() {
12978
      return this.warehouseId;
12979
    }
12980
 
12981
    public void setWarehouseId(long warehouseId) {
12982
      this.warehouseId = warehouseId;
12983
      setWarehouseIdIsSet(true);
12984
    }
12985
 
12986
    public void unsetWarehouseId() {
12987
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
12988
    }
12989
 
12990
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
12991
    public boolean isSetWarehouseId() {
12992
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
12993
    }
12994
 
12995
    public void setWarehouseIdIsSet(boolean value) {
12996
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
12997
    }
12998
 
12999
    public long getSupplierId() {
13000
      return this.supplierId;
13001
    }
13002
 
13003
    public void setSupplierId(long supplierId) {
13004
      this.supplierId = supplierId;
13005
      setSupplierIdIsSet(true);
13006
    }
13007
 
13008
    public void unsetSupplierId() {
13009
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13010
    }
13011
 
13012
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13013
    public boolean isSetSupplierId() {
13014
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13015
    }
13016
 
13017
    public void setSupplierIdIsSet(boolean value) {
13018
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13019
    }
13020
 
13021
    public long getDate() {
13022
      return this.date;
13023
    }
13024
 
13025
    public void setDate(long date) {
13026
      this.date = date;
13027
      setDateIsSet(true);
13028
    }
13029
 
13030
    public void unsetDate() {
13031
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13032
    }
13033
 
13034
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13035
    public boolean isSetDate() {
13036
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13037
    }
13038
 
13039
    public void setDateIsSet(boolean value) {
13040
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13041
    }
13042
 
13043
    public void setFieldValue(_Fields field, Object value) {
13044
      switch (field) {
13045
      case WAREHOUSE_ID:
13046
        if (value == null) {
13047
          unsetWarehouseId();
13048
        } else {
13049
          setWarehouseId((Long)value);
13050
        }
13051
        break;
13052
 
13053
      case SUPPLIER_ID:
13054
        if (value == null) {
13055
          unsetSupplierId();
13056
        } else {
13057
          setSupplierId((Long)value);
13058
        }
13059
        break;
13060
 
13061
      case DATE:
13062
        if (value == null) {
13063
          unsetDate();
13064
        } else {
13065
          setDate((Long)value);
13066
        }
13067
        break;
13068
 
13069
      }
13070
    }
13071
 
13072
    public Object getFieldValue(_Fields field) {
13073
      switch (field) {
13074
      case WAREHOUSE_ID:
13075
        return Long.valueOf(getWarehouseId());
13076
 
13077
      case SUPPLIER_ID:
13078
        return Long.valueOf(getSupplierId());
13079
 
13080
      case DATE:
13081
        return Long.valueOf(getDate());
13082
 
13083
      }
13084
      throw new IllegalStateException();
13085
    }
13086
 
13087
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13088
    public boolean isSet(_Fields field) {
13089
      if (field == null) {
13090
        throw new IllegalArgumentException();
13091
      }
13092
 
13093
      switch (field) {
13094
      case WAREHOUSE_ID:
13095
        return isSetWarehouseId();
13096
      case SUPPLIER_ID:
13097
        return isSetSupplierId();
13098
      case DATE:
13099
        return isSetDate();
13100
      }
13101
      throw new IllegalStateException();
13102
    }
13103
 
13104
    @Override
13105
    public boolean equals(Object that) {
13106
      if (that == null)
13107
        return false;
13108
      if (that instanceof getInvoicesForWarehouse_args)
13109
        return this.equals((getInvoicesForWarehouse_args)that);
13110
      return false;
13111
    }
13112
 
13113
    public boolean equals(getInvoicesForWarehouse_args that) {
13114
      if (that == null)
13115
        return false;
13116
 
13117
      boolean this_present_warehouseId = true;
13118
      boolean that_present_warehouseId = true;
13119
      if (this_present_warehouseId || that_present_warehouseId) {
13120
        if (!(this_present_warehouseId && that_present_warehouseId))
13121
          return false;
13122
        if (this.warehouseId != that.warehouseId)
13123
          return false;
13124
      }
13125
 
13126
      boolean this_present_supplierId = true;
13127
      boolean that_present_supplierId = true;
13128
      if (this_present_supplierId || that_present_supplierId) {
13129
        if (!(this_present_supplierId && that_present_supplierId))
13130
          return false;
13131
        if (this.supplierId != that.supplierId)
13132
          return false;
13133
      }
13134
 
13135
      boolean this_present_date = true;
13136
      boolean that_present_date = true;
13137
      if (this_present_date || that_present_date) {
13138
        if (!(this_present_date && that_present_date))
13139
          return false;
13140
        if (this.date != that.date)
13141
          return false;
13142
      }
13143
 
13144
      return true;
13145
    }
13146
 
13147
    @Override
13148
    public int hashCode() {
13149
      return 0;
13150
    }
13151
 
13152
    public int compareTo(getInvoicesForWarehouse_args other) {
13153
      if (!getClass().equals(other.getClass())) {
13154
        return getClass().getName().compareTo(other.getClass().getName());
13155
      }
13156
 
13157
      int lastComparison = 0;
13158
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13159
 
13160
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13161
      if (lastComparison != 0) {
13162
        return lastComparison;
13163
      }
13164
      if (isSetWarehouseId()) {
13165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13166
        if (lastComparison != 0) {
13167
          return lastComparison;
13168
        }
13169
      }
13170
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13171
      if (lastComparison != 0) {
13172
        return lastComparison;
13173
      }
13174
      if (isSetSupplierId()) {
13175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13176
        if (lastComparison != 0) {
13177
          return lastComparison;
13178
        }
13179
      }
13180
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13181
      if (lastComparison != 0) {
13182
        return lastComparison;
13183
      }
13184
      if (isSetDate()) {
13185
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13186
        if (lastComparison != 0) {
13187
          return lastComparison;
13188
        }
13189
      }
13190
      return 0;
13191
    }
13192
 
13193
    public _Fields fieldForId(int fieldId) {
13194
      return _Fields.findByThriftId(fieldId);
13195
    }
13196
 
13197
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13198
      org.apache.thrift.protocol.TField field;
13199
      iprot.readStructBegin();
13200
      while (true)
13201
      {
13202
        field = iprot.readFieldBegin();
13203
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13204
          break;
13205
        }
13206
        switch (field.id) {
13207
          case 1: // WAREHOUSE_ID
13208
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13209
              this.warehouseId = iprot.readI64();
13210
              setWarehouseIdIsSet(true);
13211
            } else { 
13212
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13213
            }
13214
            break;
13215
          case 2: // SUPPLIER_ID
13216
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13217
              this.supplierId = iprot.readI64();
13218
              setSupplierIdIsSet(true);
13219
            } else { 
13220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13221
            }
13222
            break;
13223
          case 3: // DATE
13224
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13225
              this.date = iprot.readI64();
13226
              setDateIsSet(true);
13227
            } else { 
13228
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13229
            }
13230
            break;
13231
          default:
13232
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13233
        }
13234
        iprot.readFieldEnd();
13235
      }
13236
      iprot.readStructEnd();
13237
      validate();
13238
    }
13239
 
13240
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13241
      validate();
13242
 
13243
      oprot.writeStructBegin(STRUCT_DESC);
13244
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13245
      oprot.writeI64(this.warehouseId);
13246
      oprot.writeFieldEnd();
13247
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13248
      oprot.writeI64(this.supplierId);
13249
      oprot.writeFieldEnd();
13250
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13251
      oprot.writeI64(this.date);
13252
      oprot.writeFieldEnd();
13253
      oprot.writeFieldStop();
13254
      oprot.writeStructEnd();
13255
    }
13256
 
13257
    @Override
13258
    public String toString() {
13259
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13260
      boolean first = true;
13261
 
13262
      sb.append("warehouseId:");
13263
      sb.append(this.warehouseId);
13264
      first = false;
13265
      if (!first) sb.append(", ");
13266
      sb.append("supplierId:");
13267
      sb.append(this.supplierId);
13268
      first = false;
13269
      if (!first) sb.append(", ");
13270
      sb.append("date:");
13271
      sb.append(this.date);
13272
      first = false;
13273
      sb.append(")");
13274
      return sb.toString();
13275
    }
13276
 
13277
    public void validate() throws org.apache.thrift.TException {
13278
      // check for required fields
13279
    }
13280
 
13281
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13282
      try {
13283
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13284
      } catch (org.apache.thrift.TException te) {
13285
        throw new java.io.IOException(te);
13286
      }
13287
    }
13288
 
13289
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13290
      try {
13291
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13292
        __isset_bit_vector = new BitSet(1);
13293
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13294
      } catch (org.apache.thrift.TException te) {
13295
        throw new java.io.IOException(te);
13296
      }
13297
    }
13298
 
13299
  }
13300
 
13301
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13302
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13303
 
13304
    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);
13305
 
13306
    private List<Invoice> success; // required
13307
 
13308
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13309
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13310
      SUCCESS((short)0, "success");
13311
 
13312
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13313
 
13314
      static {
13315
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13316
          byName.put(field.getFieldName(), field);
13317
        }
13318
      }
13319
 
13320
      /**
13321
       * Find the _Fields constant that matches fieldId, or null if its not found.
13322
       */
13323
      public static _Fields findByThriftId(int fieldId) {
13324
        switch(fieldId) {
13325
          case 0: // SUCCESS
13326
            return SUCCESS;
13327
          default:
13328
            return null;
13329
        }
13330
      }
13331
 
13332
      /**
13333
       * Find the _Fields constant that matches fieldId, throwing an exception
13334
       * if it is not found.
13335
       */
13336
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13337
        _Fields fields = findByThriftId(fieldId);
13338
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13339
        return fields;
13340
      }
13341
 
13342
      /**
13343
       * Find the _Fields constant that matches name, or null if its not found.
13344
       */
13345
      public static _Fields findByName(String name) {
13346
        return byName.get(name);
13347
      }
13348
 
13349
      private final short _thriftId;
13350
      private final String _fieldName;
13351
 
13352
      _Fields(short thriftId, String fieldName) {
13353
        _thriftId = thriftId;
13354
        _fieldName = fieldName;
13355
      }
13356
 
13357
      public short getThriftFieldId() {
13358
        return _thriftId;
13359
      }
13360
 
13361
      public String getFieldName() {
13362
        return _fieldName;
13363
      }
13364
    }
13365
 
13366
    // isset id assignments
13367
 
13368
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13369
    static {
13370
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13371
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13372
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13373
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13374
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13375
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
13376
    }
13377
 
13378
    public getInvoicesForWarehouse_result() {
13379
    }
13380
 
13381
    public getInvoicesForWarehouse_result(
13382
      List<Invoice> success)
13383
    {
13384
      this();
13385
      this.success = success;
13386
    }
13387
 
13388
    /**
13389
     * Performs a deep copy on <i>other</i>.
13390
     */
13391
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
13392
      if (other.isSetSuccess()) {
13393
        List<Invoice> __this__success = new ArrayList<Invoice>();
13394
        for (Invoice other_element : other.success) {
13395
          __this__success.add(new Invoice(other_element));
13396
        }
13397
        this.success = __this__success;
13398
      }
13399
    }
13400
 
13401
    public getInvoicesForWarehouse_result deepCopy() {
13402
      return new getInvoicesForWarehouse_result(this);
13403
    }
13404
 
13405
    @Override
13406
    public void clear() {
13407
      this.success = null;
13408
    }
13409
 
13410
    public int getSuccessSize() {
13411
      return (this.success == null) ? 0 : this.success.size();
13412
    }
13413
 
13414
    public java.util.Iterator<Invoice> getSuccessIterator() {
13415
      return (this.success == null) ? null : this.success.iterator();
13416
    }
13417
 
13418
    public void addToSuccess(Invoice elem) {
13419
      if (this.success == null) {
13420
        this.success = new ArrayList<Invoice>();
13421
      }
13422
      this.success.add(elem);
13423
    }
13424
 
13425
    public List<Invoice> getSuccess() {
13426
      return this.success;
13427
    }
13428
 
13429
    public void setSuccess(List<Invoice> success) {
13430
      this.success = success;
13431
    }
13432
 
13433
    public void unsetSuccess() {
13434
      this.success = null;
13435
    }
13436
 
13437
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13438
    public boolean isSetSuccess() {
13439
      return this.success != null;
13440
    }
13441
 
13442
    public void setSuccessIsSet(boolean value) {
13443
      if (!value) {
13444
        this.success = null;
13445
      }
13446
    }
13447
 
13448
    public void setFieldValue(_Fields field, Object value) {
13449
      switch (field) {
13450
      case SUCCESS:
13451
        if (value == null) {
13452
          unsetSuccess();
13453
        } else {
13454
          setSuccess((List<Invoice>)value);
13455
        }
13456
        break;
13457
 
13458
      }
13459
    }
13460
 
13461
    public Object getFieldValue(_Fields field) {
13462
      switch (field) {
13463
      case SUCCESS:
13464
        return getSuccess();
13465
 
13466
      }
13467
      throw new IllegalStateException();
13468
    }
13469
 
13470
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13471
    public boolean isSet(_Fields field) {
13472
      if (field == null) {
13473
        throw new IllegalArgumentException();
13474
      }
13475
 
13476
      switch (field) {
13477
      case SUCCESS:
13478
        return isSetSuccess();
13479
      }
13480
      throw new IllegalStateException();
13481
    }
13482
 
13483
    @Override
13484
    public boolean equals(Object that) {
13485
      if (that == null)
13486
        return false;
13487
      if (that instanceof getInvoicesForWarehouse_result)
13488
        return this.equals((getInvoicesForWarehouse_result)that);
13489
      return false;
13490
    }
13491
 
13492
    public boolean equals(getInvoicesForWarehouse_result that) {
13493
      if (that == null)
13494
        return false;
13495
 
13496
      boolean this_present_success = true && this.isSetSuccess();
13497
      boolean that_present_success = true && that.isSetSuccess();
13498
      if (this_present_success || that_present_success) {
13499
        if (!(this_present_success && that_present_success))
13500
          return false;
13501
        if (!this.success.equals(that.success))
13502
          return false;
13503
      }
13504
 
13505
      return true;
13506
    }
13507
 
13508
    @Override
13509
    public int hashCode() {
13510
      return 0;
13511
    }
13512
 
13513
    public int compareTo(getInvoicesForWarehouse_result other) {
13514
      if (!getClass().equals(other.getClass())) {
13515
        return getClass().getName().compareTo(other.getClass().getName());
13516
      }
13517
 
13518
      int lastComparison = 0;
13519
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
13520
 
13521
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13522
      if (lastComparison != 0) {
13523
        return lastComparison;
13524
      }
13525
      if (isSetSuccess()) {
13526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13527
        if (lastComparison != 0) {
13528
          return lastComparison;
13529
        }
13530
      }
13531
      return 0;
13532
    }
13533
 
13534
    public _Fields fieldForId(int fieldId) {
13535
      return _Fields.findByThriftId(fieldId);
13536
    }
13537
 
13538
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13539
      org.apache.thrift.protocol.TField field;
13540
      iprot.readStructBegin();
13541
      while (true)
13542
      {
13543
        field = iprot.readFieldBegin();
13544
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13545
          break;
13546
        }
13547
        switch (field.id) {
13548
          case 0: // SUCCESS
13549
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13550
              {
13551
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13552
                this.success = new ArrayList<Invoice>(_list28.size);
13553
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13554
                {
13555
                  Invoice _elem30; // required
13556
                  _elem30 = new Invoice();
13557
                  _elem30.read(iprot);
13558
                  this.success.add(_elem30);
13559
                }
13560
                iprot.readListEnd();
13561
              }
13562
            } else { 
13563
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13564
            }
13565
            break;
13566
          default:
13567
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13568
        }
13569
        iprot.readFieldEnd();
13570
      }
13571
      iprot.readStructEnd();
13572
      validate();
13573
    }
13574
 
13575
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13576
      oprot.writeStructBegin(STRUCT_DESC);
13577
 
13578
      if (this.isSetSuccess()) {
13579
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13580
        {
13581
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13582
          for (Invoice _iter31 : this.success)
13583
          {
13584
            _iter31.write(oprot);
13585
          }
13586
          oprot.writeListEnd();
13587
        }
13588
        oprot.writeFieldEnd();
13589
      }
13590
      oprot.writeFieldStop();
13591
      oprot.writeStructEnd();
13592
    }
13593
 
13594
    @Override
13595
    public String toString() {
13596
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
13597
      boolean first = true;
13598
 
13599
      sb.append("success:");
13600
      if (this.success == null) {
13601
        sb.append("null");
13602
      } else {
13603
        sb.append(this.success);
13604
      }
13605
      first = false;
13606
      sb.append(")");
13607
      return sb.toString();
13608
    }
13609
 
13610
    public void validate() throws org.apache.thrift.TException {
13611
      // check for required fields
13612
    }
13613
 
13614
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13615
      try {
13616
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13617
      } catch (org.apache.thrift.TException te) {
13618
        throw new java.io.IOException(te);
13619
      }
13620
    }
13621
 
13622
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13623
      try {
13624
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13625
      } catch (org.apache.thrift.TException te) {
13626
        throw new java.io.IOException(te);
13627
      }
13628
    }
13629
 
13630
  }
13631
 
5443 mandeep.dh 13632
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
13633
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
13634
 
13635
    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);
13636
 
13637
    private Invoice invoice; // required
13638
 
13639
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13640
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13641
      INVOICE((short)1, "invoice");
13642
 
13643
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13644
 
13645
      static {
13646
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13647
          byName.put(field.getFieldName(), field);
13648
        }
13649
      }
13650
 
13651
      /**
13652
       * Find the _Fields constant that matches fieldId, or null if its not found.
13653
       */
13654
      public static _Fields findByThriftId(int fieldId) {
13655
        switch(fieldId) {
13656
          case 1: // INVOICE
13657
            return INVOICE;
13658
          default:
13659
            return null;
13660
        }
13661
      }
13662
 
13663
      /**
13664
       * Find the _Fields constant that matches fieldId, throwing an exception
13665
       * if it is not found.
13666
       */
13667
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13668
        _Fields fields = findByThriftId(fieldId);
13669
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13670
        return fields;
13671
      }
13672
 
13673
      /**
13674
       * Find the _Fields constant that matches name, or null if its not found.
13675
       */
13676
      public static _Fields findByName(String name) {
13677
        return byName.get(name);
13678
      }
13679
 
13680
      private final short _thriftId;
13681
      private final String _fieldName;
13682
 
13683
      _Fields(short thriftId, String fieldName) {
13684
        _thriftId = thriftId;
13685
        _fieldName = fieldName;
13686
      }
13687
 
13688
      public short getThriftFieldId() {
13689
        return _thriftId;
13690
      }
13691
 
13692
      public String getFieldName() {
13693
        return _fieldName;
13694
      }
13695
    }
13696
 
13697
    // isset id assignments
13698
 
13699
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13700
    static {
13701
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13702
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13703
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
13704
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13705
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
13706
    }
13707
 
13708
    public createInvoice_args() {
13709
    }
13710
 
13711
    public createInvoice_args(
13712
      Invoice invoice)
13713
    {
13714
      this();
13715
      this.invoice = invoice;
13716
    }
13717
 
13718
    /**
13719
     * Performs a deep copy on <i>other</i>.
13720
     */
13721
    public createInvoice_args(createInvoice_args other) {
13722
      if (other.isSetInvoice()) {
13723
        this.invoice = new Invoice(other.invoice);
13724
      }
13725
    }
13726
 
13727
    public createInvoice_args deepCopy() {
13728
      return new createInvoice_args(this);
13729
    }
13730
 
13731
    @Override
13732
    public void clear() {
13733
      this.invoice = null;
13734
    }
13735
 
13736
    public Invoice getInvoice() {
13737
      return this.invoice;
13738
    }
13739
 
13740
    public void setInvoice(Invoice invoice) {
13741
      this.invoice = invoice;
13742
    }
13743
 
13744
    public void unsetInvoice() {
13745
      this.invoice = null;
13746
    }
13747
 
13748
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
13749
    public boolean isSetInvoice() {
13750
      return this.invoice != null;
13751
    }
13752
 
13753
    public void setInvoiceIsSet(boolean value) {
13754
      if (!value) {
13755
        this.invoice = null;
13756
      }
13757
    }
13758
 
13759
    public void setFieldValue(_Fields field, Object value) {
13760
      switch (field) {
13761
      case INVOICE:
13762
        if (value == null) {
13763
          unsetInvoice();
13764
        } else {
13765
          setInvoice((Invoice)value);
13766
        }
13767
        break;
13768
 
13769
      }
13770
    }
13771
 
13772
    public Object getFieldValue(_Fields field) {
13773
      switch (field) {
13774
      case INVOICE:
13775
        return getInvoice();
13776
 
13777
      }
13778
      throw new IllegalStateException();
13779
    }
13780
 
13781
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13782
    public boolean isSet(_Fields field) {
13783
      if (field == null) {
13784
        throw new IllegalArgumentException();
13785
      }
13786
 
13787
      switch (field) {
13788
      case INVOICE:
13789
        return isSetInvoice();
13790
      }
13791
      throw new IllegalStateException();
13792
    }
13793
 
13794
    @Override
13795
    public boolean equals(Object that) {
13796
      if (that == null)
13797
        return false;
13798
      if (that instanceof createInvoice_args)
13799
        return this.equals((createInvoice_args)that);
13800
      return false;
13801
    }
13802
 
13803
    public boolean equals(createInvoice_args that) {
13804
      if (that == null)
13805
        return false;
13806
 
13807
      boolean this_present_invoice = true && this.isSetInvoice();
13808
      boolean that_present_invoice = true && that.isSetInvoice();
13809
      if (this_present_invoice || that_present_invoice) {
13810
        if (!(this_present_invoice && that_present_invoice))
13811
          return false;
13812
        if (!this.invoice.equals(that.invoice))
13813
          return false;
13814
      }
13815
 
13816
      return true;
13817
    }
13818
 
13819
    @Override
13820
    public int hashCode() {
13821
      return 0;
13822
    }
13823
 
13824
    public int compareTo(createInvoice_args other) {
13825
      if (!getClass().equals(other.getClass())) {
13826
        return getClass().getName().compareTo(other.getClass().getName());
13827
      }
13828
 
13829
      int lastComparison = 0;
13830
      createInvoice_args typedOther = (createInvoice_args)other;
13831
 
13832
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
13833
      if (lastComparison != 0) {
13834
        return lastComparison;
13835
      }
13836
      if (isSetInvoice()) {
13837
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
13838
        if (lastComparison != 0) {
13839
          return lastComparison;
13840
        }
13841
      }
13842
      return 0;
13843
    }
13844
 
13845
    public _Fields fieldForId(int fieldId) {
13846
      return _Fields.findByThriftId(fieldId);
13847
    }
13848
 
13849
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13850
      org.apache.thrift.protocol.TField field;
13851
      iprot.readStructBegin();
13852
      while (true)
13853
      {
13854
        field = iprot.readFieldBegin();
13855
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13856
          break;
13857
        }
13858
        switch (field.id) {
13859
          case 1: // INVOICE
13860
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13861
              this.invoice = new Invoice();
13862
              this.invoice.read(iprot);
13863
            } else { 
13864
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13865
            }
13866
            break;
13867
          default:
13868
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13869
        }
13870
        iprot.readFieldEnd();
13871
      }
13872
      iprot.readStructEnd();
13873
      validate();
13874
    }
13875
 
13876
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13877
      validate();
13878
 
13879
      oprot.writeStructBegin(STRUCT_DESC);
13880
      if (this.invoice != null) {
13881
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
13882
        this.invoice.write(oprot);
13883
        oprot.writeFieldEnd();
13884
      }
13885
      oprot.writeFieldStop();
13886
      oprot.writeStructEnd();
13887
    }
13888
 
13889
    @Override
13890
    public String toString() {
13891
      StringBuilder sb = new StringBuilder("createInvoice_args(");
13892
      boolean first = true;
13893
 
13894
      sb.append("invoice:");
13895
      if (this.invoice == null) {
13896
        sb.append("null");
13897
      } else {
13898
        sb.append(this.invoice);
13899
      }
13900
      first = false;
13901
      sb.append(")");
13902
      return sb.toString();
13903
    }
13904
 
13905
    public void validate() throws org.apache.thrift.TException {
13906
      // check for required fields
13907
    }
13908
 
13909
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13910
      try {
13911
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13912
      } catch (org.apache.thrift.TException te) {
13913
        throw new java.io.IOException(te);
13914
      }
13915
    }
13916
 
13917
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13918
      try {
13919
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13920
      } catch (org.apache.thrift.TException te) {
13921
        throw new java.io.IOException(te);
13922
      }
13923
    }
13924
 
13925
  }
13926
 
13927
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
13928
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
13929
 
13930
    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);
13931
 
13932
    private PurchaseServiceException e; // required
13933
 
13934
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13935
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13936
      E((short)1, "e");
13937
 
13938
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13939
 
13940
      static {
13941
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13942
          byName.put(field.getFieldName(), field);
13943
        }
13944
      }
13945
 
13946
      /**
13947
       * Find the _Fields constant that matches fieldId, or null if its not found.
13948
       */
13949
      public static _Fields findByThriftId(int fieldId) {
13950
        switch(fieldId) {
13951
          case 1: // E
13952
            return E;
13953
          default:
13954
            return null;
13955
        }
13956
      }
13957
 
13958
      /**
13959
       * Find the _Fields constant that matches fieldId, throwing an exception
13960
       * if it is not found.
13961
       */
13962
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13963
        _Fields fields = findByThriftId(fieldId);
13964
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13965
        return fields;
13966
      }
13967
 
13968
      /**
13969
       * Find the _Fields constant that matches name, or null if its not found.
13970
       */
13971
      public static _Fields findByName(String name) {
13972
        return byName.get(name);
13973
      }
13974
 
13975
      private final short _thriftId;
13976
      private final String _fieldName;
13977
 
13978
      _Fields(short thriftId, String fieldName) {
13979
        _thriftId = thriftId;
13980
        _fieldName = fieldName;
13981
      }
13982
 
13983
      public short getThriftFieldId() {
13984
        return _thriftId;
13985
      }
13986
 
13987
      public String getFieldName() {
13988
        return _fieldName;
13989
      }
13990
    }
13991
 
13992
    // isset id assignments
13993
 
13994
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13995
    static {
13996
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13997
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13998
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13999
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14000
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14001
    }
14002
 
14003
    public createInvoice_result() {
14004
    }
14005
 
14006
    public createInvoice_result(
14007
      PurchaseServiceException e)
14008
    {
14009
      this();
14010
      this.e = e;
14011
    }
14012
 
14013
    /**
14014
     * Performs a deep copy on <i>other</i>.
14015
     */
14016
    public createInvoice_result(createInvoice_result other) {
14017
      if (other.isSetE()) {
14018
        this.e = new PurchaseServiceException(other.e);
14019
      }
14020
    }
14021
 
14022
    public createInvoice_result deepCopy() {
14023
      return new createInvoice_result(this);
14024
    }
14025
 
14026
    @Override
14027
    public void clear() {
14028
      this.e = null;
14029
    }
14030
 
14031
    public PurchaseServiceException getE() {
14032
      return this.e;
14033
    }
14034
 
14035
    public void setE(PurchaseServiceException e) {
14036
      this.e = e;
14037
    }
14038
 
14039
    public void unsetE() {
14040
      this.e = null;
14041
    }
14042
 
14043
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14044
    public boolean isSetE() {
14045
      return this.e != null;
14046
    }
14047
 
14048
    public void setEIsSet(boolean value) {
14049
      if (!value) {
14050
        this.e = null;
14051
      }
14052
    }
14053
 
14054
    public void setFieldValue(_Fields field, Object value) {
14055
      switch (field) {
14056
      case E:
14057
        if (value == null) {
14058
          unsetE();
14059
        } else {
14060
          setE((PurchaseServiceException)value);
14061
        }
14062
        break;
14063
 
14064
      }
14065
    }
14066
 
14067
    public Object getFieldValue(_Fields field) {
14068
      switch (field) {
14069
      case E:
14070
        return getE();
14071
 
14072
      }
14073
      throw new IllegalStateException();
14074
    }
14075
 
14076
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14077
    public boolean isSet(_Fields field) {
14078
      if (field == null) {
14079
        throw new IllegalArgumentException();
14080
      }
14081
 
14082
      switch (field) {
14083
      case E:
14084
        return isSetE();
14085
      }
14086
      throw new IllegalStateException();
14087
    }
14088
 
14089
    @Override
14090
    public boolean equals(Object that) {
14091
      if (that == null)
14092
        return false;
14093
      if (that instanceof createInvoice_result)
14094
        return this.equals((createInvoice_result)that);
14095
      return false;
14096
    }
14097
 
14098
    public boolean equals(createInvoice_result that) {
14099
      if (that == null)
14100
        return false;
14101
 
14102
      boolean this_present_e = true && this.isSetE();
14103
      boolean that_present_e = true && that.isSetE();
14104
      if (this_present_e || that_present_e) {
14105
        if (!(this_present_e && that_present_e))
14106
          return false;
14107
        if (!this.e.equals(that.e))
14108
          return false;
14109
      }
14110
 
14111
      return true;
14112
    }
14113
 
14114
    @Override
14115
    public int hashCode() {
14116
      return 0;
14117
    }
14118
 
14119
    public int compareTo(createInvoice_result other) {
14120
      if (!getClass().equals(other.getClass())) {
14121
        return getClass().getName().compareTo(other.getClass().getName());
14122
      }
14123
 
14124
      int lastComparison = 0;
14125
      createInvoice_result typedOther = (createInvoice_result)other;
14126
 
14127
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14128
      if (lastComparison != 0) {
14129
        return lastComparison;
14130
      }
14131
      if (isSetE()) {
14132
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14133
        if (lastComparison != 0) {
14134
          return lastComparison;
14135
        }
14136
      }
14137
      return 0;
14138
    }
14139
 
14140
    public _Fields fieldForId(int fieldId) {
14141
      return _Fields.findByThriftId(fieldId);
14142
    }
14143
 
14144
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14145
      org.apache.thrift.protocol.TField field;
14146
      iprot.readStructBegin();
14147
      while (true)
14148
      {
14149
        field = iprot.readFieldBegin();
14150
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14151
          break;
14152
        }
14153
        switch (field.id) {
14154
          case 1: // E
14155
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14156
              this.e = new PurchaseServiceException();
14157
              this.e.read(iprot);
14158
            } else { 
14159
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14160
            }
14161
            break;
14162
          default:
14163
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14164
        }
14165
        iprot.readFieldEnd();
14166
      }
14167
      iprot.readStructEnd();
14168
      validate();
14169
    }
14170
 
14171
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14172
      oprot.writeStructBegin(STRUCT_DESC);
14173
 
14174
      if (this.isSetE()) {
14175
        oprot.writeFieldBegin(E_FIELD_DESC);
14176
        this.e.write(oprot);
14177
        oprot.writeFieldEnd();
14178
      }
14179
      oprot.writeFieldStop();
14180
      oprot.writeStructEnd();
14181
    }
14182
 
14183
    @Override
14184
    public String toString() {
14185
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14186
      boolean first = true;
14187
 
14188
      sb.append("e:");
14189
      if (this.e == null) {
14190
        sb.append("null");
14191
      } else {
14192
        sb.append(this.e);
14193
      }
14194
      first = false;
14195
      sb.append(")");
14196
      return sb.toString();
14197
    }
14198
 
14199
    public void validate() throws org.apache.thrift.TException {
14200
      // check for required fields
14201
    }
14202
 
14203
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14204
      try {
14205
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14206
      } catch (org.apache.thrift.TException te) {
14207
        throw new java.io.IOException(te);
14208
      }
14209
    }
14210
 
14211
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14212
      try {
14213
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14214
      } catch (org.apache.thrift.TException te) {
14215
        throw new java.io.IOException(te);
14216
      }
14217
    }
14218
 
14219
  }
14220
 
5591 mandeep.dh 14221
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14222
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14223
 
14224
    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);
14225
 
14226
    private Supplier supplier; // required
14227
 
14228
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14229
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14230
      SUPPLIER((short)1, "supplier");
14231
 
14232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14233
 
14234
      static {
14235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14236
          byName.put(field.getFieldName(), field);
14237
        }
14238
      }
14239
 
14240
      /**
14241
       * Find the _Fields constant that matches fieldId, or null if its not found.
14242
       */
14243
      public static _Fields findByThriftId(int fieldId) {
14244
        switch(fieldId) {
14245
          case 1: // SUPPLIER
14246
            return SUPPLIER;
14247
          default:
14248
            return null;
14249
        }
14250
      }
14251
 
14252
      /**
14253
       * Find the _Fields constant that matches fieldId, throwing an exception
14254
       * if it is not found.
14255
       */
14256
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14257
        _Fields fields = findByThriftId(fieldId);
14258
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14259
        return fields;
14260
      }
14261
 
14262
      /**
14263
       * Find the _Fields constant that matches name, or null if its not found.
14264
       */
14265
      public static _Fields findByName(String name) {
14266
        return byName.get(name);
14267
      }
14268
 
14269
      private final short _thriftId;
14270
      private final String _fieldName;
14271
 
14272
      _Fields(short thriftId, String fieldName) {
14273
        _thriftId = thriftId;
14274
        _fieldName = fieldName;
14275
      }
14276
 
14277
      public short getThriftFieldId() {
14278
        return _thriftId;
14279
      }
14280
 
14281
      public String getFieldName() {
14282
        return _fieldName;
14283
      }
14284
    }
14285
 
14286
    // isset id assignments
14287
 
14288
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14289
    static {
14290
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14291
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14292
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14293
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14294
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14295
    }
14296
 
14297
    public addSupplier_args() {
14298
    }
14299
 
14300
    public addSupplier_args(
14301
      Supplier supplier)
14302
    {
14303
      this();
14304
      this.supplier = supplier;
14305
    }
14306
 
14307
    /**
14308
     * Performs a deep copy on <i>other</i>.
14309
     */
14310
    public addSupplier_args(addSupplier_args other) {
14311
      if (other.isSetSupplier()) {
14312
        this.supplier = new Supplier(other.supplier);
14313
      }
14314
    }
14315
 
14316
    public addSupplier_args deepCopy() {
14317
      return new addSupplier_args(this);
14318
    }
14319
 
14320
    @Override
14321
    public void clear() {
14322
      this.supplier = null;
14323
    }
14324
 
14325
    public Supplier getSupplier() {
14326
      return this.supplier;
14327
    }
14328
 
14329
    public void setSupplier(Supplier supplier) {
14330
      this.supplier = supplier;
14331
    }
14332
 
14333
    public void unsetSupplier() {
14334
      this.supplier = null;
14335
    }
14336
 
14337
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14338
    public boolean isSetSupplier() {
14339
      return this.supplier != null;
14340
    }
14341
 
14342
    public void setSupplierIsSet(boolean value) {
14343
      if (!value) {
14344
        this.supplier = null;
14345
      }
14346
    }
14347
 
14348
    public void setFieldValue(_Fields field, Object value) {
14349
      switch (field) {
14350
      case SUPPLIER:
14351
        if (value == null) {
14352
          unsetSupplier();
14353
        } else {
14354
          setSupplier((Supplier)value);
14355
        }
14356
        break;
14357
 
14358
      }
14359
    }
14360
 
14361
    public Object getFieldValue(_Fields field) {
14362
      switch (field) {
14363
      case SUPPLIER:
14364
        return getSupplier();
14365
 
14366
      }
14367
      throw new IllegalStateException();
14368
    }
14369
 
14370
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14371
    public boolean isSet(_Fields field) {
14372
      if (field == null) {
14373
        throw new IllegalArgumentException();
14374
      }
14375
 
14376
      switch (field) {
14377
      case SUPPLIER:
14378
        return isSetSupplier();
14379
      }
14380
      throw new IllegalStateException();
14381
    }
14382
 
14383
    @Override
14384
    public boolean equals(Object that) {
14385
      if (that == null)
14386
        return false;
14387
      if (that instanceof addSupplier_args)
14388
        return this.equals((addSupplier_args)that);
14389
      return false;
14390
    }
14391
 
14392
    public boolean equals(addSupplier_args that) {
14393
      if (that == null)
14394
        return false;
14395
 
14396
      boolean this_present_supplier = true && this.isSetSupplier();
14397
      boolean that_present_supplier = true && that.isSetSupplier();
14398
      if (this_present_supplier || that_present_supplier) {
14399
        if (!(this_present_supplier && that_present_supplier))
14400
          return false;
14401
        if (!this.supplier.equals(that.supplier))
14402
          return false;
14403
      }
14404
 
14405
      return true;
14406
    }
14407
 
14408
    @Override
14409
    public int hashCode() {
14410
      return 0;
14411
    }
14412
 
14413
    public int compareTo(addSupplier_args other) {
14414
      if (!getClass().equals(other.getClass())) {
14415
        return getClass().getName().compareTo(other.getClass().getName());
14416
      }
14417
 
14418
      int lastComparison = 0;
14419
      addSupplier_args typedOther = (addSupplier_args)other;
14420
 
14421
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
14422
      if (lastComparison != 0) {
14423
        return lastComparison;
14424
      }
14425
      if (isSetSupplier()) {
14426
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
14427
        if (lastComparison != 0) {
14428
          return lastComparison;
14429
        }
14430
      }
14431
      return 0;
14432
    }
14433
 
14434
    public _Fields fieldForId(int fieldId) {
14435
      return _Fields.findByThriftId(fieldId);
14436
    }
14437
 
14438
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14439
      org.apache.thrift.protocol.TField field;
14440
      iprot.readStructBegin();
14441
      while (true)
14442
      {
14443
        field = iprot.readFieldBegin();
14444
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14445
          break;
14446
        }
14447
        switch (field.id) {
14448
          case 1: // SUPPLIER
14449
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14450
              this.supplier = new Supplier();
14451
              this.supplier.read(iprot);
14452
            } else { 
14453
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14454
            }
14455
            break;
14456
          default:
14457
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14458
        }
14459
        iprot.readFieldEnd();
14460
      }
14461
      iprot.readStructEnd();
14462
      validate();
14463
    }
14464
 
14465
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14466
      validate();
14467
 
14468
      oprot.writeStructBegin(STRUCT_DESC);
14469
      if (this.supplier != null) {
14470
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14471
        this.supplier.write(oprot);
14472
        oprot.writeFieldEnd();
14473
      }
14474
      oprot.writeFieldStop();
14475
      oprot.writeStructEnd();
14476
    }
14477
 
14478
    @Override
14479
    public String toString() {
14480
      StringBuilder sb = new StringBuilder("addSupplier_args(");
14481
      boolean first = true;
14482
 
14483
      sb.append("supplier:");
14484
      if (this.supplier == null) {
14485
        sb.append("null");
14486
      } else {
14487
        sb.append(this.supplier);
14488
      }
14489
      first = false;
14490
      sb.append(")");
14491
      return sb.toString();
14492
    }
14493
 
14494
    public void validate() throws org.apache.thrift.TException {
14495
      // check for required fields
14496
    }
14497
 
14498
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14499
      try {
14500
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14501
      } catch (org.apache.thrift.TException te) {
14502
        throw new java.io.IOException(te);
14503
      }
14504
    }
14505
 
14506
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14507
      try {
14508
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14509
      } catch (org.apache.thrift.TException te) {
14510
        throw new java.io.IOException(te);
14511
      }
14512
    }
14513
 
14514
  }
14515
 
14516
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14517
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
14518
 
14519
    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);
14520
 
14521
    private Supplier success; // required
14522
 
14523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14524
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14525
      SUCCESS((short)0, "success");
14526
 
14527
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14528
 
14529
      static {
14530
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14531
          byName.put(field.getFieldName(), field);
14532
        }
14533
      }
14534
 
14535
      /**
14536
       * Find the _Fields constant that matches fieldId, or null if its not found.
14537
       */
14538
      public static _Fields findByThriftId(int fieldId) {
14539
        switch(fieldId) {
14540
          case 0: // SUCCESS
14541
            return SUCCESS;
14542
          default:
14543
            return null;
14544
        }
14545
      }
14546
 
14547
      /**
14548
       * Find the _Fields constant that matches fieldId, throwing an exception
14549
       * if it is not found.
14550
       */
14551
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14552
        _Fields fields = findByThriftId(fieldId);
14553
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14554
        return fields;
14555
      }
14556
 
14557
      /**
14558
       * Find the _Fields constant that matches name, or null if its not found.
14559
       */
14560
      public static _Fields findByName(String name) {
14561
        return byName.get(name);
14562
      }
14563
 
14564
      private final short _thriftId;
14565
      private final String _fieldName;
14566
 
14567
      _Fields(short thriftId, String fieldName) {
14568
        _thriftId = thriftId;
14569
        _fieldName = fieldName;
14570
      }
14571
 
14572
      public short getThriftFieldId() {
14573
        return _thriftId;
14574
      }
14575
 
14576
      public String getFieldName() {
14577
        return _fieldName;
14578
      }
14579
    }
14580
 
14581
    // isset id assignments
14582
 
14583
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14584
    static {
14585
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14586
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14587
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14588
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14589
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
14590
    }
14591
 
14592
    public addSupplier_result() {
14593
    }
14594
 
14595
    public addSupplier_result(
14596
      Supplier success)
14597
    {
14598
      this();
14599
      this.success = success;
14600
    }
14601
 
14602
    /**
14603
     * Performs a deep copy on <i>other</i>.
14604
     */
14605
    public addSupplier_result(addSupplier_result other) {
14606
      if (other.isSetSuccess()) {
14607
        this.success = new Supplier(other.success);
14608
      }
14609
    }
14610
 
14611
    public addSupplier_result deepCopy() {
14612
      return new addSupplier_result(this);
14613
    }
14614
 
14615
    @Override
14616
    public void clear() {
14617
      this.success = null;
14618
    }
14619
 
14620
    public Supplier getSuccess() {
14621
      return this.success;
14622
    }
14623
 
14624
    public void setSuccess(Supplier success) {
14625
      this.success = success;
14626
    }
14627
 
14628
    public void unsetSuccess() {
14629
      this.success = null;
14630
    }
14631
 
14632
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14633
    public boolean isSetSuccess() {
14634
      return this.success != null;
14635
    }
14636
 
14637
    public void setSuccessIsSet(boolean value) {
14638
      if (!value) {
14639
        this.success = null;
14640
      }
14641
    }
14642
 
14643
    public void setFieldValue(_Fields field, Object value) {
14644
      switch (field) {
14645
      case SUCCESS:
14646
        if (value == null) {
14647
          unsetSuccess();
14648
        } else {
14649
          setSuccess((Supplier)value);
14650
        }
14651
        break;
14652
 
14653
      }
14654
    }
14655
 
14656
    public Object getFieldValue(_Fields field) {
14657
      switch (field) {
14658
      case SUCCESS:
14659
        return getSuccess();
14660
 
14661
      }
14662
      throw new IllegalStateException();
14663
    }
14664
 
14665
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14666
    public boolean isSet(_Fields field) {
14667
      if (field == null) {
14668
        throw new IllegalArgumentException();
14669
      }
14670
 
14671
      switch (field) {
14672
      case SUCCESS:
14673
        return isSetSuccess();
14674
      }
14675
      throw new IllegalStateException();
14676
    }
14677
 
14678
    @Override
14679
    public boolean equals(Object that) {
14680
      if (that == null)
14681
        return false;
14682
      if (that instanceof addSupplier_result)
14683
        return this.equals((addSupplier_result)that);
14684
      return false;
14685
    }
14686
 
14687
    public boolean equals(addSupplier_result that) {
14688
      if (that == null)
14689
        return false;
14690
 
14691
      boolean this_present_success = true && this.isSetSuccess();
14692
      boolean that_present_success = true && that.isSetSuccess();
14693
      if (this_present_success || that_present_success) {
14694
        if (!(this_present_success && that_present_success))
14695
          return false;
14696
        if (!this.success.equals(that.success))
14697
          return false;
14698
      }
14699
 
14700
      return true;
14701
    }
14702
 
14703
    @Override
14704
    public int hashCode() {
14705
      return 0;
14706
    }
14707
 
14708
    public int compareTo(addSupplier_result other) {
14709
      if (!getClass().equals(other.getClass())) {
14710
        return getClass().getName().compareTo(other.getClass().getName());
14711
      }
14712
 
14713
      int lastComparison = 0;
14714
      addSupplier_result typedOther = (addSupplier_result)other;
14715
 
14716
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14717
      if (lastComparison != 0) {
14718
        return lastComparison;
14719
      }
14720
      if (isSetSuccess()) {
14721
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14722
        if (lastComparison != 0) {
14723
          return lastComparison;
14724
        }
14725
      }
14726
      return 0;
14727
    }
14728
 
14729
    public _Fields fieldForId(int fieldId) {
14730
      return _Fields.findByThriftId(fieldId);
14731
    }
14732
 
14733
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14734
      org.apache.thrift.protocol.TField field;
14735
      iprot.readStructBegin();
14736
      while (true)
14737
      {
14738
        field = iprot.readFieldBegin();
14739
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14740
          break;
14741
        }
14742
        switch (field.id) {
14743
          case 0: // SUCCESS
14744
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14745
              this.success = new Supplier();
14746
              this.success.read(iprot);
14747
            } else { 
14748
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14749
            }
14750
            break;
14751
          default:
14752
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14753
        }
14754
        iprot.readFieldEnd();
14755
      }
14756
      iprot.readStructEnd();
14757
      validate();
14758
    }
14759
 
14760
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14761
      oprot.writeStructBegin(STRUCT_DESC);
14762
 
14763
      if (this.isSetSuccess()) {
14764
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14765
        this.success.write(oprot);
14766
        oprot.writeFieldEnd();
14767
      }
14768
      oprot.writeFieldStop();
14769
      oprot.writeStructEnd();
14770
    }
14771
 
14772
    @Override
14773
    public String toString() {
14774
      StringBuilder sb = new StringBuilder("addSupplier_result(");
14775
      boolean first = true;
14776
 
14777
      sb.append("success:");
14778
      if (this.success == null) {
14779
        sb.append("null");
14780
      } else {
14781
        sb.append(this.success);
14782
      }
14783
      first = false;
14784
      sb.append(")");
14785
      return sb.toString();
14786
    }
14787
 
14788
    public void validate() throws org.apache.thrift.TException {
14789
      // check for required fields
14790
    }
14791
 
14792
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14793
      try {
14794
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14795
      } catch (org.apache.thrift.TException te) {
14796
        throw new java.io.IOException(te);
14797
      }
14798
    }
14799
 
14800
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14801
      try {
14802
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14803
      } catch (org.apache.thrift.TException te) {
14804
        throw new java.io.IOException(te);
14805
      }
14806
    }
14807
 
14808
  }
14809
 
14810
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14811
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
14812
 
14813
    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);
14814
 
14815
    private Supplier supplier; // required
14816
 
14817
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14818
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14819
      SUPPLIER((short)1, "supplier");
14820
 
14821
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14822
 
14823
      static {
14824
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14825
          byName.put(field.getFieldName(), field);
14826
        }
14827
      }
14828
 
14829
      /**
14830
       * Find the _Fields constant that matches fieldId, or null if its not found.
14831
       */
14832
      public static _Fields findByThriftId(int fieldId) {
14833
        switch(fieldId) {
14834
          case 1: // SUPPLIER
14835
            return SUPPLIER;
14836
          default:
14837
            return null;
14838
        }
14839
      }
14840
 
14841
      /**
14842
       * Find the _Fields constant that matches fieldId, throwing an exception
14843
       * if it is not found.
14844
       */
14845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14846
        _Fields fields = findByThriftId(fieldId);
14847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14848
        return fields;
14849
      }
14850
 
14851
      /**
14852
       * Find the _Fields constant that matches name, or null if its not found.
14853
       */
14854
      public static _Fields findByName(String name) {
14855
        return byName.get(name);
14856
      }
14857
 
14858
      private final short _thriftId;
14859
      private final String _fieldName;
14860
 
14861
      _Fields(short thriftId, String fieldName) {
14862
        _thriftId = thriftId;
14863
        _fieldName = fieldName;
14864
      }
14865
 
14866
      public short getThriftFieldId() {
14867
        return _thriftId;
14868
      }
14869
 
14870
      public String getFieldName() {
14871
        return _fieldName;
14872
      }
14873
    }
14874
 
14875
    // isset id assignments
14876
 
14877
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14878
    static {
14879
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14880
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14881
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14882
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14883
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
14884
    }
14885
 
14886
    public updateSupplier_args() {
14887
    }
14888
 
14889
    public updateSupplier_args(
14890
      Supplier supplier)
14891
    {
14892
      this();
14893
      this.supplier = supplier;
14894
    }
14895
 
14896
    /**
14897
     * Performs a deep copy on <i>other</i>.
14898
     */
14899
    public updateSupplier_args(updateSupplier_args other) {
14900
      if (other.isSetSupplier()) {
14901
        this.supplier = new Supplier(other.supplier);
14902
      }
14903
    }
14904
 
14905
    public updateSupplier_args deepCopy() {
14906
      return new updateSupplier_args(this);
14907
    }
14908
 
14909
    @Override
14910
    public void clear() {
14911
      this.supplier = null;
14912
    }
14913
 
14914
    public Supplier getSupplier() {
14915
      return this.supplier;
14916
    }
14917
 
14918
    public void setSupplier(Supplier supplier) {
14919
      this.supplier = supplier;
14920
    }
14921
 
14922
    public void unsetSupplier() {
14923
      this.supplier = null;
14924
    }
14925
 
14926
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14927
    public boolean isSetSupplier() {
14928
      return this.supplier != null;
14929
    }
14930
 
14931
    public void setSupplierIsSet(boolean value) {
14932
      if (!value) {
14933
        this.supplier = null;
14934
      }
14935
    }
14936
 
14937
    public void setFieldValue(_Fields field, Object value) {
14938
      switch (field) {
14939
      case SUPPLIER:
14940
        if (value == null) {
14941
          unsetSupplier();
14942
        } else {
14943
          setSupplier((Supplier)value);
14944
        }
14945
        break;
14946
 
14947
      }
14948
    }
14949
 
14950
    public Object getFieldValue(_Fields field) {
14951
      switch (field) {
14952
      case SUPPLIER:
14953
        return getSupplier();
14954
 
14955
      }
14956
      throw new IllegalStateException();
14957
    }
14958
 
14959
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14960
    public boolean isSet(_Fields field) {
14961
      if (field == null) {
14962
        throw new IllegalArgumentException();
14963
      }
14964
 
14965
      switch (field) {
14966
      case SUPPLIER:
14967
        return isSetSupplier();
14968
      }
14969
      throw new IllegalStateException();
14970
    }
14971
 
14972
    @Override
14973
    public boolean equals(Object that) {
14974
      if (that == null)
14975
        return false;
14976
      if (that instanceof updateSupplier_args)
14977
        return this.equals((updateSupplier_args)that);
14978
      return false;
14979
    }
14980
 
14981
    public boolean equals(updateSupplier_args that) {
14982
      if (that == null)
14983
        return false;
14984
 
14985
      boolean this_present_supplier = true && this.isSetSupplier();
14986
      boolean that_present_supplier = true && that.isSetSupplier();
14987
      if (this_present_supplier || that_present_supplier) {
14988
        if (!(this_present_supplier && that_present_supplier))
14989
          return false;
14990
        if (!this.supplier.equals(that.supplier))
14991
          return false;
14992
      }
14993
 
14994
      return true;
14995
    }
14996
 
14997
    @Override
14998
    public int hashCode() {
14999
      return 0;
15000
    }
15001
 
15002
    public int compareTo(updateSupplier_args other) {
15003
      if (!getClass().equals(other.getClass())) {
15004
        return getClass().getName().compareTo(other.getClass().getName());
15005
      }
15006
 
15007
      int lastComparison = 0;
15008
      updateSupplier_args typedOther = (updateSupplier_args)other;
15009
 
15010
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15011
      if (lastComparison != 0) {
15012
        return lastComparison;
15013
      }
15014
      if (isSetSupplier()) {
15015
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15016
        if (lastComparison != 0) {
15017
          return lastComparison;
15018
        }
15019
      }
15020
      return 0;
15021
    }
15022
 
15023
    public _Fields fieldForId(int fieldId) {
15024
      return _Fields.findByThriftId(fieldId);
15025
    }
15026
 
15027
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15028
      org.apache.thrift.protocol.TField field;
15029
      iprot.readStructBegin();
15030
      while (true)
15031
      {
15032
        field = iprot.readFieldBegin();
15033
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15034
          break;
15035
        }
15036
        switch (field.id) {
15037
          case 1: // SUPPLIER
15038
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15039
              this.supplier = new Supplier();
15040
              this.supplier.read(iprot);
15041
            } else { 
15042
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15043
            }
15044
            break;
15045
          default:
15046
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15047
        }
15048
        iprot.readFieldEnd();
15049
      }
15050
      iprot.readStructEnd();
15051
      validate();
15052
    }
15053
 
15054
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15055
      validate();
15056
 
15057
      oprot.writeStructBegin(STRUCT_DESC);
15058
      if (this.supplier != null) {
15059
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15060
        this.supplier.write(oprot);
15061
        oprot.writeFieldEnd();
15062
      }
15063
      oprot.writeFieldStop();
15064
      oprot.writeStructEnd();
15065
    }
15066
 
15067
    @Override
15068
    public String toString() {
15069
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15070
      boolean first = true;
15071
 
15072
      sb.append("supplier:");
15073
      if (this.supplier == null) {
15074
        sb.append("null");
15075
      } else {
15076
        sb.append(this.supplier);
15077
      }
15078
      first = false;
15079
      sb.append(")");
15080
      return sb.toString();
15081
    }
15082
 
15083
    public void validate() throws org.apache.thrift.TException {
15084
      // check for required fields
15085
    }
15086
 
15087
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15088
      try {
15089
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15090
      } catch (org.apache.thrift.TException te) {
15091
        throw new java.io.IOException(te);
15092
      }
15093
    }
15094
 
15095
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15096
      try {
15097
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15098
      } catch (org.apache.thrift.TException te) {
15099
        throw new java.io.IOException(te);
15100
      }
15101
    }
15102
 
15103
  }
15104
 
15105
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15106
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15107
 
15108
 
15109
 
15110
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15111
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15112
;
15113
 
15114
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15115
 
15116
      static {
15117
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15118
          byName.put(field.getFieldName(), field);
15119
        }
15120
      }
15121
 
15122
      /**
15123
       * Find the _Fields constant that matches fieldId, or null if its not found.
15124
       */
15125
      public static _Fields findByThriftId(int fieldId) {
15126
        switch(fieldId) {
15127
          default:
15128
            return null;
15129
        }
15130
      }
15131
 
15132
      /**
15133
       * Find the _Fields constant that matches fieldId, throwing an exception
15134
       * if it is not found.
15135
       */
15136
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15137
        _Fields fields = findByThriftId(fieldId);
15138
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15139
        return fields;
15140
      }
15141
 
15142
      /**
15143
       * Find the _Fields constant that matches name, or null if its not found.
15144
       */
15145
      public static _Fields findByName(String name) {
15146
        return byName.get(name);
15147
      }
15148
 
15149
      private final short _thriftId;
15150
      private final String _fieldName;
15151
 
15152
      _Fields(short thriftId, String fieldName) {
15153
        _thriftId = thriftId;
15154
        _fieldName = fieldName;
15155
      }
15156
 
15157
      public short getThriftFieldId() {
15158
        return _thriftId;
15159
      }
15160
 
15161
      public String getFieldName() {
15162
        return _fieldName;
15163
      }
15164
    }
15165
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15166
    static {
15167
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15168
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15169
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15170
    }
15171
 
15172
    public updateSupplier_result() {
15173
    }
15174
 
15175
    /**
15176
     * Performs a deep copy on <i>other</i>.
15177
     */
15178
    public updateSupplier_result(updateSupplier_result other) {
15179
    }
15180
 
15181
    public updateSupplier_result deepCopy() {
15182
      return new updateSupplier_result(this);
15183
    }
15184
 
15185
    @Override
15186
    public void clear() {
15187
    }
15188
 
15189
    public void setFieldValue(_Fields field, Object value) {
15190
      switch (field) {
15191
      }
15192
    }
15193
 
15194
    public Object getFieldValue(_Fields field) {
15195
      switch (field) {
15196
      }
15197
      throw new IllegalStateException();
15198
    }
15199
 
15200
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15201
    public boolean isSet(_Fields field) {
15202
      if (field == null) {
15203
        throw new IllegalArgumentException();
15204
      }
15205
 
15206
      switch (field) {
15207
      }
15208
      throw new IllegalStateException();
15209
    }
15210
 
15211
    @Override
15212
    public boolean equals(Object that) {
15213
      if (that == null)
15214
        return false;
15215
      if (that instanceof updateSupplier_result)
15216
        return this.equals((updateSupplier_result)that);
15217
      return false;
15218
    }
15219
 
15220
    public boolean equals(updateSupplier_result that) {
15221
      if (that == null)
15222
        return false;
15223
 
15224
      return true;
15225
    }
15226
 
15227
    @Override
15228
    public int hashCode() {
15229
      return 0;
15230
    }
15231
 
15232
    public int compareTo(updateSupplier_result other) {
15233
      if (!getClass().equals(other.getClass())) {
15234
        return getClass().getName().compareTo(other.getClass().getName());
15235
      }
15236
 
15237
      int lastComparison = 0;
15238
      updateSupplier_result typedOther = (updateSupplier_result)other;
15239
 
15240
      return 0;
15241
    }
15242
 
15243
    public _Fields fieldForId(int fieldId) {
15244
      return _Fields.findByThriftId(fieldId);
15245
    }
15246
 
15247
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15248
      org.apache.thrift.protocol.TField field;
15249
      iprot.readStructBegin();
15250
      while (true)
15251
      {
15252
        field = iprot.readFieldBegin();
15253
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15254
          break;
15255
        }
15256
        switch (field.id) {
15257
          default:
15258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15259
        }
15260
        iprot.readFieldEnd();
15261
      }
15262
      iprot.readStructEnd();
15263
      validate();
15264
    }
15265
 
15266
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15267
      oprot.writeStructBegin(STRUCT_DESC);
15268
 
15269
      oprot.writeFieldStop();
15270
      oprot.writeStructEnd();
15271
    }
15272
 
15273
    @Override
15274
    public String toString() {
15275
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15276
      boolean first = true;
15277
 
15278
      sb.append(")");
15279
      return sb.toString();
15280
    }
15281
 
15282
    public void validate() throws org.apache.thrift.TException {
15283
      // check for required fields
15284
    }
15285
 
15286
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15287
      try {
15288
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15289
      } catch (org.apache.thrift.TException te) {
15290
        throw new java.io.IOException(te);
15291
      }
15292
    }
15293
 
15294
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15295
      try {
15296
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15297
      } catch (org.apache.thrift.TException te) {
15298
        throw new java.io.IOException(te);
15299
      }
15300
    }
15301
 
15302
  }
15303
 
6467 amar.kumar 15304
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15305
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15306
 
15307
    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);
15308
 
15309
    private PurchaseReturn purchaseReturn; // required
15310
 
15311
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15312
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15313
      PURCHASE_RETURN((short)1, "purchaseReturn");
15314
 
15315
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15316
 
15317
      static {
15318
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15319
          byName.put(field.getFieldName(), field);
15320
        }
15321
      }
15322
 
15323
      /**
15324
       * Find the _Fields constant that matches fieldId, or null if its not found.
15325
       */
15326
      public static _Fields findByThriftId(int fieldId) {
15327
        switch(fieldId) {
15328
          case 1: // PURCHASE_RETURN
15329
            return PURCHASE_RETURN;
15330
          default:
15331
            return null;
15332
        }
15333
      }
15334
 
15335
      /**
15336
       * Find the _Fields constant that matches fieldId, throwing an exception
15337
       * if it is not found.
15338
       */
15339
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15340
        _Fields fields = findByThriftId(fieldId);
15341
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15342
        return fields;
15343
      }
15344
 
15345
      /**
15346
       * Find the _Fields constant that matches name, or null if its not found.
15347
       */
15348
      public static _Fields findByName(String name) {
15349
        return byName.get(name);
15350
      }
15351
 
15352
      private final short _thriftId;
15353
      private final String _fieldName;
15354
 
15355
      _Fields(short thriftId, String fieldName) {
15356
        _thriftId = thriftId;
15357
        _fieldName = fieldName;
15358
      }
15359
 
15360
      public short getThriftFieldId() {
15361
        return _thriftId;
15362
      }
15363
 
15364
      public String getFieldName() {
15365
        return _fieldName;
15366
      }
15367
    }
15368
 
15369
    // isset id assignments
15370
 
15371
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15372
    static {
15373
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15374
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15375
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
15376
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15377
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
15378
    }
15379
 
15380
    public createPurchaseReturn_args() {
15381
    }
15382
 
15383
    public createPurchaseReturn_args(
15384
      PurchaseReturn purchaseReturn)
15385
    {
15386
      this();
15387
      this.purchaseReturn = purchaseReturn;
15388
    }
15389
 
15390
    /**
15391
     * Performs a deep copy on <i>other</i>.
15392
     */
15393
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
15394
      if (other.isSetPurchaseReturn()) {
15395
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
15396
      }
15397
    }
15398
 
15399
    public createPurchaseReturn_args deepCopy() {
15400
      return new createPurchaseReturn_args(this);
15401
    }
15402
 
15403
    @Override
15404
    public void clear() {
15405
      this.purchaseReturn = null;
15406
    }
15407
 
15408
    public PurchaseReturn getPurchaseReturn() {
15409
      return this.purchaseReturn;
15410
    }
15411
 
15412
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
15413
      this.purchaseReturn = purchaseReturn;
15414
    }
15415
 
15416
    public void unsetPurchaseReturn() {
15417
      this.purchaseReturn = null;
15418
    }
15419
 
15420
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
15421
    public boolean isSetPurchaseReturn() {
15422
      return this.purchaseReturn != null;
15423
    }
15424
 
15425
    public void setPurchaseReturnIsSet(boolean value) {
15426
      if (!value) {
15427
        this.purchaseReturn = null;
15428
      }
15429
    }
15430
 
15431
    public void setFieldValue(_Fields field, Object value) {
15432
      switch (field) {
15433
      case PURCHASE_RETURN:
15434
        if (value == null) {
15435
          unsetPurchaseReturn();
15436
        } else {
15437
          setPurchaseReturn((PurchaseReturn)value);
15438
        }
15439
        break;
15440
 
15441
      }
15442
    }
15443
 
15444
    public Object getFieldValue(_Fields field) {
15445
      switch (field) {
15446
      case PURCHASE_RETURN:
15447
        return getPurchaseReturn();
15448
 
15449
      }
15450
      throw new IllegalStateException();
15451
    }
15452
 
15453
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15454
    public boolean isSet(_Fields field) {
15455
      if (field == null) {
15456
        throw new IllegalArgumentException();
15457
      }
15458
 
15459
      switch (field) {
15460
      case PURCHASE_RETURN:
15461
        return isSetPurchaseReturn();
15462
      }
15463
      throw new IllegalStateException();
15464
    }
15465
 
15466
    @Override
15467
    public boolean equals(Object that) {
15468
      if (that == null)
15469
        return false;
15470
      if (that instanceof createPurchaseReturn_args)
15471
        return this.equals((createPurchaseReturn_args)that);
15472
      return false;
15473
    }
15474
 
15475
    public boolean equals(createPurchaseReturn_args that) {
15476
      if (that == null)
15477
        return false;
15478
 
15479
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
15480
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
15481
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
15482
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
15483
          return false;
15484
        if (!this.purchaseReturn.equals(that.purchaseReturn))
15485
          return false;
15486
      }
15487
 
15488
      return true;
15489
    }
15490
 
15491
    @Override
15492
    public int hashCode() {
15493
      return 0;
15494
    }
15495
 
15496
    public int compareTo(createPurchaseReturn_args other) {
15497
      if (!getClass().equals(other.getClass())) {
15498
        return getClass().getName().compareTo(other.getClass().getName());
15499
      }
15500
 
15501
      int lastComparison = 0;
15502
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
15503
 
15504
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
15505
      if (lastComparison != 0) {
15506
        return lastComparison;
15507
      }
15508
      if (isSetPurchaseReturn()) {
15509
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
15510
        if (lastComparison != 0) {
15511
          return lastComparison;
15512
        }
15513
      }
15514
      return 0;
15515
    }
15516
 
15517
    public _Fields fieldForId(int fieldId) {
15518
      return _Fields.findByThriftId(fieldId);
15519
    }
15520
 
15521
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15522
      org.apache.thrift.protocol.TField field;
15523
      iprot.readStructBegin();
15524
      while (true)
15525
      {
15526
        field = iprot.readFieldBegin();
15527
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15528
          break;
15529
        }
15530
        switch (field.id) {
15531
          case 1: // PURCHASE_RETURN
15532
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15533
              this.purchaseReturn = new PurchaseReturn();
15534
              this.purchaseReturn.read(iprot);
15535
            } else { 
15536
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15537
            }
15538
            break;
15539
          default:
15540
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15541
        }
15542
        iprot.readFieldEnd();
15543
      }
15544
      iprot.readStructEnd();
15545
      validate();
15546
    }
15547
 
15548
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15549
      validate();
15550
 
15551
      oprot.writeStructBegin(STRUCT_DESC);
15552
      if (this.purchaseReturn != null) {
15553
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
15554
        this.purchaseReturn.write(oprot);
15555
        oprot.writeFieldEnd();
15556
      }
15557
      oprot.writeFieldStop();
15558
      oprot.writeStructEnd();
15559
    }
15560
 
15561
    @Override
15562
    public String toString() {
15563
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
15564
      boolean first = true;
15565
 
15566
      sb.append("purchaseReturn:");
15567
      if (this.purchaseReturn == null) {
15568
        sb.append("null");
15569
      } else {
15570
        sb.append(this.purchaseReturn);
15571
      }
15572
      first = false;
15573
      sb.append(")");
15574
      return sb.toString();
15575
    }
15576
 
15577
    public void validate() throws org.apache.thrift.TException {
15578
      // check for required fields
15579
    }
15580
 
15581
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15582
      try {
15583
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15584
      } catch (org.apache.thrift.TException te) {
15585
        throw new java.io.IOException(te);
15586
      }
15587
    }
15588
 
15589
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15590
      try {
15591
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15592
      } catch (org.apache.thrift.TException te) {
15593
        throw new java.io.IOException(te);
15594
      }
15595
    }
15596
 
15597
  }
15598
 
15599
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15600
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
15601
 
15602
    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);
15603
 
15604
    private long success; // required
15605
 
15606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15607
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15608
      SUCCESS((short)0, "success");
15609
 
15610
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15611
 
15612
      static {
15613
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15614
          byName.put(field.getFieldName(), field);
15615
        }
15616
      }
15617
 
15618
      /**
15619
       * Find the _Fields constant that matches fieldId, or null if its not found.
15620
       */
15621
      public static _Fields findByThriftId(int fieldId) {
15622
        switch(fieldId) {
15623
          case 0: // SUCCESS
15624
            return SUCCESS;
15625
          default:
15626
            return null;
15627
        }
15628
      }
15629
 
15630
      /**
15631
       * Find the _Fields constant that matches fieldId, throwing an exception
15632
       * if it is not found.
15633
       */
15634
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15635
        _Fields fields = findByThriftId(fieldId);
15636
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15637
        return fields;
15638
      }
15639
 
15640
      /**
15641
       * Find the _Fields constant that matches name, or null if its not found.
15642
       */
15643
      public static _Fields findByName(String name) {
15644
        return byName.get(name);
15645
      }
15646
 
15647
      private final short _thriftId;
15648
      private final String _fieldName;
15649
 
15650
      _Fields(short thriftId, String fieldName) {
15651
        _thriftId = thriftId;
15652
        _fieldName = fieldName;
15653
      }
15654
 
15655
      public short getThriftFieldId() {
15656
        return _thriftId;
15657
      }
15658
 
15659
      public String getFieldName() {
15660
        return _fieldName;
15661
      }
15662
    }
15663
 
15664
    // isset id assignments
15665
    private static final int __SUCCESS_ISSET_ID = 0;
15666
    private BitSet __isset_bit_vector = new BitSet(1);
15667
 
15668
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15669
    static {
15670
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15671
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15672
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15673
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15674
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
15675
    }
15676
 
15677
    public createPurchaseReturn_result() {
15678
    }
15679
 
15680
    public createPurchaseReturn_result(
15681
      long success)
15682
    {
15683
      this();
15684
      this.success = success;
15685
      setSuccessIsSet(true);
15686
    }
15687
 
15688
    /**
15689
     * Performs a deep copy on <i>other</i>.
15690
     */
15691
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
15692
      __isset_bit_vector.clear();
15693
      __isset_bit_vector.or(other.__isset_bit_vector);
15694
      this.success = other.success;
15695
    }
15696
 
15697
    public createPurchaseReturn_result deepCopy() {
15698
      return new createPurchaseReturn_result(this);
15699
    }
15700
 
15701
    @Override
15702
    public void clear() {
15703
      setSuccessIsSet(false);
15704
      this.success = 0;
15705
    }
15706
 
15707
    public long getSuccess() {
15708
      return this.success;
15709
    }
15710
 
15711
    public void setSuccess(long success) {
15712
      this.success = success;
15713
      setSuccessIsSet(true);
15714
    }
15715
 
15716
    public void unsetSuccess() {
15717
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15718
    }
15719
 
15720
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15721
    public boolean isSetSuccess() {
15722
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15723
    }
15724
 
15725
    public void setSuccessIsSet(boolean value) {
15726
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15727
    }
15728
 
15729
    public void setFieldValue(_Fields field, Object value) {
15730
      switch (field) {
15731
      case SUCCESS:
15732
        if (value == null) {
15733
          unsetSuccess();
15734
        } else {
15735
          setSuccess((Long)value);
15736
        }
15737
        break;
15738
 
15739
      }
15740
    }
15741
 
15742
    public Object getFieldValue(_Fields field) {
15743
      switch (field) {
15744
      case SUCCESS:
15745
        return Long.valueOf(getSuccess());
15746
 
15747
      }
15748
      throw new IllegalStateException();
15749
    }
15750
 
15751
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15752
    public boolean isSet(_Fields field) {
15753
      if (field == null) {
15754
        throw new IllegalArgumentException();
15755
      }
15756
 
15757
      switch (field) {
15758
      case SUCCESS:
15759
        return isSetSuccess();
15760
      }
15761
      throw new IllegalStateException();
15762
    }
15763
 
15764
    @Override
15765
    public boolean equals(Object that) {
15766
      if (that == null)
15767
        return false;
15768
      if (that instanceof createPurchaseReturn_result)
15769
        return this.equals((createPurchaseReturn_result)that);
15770
      return false;
15771
    }
15772
 
15773
    public boolean equals(createPurchaseReturn_result that) {
15774
      if (that == null)
15775
        return false;
15776
 
15777
      boolean this_present_success = true;
15778
      boolean that_present_success = true;
15779
      if (this_present_success || that_present_success) {
15780
        if (!(this_present_success && that_present_success))
15781
          return false;
15782
        if (this.success != that.success)
15783
          return false;
15784
      }
15785
 
15786
      return true;
15787
    }
15788
 
15789
    @Override
15790
    public int hashCode() {
15791
      return 0;
15792
    }
15793
 
15794
    public int compareTo(createPurchaseReturn_result other) {
15795
      if (!getClass().equals(other.getClass())) {
15796
        return getClass().getName().compareTo(other.getClass().getName());
15797
      }
15798
 
15799
      int lastComparison = 0;
15800
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
15801
 
15802
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15803
      if (lastComparison != 0) {
15804
        return lastComparison;
15805
      }
15806
      if (isSetSuccess()) {
15807
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15808
        if (lastComparison != 0) {
15809
          return lastComparison;
15810
        }
15811
      }
15812
      return 0;
15813
    }
15814
 
15815
    public _Fields fieldForId(int fieldId) {
15816
      return _Fields.findByThriftId(fieldId);
15817
    }
15818
 
15819
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15820
      org.apache.thrift.protocol.TField field;
15821
      iprot.readStructBegin();
15822
      while (true)
15823
      {
15824
        field = iprot.readFieldBegin();
15825
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15826
          break;
15827
        }
15828
        switch (field.id) {
15829
          case 0: // SUCCESS
15830
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15831
              this.success = iprot.readI64();
15832
              setSuccessIsSet(true);
15833
            } else { 
15834
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15835
            }
15836
            break;
15837
          default:
15838
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15839
        }
15840
        iprot.readFieldEnd();
15841
      }
15842
      iprot.readStructEnd();
15843
      validate();
15844
    }
15845
 
15846
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15847
      oprot.writeStructBegin(STRUCT_DESC);
15848
 
15849
      if (this.isSetSuccess()) {
15850
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15851
        oprot.writeI64(this.success);
15852
        oprot.writeFieldEnd();
15853
      }
15854
      oprot.writeFieldStop();
15855
      oprot.writeStructEnd();
15856
    }
15857
 
15858
    @Override
15859
    public String toString() {
15860
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
15861
      boolean first = true;
15862
 
15863
      sb.append("success:");
15864
      sb.append(this.success);
15865
      first = false;
15866
      sb.append(")");
15867
      return sb.toString();
15868
    }
15869
 
15870
    public void validate() throws org.apache.thrift.TException {
15871
      // check for required fields
15872
    }
15873
 
15874
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15875
      try {
15876
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15877
      } catch (org.apache.thrift.TException te) {
15878
        throw new java.io.IOException(te);
15879
      }
15880
    }
15881
 
15882
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15883
      try {
15884
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15885
      } catch (org.apache.thrift.TException te) {
15886
        throw new java.io.IOException(te);
15887
      }
15888
    }
15889
 
15890
  }
15891
 
15892
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15893
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
15894
 
15895
    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);
15896
 
15897
    private long id; // required
15898
 
15899
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15900
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15901
      ID((short)1, "id");
15902
 
15903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15904
 
15905
      static {
15906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15907
          byName.put(field.getFieldName(), field);
15908
        }
15909
      }
15910
 
15911
      /**
15912
       * Find the _Fields constant that matches fieldId, or null if its not found.
15913
       */
15914
      public static _Fields findByThriftId(int fieldId) {
15915
        switch(fieldId) {
15916
          case 1: // ID
15917
            return ID;
15918
          default:
15919
            return null;
15920
        }
15921
      }
15922
 
15923
      /**
15924
       * Find the _Fields constant that matches fieldId, throwing an exception
15925
       * if it is not found.
15926
       */
15927
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15928
        _Fields fields = findByThriftId(fieldId);
15929
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15930
        return fields;
15931
      }
15932
 
15933
      /**
15934
       * Find the _Fields constant that matches name, or null if its not found.
15935
       */
15936
      public static _Fields findByName(String name) {
15937
        return byName.get(name);
15938
      }
15939
 
15940
      private final short _thriftId;
15941
      private final String _fieldName;
15942
 
15943
      _Fields(short thriftId, String fieldName) {
15944
        _thriftId = thriftId;
15945
        _fieldName = fieldName;
15946
      }
15947
 
15948
      public short getThriftFieldId() {
15949
        return _thriftId;
15950
      }
15951
 
15952
      public String getFieldName() {
15953
        return _fieldName;
15954
      }
15955
    }
15956
 
15957
    // isset id assignments
15958
    private static final int __ID_ISSET_ID = 0;
15959
    private BitSet __isset_bit_vector = new BitSet(1);
15960
 
15961
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15962
    static {
15963
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15964
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15965
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15966
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15967
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
15968
    }
15969
 
15970
    public settlePurchaseReturn_args() {
15971
    }
15972
 
15973
    public settlePurchaseReturn_args(
15974
      long id)
15975
    {
15976
      this();
15977
      this.id = id;
15978
      setIdIsSet(true);
15979
    }
15980
 
15981
    /**
15982
     * Performs a deep copy on <i>other</i>.
15983
     */
15984
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
15985
      __isset_bit_vector.clear();
15986
      __isset_bit_vector.or(other.__isset_bit_vector);
15987
      this.id = other.id;
15988
    }
15989
 
15990
    public settlePurchaseReturn_args deepCopy() {
15991
      return new settlePurchaseReturn_args(this);
15992
    }
15993
 
15994
    @Override
15995
    public void clear() {
15996
      setIdIsSet(false);
15997
      this.id = 0;
15998
    }
15999
 
16000
    public long getId() {
16001
      return this.id;
16002
    }
16003
 
16004
    public void setId(long id) {
16005
      this.id = id;
16006
      setIdIsSet(true);
16007
    }
16008
 
16009
    public void unsetId() {
16010
      __isset_bit_vector.clear(__ID_ISSET_ID);
16011
    }
16012
 
16013
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16014
    public boolean isSetId() {
16015
      return __isset_bit_vector.get(__ID_ISSET_ID);
16016
    }
16017
 
16018
    public void setIdIsSet(boolean value) {
16019
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16020
    }
16021
 
16022
    public void setFieldValue(_Fields field, Object value) {
16023
      switch (field) {
16024
      case ID:
16025
        if (value == null) {
16026
          unsetId();
16027
        } else {
16028
          setId((Long)value);
16029
        }
16030
        break;
16031
 
16032
      }
16033
    }
16034
 
16035
    public Object getFieldValue(_Fields field) {
16036
      switch (field) {
16037
      case ID:
16038
        return Long.valueOf(getId());
16039
 
16040
      }
16041
      throw new IllegalStateException();
16042
    }
16043
 
16044
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16045
    public boolean isSet(_Fields field) {
16046
      if (field == null) {
16047
        throw new IllegalArgumentException();
16048
      }
16049
 
16050
      switch (field) {
16051
      case ID:
16052
        return isSetId();
16053
      }
16054
      throw new IllegalStateException();
16055
    }
16056
 
16057
    @Override
16058
    public boolean equals(Object that) {
16059
      if (that == null)
16060
        return false;
16061
      if (that instanceof settlePurchaseReturn_args)
16062
        return this.equals((settlePurchaseReturn_args)that);
16063
      return false;
16064
    }
16065
 
16066
    public boolean equals(settlePurchaseReturn_args that) {
16067
      if (that == null)
16068
        return false;
16069
 
16070
      boolean this_present_id = true;
16071
      boolean that_present_id = true;
16072
      if (this_present_id || that_present_id) {
16073
        if (!(this_present_id && that_present_id))
16074
          return false;
16075
        if (this.id != that.id)
16076
          return false;
16077
      }
16078
 
16079
      return true;
16080
    }
16081
 
16082
    @Override
16083
    public int hashCode() {
16084
      return 0;
16085
    }
16086
 
16087
    public int compareTo(settlePurchaseReturn_args other) {
16088
      if (!getClass().equals(other.getClass())) {
16089
        return getClass().getName().compareTo(other.getClass().getName());
16090
      }
16091
 
16092
      int lastComparison = 0;
16093
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16094
 
16095
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16096
      if (lastComparison != 0) {
16097
        return lastComparison;
16098
      }
16099
      if (isSetId()) {
16100
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16101
        if (lastComparison != 0) {
16102
          return lastComparison;
16103
        }
16104
      }
16105
      return 0;
16106
    }
16107
 
16108
    public _Fields fieldForId(int fieldId) {
16109
      return _Fields.findByThriftId(fieldId);
16110
    }
16111
 
16112
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16113
      org.apache.thrift.protocol.TField field;
16114
      iprot.readStructBegin();
16115
      while (true)
16116
      {
16117
        field = iprot.readFieldBegin();
16118
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16119
          break;
16120
        }
16121
        switch (field.id) {
16122
          case 1: // ID
16123
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16124
              this.id = iprot.readI64();
16125
              setIdIsSet(true);
16126
            } else { 
16127
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16128
            }
16129
            break;
16130
          default:
16131
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16132
        }
16133
        iprot.readFieldEnd();
16134
      }
16135
      iprot.readStructEnd();
16136
      validate();
16137
    }
16138
 
16139
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16140
      validate();
16141
 
16142
      oprot.writeStructBegin(STRUCT_DESC);
16143
      oprot.writeFieldBegin(ID_FIELD_DESC);
16144
      oprot.writeI64(this.id);
16145
      oprot.writeFieldEnd();
16146
      oprot.writeFieldStop();
16147
      oprot.writeStructEnd();
16148
    }
16149
 
16150
    @Override
16151
    public String toString() {
16152
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16153
      boolean first = true;
16154
 
16155
      sb.append("id:");
16156
      sb.append(this.id);
16157
      first = false;
16158
      sb.append(")");
16159
      return sb.toString();
16160
    }
16161
 
16162
    public void validate() throws org.apache.thrift.TException {
16163
      // check for required fields
16164
    }
16165
 
16166
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16167
      try {
16168
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16169
      } catch (org.apache.thrift.TException te) {
16170
        throw new java.io.IOException(te);
16171
      }
16172
    }
16173
 
16174
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16175
      try {
16176
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16177
        __isset_bit_vector = new BitSet(1);
16178
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16179
      } catch (org.apache.thrift.TException te) {
16180
        throw new java.io.IOException(te);
16181
      }
16182
    }
16183
 
16184
  }
16185
 
16186
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16187
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16188
 
16189
 
16190
 
16191
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16192
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16193
;
16194
 
16195
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16196
 
16197
      static {
16198
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16199
          byName.put(field.getFieldName(), field);
16200
        }
16201
      }
16202
 
16203
      /**
16204
       * Find the _Fields constant that matches fieldId, or null if its not found.
16205
       */
16206
      public static _Fields findByThriftId(int fieldId) {
16207
        switch(fieldId) {
16208
          default:
16209
            return null;
16210
        }
16211
      }
16212
 
16213
      /**
16214
       * Find the _Fields constant that matches fieldId, throwing an exception
16215
       * if it is not found.
16216
       */
16217
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16218
        _Fields fields = findByThriftId(fieldId);
16219
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16220
        return fields;
16221
      }
16222
 
16223
      /**
16224
       * Find the _Fields constant that matches name, or null if its not found.
16225
       */
16226
      public static _Fields findByName(String name) {
16227
        return byName.get(name);
16228
      }
16229
 
16230
      private final short _thriftId;
16231
      private final String _fieldName;
16232
 
16233
      _Fields(short thriftId, String fieldName) {
16234
        _thriftId = thriftId;
16235
        _fieldName = fieldName;
16236
      }
16237
 
16238
      public short getThriftFieldId() {
16239
        return _thriftId;
16240
      }
16241
 
16242
      public String getFieldName() {
16243
        return _fieldName;
16244
      }
16245
    }
16246
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16247
    static {
16248
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16249
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16250
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16251
    }
16252
 
16253
    public settlePurchaseReturn_result() {
16254
    }
16255
 
16256
    /**
16257
     * Performs a deep copy on <i>other</i>.
16258
     */
16259
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16260
    }
16261
 
16262
    public settlePurchaseReturn_result deepCopy() {
16263
      return new settlePurchaseReturn_result(this);
16264
    }
16265
 
16266
    @Override
16267
    public void clear() {
16268
    }
16269
 
16270
    public void setFieldValue(_Fields field, Object value) {
16271
      switch (field) {
16272
      }
16273
    }
16274
 
16275
    public Object getFieldValue(_Fields field) {
16276
      switch (field) {
16277
      }
16278
      throw new IllegalStateException();
16279
    }
16280
 
16281
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16282
    public boolean isSet(_Fields field) {
16283
      if (field == null) {
16284
        throw new IllegalArgumentException();
16285
      }
16286
 
16287
      switch (field) {
16288
      }
16289
      throw new IllegalStateException();
16290
    }
16291
 
16292
    @Override
16293
    public boolean equals(Object that) {
16294
      if (that == null)
16295
        return false;
16296
      if (that instanceof settlePurchaseReturn_result)
16297
        return this.equals((settlePurchaseReturn_result)that);
16298
      return false;
16299
    }
16300
 
16301
    public boolean equals(settlePurchaseReturn_result that) {
16302
      if (that == null)
16303
        return false;
16304
 
16305
      return true;
16306
    }
16307
 
16308
    @Override
16309
    public int hashCode() {
16310
      return 0;
16311
    }
16312
 
16313
    public int compareTo(settlePurchaseReturn_result other) {
16314
      if (!getClass().equals(other.getClass())) {
16315
        return getClass().getName().compareTo(other.getClass().getName());
16316
      }
16317
 
16318
      int lastComparison = 0;
16319
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16320
 
16321
      return 0;
16322
    }
16323
 
16324
    public _Fields fieldForId(int fieldId) {
16325
      return _Fields.findByThriftId(fieldId);
16326
    }
16327
 
16328
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16329
      org.apache.thrift.protocol.TField field;
16330
      iprot.readStructBegin();
16331
      while (true)
16332
      {
16333
        field = iprot.readFieldBegin();
16334
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16335
          break;
16336
        }
16337
        switch (field.id) {
16338
          default:
16339
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16340
        }
16341
        iprot.readFieldEnd();
16342
      }
16343
      iprot.readStructEnd();
16344
      validate();
16345
    }
16346
 
16347
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16348
      oprot.writeStructBegin(STRUCT_DESC);
16349
 
16350
      oprot.writeFieldStop();
16351
      oprot.writeStructEnd();
16352
    }
16353
 
16354
    @Override
16355
    public String toString() {
16356
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16357
      boolean first = true;
16358
 
16359
      sb.append(")");
16360
      return sb.toString();
16361
    }
16362
 
16363
    public void validate() throws org.apache.thrift.TException {
16364
      // check for required fields
16365
    }
16366
 
16367
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16368
      try {
16369
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16370
      } catch (org.apache.thrift.TException te) {
16371
        throw new java.io.IOException(te);
16372
      }
16373
    }
16374
 
16375
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16376
      try {
16377
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16378
      } catch (org.apache.thrift.TException te) {
16379
        throw new java.io.IOException(te);
16380
      }
16381
    }
16382
 
16383
  }
16384
 
16385
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
16386
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
16387
 
16388
 
16389
 
16390
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16391
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16392
;
16393
 
16394
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16395
 
16396
      static {
16397
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16398
          byName.put(field.getFieldName(), field);
16399
        }
16400
      }
16401
 
16402
      /**
16403
       * Find the _Fields constant that matches fieldId, or null if its not found.
16404
       */
16405
      public static _Fields findByThriftId(int fieldId) {
16406
        switch(fieldId) {
16407
          default:
16408
            return null;
16409
        }
16410
      }
16411
 
16412
      /**
16413
       * Find the _Fields constant that matches fieldId, throwing an exception
16414
       * if it is not found.
16415
       */
16416
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16417
        _Fields fields = findByThriftId(fieldId);
16418
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16419
        return fields;
16420
      }
16421
 
16422
      /**
16423
       * Find the _Fields constant that matches name, or null if its not found.
16424
       */
16425
      public static _Fields findByName(String name) {
16426
        return byName.get(name);
16427
      }
16428
 
16429
      private final short _thriftId;
16430
      private final String _fieldName;
16431
 
16432
      _Fields(short thriftId, String fieldName) {
16433
        _thriftId = thriftId;
16434
        _fieldName = fieldName;
16435
      }
16436
 
16437
      public short getThriftFieldId() {
16438
        return _thriftId;
16439
      }
16440
 
16441
      public String getFieldName() {
16442
        return _fieldName;
16443
      }
16444
    }
16445
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16446
    static {
16447
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16448
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16449
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
16450
    }
16451
 
16452
    public getUnsettledPurchaseReturns_args() {
16453
    }
16454
 
16455
    /**
16456
     * Performs a deep copy on <i>other</i>.
16457
     */
16458
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
16459
    }
16460
 
16461
    public getUnsettledPurchaseReturns_args deepCopy() {
16462
      return new getUnsettledPurchaseReturns_args(this);
16463
    }
16464
 
16465
    @Override
16466
    public void clear() {
16467
    }
16468
 
16469
    public void setFieldValue(_Fields field, Object value) {
16470
      switch (field) {
16471
      }
16472
    }
16473
 
16474
    public Object getFieldValue(_Fields field) {
16475
      switch (field) {
16476
      }
16477
      throw new IllegalStateException();
16478
    }
16479
 
16480
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16481
    public boolean isSet(_Fields field) {
16482
      if (field == null) {
16483
        throw new IllegalArgumentException();
16484
      }
16485
 
16486
      switch (field) {
16487
      }
16488
      throw new IllegalStateException();
16489
    }
16490
 
16491
    @Override
16492
    public boolean equals(Object that) {
16493
      if (that == null)
16494
        return false;
16495
      if (that instanceof getUnsettledPurchaseReturns_args)
16496
        return this.equals((getUnsettledPurchaseReturns_args)that);
16497
      return false;
16498
    }
16499
 
16500
    public boolean equals(getUnsettledPurchaseReturns_args that) {
16501
      if (that == null)
16502
        return false;
16503
 
16504
      return true;
16505
    }
16506
 
16507
    @Override
16508
    public int hashCode() {
16509
      return 0;
16510
    }
16511
 
16512
    public int compareTo(getUnsettledPurchaseReturns_args other) {
16513
      if (!getClass().equals(other.getClass())) {
16514
        return getClass().getName().compareTo(other.getClass().getName());
16515
      }
16516
 
16517
      int lastComparison = 0;
16518
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
16519
 
16520
      return 0;
16521
    }
16522
 
16523
    public _Fields fieldForId(int fieldId) {
16524
      return _Fields.findByThriftId(fieldId);
16525
    }
16526
 
16527
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16528
      org.apache.thrift.protocol.TField field;
16529
      iprot.readStructBegin();
16530
      while (true)
16531
      {
16532
        field = iprot.readFieldBegin();
16533
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16534
          break;
16535
        }
16536
        switch (field.id) {
16537
          default:
16538
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16539
        }
16540
        iprot.readFieldEnd();
16541
      }
16542
      iprot.readStructEnd();
16543
      validate();
16544
    }
16545
 
16546
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16547
      validate();
16548
 
16549
      oprot.writeStructBegin(STRUCT_DESC);
16550
      oprot.writeFieldStop();
16551
      oprot.writeStructEnd();
16552
    }
16553
 
16554
    @Override
16555
    public String toString() {
16556
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
16557
      boolean first = true;
16558
 
16559
      sb.append(")");
16560
      return sb.toString();
16561
    }
16562
 
16563
    public void validate() throws org.apache.thrift.TException {
16564
      // check for required fields
16565
    }
16566
 
16567
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16568
      try {
16569
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16570
      } catch (org.apache.thrift.TException te) {
16571
        throw new java.io.IOException(te);
16572
      }
16573
    }
16574
 
16575
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16576
      try {
16577
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16578
      } catch (org.apache.thrift.TException te) {
16579
        throw new java.io.IOException(te);
16580
      }
16581
    }
16582
 
16583
  }
16584
 
16585
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
16586
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
16587
 
16588
    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);
16589
 
16590
    private List<PurchaseReturn> success; // required
16591
 
16592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16593
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16594
      SUCCESS((short)0, "success");
16595
 
16596
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16597
 
16598
      static {
16599
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16600
          byName.put(field.getFieldName(), field);
16601
        }
16602
      }
16603
 
16604
      /**
16605
       * Find the _Fields constant that matches fieldId, or null if its not found.
16606
       */
16607
      public static _Fields findByThriftId(int fieldId) {
16608
        switch(fieldId) {
16609
          case 0: // SUCCESS
16610
            return SUCCESS;
16611
          default:
16612
            return null;
16613
        }
16614
      }
16615
 
16616
      /**
16617
       * Find the _Fields constant that matches fieldId, throwing an exception
16618
       * if it is not found.
16619
       */
16620
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16621
        _Fields fields = findByThriftId(fieldId);
16622
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16623
        return fields;
16624
      }
16625
 
16626
      /**
16627
       * Find the _Fields constant that matches name, or null if its not found.
16628
       */
16629
      public static _Fields findByName(String name) {
16630
        return byName.get(name);
16631
      }
16632
 
16633
      private final short _thriftId;
16634
      private final String _fieldName;
16635
 
16636
      _Fields(short thriftId, String fieldName) {
16637
        _thriftId = thriftId;
16638
        _fieldName = fieldName;
16639
      }
16640
 
16641
      public short getThriftFieldId() {
16642
        return _thriftId;
16643
      }
16644
 
16645
      public String getFieldName() {
16646
        return _fieldName;
16647
      }
16648
    }
16649
 
16650
    // isset id assignments
16651
 
16652
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16653
    static {
16654
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16655
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16656
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16657
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16658
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16659
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
16660
    }
16661
 
16662
    public getUnsettledPurchaseReturns_result() {
16663
    }
16664
 
16665
    public getUnsettledPurchaseReturns_result(
16666
      List<PurchaseReturn> success)
16667
    {
16668
      this();
16669
      this.success = success;
16670
    }
16671
 
16672
    /**
16673
     * Performs a deep copy on <i>other</i>.
16674
     */
16675
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
16676
      if (other.isSetSuccess()) {
16677
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16678
        for (PurchaseReturn other_element : other.success) {
16679
          __this__success.add(new PurchaseReturn(other_element));
16680
        }
16681
        this.success = __this__success;
16682
      }
16683
    }
16684
 
16685
    public getUnsettledPurchaseReturns_result deepCopy() {
16686
      return new getUnsettledPurchaseReturns_result(this);
16687
    }
16688
 
16689
    @Override
16690
    public void clear() {
16691
      this.success = null;
16692
    }
16693
 
16694
    public int getSuccessSize() {
16695
      return (this.success == null) ? 0 : this.success.size();
16696
    }
16697
 
16698
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16699
      return (this.success == null) ? null : this.success.iterator();
16700
    }
16701
 
16702
    public void addToSuccess(PurchaseReturn elem) {
16703
      if (this.success == null) {
16704
        this.success = new ArrayList<PurchaseReturn>();
16705
      }
16706
      this.success.add(elem);
16707
    }
16708
 
16709
    public List<PurchaseReturn> getSuccess() {
16710
      return this.success;
16711
    }
16712
 
16713
    public void setSuccess(List<PurchaseReturn> success) {
16714
      this.success = success;
16715
    }
16716
 
16717
    public void unsetSuccess() {
16718
      this.success = null;
16719
    }
16720
 
16721
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16722
    public boolean isSetSuccess() {
16723
      return this.success != null;
16724
    }
16725
 
16726
    public void setSuccessIsSet(boolean value) {
16727
      if (!value) {
16728
        this.success = null;
16729
      }
16730
    }
16731
 
16732
    public void setFieldValue(_Fields field, Object value) {
16733
      switch (field) {
16734
      case SUCCESS:
16735
        if (value == null) {
16736
          unsetSuccess();
16737
        } else {
16738
          setSuccess((List<PurchaseReturn>)value);
16739
        }
16740
        break;
16741
 
16742
      }
16743
    }
16744
 
16745
    public Object getFieldValue(_Fields field) {
16746
      switch (field) {
16747
      case SUCCESS:
16748
        return getSuccess();
16749
 
16750
      }
16751
      throw new IllegalStateException();
16752
    }
16753
 
16754
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16755
    public boolean isSet(_Fields field) {
16756
      if (field == null) {
16757
        throw new IllegalArgumentException();
16758
      }
16759
 
16760
      switch (field) {
16761
      case SUCCESS:
16762
        return isSetSuccess();
16763
      }
16764
      throw new IllegalStateException();
16765
    }
16766
 
16767
    @Override
16768
    public boolean equals(Object that) {
16769
      if (that == null)
16770
        return false;
16771
      if (that instanceof getUnsettledPurchaseReturns_result)
16772
        return this.equals((getUnsettledPurchaseReturns_result)that);
16773
      return false;
16774
    }
16775
 
16776
    public boolean equals(getUnsettledPurchaseReturns_result that) {
16777
      if (that == null)
16778
        return false;
16779
 
16780
      boolean this_present_success = true && this.isSetSuccess();
16781
      boolean that_present_success = true && that.isSetSuccess();
16782
      if (this_present_success || that_present_success) {
16783
        if (!(this_present_success && that_present_success))
16784
          return false;
16785
        if (!this.success.equals(that.success))
16786
          return false;
16787
      }
16788
 
16789
      return true;
16790
    }
16791
 
16792
    @Override
16793
    public int hashCode() {
16794
      return 0;
16795
    }
16796
 
16797
    public int compareTo(getUnsettledPurchaseReturns_result other) {
16798
      if (!getClass().equals(other.getClass())) {
16799
        return getClass().getName().compareTo(other.getClass().getName());
16800
      }
16801
 
16802
      int lastComparison = 0;
16803
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
16804
 
16805
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16806
      if (lastComparison != 0) {
16807
        return lastComparison;
16808
      }
16809
      if (isSetSuccess()) {
16810
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16811
        if (lastComparison != 0) {
16812
          return lastComparison;
16813
        }
16814
      }
16815
      return 0;
16816
    }
16817
 
16818
    public _Fields fieldForId(int fieldId) {
16819
      return _Fields.findByThriftId(fieldId);
16820
    }
16821
 
16822
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16823
      org.apache.thrift.protocol.TField field;
16824
      iprot.readStructBegin();
16825
      while (true)
16826
      {
16827
        field = iprot.readFieldBegin();
16828
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16829
          break;
16830
        }
16831
        switch (field.id) {
16832
          case 0: // SUCCESS
16833
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16834
              {
7410 amar.kumar 16835
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
16836
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
16837
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 16838
                {
7410 amar.kumar 16839
                  PurchaseReturn _elem34; // required
16840
                  _elem34 = new PurchaseReturn();
16841
                  _elem34.read(iprot);
16842
                  this.success.add(_elem34);
6467 amar.kumar 16843
                }
16844
                iprot.readListEnd();
16845
              }
16846
            } else { 
16847
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16848
            }
16849
            break;
16850
          default:
16851
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16852
        }
16853
        iprot.readFieldEnd();
16854
      }
16855
      iprot.readStructEnd();
16856
      validate();
16857
    }
16858
 
16859
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16860
      oprot.writeStructBegin(STRUCT_DESC);
16861
 
16862
      if (this.isSetSuccess()) {
16863
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16864
        {
16865
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 16866
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 16867
          {
7410 amar.kumar 16868
            _iter35.write(oprot);
6467 amar.kumar 16869
          }
16870
          oprot.writeListEnd();
16871
        }
16872
        oprot.writeFieldEnd();
16873
      }
16874
      oprot.writeFieldStop();
16875
      oprot.writeStructEnd();
16876
    }
16877
 
16878
    @Override
16879
    public String toString() {
16880
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
16881
      boolean first = true;
16882
 
16883
      sb.append("success:");
16884
      if (this.success == null) {
16885
        sb.append("null");
16886
      } else {
16887
        sb.append(this.success);
16888
      }
16889
      first = false;
16890
      sb.append(")");
16891
      return sb.toString();
16892
    }
16893
 
16894
    public void validate() throws org.apache.thrift.TException {
16895
      // check for required fields
16896
    }
16897
 
16898
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16899
      try {
16900
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16901
      } catch (org.apache.thrift.TException te) {
16902
        throw new java.io.IOException(te);
16903
      }
16904
    }
16905
 
16906
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16907
      try {
16908
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16909
      } catch (org.apache.thrift.TException te) {
16910
        throw new java.io.IOException(te);
16911
      }
16912
    }
16913
 
16914
  }
16915
 
6630 amar.kumar 16916
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
16917
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
16918
 
16919
    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);
16920
    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);
16921
 
16922
    private String invoiceNumber; // required
16923
    private long supplierId; // required
16924
 
16925
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16926
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16927
      INVOICE_NUMBER((short)1, "invoiceNumber"),
16928
      SUPPLIER_ID((short)2, "supplierId");
16929
 
16930
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16931
 
16932
      static {
16933
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16934
          byName.put(field.getFieldName(), field);
16935
        }
16936
      }
16937
 
16938
      /**
16939
       * Find the _Fields constant that matches fieldId, or null if its not found.
16940
       */
16941
      public static _Fields findByThriftId(int fieldId) {
16942
        switch(fieldId) {
16943
          case 1: // INVOICE_NUMBER
16944
            return INVOICE_NUMBER;
16945
          case 2: // SUPPLIER_ID
16946
            return SUPPLIER_ID;
16947
          default:
16948
            return null;
16949
        }
16950
      }
16951
 
16952
      /**
16953
       * Find the _Fields constant that matches fieldId, throwing an exception
16954
       * if it is not found.
16955
       */
16956
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16957
        _Fields fields = findByThriftId(fieldId);
16958
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16959
        return fields;
16960
      }
16961
 
16962
      /**
16963
       * Find the _Fields constant that matches name, or null if its not found.
16964
       */
16965
      public static _Fields findByName(String name) {
16966
        return byName.get(name);
16967
      }
16968
 
16969
      private final short _thriftId;
16970
      private final String _fieldName;
16971
 
16972
      _Fields(short thriftId, String fieldName) {
16973
        _thriftId = thriftId;
16974
        _fieldName = fieldName;
16975
      }
16976
 
16977
      public short getThriftFieldId() {
16978
        return _thriftId;
16979
      }
16980
 
16981
      public String getFieldName() {
16982
        return _fieldName;
16983
      }
16984
    }
16985
 
16986
    // isset id assignments
16987
    private static final int __SUPPLIERID_ISSET_ID = 0;
16988
    private BitSet __isset_bit_vector = new BitSet(1);
16989
 
16990
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16991
    static {
16992
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16993
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16994
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
16995
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16996
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16997
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16998
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
16999
    }
17000
 
17001
    public getInvoice_args() {
17002
    }
17003
 
17004
    public getInvoice_args(
17005
      String invoiceNumber,
17006
      long supplierId)
17007
    {
17008
      this();
17009
      this.invoiceNumber = invoiceNumber;
17010
      this.supplierId = supplierId;
17011
      setSupplierIdIsSet(true);
17012
    }
17013
 
17014
    /**
17015
     * Performs a deep copy on <i>other</i>.
17016
     */
17017
    public getInvoice_args(getInvoice_args other) {
17018
      __isset_bit_vector.clear();
17019
      __isset_bit_vector.or(other.__isset_bit_vector);
17020
      if (other.isSetInvoiceNumber()) {
17021
        this.invoiceNumber = other.invoiceNumber;
17022
      }
17023
      this.supplierId = other.supplierId;
17024
    }
17025
 
17026
    public getInvoice_args deepCopy() {
17027
      return new getInvoice_args(this);
17028
    }
17029
 
17030
    @Override
17031
    public void clear() {
17032
      this.invoiceNumber = null;
17033
      setSupplierIdIsSet(false);
17034
      this.supplierId = 0;
17035
    }
17036
 
17037
    public String getInvoiceNumber() {
17038
      return this.invoiceNumber;
17039
    }
17040
 
17041
    public void setInvoiceNumber(String invoiceNumber) {
17042
      this.invoiceNumber = invoiceNumber;
17043
    }
17044
 
17045
    public void unsetInvoiceNumber() {
17046
      this.invoiceNumber = null;
17047
    }
17048
 
17049
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17050
    public boolean isSetInvoiceNumber() {
17051
      return this.invoiceNumber != null;
17052
    }
17053
 
17054
    public void setInvoiceNumberIsSet(boolean value) {
17055
      if (!value) {
17056
        this.invoiceNumber = null;
17057
      }
17058
    }
17059
 
17060
    public long getSupplierId() {
17061
      return this.supplierId;
17062
    }
17063
 
17064
    public void setSupplierId(long supplierId) {
17065
      this.supplierId = supplierId;
17066
      setSupplierIdIsSet(true);
17067
    }
17068
 
17069
    public void unsetSupplierId() {
17070
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17071
    }
17072
 
17073
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17074
    public boolean isSetSupplierId() {
17075
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17076
    }
17077
 
17078
    public void setSupplierIdIsSet(boolean value) {
17079
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17080
    }
17081
 
17082
    public void setFieldValue(_Fields field, Object value) {
17083
      switch (field) {
17084
      case INVOICE_NUMBER:
17085
        if (value == null) {
17086
          unsetInvoiceNumber();
17087
        } else {
17088
          setInvoiceNumber((String)value);
17089
        }
17090
        break;
17091
 
17092
      case SUPPLIER_ID:
17093
        if (value == null) {
17094
          unsetSupplierId();
17095
        } else {
17096
          setSupplierId((Long)value);
17097
        }
17098
        break;
17099
 
17100
      }
17101
    }
17102
 
17103
    public Object getFieldValue(_Fields field) {
17104
      switch (field) {
17105
      case INVOICE_NUMBER:
17106
        return getInvoiceNumber();
17107
 
17108
      case SUPPLIER_ID:
17109
        return Long.valueOf(getSupplierId());
17110
 
17111
      }
17112
      throw new IllegalStateException();
17113
    }
17114
 
17115
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17116
    public boolean isSet(_Fields field) {
17117
      if (field == null) {
17118
        throw new IllegalArgumentException();
17119
      }
17120
 
17121
      switch (field) {
17122
      case INVOICE_NUMBER:
17123
        return isSetInvoiceNumber();
17124
      case SUPPLIER_ID:
17125
        return isSetSupplierId();
17126
      }
17127
      throw new IllegalStateException();
17128
    }
17129
 
17130
    @Override
17131
    public boolean equals(Object that) {
17132
      if (that == null)
17133
        return false;
17134
      if (that instanceof getInvoice_args)
17135
        return this.equals((getInvoice_args)that);
17136
      return false;
17137
    }
17138
 
17139
    public boolean equals(getInvoice_args that) {
17140
      if (that == null)
17141
        return false;
17142
 
17143
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17144
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17145
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17146
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17147
          return false;
17148
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17149
          return false;
17150
      }
17151
 
17152
      boolean this_present_supplierId = true;
17153
      boolean that_present_supplierId = true;
17154
      if (this_present_supplierId || that_present_supplierId) {
17155
        if (!(this_present_supplierId && that_present_supplierId))
17156
          return false;
17157
        if (this.supplierId != that.supplierId)
17158
          return false;
17159
      }
17160
 
17161
      return true;
17162
    }
17163
 
17164
    @Override
17165
    public int hashCode() {
17166
      return 0;
17167
    }
17168
 
17169
    public int compareTo(getInvoice_args other) {
17170
      if (!getClass().equals(other.getClass())) {
17171
        return getClass().getName().compareTo(other.getClass().getName());
17172
      }
17173
 
17174
      int lastComparison = 0;
17175
      getInvoice_args typedOther = (getInvoice_args)other;
17176
 
17177
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17178
      if (lastComparison != 0) {
17179
        return lastComparison;
17180
      }
17181
      if (isSetInvoiceNumber()) {
17182
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17183
        if (lastComparison != 0) {
17184
          return lastComparison;
17185
        }
17186
      }
17187
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17188
      if (lastComparison != 0) {
17189
        return lastComparison;
17190
      }
17191
      if (isSetSupplierId()) {
17192
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17193
        if (lastComparison != 0) {
17194
          return lastComparison;
17195
        }
17196
      }
17197
      return 0;
17198
    }
17199
 
17200
    public _Fields fieldForId(int fieldId) {
17201
      return _Fields.findByThriftId(fieldId);
17202
    }
17203
 
17204
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17205
      org.apache.thrift.protocol.TField field;
17206
      iprot.readStructBegin();
17207
      while (true)
17208
      {
17209
        field = iprot.readFieldBegin();
17210
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17211
          break;
17212
        }
17213
        switch (field.id) {
17214
          case 1: // INVOICE_NUMBER
17215
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17216
              this.invoiceNumber = iprot.readString();
17217
            } else { 
17218
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17219
            }
17220
            break;
17221
          case 2: // SUPPLIER_ID
17222
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17223
              this.supplierId = iprot.readI64();
17224
              setSupplierIdIsSet(true);
17225
            } else { 
17226
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17227
            }
17228
            break;
17229
          default:
17230
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17231
        }
17232
        iprot.readFieldEnd();
17233
      }
17234
      iprot.readStructEnd();
17235
      validate();
17236
    }
17237
 
17238
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17239
      validate();
17240
 
17241
      oprot.writeStructBegin(STRUCT_DESC);
17242
      if (this.invoiceNumber != null) {
17243
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17244
        oprot.writeString(this.invoiceNumber);
17245
        oprot.writeFieldEnd();
17246
      }
17247
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17248
      oprot.writeI64(this.supplierId);
17249
      oprot.writeFieldEnd();
17250
      oprot.writeFieldStop();
17251
      oprot.writeStructEnd();
17252
    }
17253
 
17254
    @Override
17255
    public String toString() {
17256
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17257
      boolean first = true;
17258
 
17259
      sb.append("invoiceNumber:");
17260
      if (this.invoiceNumber == null) {
17261
        sb.append("null");
17262
      } else {
17263
        sb.append(this.invoiceNumber);
17264
      }
17265
      first = false;
17266
      if (!first) sb.append(", ");
17267
      sb.append("supplierId:");
17268
      sb.append(this.supplierId);
17269
      first = false;
17270
      sb.append(")");
17271
      return sb.toString();
17272
    }
17273
 
17274
    public void validate() throws org.apache.thrift.TException {
17275
      // check for required fields
17276
    }
17277
 
17278
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17279
      try {
17280
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17281
      } catch (org.apache.thrift.TException te) {
17282
        throw new java.io.IOException(te);
17283
      }
17284
    }
17285
 
17286
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17287
      try {
17288
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17289
      } catch (org.apache.thrift.TException te) {
17290
        throw new java.io.IOException(te);
17291
      }
17292
    }
17293
 
17294
  }
17295
 
17296
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17297
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17298
 
17299
    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);
17300
 
17301
    private List<PurchaseReturn> success; // required
17302
 
17303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17304
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17305
      SUCCESS((short)0, "success");
17306
 
17307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17308
 
17309
      static {
17310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17311
          byName.put(field.getFieldName(), field);
17312
        }
17313
      }
17314
 
17315
      /**
17316
       * Find the _Fields constant that matches fieldId, or null if its not found.
17317
       */
17318
      public static _Fields findByThriftId(int fieldId) {
17319
        switch(fieldId) {
17320
          case 0: // SUCCESS
17321
            return SUCCESS;
17322
          default:
17323
            return null;
17324
        }
17325
      }
17326
 
17327
      /**
17328
       * Find the _Fields constant that matches fieldId, throwing an exception
17329
       * if it is not found.
17330
       */
17331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17332
        _Fields fields = findByThriftId(fieldId);
17333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17334
        return fields;
17335
      }
17336
 
17337
      /**
17338
       * Find the _Fields constant that matches name, or null if its not found.
17339
       */
17340
      public static _Fields findByName(String name) {
17341
        return byName.get(name);
17342
      }
17343
 
17344
      private final short _thriftId;
17345
      private final String _fieldName;
17346
 
17347
      _Fields(short thriftId, String fieldName) {
17348
        _thriftId = thriftId;
17349
        _fieldName = fieldName;
17350
      }
17351
 
17352
      public short getThriftFieldId() {
17353
        return _thriftId;
17354
      }
17355
 
17356
      public String getFieldName() {
17357
        return _fieldName;
17358
      }
17359
    }
17360
 
17361
    // isset id assignments
17362
 
17363
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17364
    static {
17365
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17366
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17367
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17368
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17369
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17370
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17371
    }
17372
 
17373
    public getInvoice_result() {
17374
    }
17375
 
17376
    public getInvoice_result(
17377
      List<PurchaseReturn> success)
17378
    {
17379
      this();
17380
      this.success = success;
17381
    }
17382
 
17383
    /**
17384
     * Performs a deep copy on <i>other</i>.
17385
     */
17386
    public getInvoice_result(getInvoice_result other) {
17387
      if (other.isSetSuccess()) {
17388
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17389
        for (PurchaseReturn other_element : other.success) {
17390
          __this__success.add(new PurchaseReturn(other_element));
17391
        }
17392
        this.success = __this__success;
17393
      }
17394
    }
17395
 
17396
    public getInvoice_result deepCopy() {
17397
      return new getInvoice_result(this);
17398
    }
17399
 
17400
    @Override
17401
    public void clear() {
17402
      this.success = null;
17403
    }
17404
 
17405
    public int getSuccessSize() {
17406
      return (this.success == null) ? 0 : this.success.size();
17407
    }
17408
 
17409
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17410
      return (this.success == null) ? null : this.success.iterator();
17411
    }
17412
 
17413
    public void addToSuccess(PurchaseReturn elem) {
17414
      if (this.success == null) {
17415
        this.success = new ArrayList<PurchaseReturn>();
17416
      }
17417
      this.success.add(elem);
17418
    }
17419
 
17420
    public List<PurchaseReturn> getSuccess() {
17421
      return this.success;
17422
    }
17423
 
17424
    public void setSuccess(List<PurchaseReturn> success) {
17425
      this.success = success;
17426
    }
17427
 
17428
    public void unsetSuccess() {
17429
      this.success = null;
17430
    }
17431
 
17432
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17433
    public boolean isSetSuccess() {
17434
      return this.success != null;
17435
    }
17436
 
17437
    public void setSuccessIsSet(boolean value) {
17438
      if (!value) {
17439
        this.success = null;
17440
      }
17441
    }
17442
 
17443
    public void setFieldValue(_Fields field, Object value) {
17444
      switch (field) {
17445
      case SUCCESS:
17446
        if (value == null) {
17447
          unsetSuccess();
17448
        } else {
17449
          setSuccess((List<PurchaseReturn>)value);
17450
        }
17451
        break;
17452
 
17453
      }
17454
    }
17455
 
17456
    public Object getFieldValue(_Fields field) {
17457
      switch (field) {
17458
      case SUCCESS:
17459
        return getSuccess();
17460
 
17461
      }
17462
      throw new IllegalStateException();
17463
    }
17464
 
17465
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17466
    public boolean isSet(_Fields field) {
17467
      if (field == null) {
17468
        throw new IllegalArgumentException();
17469
      }
17470
 
17471
      switch (field) {
17472
      case SUCCESS:
17473
        return isSetSuccess();
17474
      }
17475
      throw new IllegalStateException();
17476
    }
17477
 
17478
    @Override
17479
    public boolean equals(Object that) {
17480
      if (that == null)
17481
        return false;
17482
      if (that instanceof getInvoice_result)
17483
        return this.equals((getInvoice_result)that);
17484
      return false;
17485
    }
17486
 
17487
    public boolean equals(getInvoice_result that) {
17488
      if (that == null)
17489
        return false;
17490
 
17491
      boolean this_present_success = true && this.isSetSuccess();
17492
      boolean that_present_success = true && that.isSetSuccess();
17493
      if (this_present_success || that_present_success) {
17494
        if (!(this_present_success && that_present_success))
17495
          return false;
17496
        if (!this.success.equals(that.success))
17497
          return false;
17498
      }
17499
 
17500
      return true;
17501
    }
17502
 
17503
    @Override
17504
    public int hashCode() {
17505
      return 0;
17506
    }
17507
 
17508
    public int compareTo(getInvoice_result other) {
17509
      if (!getClass().equals(other.getClass())) {
17510
        return getClass().getName().compareTo(other.getClass().getName());
17511
      }
17512
 
17513
      int lastComparison = 0;
17514
      getInvoice_result typedOther = (getInvoice_result)other;
17515
 
17516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17517
      if (lastComparison != 0) {
17518
        return lastComparison;
17519
      }
17520
      if (isSetSuccess()) {
17521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17522
        if (lastComparison != 0) {
17523
          return lastComparison;
17524
        }
17525
      }
17526
      return 0;
17527
    }
17528
 
17529
    public _Fields fieldForId(int fieldId) {
17530
      return _Fields.findByThriftId(fieldId);
17531
    }
17532
 
17533
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17534
      org.apache.thrift.protocol.TField field;
17535
      iprot.readStructBegin();
17536
      while (true)
17537
      {
17538
        field = iprot.readFieldBegin();
17539
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17540
          break;
17541
        }
17542
        switch (field.id) {
17543
          case 0: // SUCCESS
17544
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17545
              {
7410 amar.kumar 17546
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
17547
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
17548
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 17549
                {
7410 amar.kumar 17550
                  PurchaseReturn _elem38; // required
17551
                  _elem38 = new PurchaseReturn();
17552
                  _elem38.read(iprot);
17553
                  this.success.add(_elem38);
6630 amar.kumar 17554
                }
17555
                iprot.readListEnd();
17556
              }
17557
            } else { 
17558
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17559
            }
17560
            break;
17561
          default:
17562
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17563
        }
17564
        iprot.readFieldEnd();
17565
      }
17566
      iprot.readStructEnd();
17567
      validate();
17568
    }
17569
 
17570
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17571
      oprot.writeStructBegin(STRUCT_DESC);
17572
 
17573
      if (this.isSetSuccess()) {
17574
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17575
        {
17576
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17577
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 17578
          {
7410 amar.kumar 17579
            _iter39.write(oprot);
6630 amar.kumar 17580
          }
17581
          oprot.writeListEnd();
17582
        }
17583
        oprot.writeFieldEnd();
17584
      }
17585
      oprot.writeFieldStop();
17586
      oprot.writeStructEnd();
17587
    }
17588
 
17589
    @Override
17590
    public String toString() {
17591
      StringBuilder sb = new StringBuilder("getInvoice_result(");
17592
      boolean first = true;
17593
 
17594
      sb.append("success:");
17595
      if (this.success == null) {
17596
        sb.append("null");
17597
      } else {
17598
        sb.append(this.success);
17599
      }
17600
      first = false;
17601
      sb.append(")");
17602
      return sb.toString();
17603
    }
17604
 
17605
    public void validate() throws org.apache.thrift.TException {
17606
      // check for required fields
17607
    }
17608
 
17609
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17610
      try {
17611
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17612
      } catch (org.apache.thrift.TException te) {
17613
        throw new java.io.IOException(te);
17614
      }
17615
    }
17616
 
17617
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17618
      try {
17619
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17620
      } catch (org.apache.thrift.TException te) {
17621
        throw new java.io.IOException(te);
17622
      }
17623
    }
17624
 
17625
  }
17626
 
6762 amar.kumar 17627
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17628
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
17629
 
17630
    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);
17631
    private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
7672 rajveer 17632
    private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
17633
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)4);
6762 amar.kumar 17634
 
17635
    private String invoiceNumber; // required
17636
    private double unitPrice; // required
7672 rajveer 17637
    private double nlc; // required
6762 amar.kumar 17638
    private long itemId; // required
17639
 
17640
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17641
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17642
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17643
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 17644
      NLC((short)3, "nlc"),
17645
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 17646
 
17647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17648
 
17649
      static {
17650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17651
          byName.put(field.getFieldName(), field);
17652
        }
17653
      }
17654
 
17655
      /**
17656
       * Find the _Fields constant that matches fieldId, or null if its not found.
17657
       */
17658
      public static _Fields findByThriftId(int fieldId) {
17659
        switch(fieldId) {
17660
          case 1: // INVOICE_NUMBER
17661
            return INVOICE_NUMBER;
17662
          case 2: // UNIT_PRICE
17663
            return UNIT_PRICE;
7672 rajveer 17664
          case 3: // NLC
17665
            return NLC;
17666
          case 4: // ITEM_ID
6762 amar.kumar 17667
            return ITEM_ID;
17668
          default:
17669
            return null;
17670
        }
17671
      }
17672
 
17673
      /**
17674
       * Find the _Fields constant that matches fieldId, throwing an exception
17675
       * if it is not found.
17676
       */
17677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17678
        _Fields fields = findByThriftId(fieldId);
17679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17680
        return fields;
17681
      }
17682
 
17683
      /**
17684
       * Find the _Fields constant that matches name, or null if its not found.
17685
       */
17686
      public static _Fields findByName(String name) {
17687
        return byName.get(name);
17688
      }
17689
 
17690
      private final short _thriftId;
17691
      private final String _fieldName;
17692
 
17693
      _Fields(short thriftId, String fieldName) {
17694
        _thriftId = thriftId;
17695
        _fieldName = fieldName;
17696
      }
17697
 
17698
      public short getThriftFieldId() {
17699
        return _thriftId;
17700
      }
17701
 
17702
      public String getFieldName() {
17703
        return _fieldName;
17704
      }
17705
    }
17706
 
17707
    // isset id assignments
17708
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 17709
    private static final int __NLC_ISSET_ID = 1;
17710
    private static final int __ITEMID_ISSET_ID = 2;
17711
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 17712
 
17713
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17714
    static {
17715
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17716
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17717
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17718
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17719
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 17720
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17721
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 17722
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17723
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17724
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17725
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
17726
    }
17727
 
17728
    public createPurchaseForOurExtBilling_args() {
17729
    }
17730
 
17731
    public createPurchaseForOurExtBilling_args(
17732
      String invoiceNumber,
17733
      double unitPrice,
7672 rajveer 17734
      double nlc,
6762 amar.kumar 17735
      long itemId)
17736
    {
17737
      this();
17738
      this.invoiceNumber = invoiceNumber;
17739
      this.unitPrice = unitPrice;
17740
      setUnitPriceIsSet(true);
7672 rajveer 17741
      this.nlc = nlc;
17742
      setNlcIsSet(true);
6762 amar.kumar 17743
      this.itemId = itemId;
17744
      setItemIdIsSet(true);
17745
    }
17746
 
17747
    /**
17748
     * Performs a deep copy on <i>other</i>.
17749
     */
17750
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
17751
      __isset_bit_vector.clear();
17752
      __isset_bit_vector.or(other.__isset_bit_vector);
17753
      if (other.isSetInvoiceNumber()) {
17754
        this.invoiceNumber = other.invoiceNumber;
17755
      }
17756
      this.unitPrice = other.unitPrice;
7672 rajveer 17757
      this.nlc = other.nlc;
6762 amar.kumar 17758
      this.itemId = other.itemId;
17759
    }
17760
 
17761
    public createPurchaseForOurExtBilling_args deepCopy() {
17762
      return new createPurchaseForOurExtBilling_args(this);
17763
    }
17764
 
17765
    @Override
17766
    public void clear() {
17767
      this.invoiceNumber = null;
17768
      setUnitPriceIsSet(false);
17769
      this.unitPrice = 0.0;
7672 rajveer 17770
      setNlcIsSet(false);
17771
      this.nlc = 0.0;
6762 amar.kumar 17772
      setItemIdIsSet(false);
17773
      this.itemId = 0;
17774
    }
17775
 
17776
    public String getInvoiceNumber() {
17777
      return this.invoiceNumber;
17778
    }
17779
 
17780
    public void setInvoiceNumber(String invoiceNumber) {
17781
      this.invoiceNumber = invoiceNumber;
17782
    }
17783
 
17784
    public void unsetInvoiceNumber() {
17785
      this.invoiceNumber = null;
17786
    }
17787
 
17788
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17789
    public boolean isSetInvoiceNumber() {
17790
      return this.invoiceNumber != null;
17791
    }
17792
 
17793
    public void setInvoiceNumberIsSet(boolean value) {
17794
      if (!value) {
17795
        this.invoiceNumber = null;
17796
      }
17797
    }
17798
 
17799
    public double getUnitPrice() {
17800
      return this.unitPrice;
17801
    }
17802
 
17803
    public void setUnitPrice(double unitPrice) {
17804
      this.unitPrice = unitPrice;
17805
      setUnitPriceIsSet(true);
17806
    }
17807
 
17808
    public void unsetUnitPrice() {
17809
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
17810
    }
17811
 
17812
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
17813
    public boolean isSetUnitPrice() {
17814
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
17815
    }
17816
 
17817
    public void setUnitPriceIsSet(boolean value) {
17818
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
17819
    }
17820
 
7672 rajveer 17821
    public double getNlc() {
17822
      return this.nlc;
17823
    }
17824
 
17825
    public void setNlc(double nlc) {
17826
      this.nlc = nlc;
17827
      setNlcIsSet(true);
17828
    }
17829
 
17830
    public void unsetNlc() {
17831
      __isset_bit_vector.clear(__NLC_ISSET_ID);
17832
    }
17833
 
17834
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
17835
    public boolean isSetNlc() {
17836
      return __isset_bit_vector.get(__NLC_ISSET_ID);
17837
    }
17838
 
17839
    public void setNlcIsSet(boolean value) {
17840
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
17841
    }
17842
 
6762 amar.kumar 17843
    public long getItemId() {
17844
      return this.itemId;
17845
    }
17846
 
17847
    public void setItemId(long itemId) {
17848
      this.itemId = itemId;
17849
      setItemIdIsSet(true);
17850
    }
17851
 
17852
    public void unsetItemId() {
17853
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
17854
    }
17855
 
17856
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
17857
    public boolean isSetItemId() {
17858
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
17859
    }
17860
 
17861
    public void setItemIdIsSet(boolean value) {
17862
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
17863
    }
17864
 
17865
    public void setFieldValue(_Fields field, Object value) {
17866
      switch (field) {
17867
      case INVOICE_NUMBER:
17868
        if (value == null) {
17869
          unsetInvoiceNumber();
17870
        } else {
17871
          setInvoiceNumber((String)value);
17872
        }
17873
        break;
17874
 
17875
      case UNIT_PRICE:
17876
        if (value == null) {
17877
          unsetUnitPrice();
17878
        } else {
17879
          setUnitPrice((Double)value);
17880
        }
17881
        break;
17882
 
7672 rajveer 17883
      case NLC:
17884
        if (value == null) {
17885
          unsetNlc();
17886
        } else {
17887
          setNlc((Double)value);
17888
        }
17889
        break;
17890
 
6762 amar.kumar 17891
      case ITEM_ID:
17892
        if (value == null) {
17893
          unsetItemId();
17894
        } else {
17895
          setItemId((Long)value);
17896
        }
17897
        break;
17898
 
17899
      }
17900
    }
17901
 
17902
    public Object getFieldValue(_Fields field) {
17903
      switch (field) {
17904
      case INVOICE_NUMBER:
17905
        return getInvoiceNumber();
17906
 
17907
      case UNIT_PRICE:
17908
        return Double.valueOf(getUnitPrice());
17909
 
7672 rajveer 17910
      case NLC:
17911
        return Double.valueOf(getNlc());
17912
 
6762 amar.kumar 17913
      case ITEM_ID:
17914
        return Long.valueOf(getItemId());
17915
 
17916
      }
17917
      throw new IllegalStateException();
17918
    }
17919
 
17920
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17921
    public boolean isSet(_Fields field) {
17922
      if (field == null) {
17923
        throw new IllegalArgumentException();
17924
      }
17925
 
17926
      switch (field) {
17927
      case INVOICE_NUMBER:
17928
        return isSetInvoiceNumber();
17929
      case UNIT_PRICE:
17930
        return isSetUnitPrice();
7672 rajveer 17931
      case NLC:
17932
        return isSetNlc();
6762 amar.kumar 17933
      case ITEM_ID:
17934
        return isSetItemId();
17935
      }
17936
      throw new IllegalStateException();
17937
    }
17938
 
17939
    @Override
17940
    public boolean equals(Object that) {
17941
      if (that == null)
17942
        return false;
17943
      if (that instanceof createPurchaseForOurExtBilling_args)
17944
        return this.equals((createPurchaseForOurExtBilling_args)that);
17945
      return false;
17946
    }
17947
 
17948
    public boolean equals(createPurchaseForOurExtBilling_args that) {
17949
      if (that == null)
17950
        return false;
17951
 
17952
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17953
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17954
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17955
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17956
          return false;
17957
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17958
          return false;
17959
      }
17960
 
17961
      boolean this_present_unitPrice = true;
17962
      boolean that_present_unitPrice = true;
17963
      if (this_present_unitPrice || that_present_unitPrice) {
17964
        if (!(this_present_unitPrice && that_present_unitPrice))
17965
          return false;
17966
        if (this.unitPrice != that.unitPrice)
17967
          return false;
17968
      }
17969
 
7672 rajveer 17970
      boolean this_present_nlc = true;
17971
      boolean that_present_nlc = true;
17972
      if (this_present_nlc || that_present_nlc) {
17973
        if (!(this_present_nlc && that_present_nlc))
17974
          return false;
17975
        if (this.nlc != that.nlc)
17976
          return false;
17977
      }
17978
 
6762 amar.kumar 17979
      boolean this_present_itemId = true;
17980
      boolean that_present_itemId = true;
17981
      if (this_present_itemId || that_present_itemId) {
17982
        if (!(this_present_itemId && that_present_itemId))
17983
          return false;
17984
        if (this.itemId != that.itemId)
17985
          return false;
17986
      }
17987
 
17988
      return true;
17989
    }
17990
 
17991
    @Override
17992
    public int hashCode() {
17993
      return 0;
17994
    }
17995
 
17996
    public int compareTo(createPurchaseForOurExtBilling_args other) {
17997
      if (!getClass().equals(other.getClass())) {
17998
        return getClass().getName().compareTo(other.getClass().getName());
17999
      }
18000
 
18001
      int lastComparison = 0;
18002
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18003
 
18004
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18005
      if (lastComparison != 0) {
18006
        return lastComparison;
18007
      }
18008
      if (isSetInvoiceNumber()) {
18009
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18010
        if (lastComparison != 0) {
18011
          return lastComparison;
18012
        }
18013
      }
18014
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18015
      if (lastComparison != 0) {
18016
        return lastComparison;
18017
      }
18018
      if (isSetUnitPrice()) {
18019
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18020
        if (lastComparison != 0) {
18021
          return lastComparison;
18022
        }
18023
      }
7672 rajveer 18024
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18025
      if (lastComparison != 0) {
18026
        return lastComparison;
18027
      }
18028
      if (isSetNlc()) {
18029
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18030
        if (lastComparison != 0) {
18031
          return lastComparison;
18032
        }
18033
      }
6762 amar.kumar 18034
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18035
      if (lastComparison != 0) {
18036
        return lastComparison;
18037
      }
18038
      if (isSetItemId()) {
18039
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18040
        if (lastComparison != 0) {
18041
          return lastComparison;
18042
        }
18043
      }
18044
      return 0;
18045
    }
18046
 
18047
    public _Fields fieldForId(int fieldId) {
18048
      return _Fields.findByThriftId(fieldId);
18049
    }
18050
 
18051
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18052
      org.apache.thrift.protocol.TField field;
18053
      iprot.readStructBegin();
18054
      while (true)
18055
      {
18056
        field = iprot.readFieldBegin();
18057
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18058
          break;
18059
        }
18060
        switch (field.id) {
18061
          case 1: // INVOICE_NUMBER
18062
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18063
              this.invoiceNumber = iprot.readString();
18064
            } else { 
18065
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18066
            }
18067
            break;
18068
          case 2: // UNIT_PRICE
18069
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18070
              this.unitPrice = iprot.readDouble();
18071
              setUnitPriceIsSet(true);
18072
            } else { 
18073
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18074
            }
18075
            break;
7672 rajveer 18076
          case 3: // NLC
18077
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18078
              this.nlc = iprot.readDouble();
18079
              setNlcIsSet(true);
18080
            } else { 
18081
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18082
            }
18083
            break;
18084
          case 4: // ITEM_ID
6762 amar.kumar 18085
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18086
              this.itemId = iprot.readI64();
18087
              setItemIdIsSet(true);
18088
            } else { 
18089
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18090
            }
18091
            break;
18092
          default:
18093
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18094
        }
18095
        iprot.readFieldEnd();
18096
      }
18097
      iprot.readStructEnd();
18098
      validate();
18099
    }
18100
 
18101
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18102
      validate();
18103
 
18104
      oprot.writeStructBegin(STRUCT_DESC);
18105
      if (this.invoiceNumber != null) {
18106
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18107
        oprot.writeString(this.invoiceNumber);
18108
        oprot.writeFieldEnd();
18109
      }
18110
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18111
      oprot.writeDouble(this.unitPrice);
18112
      oprot.writeFieldEnd();
7672 rajveer 18113
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18114
      oprot.writeDouble(this.nlc);
18115
      oprot.writeFieldEnd();
6762 amar.kumar 18116
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18117
      oprot.writeI64(this.itemId);
18118
      oprot.writeFieldEnd();
18119
      oprot.writeFieldStop();
18120
      oprot.writeStructEnd();
18121
    }
18122
 
18123
    @Override
18124
    public String toString() {
18125
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18126
      boolean first = true;
18127
 
18128
      sb.append("invoiceNumber:");
18129
      if (this.invoiceNumber == null) {
18130
        sb.append("null");
18131
      } else {
18132
        sb.append(this.invoiceNumber);
18133
      }
18134
      first = false;
18135
      if (!first) sb.append(", ");
18136
      sb.append("unitPrice:");
18137
      sb.append(this.unitPrice);
18138
      first = false;
18139
      if (!first) sb.append(", ");
7672 rajveer 18140
      sb.append("nlc:");
18141
      sb.append(this.nlc);
18142
      first = false;
18143
      if (!first) sb.append(", ");
6762 amar.kumar 18144
      sb.append("itemId:");
18145
      sb.append(this.itemId);
18146
      first = false;
18147
      sb.append(")");
18148
      return sb.toString();
18149
    }
18150
 
18151
    public void validate() throws org.apache.thrift.TException {
18152
      // check for required fields
18153
    }
18154
 
18155
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18156
      try {
18157
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18158
      } catch (org.apache.thrift.TException te) {
18159
        throw new java.io.IOException(te);
18160
      }
18161
    }
18162
 
18163
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18164
      try {
18165
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18166
        __isset_bit_vector = new BitSet(1);
18167
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18168
      } catch (org.apache.thrift.TException te) {
18169
        throw new java.io.IOException(te);
18170
      }
18171
    }
18172
 
18173
  }
18174
 
18175
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18176
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18177
 
18178
    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);
18179
 
18180
    private long success; // required
18181
 
18182
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18183
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18184
      SUCCESS((short)0, "success");
18185
 
18186
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18187
 
18188
      static {
18189
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18190
          byName.put(field.getFieldName(), field);
18191
        }
18192
      }
18193
 
18194
      /**
18195
       * Find the _Fields constant that matches fieldId, or null if its not found.
18196
       */
18197
      public static _Fields findByThriftId(int fieldId) {
18198
        switch(fieldId) {
18199
          case 0: // SUCCESS
18200
            return SUCCESS;
18201
          default:
18202
            return null;
18203
        }
18204
      }
18205
 
18206
      /**
18207
       * Find the _Fields constant that matches fieldId, throwing an exception
18208
       * if it is not found.
18209
       */
18210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18211
        _Fields fields = findByThriftId(fieldId);
18212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18213
        return fields;
18214
      }
18215
 
18216
      /**
18217
       * Find the _Fields constant that matches name, or null if its not found.
18218
       */
18219
      public static _Fields findByName(String name) {
18220
        return byName.get(name);
18221
      }
18222
 
18223
      private final short _thriftId;
18224
      private final String _fieldName;
18225
 
18226
      _Fields(short thriftId, String fieldName) {
18227
        _thriftId = thriftId;
18228
        _fieldName = fieldName;
18229
      }
18230
 
18231
      public short getThriftFieldId() {
18232
        return _thriftId;
18233
      }
18234
 
18235
      public String getFieldName() {
18236
        return _fieldName;
18237
      }
18238
    }
18239
 
18240
    // isset id assignments
18241
    private static final int __SUCCESS_ISSET_ID = 0;
18242
    private BitSet __isset_bit_vector = new BitSet(1);
18243
 
18244
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18245
    static {
18246
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18247
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18248
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18249
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18250
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18251
    }
18252
 
18253
    public createPurchaseForOurExtBilling_result() {
18254
    }
18255
 
18256
    public createPurchaseForOurExtBilling_result(
18257
      long success)
18258
    {
18259
      this();
18260
      this.success = success;
18261
      setSuccessIsSet(true);
18262
    }
18263
 
18264
    /**
18265
     * Performs a deep copy on <i>other</i>.
18266
     */
18267
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18268
      __isset_bit_vector.clear();
18269
      __isset_bit_vector.or(other.__isset_bit_vector);
18270
      this.success = other.success;
18271
    }
18272
 
18273
    public createPurchaseForOurExtBilling_result deepCopy() {
18274
      return new createPurchaseForOurExtBilling_result(this);
18275
    }
18276
 
18277
    @Override
18278
    public void clear() {
18279
      setSuccessIsSet(false);
18280
      this.success = 0;
18281
    }
18282
 
18283
    public long getSuccess() {
18284
      return this.success;
18285
    }
18286
 
18287
    public void setSuccess(long success) {
18288
      this.success = success;
18289
      setSuccessIsSet(true);
18290
    }
18291
 
18292
    public void unsetSuccess() {
18293
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18294
    }
18295
 
18296
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18297
    public boolean isSetSuccess() {
18298
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18299
    }
18300
 
18301
    public void setSuccessIsSet(boolean value) {
18302
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18303
    }
18304
 
18305
    public void setFieldValue(_Fields field, Object value) {
18306
      switch (field) {
18307
      case SUCCESS:
18308
        if (value == null) {
18309
          unsetSuccess();
18310
        } else {
18311
          setSuccess((Long)value);
18312
        }
18313
        break;
18314
 
18315
      }
18316
    }
18317
 
18318
    public Object getFieldValue(_Fields field) {
18319
      switch (field) {
18320
      case SUCCESS:
18321
        return Long.valueOf(getSuccess());
18322
 
18323
      }
18324
      throw new IllegalStateException();
18325
    }
18326
 
18327
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18328
    public boolean isSet(_Fields field) {
18329
      if (field == null) {
18330
        throw new IllegalArgumentException();
18331
      }
18332
 
18333
      switch (field) {
18334
      case SUCCESS:
18335
        return isSetSuccess();
18336
      }
18337
      throw new IllegalStateException();
18338
    }
18339
 
18340
    @Override
18341
    public boolean equals(Object that) {
18342
      if (that == null)
18343
        return false;
18344
      if (that instanceof createPurchaseForOurExtBilling_result)
18345
        return this.equals((createPurchaseForOurExtBilling_result)that);
18346
      return false;
18347
    }
18348
 
18349
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18350
      if (that == null)
18351
        return false;
18352
 
18353
      boolean this_present_success = true;
18354
      boolean that_present_success = true;
18355
      if (this_present_success || that_present_success) {
18356
        if (!(this_present_success && that_present_success))
18357
          return false;
18358
        if (this.success != that.success)
18359
          return false;
18360
      }
18361
 
18362
      return true;
18363
    }
18364
 
18365
    @Override
18366
    public int hashCode() {
18367
      return 0;
18368
    }
18369
 
18370
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18371
      if (!getClass().equals(other.getClass())) {
18372
        return getClass().getName().compareTo(other.getClass().getName());
18373
      }
18374
 
18375
      int lastComparison = 0;
18376
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
18377
 
18378
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18379
      if (lastComparison != 0) {
18380
        return lastComparison;
18381
      }
18382
      if (isSetSuccess()) {
18383
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18384
        if (lastComparison != 0) {
18385
          return lastComparison;
18386
        }
18387
      }
18388
      return 0;
18389
    }
18390
 
18391
    public _Fields fieldForId(int fieldId) {
18392
      return _Fields.findByThriftId(fieldId);
18393
    }
18394
 
18395
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18396
      org.apache.thrift.protocol.TField field;
18397
      iprot.readStructBegin();
18398
      while (true)
18399
      {
18400
        field = iprot.readFieldBegin();
18401
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18402
          break;
18403
        }
18404
        switch (field.id) {
18405
          case 0: // SUCCESS
18406
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18407
              this.success = iprot.readI64();
18408
              setSuccessIsSet(true);
18409
            } else { 
18410
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18411
            }
18412
            break;
18413
          default:
18414
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18415
        }
18416
        iprot.readFieldEnd();
18417
      }
18418
      iprot.readStructEnd();
18419
      validate();
18420
    }
18421
 
18422
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18423
      oprot.writeStructBegin(STRUCT_DESC);
18424
 
18425
      if (this.isSetSuccess()) {
18426
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18427
        oprot.writeI64(this.success);
18428
        oprot.writeFieldEnd();
18429
      }
18430
      oprot.writeFieldStop();
18431
      oprot.writeStructEnd();
18432
    }
18433
 
18434
    @Override
18435
    public String toString() {
18436
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
18437
      boolean first = true;
18438
 
18439
      sb.append("success:");
18440
      sb.append(this.success);
18441
      first = false;
18442
      sb.append(")");
18443
      return sb.toString();
18444
    }
18445
 
18446
    public void validate() throws org.apache.thrift.TException {
18447
      // check for required fields
18448
    }
18449
 
18450
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18451
      try {
18452
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18453
      } catch (org.apache.thrift.TException te) {
18454
        throw new java.io.IOException(te);
18455
      }
18456
    }
18457
 
18458
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18459
      try {
18460
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18461
      } catch (org.apache.thrift.TException te) {
18462
        throw new java.io.IOException(te);
18463
      }
18464
    }
18465
 
18466
  }
18467
 
18468
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18469
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
18470
 
18471
    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);
18472
    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);
18473
 
18474
    private long itemId; // required
18475
    private long quantity; // required
18476
 
18477
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18478
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18479
      ITEM_ID((short)1, "itemId"),
18480
      QUANTITY((short)2, "quantity");
18481
 
18482
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18483
 
18484
      static {
18485
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18486
          byName.put(field.getFieldName(), field);
18487
        }
18488
      }
18489
 
18490
      /**
18491
       * Find the _Fields constant that matches fieldId, or null if its not found.
18492
       */
18493
      public static _Fields findByThriftId(int fieldId) {
18494
        switch(fieldId) {
18495
          case 1: // ITEM_ID
18496
            return ITEM_ID;
18497
          case 2: // QUANTITY
18498
            return QUANTITY;
18499
          default:
18500
            return null;
18501
        }
18502
      }
18503
 
18504
      /**
18505
       * Find the _Fields constant that matches fieldId, throwing an exception
18506
       * if it is not found.
18507
       */
18508
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18509
        _Fields fields = findByThriftId(fieldId);
18510
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18511
        return fields;
18512
      }
18513
 
18514
      /**
18515
       * Find the _Fields constant that matches name, or null if its not found.
18516
       */
18517
      public static _Fields findByName(String name) {
18518
        return byName.get(name);
18519
      }
18520
 
18521
      private final short _thriftId;
18522
      private final String _fieldName;
18523
 
18524
      _Fields(short thriftId, String fieldName) {
18525
        _thriftId = thriftId;
18526
        _fieldName = fieldName;
18527
      }
18528
 
18529
      public short getThriftFieldId() {
18530
        return _thriftId;
18531
      }
18532
 
18533
      public String getFieldName() {
18534
        return _fieldName;
18535
      }
18536
    }
18537
 
18538
    // isset id assignments
18539
    private static final int __ITEMID_ISSET_ID = 0;
18540
    private static final int __QUANTITY_ISSET_ID = 1;
18541
    private BitSet __isset_bit_vector = new BitSet(2);
18542
 
18543
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18544
    static {
18545
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18546
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18547
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18548
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18549
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18550
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18551
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
18552
    }
18553
 
18554
    public fulfillPOForExtBilling_args() {
18555
    }
18556
 
18557
    public fulfillPOForExtBilling_args(
18558
      long itemId,
18559
      long quantity)
18560
    {
18561
      this();
18562
      this.itemId = itemId;
18563
      setItemIdIsSet(true);
18564
      this.quantity = quantity;
18565
      setQuantityIsSet(true);
18566
    }
18567
 
18568
    /**
18569
     * Performs a deep copy on <i>other</i>.
18570
     */
18571
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
18572
      __isset_bit_vector.clear();
18573
      __isset_bit_vector.or(other.__isset_bit_vector);
18574
      this.itemId = other.itemId;
18575
      this.quantity = other.quantity;
18576
    }
18577
 
18578
    public fulfillPOForExtBilling_args deepCopy() {
18579
      return new fulfillPOForExtBilling_args(this);
18580
    }
18581
 
18582
    @Override
18583
    public void clear() {
18584
      setItemIdIsSet(false);
18585
      this.itemId = 0;
18586
      setQuantityIsSet(false);
18587
      this.quantity = 0;
18588
    }
18589
 
18590
    public long getItemId() {
18591
      return this.itemId;
18592
    }
18593
 
18594
    public void setItemId(long itemId) {
18595
      this.itemId = itemId;
18596
      setItemIdIsSet(true);
18597
    }
18598
 
18599
    public void unsetItemId() {
18600
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18601
    }
18602
 
18603
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18604
    public boolean isSetItemId() {
18605
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18606
    }
18607
 
18608
    public void setItemIdIsSet(boolean value) {
18609
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18610
    }
18611
 
18612
    public long getQuantity() {
18613
      return this.quantity;
18614
    }
18615
 
18616
    public void setQuantity(long quantity) {
18617
      this.quantity = quantity;
18618
      setQuantityIsSet(true);
18619
    }
18620
 
18621
    public void unsetQuantity() {
18622
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18623
    }
18624
 
18625
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
18626
    public boolean isSetQuantity() {
18627
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18628
    }
18629
 
18630
    public void setQuantityIsSet(boolean value) {
18631
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18632
    }
18633
 
18634
    public void setFieldValue(_Fields field, Object value) {
18635
      switch (field) {
18636
      case ITEM_ID:
18637
        if (value == null) {
18638
          unsetItemId();
18639
        } else {
18640
          setItemId((Long)value);
18641
        }
18642
        break;
18643
 
18644
      case QUANTITY:
18645
        if (value == null) {
18646
          unsetQuantity();
18647
        } else {
18648
          setQuantity((Long)value);
18649
        }
18650
        break;
18651
 
18652
      }
18653
    }
18654
 
18655
    public Object getFieldValue(_Fields field) {
18656
      switch (field) {
18657
      case ITEM_ID:
18658
        return Long.valueOf(getItemId());
18659
 
18660
      case QUANTITY:
18661
        return Long.valueOf(getQuantity());
18662
 
18663
      }
18664
      throw new IllegalStateException();
18665
    }
18666
 
18667
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18668
    public boolean isSet(_Fields field) {
18669
      if (field == null) {
18670
        throw new IllegalArgumentException();
18671
      }
18672
 
18673
      switch (field) {
18674
      case ITEM_ID:
18675
        return isSetItemId();
18676
      case QUANTITY:
18677
        return isSetQuantity();
18678
      }
18679
      throw new IllegalStateException();
18680
    }
18681
 
18682
    @Override
18683
    public boolean equals(Object that) {
18684
      if (that == null)
18685
        return false;
18686
      if (that instanceof fulfillPOForExtBilling_args)
18687
        return this.equals((fulfillPOForExtBilling_args)that);
18688
      return false;
18689
    }
18690
 
18691
    public boolean equals(fulfillPOForExtBilling_args that) {
18692
      if (that == null)
18693
        return false;
18694
 
18695
      boolean this_present_itemId = true;
18696
      boolean that_present_itemId = true;
18697
      if (this_present_itemId || that_present_itemId) {
18698
        if (!(this_present_itemId && that_present_itemId))
18699
          return false;
18700
        if (this.itemId != that.itemId)
18701
          return false;
18702
      }
18703
 
18704
      boolean this_present_quantity = true;
18705
      boolean that_present_quantity = true;
18706
      if (this_present_quantity || that_present_quantity) {
18707
        if (!(this_present_quantity && that_present_quantity))
18708
          return false;
18709
        if (this.quantity != that.quantity)
18710
          return false;
18711
      }
18712
 
18713
      return true;
18714
    }
18715
 
18716
    @Override
18717
    public int hashCode() {
18718
      return 0;
18719
    }
18720
 
18721
    public int compareTo(fulfillPOForExtBilling_args other) {
18722
      if (!getClass().equals(other.getClass())) {
18723
        return getClass().getName().compareTo(other.getClass().getName());
18724
      }
18725
 
18726
      int lastComparison = 0;
18727
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
18728
 
18729
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18730
      if (lastComparison != 0) {
18731
        return lastComparison;
18732
      }
18733
      if (isSetItemId()) {
18734
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18735
        if (lastComparison != 0) {
18736
          return lastComparison;
18737
        }
18738
      }
18739
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
18740
      if (lastComparison != 0) {
18741
        return lastComparison;
18742
      }
18743
      if (isSetQuantity()) {
18744
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
18745
        if (lastComparison != 0) {
18746
          return lastComparison;
18747
        }
18748
      }
18749
      return 0;
18750
    }
18751
 
18752
    public _Fields fieldForId(int fieldId) {
18753
      return _Fields.findByThriftId(fieldId);
18754
    }
18755
 
18756
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18757
      org.apache.thrift.protocol.TField field;
18758
      iprot.readStructBegin();
18759
      while (true)
18760
      {
18761
        field = iprot.readFieldBegin();
18762
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18763
          break;
18764
        }
18765
        switch (field.id) {
18766
          case 1: // ITEM_ID
18767
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18768
              this.itemId = iprot.readI64();
18769
              setItemIdIsSet(true);
18770
            } else { 
18771
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18772
            }
18773
            break;
18774
          case 2: // QUANTITY
18775
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18776
              this.quantity = iprot.readI64();
18777
              setQuantityIsSet(true);
18778
            } else { 
18779
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18780
            }
18781
            break;
18782
          default:
18783
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18784
        }
18785
        iprot.readFieldEnd();
18786
      }
18787
      iprot.readStructEnd();
18788
      validate();
18789
    }
18790
 
18791
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18792
      validate();
18793
 
18794
      oprot.writeStructBegin(STRUCT_DESC);
18795
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18796
      oprot.writeI64(this.itemId);
18797
      oprot.writeFieldEnd();
18798
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
18799
      oprot.writeI64(this.quantity);
18800
      oprot.writeFieldEnd();
18801
      oprot.writeFieldStop();
18802
      oprot.writeStructEnd();
18803
    }
18804
 
18805
    @Override
18806
    public String toString() {
18807
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
18808
      boolean first = true;
18809
 
18810
      sb.append("itemId:");
18811
      sb.append(this.itemId);
18812
      first = false;
18813
      if (!first) sb.append(", ");
18814
      sb.append("quantity:");
18815
      sb.append(this.quantity);
18816
      first = false;
18817
      sb.append(")");
18818
      return sb.toString();
18819
    }
18820
 
18821
    public void validate() throws org.apache.thrift.TException {
18822
      // check for required fields
18823
    }
18824
 
18825
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18826
      try {
18827
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18828
      } catch (org.apache.thrift.TException te) {
18829
        throw new java.io.IOException(te);
18830
      }
18831
    }
18832
 
18833
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18834
      try {
18835
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18836
        __isset_bit_vector = new BitSet(1);
18837
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18838
      } catch (org.apache.thrift.TException te) {
18839
        throw new java.io.IOException(te);
18840
      }
18841
    }
18842
 
18843
  }
18844
 
18845
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18846
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
18847
 
18848
 
18849
 
18850
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18851
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18852
;
18853
 
18854
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18855
 
18856
      static {
18857
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18858
          byName.put(field.getFieldName(), field);
18859
        }
18860
      }
18861
 
18862
      /**
18863
       * Find the _Fields constant that matches fieldId, or null if its not found.
18864
       */
18865
      public static _Fields findByThriftId(int fieldId) {
18866
        switch(fieldId) {
18867
          default:
18868
            return null;
18869
        }
18870
      }
18871
 
18872
      /**
18873
       * Find the _Fields constant that matches fieldId, throwing an exception
18874
       * if it is not found.
18875
       */
18876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18877
        _Fields fields = findByThriftId(fieldId);
18878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18879
        return fields;
18880
      }
18881
 
18882
      /**
18883
       * Find the _Fields constant that matches name, or null if its not found.
18884
       */
18885
      public static _Fields findByName(String name) {
18886
        return byName.get(name);
18887
      }
18888
 
18889
      private final short _thriftId;
18890
      private final String _fieldName;
18891
 
18892
      _Fields(short thriftId, String fieldName) {
18893
        _thriftId = thriftId;
18894
        _fieldName = fieldName;
18895
      }
18896
 
18897
      public short getThriftFieldId() {
18898
        return _thriftId;
18899
      }
18900
 
18901
      public String getFieldName() {
18902
        return _fieldName;
18903
      }
18904
    }
18905
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18906
    static {
18907
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18908
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18909
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
18910
    }
18911
 
18912
    public fulfillPOForExtBilling_result() {
18913
    }
18914
 
18915
    /**
18916
     * Performs a deep copy on <i>other</i>.
18917
     */
18918
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
18919
    }
18920
 
18921
    public fulfillPOForExtBilling_result deepCopy() {
18922
      return new fulfillPOForExtBilling_result(this);
18923
    }
18924
 
18925
    @Override
18926
    public void clear() {
18927
    }
18928
 
18929
    public void setFieldValue(_Fields field, Object value) {
18930
      switch (field) {
18931
      }
18932
    }
18933
 
18934
    public Object getFieldValue(_Fields field) {
18935
      switch (field) {
18936
      }
18937
      throw new IllegalStateException();
18938
    }
18939
 
18940
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18941
    public boolean isSet(_Fields field) {
18942
      if (field == null) {
18943
        throw new IllegalArgumentException();
18944
      }
18945
 
18946
      switch (field) {
18947
      }
18948
      throw new IllegalStateException();
18949
    }
18950
 
18951
    @Override
18952
    public boolean equals(Object that) {
18953
      if (that == null)
18954
        return false;
18955
      if (that instanceof fulfillPOForExtBilling_result)
18956
        return this.equals((fulfillPOForExtBilling_result)that);
18957
      return false;
18958
    }
18959
 
18960
    public boolean equals(fulfillPOForExtBilling_result that) {
18961
      if (that == null)
18962
        return false;
18963
 
18964
      return true;
18965
    }
18966
 
18967
    @Override
18968
    public int hashCode() {
18969
      return 0;
18970
    }
18971
 
18972
    public int compareTo(fulfillPOForExtBilling_result other) {
18973
      if (!getClass().equals(other.getClass())) {
18974
        return getClass().getName().compareTo(other.getClass().getName());
18975
      }
18976
 
18977
      int lastComparison = 0;
18978
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
18979
 
18980
      return 0;
18981
    }
18982
 
18983
    public _Fields fieldForId(int fieldId) {
18984
      return _Fields.findByThriftId(fieldId);
18985
    }
18986
 
18987
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18988
      org.apache.thrift.protocol.TField field;
18989
      iprot.readStructBegin();
18990
      while (true)
18991
      {
18992
        field = iprot.readFieldBegin();
18993
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18994
          break;
18995
        }
18996
        switch (field.id) {
18997
          default:
18998
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18999
        }
19000
        iprot.readFieldEnd();
19001
      }
19002
      iprot.readStructEnd();
19003
      validate();
19004
    }
19005
 
19006
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19007
      oprot.writeStructBegin(STRUCT_DESC);
19008
 
19009
      oprot.writeFieldStop();
19010
      oprot.writeStructEnd();
19011
    }
19012
 
19013
    @Override
19014
    public String toString() {
19015
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19016
      boolean first = true;
19017
 
19018
      sb.append(")");
19019
      return sb.toString();
19020
    }
19021
 
19022
    public void validate() throws org.apache.thrift.TException {
19023
      // check for required fields
19024
    }
19025
 
19026
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19027
      try {
19028
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19029
      } catch (org.apache.thrift.TException te) {
19030
        throw new java.io.IOException(te);
19031
      }
19032
    }
19033
 
19034
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19035
      try {
19036
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19037
      } catch (org.apache.thrift.TException te) {
19038
        throw new java.io.IOException(te);
19039
      }
19040
    }
19041
 
19042
  }
19043
 
7410 amar.kumar 19044
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19045
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19046
 
19047
    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);
19048
 
19049
    private long poId; // required
19050
 
19051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19052
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19053
      PO_ID((short)1, "poId");
19054
 
19055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19056
 
19057
      static {
19058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19059
          byName.put(field.getFieldName(), field);
19060
        }
19061
      }
19062
 
19063
      /**
19064
       * Find the _Fields constant that matches fieldId, or null if its not found.
19065
       */
19066
      public static _Fields findByThriftId(int fieldId) {
19067
        switch(fieldId) {
19068
          case 1: // PO_ID
19069
            return PO_ID;
19070
          default:
19071
            return null;
19072
        }
19073
      }
19074
 
19075
      /**
19076
       * Find the _Fields constant that matches fieldId, throwing an exception
19077
       * if it is not found.
19078
       */
19079
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19080
        _Fields fields = findByThriftId(fieldId);
19081
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19082
        return fields;
19083
      }
19084
 
19085
      /**
19086
       * Find the _Fields constant that matches name, or null if its not found.
19087
       */
19088
      public static _Fields findByName(String name) {
19089
        return byName.get(name);
19090
      }
19091
 
19092
      private final short _thriftId;
19093
      private final String _fieldName;
19094
 
19095
      _Fields(short thriftId, String fieldName) {
19096
        _thriftId = thriftId;
19097
        _fieldName = fieldName;
19098
      }
19099
 
19100
      public short getThriftFieldId() {
19101
        return _thriftId;
19102
      }
19103
 
19104
      public String getFieldName() {
19105
        return _fieldName;
19106
      }
19107
    }
19108
 
19109
    // isset id assignments
19110
    private static final int __POID_ISSET_ID = 0;
19111
    private BitSet __isset_bit_vector = new BitSet(1);
19112
 
19113
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19114
    static {
19115
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19116
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19117
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19118
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19119
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19120
    }
19121
 
19122
    public closePO_args() {
19123
    }
19124
 
19125
    public closePO_args(
19126
      long poId)
19127
    {
19128
      this();
19129
      this.poId = poId;
19130
      setPoIdIsSet(true);
19131
    }
19132
 
19133
    /**
19134
     * Performs a deep copy on <i>other</i>.
19135
     */
19136
    public closePO_args(closePO_args other) {
19137
      __isset_bit_vector.clear();
19138
      __isset_bit_vector.or(other.__isset_bit_vector);
19139
      this.poId = other.poId;
19140
    }
19141
 
19142
    public closePO_args deepCopy() {
19143
      return new closePO_args(this);
19144
    }
19145
 
19146
    @Override
19147
    public void clear() {
19148
      setPoIdIsSet(false);
19149
      this.poId = 0;
19150
    }
19151
 
19152
    public long getPoId() {
19153
      return this.poId;
19154
    }
19155
 
19156
    public void setPoId(long poId) {
19157
      this.poId = poId;
19158
      setPoIdIsSet(true);
19159
    }
19160
 
19161
    public void unsetPoId() {
19162
      __isset_bit_vector.clear(__POID_ISSET_ID);
19163
    }
19164
 
19165
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19166
    public boolean isSetPoId() {
19167
      return __isset_bit_vector.get(__POID_ISSET_ID);
19168
    }
19169
 
19170
    public void setPoIdIsSet(boolean value) {
19171
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19172
    }
19173
 
19174
    public void setFieldValue(_Fields field, Object value) {
19175
      switch (field) {
19176
      case PO_ID:
19177
        if (value == null) {
19178
          unsetPoId();
19179
        } else {
19180
          setPoId((Long)value);
19181
        }
19182
        break;
19183
 
19184
      }
19185
    }
19186
 
19187
    public Object getFieldValue(_Fields field) {
19188
      switch (field) {
19189
      case PO_ID:
19190
        return Long.valueOf(getPoId());
19191
 
19192
      }
19193
      throw new IllegalStateException();
19194
    }
19195
 
19196
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19197
    public boolean isSet(_Fields field) {
19198
      if (field == null) {
19199
        throw new IllegalArgumentException();
19200
      }
19201
 
19202
      switch (field) {
19203
      case PO_ID:
19204
        return isSetPoId();
19205
      }
19206
      throw new IllegalStateException();
19207
    }
19208
 
19209
    @Override
19210
    public boolean equals(Object that) {
19211
      if (that == null)
19212
        return false;
19213
      if (that instanceof closePO_args)
19214
        return this.equals((closePO_args)that);
19215
      return false;
19216
    }
19217
 
19218
    public boolean equals(closePO_args that) {
19219
      if (that == null)
19220
        return false;
19221
 
19222
      boolean this_present_poId = true;
19223
      boolean that_present_poId = true;
19224
      if (this_present_poId || that_present_poId) {
19225
        if (!(this_present_poId && that_present_poId))
19226
          return false;
19227
        if (this.poId != that.poId)
19228
          return false;
19229
      }
19230
 
19231
      return true;
19232
    }
19233
 
19234
    @Override
19235
    public int hashCode() {
19236
      return 0;
19237
    }
19238
 
19239
    public int compareTo(closePO_args other) {
19240
      if (!getClass().equals(other.getClass())) {
19241
        return getClass().getName().compareTo(other.getClass().getName());
19242
      }
19243
 
19244
      int lastComparison = 0;
19245
      closePO_args typedOther = (closePO_args)other;
19246
 
19247
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19248
      if (lastComparison != 0) {
19249
        return lastComparison;
19250
      }
19251
      if (isSetPoId()) {
19252
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19253
        if (lastComparison != 0) {
19254
          return lastComparison;
19255
        }
19256
      }
19257
      return 0;
19258
    }
19259
 
19260
    public _Fields fieldForId(int fieldId) {
19261
      return _Fields.findByThriftId(fieldId);
19262
    }
19263
 
19264
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19265
      org.apache.thrift.protocol.TField field;
19266
      iprot.readStructBegin();
19267
      while (true)
19268
      {
19269
        field = iprot.readFieldBegin();
19270
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19271
          break;
19272
        }
19273
        switch (field.id) {
19274
          case 1: // PO_ID
19275
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19276
              this.poId = iprot.readI64();
19277
              setPoIdIsSet(true);
19278
            } else { 
19279
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19280
            }
19281
            break;
19282
          default:
19283
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19284
        }
19285
        iprot.readFieldEnd();
19286
      }
19287
      iprot.readStructEnd();
19288
      validate();
19289
    }
19290
 
19291
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19292
      validate();
19293
 
19294
      oprot.writeStructBegin(STRUCT_DESC);
19295
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19296
      oprot.writeI64(this.poId);
19297
      oprot.writeFieldEnd();
19298
      oprot.writeFieldStop();
19299
      oprot.writeStructEnd();
19300
    }
19301
 
19302
    @Override
19303
    public String toString() {
19304
      StringBuilder sb = new StringBuilder("closePO_args(");
19305
      boolean first = true;
19306
 
19307
      sb.append("poId:");
19308
      sb.append(this.poId);
19309
      first = false;
19310
      sb.append(")");
19311
      return sb.toString();
19312
    }
19313
 
19314
    public void validate() throws org.apache.thrift.TException {
19315
      // check for required fields
19316
    }
19317
 
19318
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19319
      try {
19320
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19321
      } catch (org.apache.thrift.TException te) {
19322
        throw new java.io.IOException(te);
19323
      }
19324
    }
19325
 
19326
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19327
      try {
19328
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19329
      } catch (org.apache.thrift.TException te) {
19330
        throw new java.io.IOException(te);
19331
      }
19332
    }
19333
 
19334
  }
19335
 
19336
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19337
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19338
 
19339
    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);
19340
 
19341
    private PurchaseServiceException e; // required
19342
 
19343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19344
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19345
      E((short)1, "e");
19346
 
19347
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19348
 
19349
      static {
19350
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19351
          byName.put(field.getFieldName(), field);
19352
        }
19353
      }
19354
 
19355
      /**
19356
       * Find the _Fields constant that matches fieldId, or null if its not found.
19357
       */
19358
      public static _Fields findByThriftId(int fieldId) {
19359
        switch(fieldId) {
19360
          case 1: // E
19361
            return E;
19362
          default:
19363
            return null;
19364
        }
19365
      }
19366
 
19367
      /**
19368
       * Find the _Fields constant that matches fieldId, throwing an exception
19369
       * if it is not found.
19370
       */
19371
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19372
        _Fields fields = findByThriftId(fieldId);
19373
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19374
        return fields;
19375
      }
19376
 
19377
      /**
19378
       * Find the _Fields constant that matches name, or null if its not found.
19379
       */
19380
      public static _Fields findByName(String name) {
19381
        return byName.get(name);
19382
      }
19383
 
19384
      private final short _thriftId;
19385
      private final String _fieldName;
19386
 
19387
      _Fields(short thriftId, String fieldName) {
19388
        _thriftId = thriftId;
19389
        _fieldName = fieldName;
19390
      }
19391
 
19392
      public short getThriftFieldId() {
19393
        return _thriftId;
19394
      }
19395
 
19396
      public String getFieldName() {
19397
        return _fieldName;
19398
      }
19399
    }
19400
 
19401
    // isset id assignments
19402
 
19403
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19404
    static {
19405
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19406
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19407
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19408
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19409
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
19410
    }
19411
 
19412
    public closePO_result() {
19413
    }
19414
 
19415
    public closePO_result(
19416
      PurchaseServiceException e)
19417
    {
19418
      this();
19419
      this.e = e;
19420
    }
19421
 
19422
    /**
19423
     * Performs a deep copy on <i>other</i>.
19424
     */
19425
    public closePO_result(closePO_result other) {
19426
      if (other.isSetE()) {
19427
        this.e = new PurchaseServiceException(other.e);
19428
      }
19429
    }
19430
 
19431
    public closePO_result deepCopy() {
19432
      return new closePO_result(this);
19433
    }
19434
 
19435
    @Override
19436
    public void clear() {
19437
      this.e = null;
19438
    }
19439
 
19440
    public PurchaseServiceException getE() {
19441
      return this.e;
19442
    }
19443
 
19444
    public void setE(PurchaseServiceException e) {
19445
      this.e = e;
19446
    }
19447
 
19448
    public void unsetE() {
19449
      this.e = null;
19450
    }
19451
 
19452
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
19453
    public boolean isSetE() {
19454
      return this.e != null;
19455
    }
19456
 
19457
    public void setEIsSet(boolean value) {
19458
      if (!value) {
19459
        this.e = null;
19460
      }
19461
    }
19462
 
19463
    public void setFieldValue(_Fields field, Object value) {
19464
      switch (field) {
19465
      case E:
19466
        if (value == null) {
19467
          unsetE();
19468
        } else {
19469
          setE((PurchaseServiceException)value);
19470
        }
19471
        break;
19472
 
19473
      }
19474
    }
19475
 
19476
    public Object getFieldValue(_Fields field) {
19477
      switch (field) {
19478
      case E:
19479
        return getE();
19480
 
19481
      }
19482
      throw new IllegalStateException();
19483
    }
19484
 
19485
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19486
    public boolean isSet(_Fields field) {
19487
      if (field == null) {
19488
        throw new IllegalArgumentException();
19489
      }
19490
 
19491
      switch (field) {
19492
      case E:
19493
        return isSetE();
19494
      }
19495
      throw new IllegalStateException();
19496
    }
19497
 
19498
    @Override
19499
    public boolean equals(Object that) {
19500
      if (that == null)
19501
        return false;
19502
      if (that instanceof closePO_result)
19503
        return this.equals((closePO_result)that);
19504
      return false;
19505
    }
19506
 
19507
    public boolean equals(closePO_result that) {
19508
      if (that == null)
19509
        return false;
19510
 
19511
      boolean this_present_e = true && this.isSetE();
19512
      boolean that_present_e = true && that.isSetE();
19513
      if (this_present_e || that_present_e) {
19514
        if (!(this_present_e && that_present_e))
19515
          return false;
19516
        if (!this.e.equals(that.e))
19517
          return false;
19518
      }
19519
 
19520
      return true;
19521
    }
19522
 
19523
    @Override
19524
    public int hashCode() {
19525
      return 0;
19526
    }
19527
 
19528
    public int compareTo(closePO_result other) {
19529
      if (!getClass().equals(other.getClass())) {
19530
        return getClass().getName().compareTo(other.getClass().getName());
19531
      }
19532
 
19533
      int lastComparison = 0;
19534
      closePO_result typedOther = (closePO_result)other;
19535
 
19536
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
19537
      if (lastComparison != 0) {
19538
        return lastComparison;
19539
      }
19540
      if (isSetE()) {
19541
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
19542
        if (lastComparison != 0) {
19543
          return lastComparison;
19544
        }
19545
      }
19546
      return 0;
19547
    }
19548
 
19549
    public _Fields fieldForId(int fieldId) {
19550
      return _Fields.findByThriftId(fieldId);
19551
    }
19552
 
19553
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19554
      org.apache.thrift.protocol.TField field;
19555
      iprot.readStructBegin();
19556
      while (true)
19557
      {
19558
        field = iprot.readFieldBegin();
19559
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19560
          break;
19561
        }
19562
        switch (field.id) {
19563
          case 1: // E
19564
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19565
              this.e = new PurchaseServiceException();
19566
              this.e.read(iprot);
19567
            } else { 
19568
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19569
            }
19570
            break;
19571
          default:
19572
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19573
        }
19574
        iprot.readFieldEnd();
19575
      }
19576
      iprot.readStructEnd();
19577
      validate();
19578
    }
19579
 
19580
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19581
      oprot.writeStructBegin(STRUCT_DESC);
19582
 
19583
      if (this.isSetE()) {
19584
        oprot.writeFieldBegin(E_FIELD_DESC);
19585
        this.e.write(oprot);
19586
        oprot.writeFieldEnd();
19587
      }
19588
      oprot.writeFieldStop();
19589
      oprot.writeStructEnd();
19590
    }
19591
 
19592
    @Override
19593
    public String toString() {
19594
      StringBuilder sb = new StringBuilder("closePO_result(");
19595
      boolean first = true;
19596
 
19597
      sb.append("e:");
19598
      if (this.e == null) {
19599
        sb.append("null");
19600
      } else {
19601
        sb.append(this.e);
19602
      }
19603
      first = false;
19604
      sb.append(")");
19605
      return sb.toString();
19606
    }
19607
 
19608
    public void validate() throws org.apache.thrift.TException {
19609
      // check for required fields
19610
    }
19611
 
19612
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19613
      try {
19614
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19615
      } catch (org.apache.thrift.TException te) {
19616
        throw new java.io.IOException(te);
19617
      }
19618
    }
19619
 
19620
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19621
      try {
19622
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19623
      } catch (org.apache.thrift.TException te) {
19624
        throw new java.io.IOException(te);
19625
      }
19626
    }
19627
 
19628
  }
19629
 
19630
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
19631
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
19632
 
19633
    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);
19634
    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);
19635
 
19636
    private String invoiceNumber; // required
19637
    private long supplierId; // required
19638
 
19639
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19640
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19641
      INVOICE_NUMBER((short)1, "invoiceNumber"),
19642
      SUPPLIER_ID((short)2, "supplierId");
19643
 
19644
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19645
 
19646
      static {
19647
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19648
          byName.put(field.getFieldName(), field);
19649
        }
19650
      }
19651
 
19652
      /**
19653
       * Find the _Fields constant that matches fieldId, or null if its not found.
19654
       */
19655
      public static _Fields findByThriftId(int fieldId) {
19656
        switch(fieldId) {
19657
          case 1: // INVOICE_NUMBER
19658
            return INVOICE_NUMBER;
19659
          case 2: // SUPPLIER_ID
19660
            return SUPPLIER_ID;
19661
          default:
19662
            return null;
19663
        }
19664
      }
19665
 
19666
      /**
19667
       * Find the _Fields constant that matches fieldId, throwing an exception
19668
       * if it is not found.
19669
       */
19670
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19671
        _Fields fields = findByThriftId(fieldId);
19672
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19673
        return fields;
19674
      }
19675
 
19676
      /**
19677
       * Find the _Fields constant that matches name, or null if its not found.
19678
       */
19679
      public static _Fields findByName(String name) {
19680
        return byName.get(name);
19681
      }
19682
 
19683
      private final short _thriftId;
19684
      private final String _fieldName;
19685
 
19686
      _Fields(short thriftId, String fieldName) {
19687
        _thriftId = thriftId;
19688
        _fieldName = fieldName;
19689
      }
19690
 
19691
      public short getThriftFieldId() {
19692
        return _thriftId;
19693
      }
19694
 
19695
      public String getFieldName() {
19696
        return _fieldName;
19697
      }
19698
    }
19699
 
19700
    // isset id assignments
19701
    private static final int __SUPPLIERID_ISSET_ID = 0;
19702
    private BitSet __isset_bit_vector = new BitSet(1);
19703
 
19704
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19705
    static {
19706
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19707
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19708
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19709
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19710
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19711
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19712
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
19713
    }
19714
 
19715
    public isInvoiceReceived_args() {
19716
    }
19717
 
19718
    public isInvoiceReceived_args(
19719
      String invoiceNumber,
19720
      long supplierId)
19721
    {
19722
      this();
19723
      this.invoiceNumber = invoiceNumber;
19724
      this.supplierId = supplierId;
19725
      setSupplierIdIsSet(true);
19726
    }
19727
 
19728
    /**
19729
     * Performs a deep copy on <i>other</i>.
19730
     */
19731
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
19732
      __isset_bit_vector.clear();
19733
      __isset_bit_vector.or(other.__isset_bit_vector);
19734
      if (other.isSetInvoiceNumber()) {
19735
        this.invoiceNumber = other.invoiceNumber;
19736
      }
19737
      this.supplierId = other.supplierId;
19738
    }
19739
 
19740
    public isInvoiceReceived_args deepCopy() {
19741
      return new isInvoiceReceived_args(this);
19742
    }
19743
 
19744
    @Override
19745
    public void clear() {
19746
      this.invoiceNumber = null;
19747
      setSupplierIdIsSet(false);
19748
      this.supplierId = 0;
19749
    }
19750
 
19751
    public String getInvoiceNumber() {
19752
      return this.invoiceNumber;
19753
    }
19754
 
19755
    public void setInvoiceNumber(String invoiceNumber) {
19756
      this.invoiceNumber = invoiceNumber;
19757
    }
19758
 
19759
    public void unsetInvoiceNumber() {
19760
      this.invoiceNumber = null;
19761
    }
19762
 
19763
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19764
    public boolean isSetInvoiceNumber() {
19765
      return this.invoiceNumber != null;
19766
    }
19767
 
19768
    public void setInvoiceNumberIsSet(boolean value) {
19769
      if (!value) {
19770
        this.invoiceNumber = null;
19771
      }
19772
    }
19773
 
19774
    public long getSupplierId() {
19775
      return this.supplierId;
19776
    }
19777
 
19778
    public void setSupplierId(long supplierId) {
19779
      this.supplierId = supplierId;
19780
      setSupplierIdIsSet(true);
19781
    }
19782
 
19783
    public void unsetSupplierId() {
19784
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
19785
    }
19786
 
19787
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
19788
    public boolean isSetSupplierId() {
19789
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
19790
    }
19791
 
19792
    public void setSupplierIdIsSet(boolean value) {
19793
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
19794
    }
19795
 
19796
    public void setFieldValue(_Fields field, Object value) {
19797
      switch (field) {
19798
      case INVOICE_NUMBER:
19799
        if (value == null) {
19800
          unsetInvoiceNumber();
19801
        } else {
19802
          setInvoiceNumber((String)value);
19803
        }
19804
        break;
19805
 
19806
      case SUPPLIER_ID:
19807
        if (value == null) {
19808
          unsetSupplierId();
19809
        } else {
19810
          setSupplierId((Long)value);
19811
        }
19812
        break;
19813
 
19814
      }
19815
    }
19816
 
19817
    public Object getFieldValue(_Fields field) {
19818
      switch (field) {
19819
      case INVOICE_NUMBER:
19820
        return getInvoiceNumber();
19821
 
19822
      case SUPPLIER_ID:
19823
        return Long.valueOf(getSupplierId());
19824
 
19825
      }
19826
      throw new IllegalStateException();
19827
    }
19828
 
19829
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19830
    public boolean isSet(_Fields field) {
19831
      if (field == null) {
19832
        throw new IllegalArgumentException();
19833
      }
19834
 
19835
      switch (field) {
19836
      case INVOICE_NUMBER:
19837
        return isSetInvoiceNumber();
19838
      case SUPPLIER_ID:
19839
        return isSetSupplierId();
19840
      }
19841
      throw new IllegalStateException();
19842
    }
19843
 
19844
    @Override
19845
    public boolean equals(Object that) {
19846
      if (that == null)
19847
        return false;
19848
      if (that instanceof isInvoiceReceived_args)
19849
        return this.equals((isInvoiceReceived_args)that);
19850
      return false;
19851
    }
19852
 
19853
    public boolean equals(isInvoiceReceived_args that) {
19854
      if (that == null)
19855
        return false;
19856
 
19857
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
19858
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
19859
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
19860
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
19861
          return false;
19862
        if (!this.invoiceNumber.equals(that.invoiceNumber))
19863
          return false;
19864
      }
19865
 
19866
      boolean this_present_supplierId = true;
19867
      boolean that_present_supplierId = true;
19868
      if (this_present_supplierId || that_present_supplierId) {
19869
        if (!(this_present_supplierId && that_present_supplierId))
19870
          return false;
19871
        if (this.supplierId != that.supplierId)
19872
          return false;
19873
      }
19874
 
19875
      return true;
19876
    }
19877
 
19878
    @Override
19879
    public int hashCode() {
19880
      return 0;
19881
    }
19882
 
19883
    public int compareTo(isInvoiceReceived_args other) {
19884
      if (!getClass().equals(other.getClass())) {
19885
        return getClass().getName().compareTo(other.getClass().getName());
19886
      }
19887
 
19888
      int lastComparison = 0;
19889
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
19890
 
19891
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
19892
      if (lastComparison != 0) {
19893
        return lastComparison;
19894
      }
19895
      if (isSetInvoiceNumber()) {
19896
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
19897
        if (lastComparison != 0) {
19898
          return lastComparison;
19899
        }
19900
      }
19901
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
19902
      if (lastComparison != 0) {
19903
        return lastComparison;
19904
      }
19905
      if (isSetSupplierId()) {
19906
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
19907
        if (lastComparison != 0) {
19908
          return lastComparison;
19909
        }
19910
      }
19911
      return 0;
19912
    }
19913
 
19914
    public _Fields fieldForId(int fieldId) {
19915
      return _Fields.findByThriftId(fieldId);
19916
    }
19917
 
19918
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19919
      org.apache.thrift.protocol.TField field;
19920
      iprot.readStructBegin();
19921
      while (true)
19922
      {
19923
        field = iprot.readFieldBegin();
19924
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19925
          break;
19926
        }
19927
        switch (field.id) {
19928
          case 1: // INVOICE_NUMBER
19929
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
19930
              this.invoiceNumber = iprot.readString();
19931
            } else { 
19932
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19933
            }
19934
            break;
19935
          case 2: // SUPPLIER_ID
19936
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19937
              this.supplierId = iprot.readI64();
19938
              setSupplierIdIsSet(true);
19939
            } else { 
19940
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19941
            }
19942
            break;
19943
          default:
19944
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19945
        }
19946
        iprot.readFieldEnd();
19947
      }
19948
      iprot.readStructEnd();
19949
      validate();
19950
    }
19951
 
19952
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19953
      validate();
19954
 
19955
      oprot.writeStructBegin(STRUCT_DESC);
19956
      if (this.invoiceNumber != null) {
19957
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
19958
        oprot.writeString(this.invoiceNumber);
19959
        oprot.writeFieldEnd();
19960
      }
19961
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
19962
      oprot.writeI64(this.supplierId);
19963
      oprot.writeFieldEnd();
19964
      oprot.writeFieldStop();
19965
      oprot.writeStructEnd();
19966
    }
19967
 
19968
    @Override
19969
    public String toString() {
19970
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
19971
      boolean first = true;
19972
 
19973
      sb.append("invoiceNumber:");
19974
      if (this.invoiceNumber == null) {
19975
        sb.append("null");
19976
      } else {
19977
        sb.append(this.invoiceNumber);
19978
      }
19979
      first = false;
19980
      if (!first) sb.append(", ");
19981
      sb.append("supplierId:");
19982
      sb.append(this.supplierId);
19983
      first = false;
19984
      sb.append(")");
19985
      return sb.toString();
19986
    }
19987
 
19988
    public void validate() throws org.apache.thrift.TException {
19989
      // check for required fields
19990
    }
19991
 
19992
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19993
      try {
19994
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19995
      } catch (org.apache.thrift.TException te) {
19996
        throw new java.io.IOException(te);
19997
      }
19998
    }
19999
 
20000
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20001
      try {
20002
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20003
      } catch (org.apache.thrift.TException te) {
20004
        throw new java.io.IOException(te);
20005
      }
20006
    }
20007
 
20008
  }
20009
 
20010
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20011
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20012
 
20013
    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);
20014
 
20015
    private boolean success; // required
20016
 
20017
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20018
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20019
      SUCCESS((short)0, "success");
20020
 
20021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20022
 
20023
      static {
20024
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20025
          byName.put(field.getFieldName(), field);
20026
        }
20027
      }
20028
 
20029
      /**
20030
       * Find the _Fields constant that matches fieldId, or null if its not found.
20031
       */
20032
      public static _Fields findByThriftId(int fieldId) {
20033
        switch(fieldId) {
20034
          case 0: // SUCCESS
20035
            return SUCCESS;
20036
          default:
20037
            return null;
20038
        }
20039
      }
20040
 
20041
      /**
20042
       * Find the _Fields constant that matches fieldId, throwing an exception
20043
       * if it is not found.
20044
       */
20045
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20046
        _Fields fields = findByThriftId(fieldId);
20047
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20048
        return fields;
20049
      }
20050
 
20051
      /**
20052
       * Find the _Fields constant that matches name, or null if its not found.
20053
       */
20054
      public static _Fields findByName(String name) {
20055
        return byName.get(name);
20056
      }
20057
 
20058
      private final short _thriftId;
20059
      private final String _fieldName;
20060
 
20061
      _Fields(short thriftId, String fieldName) {
20062
        _thriftId = thriftId;
20063
        _fieldName = fieldName;
20064
      }
20065
 
20066
      public short getThriftFieldId() {
20067
        return _thriftId;
20068
      }
20069
 
20070
      public String getFieldName() {
20071
        return _fieldName;
20072
      }
20073
    }
20074
 
20075
    // isset id assignments
20076
    private static final int __SUCCESS_ISSET_ID = 0;
20077
    private BitSet __isset_bit_vector = new BitSet(1);
20078
 
20079
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20080
    static {
20081
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20082
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20083
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20084
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20085
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20086
    }
20087
 
20088
    public isInvoiceReceived_result() {
20089
    }
20090
 
20091
    public isInvoiceReceived_result(
20092
      boolean success)
20093
    {
20094
      this();
20095
      this.success = success;
20096
      setSuccessIsSet(true);
20097
    }
20098
 
20099
    /**
20100
     * Performs a deep copy on <i>other</i>.
20101
     */
20102
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20103
      __isset_bit_vector.clear();
20104
      __isset_bit_vector.or(other.__isset_bit_vector);
20105
      this.success = other.success;
20106
    }
20107
 
20108
    public isInvoiceReceived_result deepCopy() {
20109
      return new isInvoiceReceived_result(this);
20110
    }
20111
 
20112
    @Override
20113
    public void clear() {
20114
      setSuccessIsSet(false);
20115
      this.success = false;
20116
    }
20117
 
20118
    public boolean isSuccess() {
20119
      return this.success;
20120
    }
20121
 
20122
    public void setSuccess(boolean success) {
20123
      this.success = success;
20124
      setSuccessIsSet(true);
20125
    }
20126
 
20127
    public void unsetSuccess() {
20128
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20129
    }
20130
 
20131
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20132
    public boolean isSetSuccess() {
20133
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20134
    }
20135
 
20136
    public void setSuccessIsSet(boolean value) {
20137
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20138
    }
20139
 
20140
    public void setFieldValue(_Fields field, Object value) {
20141
      switch (field) {
20142
      case SUCCESS:
20143
        if (value == null) {
20144
          unsetSuccess();
20145
        } else {
20146
          setSuccess((Boolean)value);
20147
        }
20148
        break;
20149
 
20150
      }
20151
    }
20152
 
20153
    public Object getFieldValue(_Fields field) {
20154
      switch (field) {
20155
      case SUCCESS:
20156
        return Boolean.valueOf(isSuccess());
20157
 
20158
      }
20159
      throw new IllegalStateException();
20160
    }
20161
 
20162
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20163
    public boolean isSet(_Fields field) {
20164
      if (field == null) {
20165
        throw new IllegalArgumentException();
20166
      }
20167
 
20168
      switch (field) {
20169
      case SUCCESS:
20170
        return isSetSuccess();
20171
      }
20172
      throw new IllegalStateException();
20173
    }
20174
 
20175
    @Override
20176
    public boolean equals(Object that) {
20177
      if (that == null)
20178
        return false;
20179
      if (that instanceof isInvoiceReceived_result)
20180
        return this.equals((isInvoiceReceived_result)that);
20181
      return false;
20182
    }
20183
 
20184
    public boolean equals(isInvoiceReceived_result that) {
20185
      if (that == null)
20186
        return false;
20187
 
20188
      boolean this_present_success = true;
20189
      boolean that_present_success = true;
20190
      if (this_present_success || that_present_success) {
20191
        if (!(this_present_success && that_present_success))
20192
          return false;
20193
        if (this.success != that.success)
20194
          return false;
20195
      }
20196
 
20197
      return true;
20198
    }
20199
 
20200
    @Override
20201
    public int hashCode() {
20202
      return 0;
20203
    }
20204
 
20205
    public int compareTo(isInvoiceReceived_result other) {
20206
      if (!getClass().equals(other.getClass())) {
20207
        return getClass().getName().compareTo(other.getClass().getName());
20208
      }
20209
 
20210
      int lastComparison = 0;
20211
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20212
 
20213
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20214
      if (lastComparison != 0) {
20215
        return lastComparison;
20216
      }
20217
      if (isSetSuccess()) {
20218
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20219
        if (lastComparison != 0) {
20220
          return lastComparison;
20221
        }
20222
      }
20223
      return 0;
20224
    }
20225
 
20226
    public _Fields fieldForId(int fieldId) {
20227
      return _Fields.findByThriftId(fieldId);
20228
    }
20229
 
20230
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20231
      org.apache.thrift.protocol.TField field;
20232
      iprot.readStructBegin();
20233
      while (true)
20234
      {
20235
        field = iprot.readFieldBegin();
20236
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20237
          break;
20238
        }
20239
        switch (field.id) {
20240
          case 0: // SUCCESS
20241
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20242
              this.success = iprot.readBool();
20243
              setSuccessIsSet(true);
20244
            } else { 
20245
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20246
            }
20247
            break;
20248
          default:
20249
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20250
        }
20251
        iprot.readFieldEnd();
20252
      }
20253
      iprot.readStructEnd();
20254
      validate();
20255
    }
20256
 
20257
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20258
      oprot.writeStructBegin(STRUCT_DESC);
20259
 
20260
      if (this.isSetSuccess()) {
20261
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20262
        oprot.writeBool(this.success);
20263
        oprot.writeFieldEnd();
20264
      }
20265
      oprot.writeFieldStop();
20266
      oprot.writeStructEnd();
20267
    }
20268
 
20269
    @Override
20270
    public String toString() {
20271
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20272
      boolean first = true;
20273
 
20274
      sb.append("success:");
20275
      sb.append(this.success);
20276
      first = false;
20277
      sb.append(")");
20278
      return sb.toString();
20279
    }
20280
 
20281
    public void validate() throws org.apache.thrift.TException {
20282
      // check for required fields
20283
    }
20284
 
20285
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20286
      try {
20287
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20288
      } catch (org.apache.thrift.TException te) {
20289
        throw new java.io.IOException(te);
20290
      }
20291
    }
20292
 
20293
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20294
      try {
20295
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20296
      } catch (org.apache.thrift.TException te) {
20297
        throw new java.io.IOException(te);
20298
      }
20299
    }
20300
 
20301
  }
20302
 
4496 mandeep.dh 20303
}