Subversion Repositories SmartDukaan

Rev

Rev 9829 | Rev 11751 | 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
 
9829 amar.kumar 225
    /**
226
     * Change warehouseId of PO if no items have been received yet for the PO
227
     * 
228
     * @param id
229
     * @param warehouseId
230
     */
231
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
232
 
9925 amar.kumar 233
    /**
234
     * Change status of PO
235
     * 
236
     * @param id
237
     * @param poStatus
238
     */
239
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
240
 
4496 mandeep.dh 241
  }
242
 
243
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
244
 
245
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
246
 
247
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
248
 
249
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
250
 
251
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
252
 
253
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
254
 
255
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
256
 
257
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
258
 
6385 amar.kumar 259
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
260
 
4555 mandeep.dh 261
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 262
 
4754 mandeep.dh 263
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
264
 
265
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
266
 
267
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
268
 
269
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
270
 
5185 mandeep.dh 271
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
272
 
5443 mandeep.dh 273
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
274
 
7410 amar.kumar 275
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
276
 
5443 mandeep.dh 277
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
278
 
5591 mandeep.dh 279
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
280
 
281
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
282
 
6467 amar.kumar 283
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
284
 
285
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
286
 
287
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
288
 
6630 amar.kumar 289
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
290
 
7672 rajveer 291
    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 292
 
293
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
294
 
7410 amar.kumar 295
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
296
 
297
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
298
 
9829 amar.kumar 299
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
300
 
9925 amar.kumar 301
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
302
 
4496 mandeep.dh 303
  }
304
 
305
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
306
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
307
      public Factory() {}
308
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
309
        return new Client(prot);
310
      }
311
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
312
        return new Client(iprot, oprot);
313
      }
314
    }
315
 
316
    public Client(org.apache.thrift.protocol.TProtocol prot)
317
    {
318
      super(prot, prot);
319
    }
320
 
321
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
322
      super(iprot, oprot);
323
    }
324
 
325
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
326
    {
327
      send_createPurchaseOrder(purchaseOrder);
328
      return recv_createPurchaseOrder();
329
    }
330
 
331
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
332
    {
333
      createPurchaseOrder_args args = new createPurchaseOrder_args();
334
      args.setPurchaseOrder(purchaseOrder);
335
      sendBase("createPurchaseOrder", args);
336
    }
337
 
338
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
339
    {
340
      createPurchaseOrder_result result = new createPurchaseOrder_result();
341
      receiveBase(result, "createPurchaseOrder");
342
      if (result.isSetSuccess()) {
343
        return result.success;
344
      }
345
      if (result.e != null) {
346
        throw result.e;
347
      }
348
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
349
    }
350
 
351
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
352
    {
353
      send_getPurchaseOrder(id);
354
      return recv_getPurchaseOrder();
355
    }
356
 
357
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
358
    {
359
      getPurchaseOrder_args args = new getPurchaseOrder_args();
360
      args.setId(id);
361
      sendBase("getPurchaseOrder", args);
362
    }
363
 
364
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
365
    {
366
      getPurchaseOrder_result result = new getPurchaseOrder_result();
367
      receiveBase(result, "getPurchaseOrder");
368
      if (result.isSetSuccess()) {
369
        return result.success;
370
      }
371
      if (result.e != null) {
372
        throw result.e;
373
      }
374
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
375
    }
376
 
377
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
378
    {
379
      send_getAllPurchaseOrders(status);
380
      return recv_getAllPurchaseOrders();
381
    }
382
 
383
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
384
    {
385
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
386
      args.setStatus(status);
387
      sendBase("getAllPurchaseOrders", args);
388
    }
389
 
390
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
391
    {
392
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
393
      receiveBase(result, "getAllPurchaseOrders");
394
      if (result.isSetSuccess()) {
395
        return result.success;
396
      }
397
      if (result.e != null) {
398
        throw result.e;
399
      }
400
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
401
    }
402
 
403
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
404
    {
405
      send_getSupplier(id);
406
      return recv_getSupplier();
407
    }
408
 
409
    public void send_getSupplier(long id) throws org.apache.thrift.TException
410
    {
411
      getSupplier_args args = new getSupplier_args();
412
      args.setId(id);
413
      sendBase("getSupplier", args);
414
    }
415
 
416
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
417
    {
418
      getSupplier_result result = new getSupplier_result();
419
      receiveBase(result, "getSupplier");
420
      if (result.isSetSuccess()) {
421
        return result.success;
422
      }
423
      if (result.e != null) {
424
        throw result.e;
425
      }
426
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
427
    }
428
 
429
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
430
    {
431
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
432
      return recv_startPurchase();
433
    }
434
 
435
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
436
    {
437
      startPurchase_args args = new startPurchase_args();
438
      args.setPurchaseOrderId(purchaseOrderId);
439
      args.setInvoiceNumber(invoiceNumber);
440
      args.setFreightCharges(freightCharges);
441
      sendBase("startPurchase", args);
442
    }
443
 
444
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
445
    {
446
      startPurchase_result result = new startPurchase_result();
447
      receiveBase(result, "startPurchase");
448
      if (result.isSetSuccess()) {
449
        return result.success;
450
      }
451
      if (result.e != null) {
452
        throw result.e;
453
      }
454
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
455
    }
456
 
457
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
458
    {
459
      send_closePurchase(purchaseId);
460
      return recv_closePurchase();
461
    }
462
 
463
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
464
    {
465
      closePurchase_args args = new closePurchase_args();
466
      args.setPurchaseId(purchaseId);
467
      sendBase("closePurchase", args);
468
    }
469
 
470
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
471
    {
472
      closePurchase_result result = new closePurchase_result();
473
      receiveBase(result, "closePurchase");
474
      if (result.isSetSuccess()) {
475
        return result.success;
476
      }
477
      if (result.e != null) {
478
        throw result.e;
479
      }
480
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
481
    }
482
 
483
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
484
    {
485
      send_getAllPurchases(purchaseOrderId, open);
486
      return recv_getAllPurchases();
487
    }
488
 
489
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
490
    {
491
      getAllPurchases_args args = new getAllPurchases_args();
492
      args.setPurchaseOrderId(purchaseOrderId);
493
      args.setOpen(open);
494
      sendBase("getAllPurchases", args);
495
    }
496
 
497
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
498
    {
499
      getAllPurchases_result result = new getAllPurchases_result();
500
      receiveBase(result, "getAllPurchases");
501
      if (result.isSetSuccess()) {
502
        return result.success;
503
      }
504
      if (result.e != null) {
505
        throw result.e;
506
      }
507
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
508
    }
509
 
6385 amar.kumar 510
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
511
    {
512
      send_getPurchasesForPO(purchaseOrderId);
513
      return recv_getPurchasesForPO();
514
    }
515
 
516
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
517
    {
518
      getPurchasesForPO_args args = new getPurchasesForPO_args();
519
      args.setPurchaseOrderId(purchaseOrderId);
520
      sendBase("getPurchasesForPO", args);
521
    }
522
 
523
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
524
    {
525
      getPurchasesForPO_result result = new getPurchasesForPO_result();
526
      receiveBase(result, "getPurchasesForPO");
527
      if (result.isSetSuccess()) {
528
        return result.success;
529
      }
530
      if (result.e != null) {
531
        throw result.e;
532
      }
533
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
534
    }
535
 
4555 mandeep.dh 536
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 537
    {
4555 mandeep.dh 538
      send_getPurchaseOrderForPurchase(purchaseId);
539
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 540
    }
541
 
4555 mandeep.dh 542
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 543
    {
4555 mandeep.dh 544
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 545
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 546
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 547
    }
548
 
4555 mandeep.dh 549
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 550
    {
4555 mandeep.dh 551
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
552
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 553
      if (result.isSetSuccess()) {
554
        return result.success;
555
      }
4555 mandeep.dh 556
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 557
    }
558
 
4754 mandeep.dh 559
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
560
    {
561
      send_getPendingPurchaseOrders(warehouseId);
562
      return recv_getPendingPurchaseOrders();
563
    }
564
 
565
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
566
    {
567
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
568
      args.setWarehouseId(warehouseId);
569
      sendBase("getPendingPurchaseOrders", args);
570
    }
571
 
572
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
573
    {
574
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
575
      receiveBase(result, "getPendingPurchaseOrders");
576
      if (result.isSetSuccess()) {
577
        return result.success;
578
      }
579
      if (result.e != null) {
580
        throw result.e;
581
      }
582
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
583
    }
584
 
585
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
586
    {
587
      send_getSuppliers();
588
      return recv_getSuppliers();
589
    }
590
 
591
    public void send_getSuppliers() throws org.apache.thrift.TException
592
    {
593
      getSuppliers_args args = new getSuppliers_args();
594
      sendBase("getSuppliers", args);
595
    }
596
 
597
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
598
    {
599
      getSuppliers_result result = new getSuppliers_result();
600
      receiveBase(result, "getSuppliers");
601
      if (result.isSetSuccess()) {
602
        return result.success;
603
      }
604
      if (result.e != null) {
605
        throw result.e;
606
      }
607
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
608
    }
609
 
610
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
611
    {
612
      send_fulfillPO(purchaseOrderId, itemId, quantity);
613
      recv_fulfillPO();
614
    }
615
 
616
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
617
    {
618
      fulfillPO_args args = new fulfillPO_args();
619
      args.setPurchaseOrderId(purchaseOrderId);
620
      args.setItemId(itemId);
621
      args.setQuantity(quantity);
622
      sendBase("fulfillPO", args);
623
    }
624
 
625
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
626
    {
627
      fulfillPO_result result = new fulfillPO_result();
628
      receiveBase(result, "fulfillPO");
629
      if (result.e != null) {
630
        throw result.e;
631
      }
632
      return;
633
    }
634
 
635
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
636
    {
637
      send_updatePurchaseOrder(purchaseOrder);
638
      recv_updatePurchaseOrder();
639
    }
640
 
641
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
642
    {
643
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
644
      args.setPurchaseOrder(purchaseOrder);
645
      sendBase("updatePurchaseOrder", args);
646
    }
647
 
648
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
649
    {
650
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
651
      receiveBase(result, "updatePurchaseOrder");
652
      if (result.e != null) {
653
        throw result.e;
654
      }
655
      return;
656
    }
657
 
5185 mandeep.dh 658
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
659
    {
660
      send_unFulfillPO(purchaseId, itemId, quantity);
661
      recv_unFulfillPO();
662
    }
663
 
664
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
665
    {
666
      unFulfillPO_args args = new unFulfillPO_args();
667
      args.setPurchaseId(purchaseId);
668
      args.setItemId(itemId);
669
      args.setQuantity(quantity);
670
      sendBase("unFulfillPO", args);
671
    }
672
 
673
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
674
    {
675
      unFulfillPO_result result = new unFulfillPO_result();
676
      receiveBase(result, "unFulfillPO");
677
      if (result.e != null) {
678
        throw result.e;
679
      }
680
      return;
681
    }
682
 
5443 mandeep.dh 683
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
684
    {
685
      send_getInvoices(date);
686
      return recv_getInvoices();
687
    }
688
 
689
    public void send_getInvoices(long date) throws org.apache.thrift.TException
690
    {
691
      getInvoices_args args = new getInvoices_args();
692
      args.setDate(date);
693
      sendBase("getInvoices", args);
694
    }
695
 
696
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
697
    {
698
      getInvoices_result result = new getInvoices_result();
699
      receiveBase(result, "getInvoices");
700
      if (result.isSetSuccess()) {
701
        return result.success;
702
      }
703
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
704
    }
705
 
7410 amar.kumar 706
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
707
    {
708
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
709
      return recv_getInvoicesForWarehouse();
710
    }
711
 
712
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
713
    {
714
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
715
      args.setWarehouseId(warehouseId);
716
      args.setSupplierId(supplierId);
717
      args.setDate(date);
718
      sendBase("getInvoicesForWarehouse", args);
719
    }
720
 
721
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
722
    {
723
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
724
      receiveBase(result, "getInvoicesForWarehouse");
725
      if (result.isSetSuccess()) {
726
        return result.success;
727
      }
728
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
729
    }
730
 
5443 mandeep.dh 731
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
732
    {
733
      send_createInvoice(invoice);
734
      recv_createInvoice();
735
    }
736
 
737
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
738
    {
739
      createInvoice_args args = new createInvoice_args();
740
      args.setInvoice(invoice);
741
      sendBase("createInvoice", args);
742
    }
743
 
744
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
745
    {
746
      createInvoice_result result = new createInvoice_result();
747
      receiveBase(result, "createInvoice");
748
      if (result.e != null) {
749
        throw result.e;
750
      }
751
      return;
752
    }
753
 
5591 mandeep.dh 754
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
755
    {
756
      send_addSupplier(supplier);
757
      return recv_addSupplier();
758
    }
759
 
760
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
761
    {
762
      addSupplier_args args = new addSupplier_args();
763
      args.setSupplier(supplier);
764
      sendBase("addSupplier", args);
765
    }
766
 
767
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
768
    {
769
      addSupplier_result result = new addSupplier_result();
770
      receiveBase(result, "addSupplier");
771
      if (result.isSetSuccess()) {
772
        return result.success;
773
      }
774
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
775
    }
776
 
777
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
778
    {
779
      send_updateSupplier(supplier);
780
      recv_updateSupplier();
781
    }
782
 
783
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
784
    {
785
      updateSupplier_args args = new updateSupplier_args();
786
      args.setSupplier(supplier);
787
      sendBase("updateSupplier", args);
788
    }
789
 
790
    public void recv_updateSupplier() throws org.apache.thrift.TException
791
    {
792
      updateSupplier_result result = new updateSupplier_result();
793
      receiveBase(result, "updateSupplier");
794
      return;
795
    }
796
 
6467 amar.kumar 797
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
798
    {
799
      send_createPurchaseReturn(purchaseReturn);
800
      return recv_createPurchaseReturn();
801
    }
802
 
803
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
804
    {
805
      createPurchaseReturn_args args = new createPurchaseReturn_args();
806
      args.setPurchaseReturn(purchaseReturn);
807
      sendBase("createPurchaseReturn", args);
808
    }
809
 
810
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
811
    {
812
      createPurchaseReturn_result result = new createPurchaseReturn_result();
813
      receiveBase(result, "createPurchaseReturn");
814
      if (result.isSetSuccess()) {
815
        return result.success;
816
      }
817
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
818
    }
819
 
820
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
821
    {
822
      send_settlePurchaseReturn(id);
823
      recv_settlePurchaseReturn();
824
    }
825
 
826
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
827
    {
828
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
829
      args.setId(id);
830
      sendBase("settlePurchaseReturn", args);
831
    }
832
 
833
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
834
    {
835
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
836
      receiveBase(result, "settlePurchaseReturn");
837
      return;
838
    }
839
 
840
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
841
    {
842
      send_getUnsettledPurchaseReturns();
843
      return recv_getUnsettledPurchaseReturns();
844
    }
845
 
846
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
847
    {
848
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
849
      sendBase("getUnsettledPurchaseReturns", args);
850
    }
851
 
852
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
853
    {
854
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
855
      receiveBase(result, "getUnsettledPurchaseReturns");
856
      if (result.isSetSuccess()) {
857
        return result.success;
858
      }
859
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
860
    }
861
 
6630 amar.kumar 862
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
863
    {
864
      send_getInvoice(invoiceNumber, supplierId);
865
      return recv_getInvoice();
866
    }
867
 
868
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
869
    {
870
      getInvoice_args args = new getInvoice_args();
871
      args.setInvoiceNumber(invoiceNumber);
872
      args.setSupplierId(supplierId);
873
      sendBase("getInvoice", args);
874
    }
875
 
876
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
877
    {
878
      getInvoice_result result = new getInvoice_result();
879
      receiveBase(result, "getInvoice");
880
      if (result.isSetSuccess()) {
881
        return result.success;
882
      }
883
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
884
    }
885
 
7672 rajveer 886
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 887
    {
7672 rajveer 888
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 889
      return recv_createPurchaseForOurExtBilling();
890
    }
891
 
7672 rajveer 892
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 893
    {
894
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
895
      args.setInvoiceNumber(invoiceNumber);
896
      args.setUnitPrice(unitPrice);
7672 rajveer 897
      args.setNlc(nlc);
6762 amar.kumar 898
      args.setItemId(itemId);
899
      sendBase("createPurchaseForOurExtBilling", args);
900
    }
901
 
902
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
903
    {
904
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
905
      receiveBase(result, "createPurchaseForOurExtBilling");
906
      if (result.isSetSuccess()) {
907
        return result.success;
908
      }
909
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
910
    }
911
 
912
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
913
    {
914
      send_fulfillPOForExtBilling(itemId, quantity);
915
      recv_fulfillPOForExtBilling();
916
    }
917
 
918
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
919
    {
920
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
921
      args.setItemId(itemId);
922
      args.setQuantity(quantity);
923
      sendBase("fulfillPOForExtBilling", args);
924
    }
925
 
926
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
927
    {
928
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
929
      receiveBase(result, "fulfillPOForExtBilling");
930
      return;
931
    }
932
 
7410 amar.kumar 933
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
934
    {
935
      send_closePO(poId);
936
      recv_closePO();
937
    }
938
 
939
    public void send_closePO(long poId) throws org.apache.thrift.TException
940
    {
941
      closePO_args args = new closePO_args();
942
      args.setPoId(poId);
943
      sendBase("closePO", args);
944
    }
945
 
946
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
947
    {
948
      closePO_result result = new closePO_result();
949
      receiveBase(result, "closePO");
950
      if (result.e != null) {
951
        throw result.e;
952
      }
953
      return;
954
    }
955
 
956
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
957
    {
958
      send_isInvoiceReceived(invoiceNumber, supplierId);
959
      return recv_isInvoiceReceived();
960
    }
961
 
962
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
963
    {
964
      isInvoiceReceived_args args = new isInvoiceReceived_args();
965
      args.setInvoiceNumber(invoiceNumber);
966
      args.setSupplierId(supplierId);
967
      sendBase("isInvoiceReceived", args);
968
    }
969
 
970
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
971
    {
972
      isInvoiceReceived_result result = new isInvoiceReceived_result();
973
      receiveBase(result, "isInvoiceReceived");
974
      if (result.isSetSuccess()) {
975
        return result.success;
976
      }
977
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
978
    }
979
 
9829 amar.kumar 980
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
981
    {
982
      send_changeWarehouseForPO(id, warehouseId);
983
      recv_changeWarehouseForPO();
984
    }
985
 
986
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
987
    {
988
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
989
      args.setId(id);
990
      args.setWarehouseId(warehouseId);
991
      sendBase("changeWarehouseForPO", args);
992
    }
993
 
994
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
995
    {
996
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
997
      receiveBase(result, "changeWarehouseForPO");
998
      if (result.e != null) {
999
        throw result.e;
1000
      }
1001
      return;
1002
    }
1003
 
9925 amar.kumar 1004
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException
1005
    {
1006
      send_changePOStatus(id, poStatus);
1007
      recv_changePOStatus();
1008
    }
1009
 
1010
    public void send_changePOStatus(long id, POStatus poStatus) throws org.apache.thrift.TException
1011
    {
1012
      changePOStatus_args args = new changePOStatus_args();
1013
      args.setId(id);
1014
      args.setPoStatus(poStatus);
1015
      sendBase("changePOStatus", args);
1016
    }
1017
 
1018
    public void recv_changePOStatus() throws PurchaseServiceException, org.apache.thrift.TException
1019
    {
1020
      changePOStatus_result result = new changePOStatus_result();
1021
      receiveBase(result, "changePOStatus");
1022
      if (result.e != null) {
1023
        throw result.e;
1024
      }
1025
      return;
1026
    }
1027
 
4496 mandeep.dh 1028
  }
1029
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1030
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1031
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1032
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1033
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1034
        this.clientManager = clientManager;
1035
        this.protocolFactory = protocolFactory;
1036
      }
1037
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1038
        return new AsyncClient(protocolFactory, clientManager, transport);
1039
      }
1040
    }
1041
 
1042
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1043
      super(protocolFactory, clientManager, transport);
1044
    }
1045
 
1046
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1047
      checkReady();
1048
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1049
      this.___currentMethod = method_call;
1050
      ___manager.call(method_call);
1051
    }
1052
 
1053
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1054
      private PurchaseOrder purchaseOrder;
1055
      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 {
1056
        super(client, protocolFactory, transport, resultHandler, false);
1057
        this.purchaseOrder = purchaseOrder;
1058
      }
1059
 
1060
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1061
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1062
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1063
        args.setPurchaseOrder(purchaseOrder);
1064
        args.write(prot);
1065
        prot.writeMessageEnd();
1066
      }
1067
 
1068
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1069
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1070
          throw new IllegalStateException("Method call not finished!");
1071
        }
1072
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1073
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1074
        return (new Client(prot)).recv_createPurchaseOrder();
1075
      }
1076
    }
1077
 
1078
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1079
      checkReady();
1080
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1081
      this.___currentMethod = method_call;
1082
      ___manager.call(method_call);
1083
    }
1084
 
1085
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1086
      private long id;
1087
      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 {
1088
        super(client, protocolFactory, transport, resultHandler, false);
1089
        this.id = id;
1090
      }
1091
 
1092
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1093
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1094
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1095
        args.setId(id);
1096
        args.write(prot);
1097
        prot.writeMessageEnd();
1098
      }
1099
 
1100
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1101
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1102
          throw new IllegalStateException("Method call not finished!");
1103
        }
1104
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1105
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1106
        return (new Client(prot)).recv_getPurchaseOrder();
1107
      }
1108
    }
1109
 
1110
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1111
      checkReady();
1112
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1113
      this.___currentMethod = method_call;
1114
      ___manager.call(method_call);
1115
    }
1116
 
1117
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1118
      private POStatus status;
1119
      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 {
1120
        super(client, protocolFactory, transport, resultHandler, false);
1121
        this.status = status;
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("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1126
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1127
        args.setStatus(status);
1128
        args.write(prot);
1129
        prot.writeMessageEnd();
1130
      }
1131
 
1132
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1133
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1134
          throw new IllegalStateException("Method call not finished!");
1135
        }
1136
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1137
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1138
        return (new Client(prot)).recv_getAllPurchaseOrders();
1139
      }
1140
    }
1141
 
1142
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1143
      checkReady();
1144
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1145
      this.___currentMethod = method_call;
1146
      ___manager.call(method_call);
1147
    }
1148
 
1149
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1150
      private long id;
1151
      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 {
1152
        super(client, protocolFactory, transport, resultHandler, false);
1153
        this.id = id;
1154
      }
1155
 
1156
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1157
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1158
        getSupplier_args args = new getSupplier_args();
1159
        args.setId(id);
1160
        args.write(prot);
1161
        prot.writeMessageEnd();
1162
      }
1163
 
1164
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1165
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1166
          throw new IllegalStateException("Method call not finished!");
1167
        }
1168
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1169
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1170
        return (new Client(prot)).recv_getSupplier();
1171
      }
1172
    }
1173
 
1174
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1175
      checkReady();
1176
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1177
      this.___currentMethod = method_call;
1178
      ___manager.call(method_call);
1179
    }
1180
 
1181
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1182
      private long purchaseOrderId;
1183
      private String invoiceNumber;
1184
      private double freightCharges;
1185
      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 {
1186
        super(client, protocolFactory, transport, resultHandler, false);
1187
        this.purchaseOrderId = purchaseOrderId;
1188
        this.invoiceNumber = invoiceNumber;
1189
        this.freightCharges = freightCharges;
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("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1194
        startPurchase_args args = new startPurchase_args();
1195
        args.setPurchaseOrderId(purchaseOrderId);
1196
        args.setInvoiceNumber(invoiceNumber);
1197
        args.setFreightCharges(freightCharges);
1198
        args.write(prot);
1199
        prot.writeMessageEnd();
1200
      }
1201
 
1202
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1203
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1204
          throw new IllegalStateException("Method call not finished!");
1205
        }
1206
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1207
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1208
        return (new Client(prot)).recv_startPurchase();
1209
      }
1210
    }
1211
 
1212
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1213
      checkReady();
1214
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1215
      this.___currentMethod = method_call;
1216
      ___manager.call(method_call);
1217
    }
1218
 
1219
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1220
      private long purchaseId;
1221
      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 {
1222
        super(client, protocolFactory, transport, resultHandler, false);
1223
        this.purchaseId = purchaseId;
1224
      }
1225
 
1226
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1227
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1228
        closePurchase_args args = new closePurchase_args();
1229
        args.setPurchaseId(purchaseId);
1230
        args.write(prot);
1231
        prot.writeMessageEnd();
1232
      }
1233
 
1234
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1235
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1236
          throw new IllegalStateException("Method call not finished!");
1237
        }
1238
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1239
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1240
        return (new Client(prot)).recv_closePurchase();
1241
      }
1242
    }
1243
 
1244
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1245
      checkReady();
1246
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1247
      this.___currentMethod = method_call;
1248
      ___manager.call(method_call);
1249
    }
1250
 
1251
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1252
      private long purchaseOrderId;
1253
      private boolean open;
1254
      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 {
1255
        super(client, protocolFactory, transport, resultHandler, false);
1256
        this.purchaseOrderId = purchaseOrderId;
1257
        this.open = open;
1258
      }
1259
 
1260
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1261
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1262
        getAllPurchases_args args = new getAllPurchases_args();
1263
        args.setPurchaseOrderId(purchaseOrderId);
1264
        args.setOpen(open);
1265
        args.write(prot);
1266
        prot.writeMessageEnd();
1267
      }
1268
 
1269
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1270
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1271
          throw new IllegalStateException("Method call not finished!");
1272
        }
1273
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1274
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1275
        return (new Client(prot)).recv_getAllPurchases();
1276
      }
1277
    }
1278
 
6385 amar.kumar 1279
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1280
      checkReady();
1281
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1282
      this.___currentMethod = method_call;
1283
      ___manager.call(method_call);
1284
    }
1285
 
1286
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1287
      private long purchaseOrderId;
1288
      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 {
1289
        super(client, protocolFactory, transport, resultHandler, false);
1290
        this.purchaseOrderId = purchaseOrderId;
1291
      }
1292
 
1293
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1294
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1295
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1296
        args.setPurchaseOrderId(purchaseOrderId);
1297
        args.write(prot);
1298
        prot.writeMessageEnd();
1299
      }
1300
 
1301
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1302
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1303
          throw new IllegalStateException("Method call not finished!");
1304
        }
1305
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1306
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1307
        return (new Client(prot)).recv_getPurchasesForPO();
1308
      }
1309
    }
1310
 
4555 mandeep.dh 1311
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1312
      checkReady();
4555 mandeep.dh 1313
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1314
      this.___currentMethod = method_call;
1315
      ___manager.call(method_call);
1316
    }
1317
 
4555 mandeep.dh 1318
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1319
      private long purchaseId;
4555 mandeep.dh 1320
      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 1321
        super(client, protocolFactory, transport, resultHandler, false);
1322
        this.purchaseId = purchaseId;
1323
      }
1324
 
1325
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1326
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1327
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1328
        args.setPurchaseId(purchaseId);
1329
        args.write(prot);
1330
        prot.writeMessageEnd();
1331
      }
1332
 
4555 mandeep.dh 1333
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1334
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1335
          throw new IllegalStateException("Method call not finished!");
1336
        }
1337
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1338
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1339
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1340
      }
1341
    }
1342
 
4754 mandeep.dh 1343
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1344
      checkReady();
1345
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1346
      this.___currentMethod = method_call;
1347
      ___manager.call(method_call);
1348
    }
1349
 
1350
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1351
      private long warehouseId;
1352
      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 {
1353
        super(client, protocolFactory, transport, resultHandler, false);
1354
        this.warehouseId = warehouseId;
1355
      }
1356
 
1357
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1358
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1359
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1360
        args.setWarehouseId(warehouseId);
1361
        args.write(prot);
1362
        prot.writeMessageEnd();
1363
      }
1364
 
1365
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1366
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1367
          throw new IllegalStateException("Method call not finished!");
1368
        }
1369
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1370
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1371
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1372
      }
1373
    }
1374
 
1375
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1376
      checkReady();
1377
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1378
      this.___currentMethod = method_call;
1379
      ___manager.call(method_call);
1380
    }
1381
 
1382
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1383
      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 {
1384
        super(client, protocolFactory, transport, resultHandler, false);
1385
      }
1386
 
1387
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1388
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1389
        getSuppliers_args args = new getSuppliers_args();
1390
        args.write(prot);
1391
        prot.writeMessageEnd();
1392
      }
1393
 
1394
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1395
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1396
          throw new IllegalStateException("Method call not finished!");
1397
        }
1398
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1399
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1400
        return (new Client(prot)).recv_getSuppliers();
1401
      }
1402
    }
1403
 
1404
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1405
      checkReady();
1406
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1407
      this.___currentMethod = method_call;
1408
      ___manager.call(method_call);
1409
    }
1410
 
1411
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1412
      private long purchaseOrderId;
1413
      private long itemId;
1414
      private long quantity;
1415
      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 {
1416
        super(client, protocolFactory, transport, resultHandler, false);
1417
        this.purchaseOrderId = purchaseOrderId;
1418
        this.itemId = itemId;
1419
        this.quantity = quantity;
1420
      }
1421
 
1422
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1423
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1424
        fulfillPO_args args = new fulfillPO_args();
1425
        args.setPurchaseOrderId(purchaseOrderId);
1426
        args.setItemId(itemId);
1427
        args.setQuantity(quantity);
1428
        args.write(prot);
1429
        prot.writeMessageEnd();
1430
      }
1431
 
1432
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1433
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1434
          throw new IllegalStateException("Method call not finished!");
1435
        }
1436
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1437
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1438
        (new Client(prot)).recv_fulfillPO();
1439
      }
1440
    }
1441
 
1442
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1443
      checkReady();
1444
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
1449
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1450
      private PurchaseOrder purchaseOrder;
1451
      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 {
1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.purchaseOrder = purchaseOrder;
1454
      }
1455
 
1456
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1457
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1458
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1459
        args.setPurchaseOrder(purchaseOrder);
1460
        args.write(prot);
1461
        prot.writeMessageEnd();
1462
      }
1463
 
1464
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1465
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1466
          throw new IllegalStateException("Method call not finished!");
1467
        }
1468
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1469
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1470
        (new Client(prot)).recv_updatePurchaseOrder();
1471
      }
1472
    }
1473
 
5185 mandeep.dh 1474
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1475
      checkReady();
1476
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1477
      this.___currentMethod = method_call;
1478
      ___manager.call(method_call);
1479
    }
1480
 
1481
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1482
      private long purchaseId;
1483
      private long itemId;
1484
      private long quantity;
1485
      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 {
1486
        super(client, protocolFactory, transport, resultHandler, false);
1487
        this.purchaseId = purchaseId;
1488
        this.itemId = itemId;
1489
        this.quantity = quantity;
1490
      }
1491
 
1492
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1493
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1494
        unFulfillPO_args args = new unFulfillPO_args();
1495
        args.setPurchaseId(purchaseId);
1496
        args.setItemId(itemId);
1497
        args.setQuantity(quantity);
1498
        args.write(prot);
1499
        prot.writeMessageEnd();
1500
      }
1501
 
1502
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1503
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1504
          throw new IllegalStateException("Method call not finished!");
1505
        }
1506
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1507
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1508
        (new Client(prot)).recv_unFulfillPO();
1509
      }
1510
    }
1511
 
5443 mandeep.dh 1512
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1513
      checkReady();
1514
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1515
      this.___currentMethod = method_call;
1516
      ___manager.call(method_call);
1517
    }
1518
 
1519
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1520
      private long date;
1521
      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 {
1522
        super(client, protocolFactory, transport, resultHandler, false);
1523
        this.date = date;
1524
      }
1525
 
1526
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1527
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1528
        getInvoices_args args = new getInvoices_args();
1529
        args.setDate(date);
1530
        args.write(prot);
1531
        prot.writeMessageEnd();
1532
      }
1533
 
1534
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1535
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1536
          throw new IllegalStateException("Method call not finished!");
1537
        }
1538
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1539
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1540
        return (new Client(prot)).recv_getInvoices();
1541
      }
1542
    }
1543
 
7410 amar.kumar 1544
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1545
      checkReady();
1546
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1547
      this.___currentMethod = method_call;
1548
      ___manager.call(method_call);
1549
    }
1550
 
1551
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1552
      private long warehouseId;
1553
      private long supplierId;
1554
      private long date;
1555
      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 {
1556
        super(client, protocolFactory, transport, resultHandler, false);
1557
        this.warehouseId = warehouseId;
1558
        this.supplierId = supplierId;
1559
        this.date = date;
1560
      }
1561
 
1562
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1563
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1564
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1565
        args.setWarehouseId(warehouseId);
1566
        args.setSupplierId(supplierId);
1567
        args.setDate(date);
1568
        args.write(prot);
1569
        prot.writeMessageEnd();
1570
      }
1571
 
1572
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1573
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1574
          throw new IllegalStateException("Method call not finished!");
1575
        }
1576
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1577
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1578
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1579
      }
1580
    }
1581
 
5443 mandeep.dh 1582
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1583
      checkReady();
1584
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1585
      this.___currentMethod = method_call;
1586
      ___manager.call(method_call);
1587
    }
1588
 
1589
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1590
      private Invoice invoice;
1591
      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 {
1592
        super(client, protocolFactory, transport, resultHandler, false);
1593
        this.invoice = invoice;
1594
      }
1595
 
1596
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1597
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1598
        createInvoice_args args = new createInvoice_args();
1599
        args.setInvoice(invoice);
1600
        args.write(prot);
1601
        prot.writeMessageEnd();
1602
      }
1603
 
1604
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1605
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1606
          throw new IllegalStateException("Method call not finished!");
1607
        }
1608
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1609
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1610
        (new Client(prot)).recv_createInvoice();
1611
      }
1612
    }
1613
 
5591 mandeep.dh 1614
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1615
      checkReady();
1616
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1617
      this.___currentMethod = method_call;
1618
      ___manager.call(method_call);
1619
    }
1620
 
1621
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1622
      private Supplier supplier;
1623
      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 {
1624
        super(client, protocolFactory, transport, resultHandler, false);
1625
        this.supplier = supplier;
1626
      }
1627
 
1628
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1629
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1630
        addSupplier_args args = new addSupplier_args();
1631
        args.setSupplier(supplier);
1632
        args.write(prot);
1633
        prot.writeMessageEnd();
1634
      }
1635
 
1636
      public Supplier getResult() throws org.apache.thrift.TException {
1637
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1638
          throw new IllegalStateException("Method call not finished!");
1639
        }
1640
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1641
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1642
        return (new Client(prot)).recv_addSupplier();
1643
      }
1644
    }
1645
 
1646
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1647
      checkReady();
1648
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1649
      this.___currentMethod = method_call;
1650
      ___manager.call(method_call);
1651
    }
1652
 
1653
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1654
      private Supplier supplier;
1655
      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 {
1656
        super(client, protocolFactory, transport, resultHandler, false);
1657
        this.supplier = supplier;
1658
      }
1659
 
1660
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1661
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1662
        updateSupplier_args args = new updateSupplier_args();
1663
        args.setSupplier(supplier);
1664
        args.write(prot);
1665
        prot.writeMessageEnd();
1666
      }
1667
 
1668
      public void getResult() throws org.apache.thrift.TException {
1669
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1670
          throw new IllegalStateException("Method call not finished!");
1671
        }
1672
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1673
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1674
        (new Client(prot)).recv_updateSupplier();
1675
      }
1676
    }
1677
 
6467 amar.kumar 1678
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1679
      checkReady();
1680
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1681
      this.___currentMethod = method_call;
1682
      ___manager.call(method_call);
1683
    }
1684
 
1685
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1686
      private PurchaseReturn purchaseReturn;
1687
      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 {
1688
        super(client, protocolFactory, transport, resultHandler, false);
1689
        this.purchaseReturn = purchaseReturn;
1690
      }
1691
 
1692
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1693
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1694
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1695
        args.setPurchaseReturn(purchaseReturn);
1696
        args.write(prot);
1697
        prot.writeMessageEnd();
1698
      }
1699
 
1700
      public long getResult() throws org.apache.thrift.TException {
1701
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1702
          throw new IllegalStateException("Method call not finished!");
1703
        }
1704
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1705
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1706
        return (new Client(prot)).recv_createPurchaseReturn();
1707
      }
1708
    }
1709
 
1710
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1711
      checkReady();
1712
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1713
      this.___currentMethod = method_call;
1714
      ___manager.call(method_call);
1715
    }
1716
 
1717
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1718
      private long id;
1719
      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 {
1720
        super(client, protocolFactory, transport, resultHandler, false);
1721
        this.id = id;
1722
      }
1723
 
1724
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1725
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1726
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1727
        args.setId(id);
1728
        args.write(prot);
1729
        prot.writeMessageEnd();
1730
      }
1731
 
1732
      public void getResult() throws org.apache.thrift.TException {
1733
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1734
          throw new IllegalStateException("Method call not finished!");
1735
        }
1736
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1737
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1738
        (new Client(prot)).recv_settlePurchaseReturn();
1739
      }
1740
    }
1741
 
1742
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1743
      checkReady();
1744
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1745
      this.___currentMethod = method_call;
1746
      ___manager.call(method_call);
1747
    }
1748
 
1749
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1750
      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 {
1751
        super(client, protocolFactory, transport, resultHandler, false);
1752
      }
1753
 
1754
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1755
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1756
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1757
        args.write(prot);
1758
        prot.writeMessageEnd();
1759
      }
1760
 
1761
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1762
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1763
          throw new IllegalStateException("Method call not finished!");
1764
        }
1765
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1766
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1767
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1768
      }
1769
    }
1770
 
6630 amar.kumar 1771
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1772
      checkReady();
1773
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1774
      this.___currentMethod = method_call;
1775
      ___manager.call(method_call);
1776
    }
1777
 
1778
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1779
      private String invoiceNumber;
1780
      private long supplierId;
1781
      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 {
1782
        super(client, protocolFactory, transport, resultHandler, false);
1783
        this.invoiceNumber = invoiceNumber;
1784
        this.supplierId = supplierId;
1785
      }
1786
 
1787
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1788
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1789
        getInvoice_args args = new getInvoice_args();
1790
        args.setInvoiceNumber(invoiceNumber);
1791
        args.setSupplierId(supplierId);
1792
        args.write(prot);
1793
        prot.writeMessageEnd();
1794
      }
1795
 
1796
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1797
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1798
          throw new IllegalStateException("Method call not finished!");
1799
        }
1800
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1801
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1802
        return (new Client(prot)).recv_getInvoice();
1803
      }
1804
    }
1805
 
7672 rajveer 1806
    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 1807
      checkReady();
7672 rajveer 1808
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1809
      this.___currentMethod = method_call;
1810
      ___manager.call(method_call);
1811
    }
1812
 
1813
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1814
      private String invoiceNumber;
1815
      private double unitPrice;
7672 rajveer 1816
      private double nlc;
6762 amar.kumar 1817
      private long itemId;
7672 rajveer 1818
      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 1819
        super(client, protocolFactory, transport, resultHandler, false);
1820
        this.invoiceNumber = invoiceNumber;
1821
        this.unitPrice = unitPrice;
7672 rajveer 1822
        this.nlc = nlc;
6762 amar.kumar 1823
        this.itemId = itemId;
1824
      }
1825
 
1826
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1827
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1828
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1829
        args.setInvoiceNumber(invoiceNumber);
1830
        args.setUnitPrice(unitPrice);
7672 rajveer 1831
        args.setNlc(nlc);
6762 amar.kumar 1832
        args.setItemId(itemId);
1833
        args.write(prot);
1834
        prot.writeMessageEnd();
1835
      }
1836
 
1837
      public long getResult() throws org.apache.thrift.TException {
1838
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1839
          throw new IllegalStateException("Method call not finished!");
1840
        }
1841
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1842
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1843
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1844
      }
1845
    }
1846
 
1847
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1848
      checkReady();
1849
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1850
      this.___currentMethod = method_call;
1851
      ___manager.call(method_call);
1852
    }
1853
 
1854
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1855
      private long itemId;
1856
      private long quantity;
1857
      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 {
1858
        super(client, protocolFactory, transport, resultHandler, false);
1859
        this.itemId = itemId;
1860
        this.quantity = quantity;
1861
      }
1862
 
1863
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1864
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1865
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1866
        args.setItemId(itemId);
1867
        args.setQuantity(quantity);
1868
        args.write(prot);
1869
        prot.writeMessageEnd();
1870
      }
1871
 
1872
      public void getResult() throws org.apache.thrift.TException {
1873
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1874
          throw new IllegalStateException("Method call not finished!");
1875
        }
1876
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1877
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1878
        (new Client(prot)).recv_fulfillPOForExtBilling();
1879
      }
1880
    }
1881
 
7410 amar.kumar 1882
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
1883
      checkReady();
1884
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
1885
      this.___currentMethod = method_call;
1886
      ___manager.call(method_call);
1887
    }
1888
 
1889
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
1890
      private long poId;
1891
      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 {
1892
        super(client, protocolFactory, transport, resultHandler, false);
1893
        this.poId = poId;
1894
      }
1895
 
1896
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1897
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1898
        closePO_args args = new closePO_args();
1899
        args.setPoId(poId);
1900
        args.write(prot);
1901
        prot.writeMessageEnd();
1902
      }
1903
 
1904
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1905
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1906
          throw new IllegalStateException("Method call not finished!");
1907
        }
1908
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1909
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1910
        (new Client(prot)).recv_closePO();
1911
      }
1912
    }
1913
 
1914
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
1915
      checkReady();
1916
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1917
      this.___currentMethod = method_call;
1918
      ___manager.call(method_call);
1919
    }
1920
 
1921
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
1922
      private String invoiceNumber;
1923
      private long supplierId;
1924
      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 {
1925
        super(client, protocolFactory, transport, resultHandler, false);
1926
        this.invoiceNumber = invoiceNumber;
1927
        this.supplierId = supplierId;
1928
      }
1929
 
1930
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1931
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
1932
        isInvoiceReceived_args args = new isInvoiceReceived_args();
1933
        args.setInvoiceNumber(invoiceNumber);
1934
        args.setSupplierId(supplierId);
1935
        args.write(prot);
1936
        prot.writeMessageEnd();
1937
      }
1938
 
1939
      public boolean getResult() throws org.apache.thrift.TException {
1940
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1941
          throw new IllegalStateException("Method call not finished!");
1942
        }
1943
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1944
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1945
        return (new Client(prot)).recv_isInvoiceReceived();
1946
      }
1947
    }
1948
 
9829 amar.kumar 1949
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
1950
      checkReady();
1951
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1952
      this.___currentMethod = method_call;
1953
      ___manager.call(method_call);
1954
    }
1955
 
1956
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1957
      private long id;
1958
      private long warehouseId;
1959
      public changeWarehouseForPO_call(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1960
        super(client, protocolFactory, transport, resultHandler, false);
1961
        this.id = id;
1962
        this.warehouseId = warehouseId;
1963
      }
1964
 
1965
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1966
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1967
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1968
        args.setId(id);
1969
        args.setWarehouseId(warehouseId);
1970
        args.write(prot);
1971
        prot.writeMessageEnd();
1972
      }
1973
 
1974
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1975
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1976
          throw new IllegalStateException("Method call not finished!");
1977
        }
1978
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1979
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1980
        (new Client(prot)).recv_changeWarehouseForPO();
1981
      }
1982
    }
1983
 
9925 amar.kumar 1984
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler) throws org.apache.thrift.TException {
1985
      checkReady();
1986
      changePOStatus_call method_call = new changePOStatus_call(id, poStatus, resultHandler, this, ___protocolFactory, ___transport);
1987
      this.___currentMethod = method_call;
1988
      ___manager.call(method_call);
1989
    }
1990
 
1991
    public static class changePOStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
1992
      private long id;
1993
      private POStatus poStatus;
1994
      public changePOStatus_call(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<changePOStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1995
        super(client, protocolFactory, transport, resultHandler, false);
1996
        this.id = id;
1997
        this.poStatus = poStatus;
1998
      }
1999
 
2000
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
2001
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePOStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
2002
        changePOStatus_args args = new changePOStatus_args();
2003
        args.setId(id);
2004
        args.setPoStatus(poStatus);
2005
        args.write(prot);
2006
        prot.writeMessageEnd();
2007
      }
2008
 
2009
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
2010
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
2011
          throw new IllegalStateException("Method call not finished!");
2012
        }
2013
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
2014
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2015
        (new Client(prot)).recv_changePOStatus();
2016
      }
2017
    }
2018
 
4496 mandeep.dh 2019
  }
2020
 
2021
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2022
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2023
    public Processor(I iface) {
2024
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
2025
    }
2026
 
2027
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
2028
      super(iface, getProcessMap(processMap));
2029
    }
2030
 
2031
    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) {
2032
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
2033
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
2034
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
2035
      processMap.put("getSupplier", new getSupplier());
2036
      processMap.put("startPurchase", new startPurchase());
2037
      processMap.put("closePurchase", new closePurchase());
2038
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 2039
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 2040
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 2041
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
2042
      processMap.put("getSuppliers", new getSuppliers());
2043
      processMap.put("fulfillPO", new fulfillPO());
2044
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 2045
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 2046
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 2047
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 2048
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 2049
      processMap.put("addSupplier", new addSupplier());
2050
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 2051
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
2052
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
2053
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 2054
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 2055
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
2056
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 2057
      processMap.put("closePO", new closePO());
2058
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 2059
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
9925 amar.kumar 2060
      processMap.put("changePOStatus", new changePOStatus());
4496 mandeep.dh 2061
      return processMap;
2062
    }
2063
 
2064
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2065
      public createPurchaseOrder() {
2066
        super("createPurchaseOrder");
2067
      }
2068
 
2069
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2070
        return new createPurchaseOrder_args();
2071
      }
2072
 
2073
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2074
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2075
        try {
2076
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2077
          result.setSuccessIsSet(true);
2078
        } catch (PurchaseServiceException e) {
2079
          result.e = e;
2080
        }
2081
        return result;
2082
      }
2083
    }
2084
 
2085
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2086
      public getPurchaseOrder() {
2087
        super("getPurchaseOrder");
2088
      }
2089
 
2090
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2091
        return new getPurchaseOrder_args();
2092
      }
2093
 
2094
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2095
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2096
        try {
2097
          result.success = iface.getPurchaseOrder(args.id);
2098
        } catch (PurchaseServiceException e) {
2099
          result.e = e;
2100
        }
2101
        return result;
2102
      }
2103
    }
2104
 
2105
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2106
      public getAllPurchaseOrders() {
2107
        super("getAllPurchaseOrders");
2108
      }
2109
 
2110
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2111
        return new getAllPurchaseOrders_args();
2112
      }
2113
 
2114
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2115
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2116
        try {
2117
          result.success = iface.getAllPurchaseOrders(args.status);
2118
        } catch (PurchaseServiceException e) {
2119
          result.e = e;
2120
        }
2121
        return result;
2122
      }
2123
    }
2124
 
2125
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2126
      public getSupplier() {
2127
        super("getSupplier");
2128
      }
2129
 
2130
      protected getSupplier_args getEmptyArgsInstance() {
2131
        return new getSupplier_args();
2132
      }
2133
 
2134
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2135
        getSupplier_result result = new getSupplier_result();
2136
        try {
2137
          result.success = iface.getSupplier(args.id);
2138
        } catch (PurchaseServiceException e) {
2139
          result.e = e;
2140
        }
2141
        return result;
2142
      }
2143
    }
2144
 
2145
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2146
      public startPurchase() {
2147
        super("startPurchase");
2148
      }
2149
 
2150
      protected startPurchase_args getEmptyArgsInstance() {
2151
        return new startPurchase_args();
2152
      }
2153
 
2154
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2155
        startPurchase_result result = new startPurchase_result();
2156
        try {
2157
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
2158
          result.setSuccessIsSet(true);
2159
        } catch (PurchaseServiceException e) {
2160
          result.e = e;
2161
        }
2162
        return result;
2163
      }
2164
    }
2165
 
2166
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2167
      public closePurchase() {
2168
        super("closePurchase");
2169
      }
2170
 
2171
      protected closePurchase_args getEmptyArgsInstance() {
2172
        return new closePurchase_args();
2173
      }
2174
 
2175
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2176
        closePurchase_result result = new closePurchase_result();
2177
        try {
2178
          result.success = iface.closePurchase(args.purchaseId);
2179
          result.setSuccessIsSet(true);
2180
        } catch (PurchaseServiceException e) {
2181
          result.e = e;
2182
        }
2183
        return result;
2184
      }
2185
    }
2186
 
2187
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2188
      public getAllPurchases() {
2189
        super("getAllPurchases");
2190
      }
2191
 
2192
      protected getAllPurchases_args getEmptyArgsInstance() {
2193
        return new getAllPurchases_args();
2194
      }
2195
 
2196
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2197
        getAllPurchases_result result = new getAllPurchases_result();
2198
        try {
2199
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2200
        } catch (PurchaseServiceException e) {
2201
          result.e = e;
2202
        }
2203
        return result;
2204
      }
2205
    }
2206
 
6385 amar.kumar 2207
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2208
      public getPurchasesForPO() {
2209
        super("getPurchasesForPO");
2210
      }
2211
 
2212
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2213
        return new getPurchasesForPO_args();
2214
      }
2215
 
2216
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2217
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2218
        try {
2219
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2220
        } catch (PurchaseServiceException e) {
2221
          result.e = e;
2222
        }
2223
        return result;
2224
      }
2225
    }
2226
 
4555 mandeep.dh 2227
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2228
      public getPurchaseOrderForPurchase() {
2229
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2230
      }
2231
 
4555 mandeep.dh 2232
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2233
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2234
      }
2235
 
4555 mandeep.dh 2236
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2237
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2238
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2239
        return result;
2240
      }
2241
    }
2242
 
4754 mandeep.dh 2243
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2244
      public getPendingPurchaseOrders() {
2245
        super("getPendingPurchaseOrders");
2246
      }
2247
 
2248
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2249
        return new getPendingPurchaseOrders_args();
2250
      }
2251
 
2252
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2253
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2254
        try {
2255
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2256
        } catch (PurchaseServiceException e) {
2257
          result.e = e;
2258
        }
2259
        return result;
2260
      }
2261
    }
2262
 
2263
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2264
      public getSuppliers() {
2265
        super("getSuppliers");
2266
      }
2267
 
2268
      protected getSuppliers_args getEmptyArgsInstance() {
2269
        return new getSuppliers_args();
2270
      }
2271
 
2272
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2273
        getSuppliers_result result = new getSuppliers_result();
2274
        try {
2275
          result.success = iface.getSuppliers();
2276
        } catch (PurchaseServiceException e) {
2277
          result.e = e;
2278
        }
2279
        return result;
2280
      }
2281
    }
2282
 
2283
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2284
      public fulfillPO() {
2285
        super("fulfillPO");
2286
      }
2287
 
2288
      protected fulfillPO_args getEmptyArgsInstance() {
2289
        return new fulfillPO_args();
2290
      }
2291
 
2292
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2293
        fulfillPO_result result = new fulfillPO_result();
2294
        try {
2295
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2296
        } catch (PurchaseServiceException e) {
2297
          result.e = e;
2298
        }
2299
        return result;
2300
      }
2301
    }
2302
 
2303
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2304
      public updatePurchaseOrder() {
2305
        super("updatePurchaseOrder");
2306
      }
2307
 
2308
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2309
        return new updatePurchaseOrder_args();
2310
      }
2311
 
2312
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2313
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2314
        try {
2315
          iface.updatePurchaseOrder(args.purchaseOrder);
2316
        } catch (PurchaseServiceException e) {
2317
          result.e = e;
2318
        }
2319
        return result;
2320
      }
2321
    }
2322
 
5185 mandeep.dh 2323
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2324
      public unFulfillPO() {
2325
        super("unFulfillPO");
2326
      }
2327
 
2328
      protected unFulfillPO_args getEmptyArgsInstance() {
2329
        return new unFulfillPO_args();
2330
      }
2331
 
2332
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2333
        unFulfillPO_result result = new unFulfillPO_result();
2334
        try {
2335
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2336
        } catch (PurchaseServiceException e) {
2337
          result.e = e;
2338
        }
2339
        return result;
2340
      }
2341
    }
2342
 
5443 mandeep.dh 2343
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2344
      public getInvoices() {
2345
        super("getInvoices");
2346
      }
2347
 
2348
      protected getInvoices_args getEmptyArgsInstance() {
2349
        return new getInvoices_args();
2350
      }
2351
 
2352
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2353
        getInvoices_result result = new getInvoices_result();
2354
        result.success = iface.getInvoices(args.date);
2355
        return result;
2356
      }
2357
    }
2358
 
7410 amar.kumar 2359
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2360
      public getInvoicesForWarehouse() {
2361
        super("getInvoicesForWarehouse");
2362
      }
2363
 
2364
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2365
        return new getInvoicesForWarehouse_args();
2366
      }
2367
 
2368
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2369
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2370
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2371
        return result;
2372
      }
2373
    }
2374
 
5443 mandeep.dh 2375
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2376
      public createInvoice() {
2377
        super("createInvoice");
2378
      }
2379
 
2380
      protected createInvoice_args getEmptyArgsInstance() {
2381
        return new createInvoice_args();
2382
      }
2383
 
2384
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2385
        createInvoice_result result = new createInvoice_result();
2386
        try {
2387
          iface.createInvoice(args.invoice);
2388
        } catch (PurchaseServiceException e) {
2389
          result.e = e;
2390
        }
2391
        return result;
2392
      }
2393
    }
2394
 
5591 mandeep.dh 2395
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2396
      public addSupplier() {
2397
        super("addSupplier");
2398
      }
2399
 
2400
      protected addSupplier_args getEmptyArgsInstance() {
2401
        return new addSupplier_args();
2402
      }
2403
 
2404
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2405
        addSupplier_result result = new addSupplier_result();
2406
        result.success = iface.addSupplier(args.supplier);
2407
        return result;
2408
      }
2409
    }
2410
 
2411
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2412
      public updateSupplier() {
2413
        super("updateSupplier");
2414
      }
2415
 
2416
      protected updateSupplier_args getEmptyArgsInstance() {
2417
        return new updateSupplier_args();
2418
      }
2419
 
2420
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2421
        updateSupplier_result result = new updateSupplier_result();
2422
        iface.updateSupplier(args.supplier);
2423
        return result;
2424
      }
2425
    }
2426
 
6467 amar.kumar 2427
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2428
      public createPurchaseReturn() {
2429
        super("createPurchaseReturn");
2430
      }
2431
 
2432
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2433
        return new createPurchaseReturn_args();
2434
      }
2435
 
2436
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2437
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2438
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2439
        result.setSuccessIsSet(true);
2440
        return result;
2441
      }
2442
    }
2443
 
2444
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2445
      public settlePurchaseReturn() {
2446
        super("settlePurchaseReturn");
2447
      }
2448
 
2449
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2450
        return new settlePurchaseReturn_args();
2451
      }
2452
 
2453
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2454
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2455
        iface.settlePurchaseReturn(args.id);
2456
        return result;
2457
      }
2458
    }
2459
 
2460
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2461
      public getUnsettledPurchaseReturns() {
2462
        super("getUnsettledPurchaseReturns");
2463
      }
2464
 
2465
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2466
        return new getUnsettledPurchaseReturns_args();
2467
      }
2468
 
2469
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2470
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2471
        result.success = iface.getUnsettledPurchaseReturns();
2472
        return result;
2473
      }
2474
    }
2475
 
6630 amar.kumar 2476
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2477
      public getInvoice() {
2478
        super("getInvoice");
2479
      }
2480
 
2481
      protected getInvoice_args getEmptyArgsInstance() {
2482
        return new getInvoice_args();
2483
      }
2484
 
2485
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2486
        getInvoice_result result = new getInvoice_result();
2487
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2488
        return result;
2489
      }
2490
    }
2491
 
6762 amar.kumar 2492
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2493
      public createPurchaseForOurExtBilling() {
2494
        super("createPurchaseForOurExtBilling");
2495
      }
2496
 
2497
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2498
        return new createPurchaseForOurExtBilling_args();
2499
      }
2500
 
2501
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2502
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2503
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2504
        result.setSuccessIsSet(true);
2505
        return result;
2506
      }
2507
    }
2508
 
2509
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2510
      public fulfillPOForExtBilling() {
2511
        super("fulfillPOForExtBilling");
2512
      }
2513
 
2514
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2515
        return new fulfillPOForExtBilling_args();
2516
      }
2517
 
2518
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2519
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2520
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2521
        return result;
2522
      }
2523
    }
2524
 
7410 amar.kumar 2525
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2526
      public closePO() {
2527
        super("closePO");
2528
      }
2529
 
2530
      protected closePO_args getEmptyArgsInstance() {
2531
        return new closePO_args();
2532
      }
2533
 
2534
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2535
        closePO_result result = new closePO_result();
2536
        try {
2537
          iface.closePO(args.poId);
2538
        } catch (PurchaseServiceException e) {
2539
          result.e = e;
2540
        }
2541
        return result;
2542
      }
2543
    }
2544
 
2545
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2546
      public isInvoiceReceived() {
2547
        super("isInvoiceReceived");
2548
      }
2549
 
2550
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2551
        return new isInvoiceReceived_args();
2552
      }
2553
 
2554
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2555
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2556
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2557
        result.setSuccessIsSet(true);
2558
        return result;
2559
      }
2560
    }
2561
 
9829 amar.kumar 2562
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2563
      public changeWarehouseForPO() {
2564
        super("changeWarehouseForPO");
2565
      }
2566
 
2567
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2568
        return new changeWarehouseForPO_args();
2569
      }
2570
 
2571
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2572
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2573
        try {
2574
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2575
        } catch (PurchaseServiceException e) {
2576
          result.e = e;
2577
        }
2578
        return result;
2579
      }
2580
    }
2581
 
9925 amar.kumar 2582
    private static class changePOStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePOStatus_args> {
2583
      public changePOStatus() {
2584
        super("changePOStatus");
2585
      }
2586
 
2587
      protected changePOStatus_args getEmptyArgsInstance() {
2588
        return new changePOStatus_args();
2589
      }
2590
 
2591
      protected changePOStatus_result getResult(I iface, changePOStatus_args args) throws org.apache.thrift.TException {
2592
        changePOStatus_result result = new changePOStatus_result();
2593
        try {
2594
          iface.changePOStatus(args.id, args.poStatus);
2595
        } catch (PurchaseServiceException e) {
2596
          result.e = e;
2597
        }
2598
        return result;
2599
      }
2600
    }
2601
 
4496 mandeep.dh 2602
  }
2603
 
2604
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2605
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2606
 
2607
    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);
2608
 
2609
    private PurchaseOrder purchaseOrder; // required
2610
 
2611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2612
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2613
      PURCHASE_ORDER((short)1, "purchaseOrder");
2614
 
2615
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2616
 
2617
      static {
2618
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2619
          byName.put(field.getFieldName(), field);
2620
        }
2621
      }
2622
 
2623
      /**
2624
       * Find the _Fields constant that matches fieldId, or null if its not found.
2625
       */
2626
      public static _Fields findByThriftId(int fieldId) {
2627
        switch(fieldId) {
2628
          case 1: // PURCHASE_ORDER
2629
            return PURCHASE_ORDER;
2630
          default:
2631
            return null;
2632
        }
2633
      }
2634
 
2635
      /**
2636
       * Find the _Fields constant that matches fieldId, throwing an exception
2637
       * if it is not found.
2638
       */
2639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2640
        _Fields fields = findByThriftId(fieldId);
2641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2642
        return fields;
2643
      }
2644
 
2645
      /**
2646
       * Find the _Fields constant that matches name, or null if its not found.
2647
       */
2648
      public static _Fields findByName(String name) {
2649
        return byName.get(name);
2650
      }
2651
 
2652
      private final short _thriftId;
2653
      private final String _fieldName;
2654
 
2655
      _Fields(short thriftId, String fieldName) {
2656
        _thriftId = thriftId;
2657
        _fieldName = fieldName;
2658
      }
2659
 
2660
      public short getThriftFieldId() {
2661
        return _thriftId;
2662
      }
2663
 
2664
      public String getFieldName() {
2665
        return _fieldName;
2666
      }
2667
    }
2668
 
2669
    // isset id assignments
2670
 
2671
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2672
    static {
2673
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2674
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2675
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2676
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2677
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2678
    }
2679
 
2680
    public createPurchaseOrder_args() {
2681
    }
2682
 
2683
    public createPurchaseOrder_args(
2684
      PurchaseOrder purchaseOrder)
2685
    {
2686
      this();
2687
      this.purchaseOrder = purchaseOrder;
2688
    }
2689
 
2690
    /**
2691
     * Performs a deep copy on <i>other</i>.
2692
     */
2693
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2694
      if (other.isSetPurchaseOrder()) {
2695
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2696
      }
2697
    }
2698
 
2699
    public createPurchaseOrder_args deepCopy() {
2700
      return new createPurchaseOrder_args(this);
2701
    }
2702
 
2703
    @Override
2704
    public void clear() {
2705
      this.purchaseOrder = null;
2706
    }
2707
 
2708
    public PurchaseOrder getPurchaseOrder() {
2709
      return this.purchaseOrder;
2710
    }
2711
 
2712
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2713
      this.purchaseOrder = purchaseOrder;
2714
    }
2715
 
2716
    public void unsetPurchaseOrder() {
2717
      this.purchaseOrder = null;
2718
    }
2719
 
2720
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2721
    public boolean isSetPurchaseOrder() {
2722
      return this.purchaseOrder != null;
2723
    }
2724
 
2725
    public void setPurchaseOrderIsSet(boolean value) {
2726
      if (!value) {
2727
        this.purchaseOrder = null;
2728
      }
2729
    }
2730
 
2731
    public void setFieldValue(_Fields field, Object value) {
2732
      switch (field) {
2733
      case PURCHASE_ORDER:
2734
        if (value == null) {
2735
          unsetPurchaseOrder();
2736
        } else {
2737
          setPurchaseOrder((PurchaseOrder)value);
2738
        }
2739
        break;
2740
 
2741
      }
2742
    }
2743
 
2744
    public Object getFieldValue(_Fields field) {
2745
      switch (field) {
2746
      case PURCHASE_ORDER:
2747
        return getPurchaseOrder();
2748
 
2749
      }
2750
      throw new IllegalStateException();
2751
    }
2752
 
2753
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2754
    public boolean isSet(_Fields field) {
2755
      if (field == null) {
2756
        throw new IllegalArgumentException();
2757
      }
2758
 
2759
      switch (field) {
2760
      case PURCHASE_ORDER:
2761
        return isSetPurchaseOrder();
2762
      }
2763
      throw new IllegalStateException();
2764
    }
2765
 
2766
    @Override
2767
    public boolean equals(Object that) {
2768
      if (that == null)
2769
        return false;
2770
      if (that instanceof createPurchaseOrder_args)
2771
        return this.equals((createPurchaseOrder_args)that);
2772
      return false;
2773
    }
2774
 
2775
    public boolean equals(createPurchaseOrder_args that) {
2776
      if (that == null)
2777
        return false;
2778
 
2779
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2780
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2781
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2782
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2783
          return false;
2784
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2785
          return false;
2786
      }
2787
 
2788
      return true;
2789
    }
2790
 
2791
    @Override
2792
    public int hashCode() {
2793
      return 0;
2794
    }
2795
 
2796
    public int compareTo(createPurchaseOrder_args other) {
2797
      if (!getClass().equals(other.getClass())) {
2798
        return getClass().getName().compareTo(other.getClass().getName());
2799
      }
2800
 
2801
      int lastComparison = 0;
2802
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2803
 
2804
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2805
      if (lastComparison != 0) {
2806
        return lastComparison;
2807
      }
2808
      if (isSetPurchaseOrder()) {
2809
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2810
        if (lastComparison != 0) {
2811
          return lastComparison;
2812
        }
2813
      }
2814
      return 0;
2815
    }
2816
 
2817
    public _Fields fieldForId(int fieldId) {
2818
      return _Fields.findByThriftId(fieldId);
2819
    }
2820
 
2821
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2822
      org.apache.thrift.protocol.TField field;
2823
      iprot.readStructBegin();
2824
      while (true)
2825
      {
2826
        field = iprot.readFieldBegin();
2827
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2828
          break;
2829
        }
2830
        switch (field.id) {
2831
          case 1: // PURCHASE_ORDER
2832
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2833
              this.purchaseOrder = new PurchaseOrder();
2834
              this.purchaseOrder.read(iprot);
2835
            } else { 
2836
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2837
            }
2838
            break;
2839
          default:
2840
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2841
        }
2842
        iprot.readFieldEnd();
2843
      }
2844
      iprot.readStructEnd();
2845
      validate();
2846
    }
2847
 
2848
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2849
      validate();
2850
 
2851
      oprot.writeStructBegin(STRUCT_DESC);
2852
      if (this.purchaseOrder != null) {
2853
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2854
        this.purchaseOrder.write(oprot);
2855
        oprot.writeFieldEnd();
2856
      }
2857
      oprot.writeFieldStop();
2858
      oprot.writeStructEnd();
2859
    }
2860
 
2861
    @Override
2862
    public String toString() {
2863
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2864
      boolean first = true;
2865
 
2866
      sb.append("purchaseOrder:");
2867
      if (this.purchaseOrder == null) {
2868
        sb.append("null");
2869
      } else {
2870
        sb.append(this.purchaseOrder);
2871
      }
2872
      first = false;
2873
      sb.append(")");
2874
      return sb.toString();
2875
    }
2876
 
2877
    public void validate() throws org.apache.thrift.TException {
2878
      // check for required fields
2879
    }
2880
 
2881
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2882
      try {
2883
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2884
      } catch (org.apache.thrift.TException te) {
2885
        throw new java.io.IOException(te);
2886
      }
2887
    }
2888
 
2889
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2890
      try {
2891
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2892
      } catch (org.apache.thrift.TException te) {
2893
        throw new java.io.IOException(te);
2894
      }
2895
    }
2896
 
2897
  }
2898
 
2899
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2900
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2901
 
2902
    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);
2903
    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);
2904
 
2905
    private long success; // required
2906
    private PurchaseServiceException e; // required
2907
 
2908
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2909
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2910
      SUCCESS((short)0, "success"),
2911
      E((short)1, "e");
2912
 
2913
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2914
 
2915
      static {
2916
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2917
          byName.put(field.getFieldName(), field);
2918
        }
2919
      }
2920
 
2921
      /**
2922
       * Find the _Fields constant that matches fieldId, or null if its not found.
2923
       */
2924
      public static _Fields findByThriftId(int fieldId) {
2925
        switch(fieldId) {
2926
          case 0: // SUCCESS
2927
            return SUCCESS;
2928
          case 1: // E
2929
            return E;
2930
          default:
2931
            return null;
2932
        }
2933
      }
2934
 
2935
      /**
2936
       * Find the _Fields constant that matches fieldId, throwing an exception
2937
       * if it is not found.
2938
       */
2939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2940
        _Fields fields = findByThriftId(fieldId);
2941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2942
        return fields;
2943
      }
2944
 
2945
      /**
2946
       * Find the _Fields constant that matches name, or null if its not found.
2947
       */
2948
      public static _Fields findByName(String name) {
2949
        return byName.get(name);
2950
      }
2951
 
2952
      private final short _thriftId;
2953
      private final String _fieldName;
2954
 
2955
      _Fields(short thriftId, String fieldName) {
2956
        _thriftId = thriftId;
2957
        _fieldName = fieldName;
2958
      }
2959
 
2960
      public short getThriftFieldId() {
2961
        return _thriftId;
2962
      }
2963
 
2964
      public String getFieldName() {
2965
        return _fieldName;
2966
      }
2967
    }
2968
 
2969
    // isset id assignments
2970
    private static final int __SUCCESS_ISSET_ID = 0;
2971
    private BitSet __isset_bit_vector = new BitSet(1);
2972
 
2973
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2974
    static {
2975
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2976
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2977
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2978
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2979
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2980
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2981
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2982
    }
2983
 
2984
    public createPurchaseOrder_result() {
2985
    }
2986
 
2987
    public createPurchaseOrder_result(
2988
      long success,
2989
      PurchaseServiceException e)
2990
    {
2991
      this();
2992
      this.success = success;
2993
      setSuccessIsSet(true);
2994
      this.e = e;
2995
    }
2996
 
2997
    /**
2998
     * Performs a deep copy on <i>other</i>.
2999
     */
3000
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
3001
      __isset_bit_vector.clear();
3002
      __isset_bit_vector.or(other.__isset_bit_vector);
3003
      this.success = other.success;
3004
      if (other.isSetE()) {
3005
        this.e = new PurchaseServiceException(other.e);
3006
      }
3007
    }
3008
 
3009
    public createPurchaseOrder_result deepCopy() {
3010
      return new createPurchaseOrder_result(this);
3011
    }
3012
 
3013
    @Override
3014
    public void clear() {
3015
      setSuccessIsSet(false);
3016
      this.success = 0;
3017
      this.e = null;
3018
    }
3019
 
3020
    public long getSuccess() {
3021
      return this.success;
3022
    }
3023
 
3024
    public void setSuccess(long success) {
3025
      this.success = success;
3026
      setSuccessIsSet(true);
3027
    }
3028
 
3029
    public void unsetSuccess() {
3030
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3031
    }
3032
 
3033
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3034
    public boolean isSetSuccess() {
3035
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3036
    }
3037
 
3038
    public void setSuccessIsSet(boolean value) {
3039
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3040
    }
3041
 
3042
    public PurchaseServiceException getE() {
3043
      return this.e;
3044
    }
3045
 
3046
    public void setE(PurchaseServiceException e) {
3047
      this.e = e;
3048
    }
3049
 
3050
    public void unsetE() {
3051
      this.e = null;
3052
    }
3053
 
3054
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3055
    public boolean isSetE() {
3056
      return this.e != null;
3057
    }
3058
 
3059
    public void setEIsSet(boolean value) {
3060
      if (!value) {
3061
        this.e = null;
3062
      }
3063
    }
3064
 
3065
    public void setFieldValue(_Fields field, Object value) {
3066
      switch (field) {
3067
      case SUCCESS:
3068
        if (value == null) {
3069
          unsetSuccess();
3070
        } else {
3071
          setSuccess((Long)value);
3072
        }
3073
        break;
3074
 
3075
      case E:
3076
        if (value == null) {
3077
          unsetE();
3078
        } else {
3079
          setE((PurchaseServiceException)value);
3080
        }
3081
        break;
3082
 
3083
      }
3084
    }
3085
 
3086
    public Object getFieldValue(_Fields field) {
3087
      switch (field) {
3088
      case SUCCESS:
3089
        return Long.valueOf(getSuccess());
3090
 
3091
      case E:
3092
        return getE();
3093
 
3094
      }
3095
      throw new IllegalStateException();
3096
    }
3097
 
3098
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3099
    public boolean isSet(_Fields field) {
3100
      if (field == null) {
3101
        throw new IllegalArgumentException();
3102
      }
3103
 
3104
      switch (field) {
3105
      case SUCCESS:
3106
        return isSetSuccess();
3107
      case E:
3108
        return isSetE();
3109
      }
3110
      throw new IllegalStateException();
3111
    }
3112
 
3113
    @Override
3114
    public boolean equals(Object that) {
3115
      if (that == null)
3116
        return false;
3117
      if (that instanceof createPurchaseOrder_result)
3118
        return this.equals((createPurchaseOrder_result)that);
3119
      return false;
3120
    }
3121
 
3122
    public boolean equals(createPurchaseOrder_result that) {
3123
      if (that == null)
3124
        return false;
3125
 
3126
      boolean this_present_success = true;
3127
      boolean that_present_success = true;
3128
      if (this_present_success || that_present_success) {
3129
        if (!(this_present_success && that_present_success))
3130
          return false;
3131
        if (this.success != that.success)
3132
          return false;
3133
      }
3134
 
3135
      boolean this_present_e = true && this.isSetE();
3136
      boolean that_present_e = true && that.isSetE();
3137
      if (this_present_e || that_present_e) {
3138
        if (!(this_present_e && that_present_e))
3139
          return false;
3140
        if (!this.e.equals(that.e))
3141
          return false;
3142
      }
3143
 
3144
      return true;
3145
    }
3146
 
3147
    @Override
3148
    public int hashCode() {
3149
      return 0;
3150
    }
3151
 
3152
    public int compareTo(createPurchaseOrder_result other) {
3153
      if (!getClass().equals(other.getClass())) {
3154
        return getClass().getName().compareTo(other.getClass().getName());
3155
      }
3156
 
3157
      int lastComparison = 0;
3158
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3159
 
3160
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3161
      if (lastComparison != 0) {
3162
        return lastComparison;
3163
      }
3164
      if (isSetSuccess()) {
3165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3166
        if (lastComparison != 0) {
3167
          return lastComparison;
3168
        }
3169
      }
3170
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3171
      if (lastComparison != 0) {
3172
        return lastComparison;
3173
      }
3174
      if (isSetE()) {
3175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3176
        if (lastComparison != 0) {
3177
          return lastComparison;
3178
        }
3179
      }
3180
      return 0;
3181
    }
3182
 
3183
    public _Fields fieldForId(int fieldId) {
3184
      return _Fields.findByThriftId(fieldId);
3185
    }
3186
 
3187
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3188
      org.apache.thrift.protocol.TField field;
3189
      iprot.readStructBegin();
3190
      while (true)
3191
      {
3192
        field = iprot.readFieldBegin();
3193
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3194
          break;
3195
        }
3196
        switch (field.id) {
3197
          case 0: // SUCCESS
3198
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3199
              this.success = iprot.readI64();
3200
              setSuccessIsSet(true);
3201
            } else { 
3202
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3203
            }
3204
            break;
3205
          case 1: // E
3206
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3207
              this.e = new PurchaseServiceException();
3208
              this.e.read(iprot);
3209
            } else { 
3210
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3211
            }
3212
            break;
3213
          default:
3214
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3215
        }
3216
        iprot.readFieldEnd();
3217
      }
3218
      iprot.readStructEnd();
3219
      validate();
3220
    }
3221
 
3222
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3223
      oprot.writeStructBegin(STRUCT_DESC);
3224
 
3225
      if (this.isSetSuccess()) {
3226
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3227
        oprot.writeI64(this.success);
3228
        oprot.writeFieldEnd();
3229
      } else if (this.isSetE()) {
3230
        oprot.writeFieldBegin(E_FIELD_DESC);
3231
        this.e.write(oprot);
3232
        oprot.writeFieldEnd();
3233
      }
3234
      oprot.writeFieldStop();
3235
      oprot.writeStructEnd();
3236
    }
3237
 
3238
    @Override
3239
    public String toString() {
3240
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3241
      boolean first = true;
3242
 
3243
      sb.append("success:");
3244
      sb.append(this.success);
3245
      first = false;
3246
      if (!first) sb.append(", ");
3247
      sb.append("e:");
3248
      if (this.e == null) {
3249
        sb.append("null");
3250
      } else {
3251
        sb.append(this.e);
3252
      }
3253
      first = false;
3254
      sb.append(")");
3255
      return sb.toString();
3256
    }
3257
 
3258
    public void validate() throws org.apache.thrift.TException {
3259
      // check for required fields
3260
    }
3261
 
3262
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3263
      try {
3264
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3265
      } catch (org.apache.thrift.TException te) {
3266
        throw new java.io.IOException(te);
3267
      }
3268
    }
3269
 
3270
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3271
      try {
3272
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3273
      } catch (org.apache.thrift.TException te) {
3274
        throw new java.io.IOException(te);
3275
      }
3276
    }
3277
 
3278
  }
3279
 
3280
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3281
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3282
 
3283
    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);
3284
 
3285
    private long id; // required
3286
 
3287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3288
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3289
      ID((short)1, "id");
3290
 
3291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3292
 
3293
      static {
3294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3295
          byName.put(field.getFieldName(), field);
3296
        }
3297
      }
3298
 
3299
      /**
3300
       * Find the _Fields constant that matches fieldId, or null if its not found.
3301
       */
3302
      public static _Fields findByThriftId(int fieldId) {
3303
        switch(fieldId) {
3304
          case 1: // ID
3305
            return ID;
3306
          default:
3307
            return null;
3308
        }
3309
      }
3310
 
3311
      /**
3312
       * Find the _Fields constant that matches fieldId, throwing an exception
3313
       * if it is not found.
3314
       */
3315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3316
        _Fields fields = findByThriftId(fieldId);
3317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3318
        return fields;
3319
      }
3320
 
3321
      /**
3322
       * Find the _Fields constant that matches name, or null if its not found.
3323
       */
3324
      public static _Fields findByName(String name) {
3325
        return byName.get(name);
3326
      }
3327
 
3328
      private final short _thriftId;
3329
      private final String _fieldName;
3330
 
3331
      _Fields(short thriftId, String fieldName) {
3332
        _thriftId = thriftId;
3333
        _fieldName = fieldName;
3334
      }
3335
 
3336
      public short getThriftFieldId() {
3337
        return _thriftId;
3338
      }
3339
 
3340
      public String getFieldName() {
3341
        return _fieldName;
3342
      }
3343
    }
3344
 
3345
    // isset id assignments
3346
    private static final int __ID_ISSET_ID = 0;
3347
    private BitSet __isset_bit_vector = new BitSet(1);
3348
 
3349
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3350
    static {
3351
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3352
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3353
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3354
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3355
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3356
    }
3357
 
3358
    public getPurchaseOrder_args() {
3359
    }
3360
 
3361
    public getPurchaseOrder_args(
3362
      long id)
3363
    {
3364
      this();
3365
      this.id = id;
3366
      setIdIsSet(true);
3367
    }
3368
 
3369
    /**
3370
     * Performs a deep copy on <i>other</i>.
3371
     */
3372
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3373
      __isset_bit_vector.clear();
3374
      __isset_bit_vector.or(other.__isset_bit_vector);
3375
      this.id = other.id;
3376
    }
3377
 
3378
    public getPurchaseOrder_args deepCopy() {
3379
      return new getPurchaseOrder_args(this);
3380
    }
3381
 
3382
    @Override
3383
    public void clear() {
3384
      setIdIsSet(false);
3385
      this.id = 0;
3386
    }
3387
 
3388
    public long getId() {
3389
      return this.id;
3390
    }
3391
 
3392
    public void setId(long id) {
3393
      this.id = id;
3394
      setIdIsSet(true);
3395
    }
3396
 
3397
    public void unsetId() {
3398
      __isset_bit_vector.clear(__ID_ISSET_ID);
3399
    }
3400
 
3401
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3402
    public boolean isSetId() {
3403
      return __isset_bit_vector.get(__ID_ISSET_ID);
3404
    }
3405
 
3406
    public void setIdIsSet(boolean value) {
3407
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3408
    }
3409
 
3410
    public void setFieldValue(_Fields field, Object value) {
3411
      switch (field) {
3412
      case ID:
3413
        if (value == null) {
3414
          unsetId();
3415
        } else {
3416
          setId((Long)value);
3417
        }
3418
        break;
3419
 
3420
      }
3421
    }
3422
 
3423
    public Object getFieldValue(_Fields field) {
3424
      switch (field) {
3425
      case ID:
3426
        return Long.valueOf(getId());
3427
 
3428
      }
3429
      throw new IllegalStateException();
3430
    }
3431
 
3432
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3433
    public boolean isSet(_Fields field) {
3434
      if (field == null) {
3435
        throw new IllegalArgumentException();
3436
      }
3437
 
3438
      switch (field) {
3439
      case ID:
3440
        return isSetId();
3441
      }
3442
      throw new IllegalStateException();
3443
    }
3444
 
3445
    @Override
3446
    public boolean equals(Object that) {
3447
      if (that == null)
3448
        return false;
3449
      if (that instanceof getPurchaseOrder_args)
3450
        return this.equals((getPurchaseOrder_args)that);
3451
      return false;
3452
    }
3453
 
3454
    public boolean equals(getPurchaseOrder_args that) {
3455
      if (that == null)
3456
        return false;
3457
 
3458
      boolean this_present_id = true;
3459
      boolean that_present_id = true;
3460
      if (this_present_id || that_present_id) {
3461
        if (!(this_present_id && that_present_id))
3462
          return false;
3463
        if (this.id != that.id)
3464
          return false;
3465
      }
3466
 
3467
      return true;
3468
    }
3469
 
3470
    @Override
3471
    public int hashCode() {
3472
      return 0;
3473
    }
3474
 
3475
    public int compareTo(getPurchaseOrder_args other) {
3476
      if (!getClass().equals(other.getClass())) {
3477
        return getClass().getName().compareTo(other.getClass().getName());
3478
      }
3479
 
3480
      int lastComparison = 0;
3481
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3482
 
3483
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3484
      if (lastComparison != 0) {
3485
        return lastComparison;
3486
      }
3487
      if (isSetId()) {
3488
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3489
        if (lastComparison != 0) {
3490
          return lastComparison;
3491
        }
3492
      }
3493
      return 0;
3494
    }
3495
 
3496
    public _Fields fieldForId(int fieldId) {
3497
      return _Fields.findByThriftId(fieldId);
3498
    }
3499
 
3500
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3501
      org.apache.thrift.protocol.TField field;
3502
      iprot.readStructBegin();
3503
      while (true)
3504
      {
3505
        field = iprot.readFieldBegin();
3506
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3507
          break;
3508
        }
3509
        switch (field.id) {
3510
          case 1: // ID
3511
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3512
              this.id = iprot.readI64();
3513
              setIdIsSet(true);
3514
            } else { 
3515
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3516
            }
3517
            break;
3518
          default:
3519
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3520
        }
3521
        iprot.readFieldEnd();
3522
      }
3523
      iprot.readStructEnd();
3524
      validate();
3525
    }
3526
 
3527
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3528
      validate();
3529
 
3530
      oprot.writeStructBegin(STRUCT_DESC);
3531
      oprot.writeFieldBegin(ID_FIELD_DESC);
3532
      oprot.writeI64(this.id);
3533
      oprot.writeFieldEnd();
3534
      oprot.writeFieldStop();
3535
      oprot.writeStructEnd();
3536
    }
3537
 
3538
    @Override
3539
    public String toString() {
3540
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3541
      boolean first = true;
3542
 
3543
      sb.append("id:");
3544
      sb.append(this.id);
3545
      first = false;
3546
      sb.append(")");
3547
      return sb.toString();
3548
    }
3549
 
3550
    public void validate() throws org.apache.thrift.TException {
3551
      // check for required fields
3552
    }
3553
 
3554
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3555
      try {
3556
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3557
      } catch (org.apache.thrift.TException te) {
3558
        throw new java.io.IOException(te);
3559
      }
3560
    }
3561
 
3562
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3563
      try {
3564
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3565
      } catch (org.apache.thrift.TException te) {
3566
        throw new java.io.IOException(te);
3567
      }
3568
    }
3569
 
3570
  }
3571
 
3572
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3573
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3574
 
3575
    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);
3576
    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);
3577
 
3578
    private PurchaseOrder success; // required
3579
    private PurchaseServiceException e; // required
3580
 
3581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3582
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3583
      SUCCESS((short)0, "success"),
3584
      E((short)1, "e");
3585
 
3586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3587
 
3588
      static {
3589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3590
          byName.put(field.getFieldName(), field);
3591
        }
3592
      }
3593
 
3594
      /**
3595
       * Find the _Fields constant that matches fieldId, or null if its not found.
3596
       */
3597
      public static _Fields findByThriftId(int fieldId) {
3598
        switch(fieldId) {
3599
          case 0: // SUCCESS
3600
            return SUCCESS;
3601
          case 1: // E
3602
            return E;
3603
          default:
3604
            return null;
3605
        }
3606
      }
3607
 
3608
      /**
3609
       * Find the _Fields constant that matches fieldId, throwing an exception
3610
       * if it is not found.
3611
       */
3612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3613
        _Fields fields = findByThriftId(fieldId);
3614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3615
        return fields;
3616
      }
3617
 
3618
      /**
3619
       * Find the _Fields constant that matches name, or null if its not found.
3620
       */
3621
      public static _Fields findByName(String name) {
3622
        return byName.get(name);
3623
      }
3624
 
3625
      private final short _thriftId;
3626
      private final String _fieldName;
3627
 
3628
      _Fields(short thriftId, String fieldName) {
3629
        _thriftId = thriftId;
3630
        _fieldName = fieldName;
3631
      }
3632
 
3633
      public short getThriftFieldId() {
3634
        return _thriftId;
3635
      }
3636
 
3637
      public String getFieldName() {
3638
        return _fieldName;
3639
      }
3640
    }
3641
 
3642
    // isset id assignments
3643
 
3644
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3645
    static {
3646
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3647
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3648
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3649
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3650
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3651
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3652
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3653
    }
3654
 
3655
    public getPurchaseOrder_result() {
3656
    }
3657
 
3658
    public getPurchaseOrder_result(
3659
      PurchaseOrder success,
3660
      PurchaseServiceException e)
3661
    {
3662
      this();
3663
      this.success = success;
3664
      this.e = e;
3665
    }
3666
 
3667
    /**
3668
     * Performs a deep copy on <i>other</i>.
3669
     */
3670
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3671
      if (other.isSetSuccess()) {
3672
        this.success = new PurchaseOrder(other.success);
3673
      }
3674
      if (other.isSetE()) {
3675
        this.e = new PurchaseServiceException(other.e);
3676
      }
3677
    }
3678
 
3679
    public getPurchaseOrder_result deepCopy() {
3680
      return new getPurchaseOrder_result(this);
3681
    }
3682
 
3683
    @Override
3684
    public void clear() {
3685
      this.success = null;
3686
      this.e = null;
3687
    }
3688
 
3689
    public PurchaseOrder getSuccess() {
3690
      return this.success;
3691
    }
3692
 
3693
    public void setSuccess(PurchaseOrder success) {
3694
      this.success = success;
3695
    }
3696
 
3697
    public void unsetSuccess() {
3698
      this.success = null;
3699
    }
3700
 
3701
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3702
    public boolean isSetSuccess() {
3703
      return this.success != null;
3704
    }
3705
 
3706
    public void setSuccessIsSet(boolean value) {
3707
      if (!value) {
3708
        this.success = null;
3709
      }
3710
    }
3711
 
3712
    public PurchaseServiceException getE() {
3713
      return this.e;
3714
    }
3715
 
3716
    public void setE(PurchaseServiceException e) {
3717
      this.e = e;
3718
    }
3719
 
3720
    public void unsetE() {
3721
      this.e = null;
3722
    }
3723
 
3724
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3725
    public boolean isSetE() {
3726
      return this.e != null;
3727
    }
3728
 
3729
    public void setEIsSet(boolean value) {
3730
      if (!value) {
3731
        this.e = null;
3732
      }
3733
    }
3734
 
3735
    public void setFieldValue(_Fields field, Object value) {
3736
      switch (field) {
3737
      case SUCCESS:
3738
        if (value == null) {
3739
          unsetSuccess();
3740
        } else {
3741
          setSuccess((PurchaseOrder)value);
3742
        }
3743
        break;
3744
 
3745
      case E:
3746
        if (value == null) {
3747
          unsetE();
3748
        } else {
3749
          setE((PurchaseServiceException)value);
3750
        }
3751
        break;
3752
 
3753
      }
3754
    }
3755
 
3756
    public Object getFieldValue(_Fields field) {
3757
      switch (field) {
3758
      case SUCCESS:
3759
        return getSuccess();
3760
 
3761
      case E:
3762
        return getE();
3763
 
3764
      }
3765
      throw new IllegalStateException();
3766
    }
3767
 
3768
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3769
    public boolean isSet(_Fields field) {
3770
      if (field == null) {
3771
        throw new IllegalArgumentException();
3772
      }
3773
 
3774
      switch (field) {
3775
      case SUCCESS:
3776
        return isSetSuccess();
3777
      case E:
3778
        return isSetE();
3779
      }
3780
      throw new IllegalStateException();
3781
    }
3782
 
3783
    @Override
3784
    public boolean equals(Object that) {
3785
      if (that == null)
3786
        return false;
3787
      if (that instanceof getPurchaseOrder_result)
3788
        return this.equals((getPurchaseOrder_result)that);
3789
      return false;
3790
    }
3791
 
3792
    public boolean equals(getPurchaseOrder_result that) {
3793
      if (that == null)
3794
        return false;
3795
 
3796
      boolean this_present_success = true && this.isSetSuccess();
3797
      boolean that_present_success = true && that.isSetSuccess();
3798
      if (this_present_success || that_present_success) {
3799
        if (!(this_present_success && that_present_success))
3800
          return false;
3801
        if (!this.success.equals(that.success))
3802
          return false;
3803
      }
3804
 
3805
      boolean this_present_e = true && this.isSetE();
3806
      boolean that_present_e = true && that.isSetE();
3807
      if (this_present_e || that_present_e) {
3808
        if (!(this_present_e && that_present_e))
3809
          return false;
3810
        if (!this.e.equals(that.e))
3811
          return false;
3812
      }
3813
 
3814
      return true;
3815
    }
3816
 
3817
    @Override
3818
    public int hashCode() {
3819
      return 0;
3820
    }
3821
 
3822
    public int compareTo(getPurchaseOrder_result other) {
3823
      if (!getClass().equals(other.getClass())) {
3824
        return getClass().getName().compareTo(other.getClass().getName());
3825
      }
3826
 
3827
      int lastComparison = 0;
3828
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3829
 
3830
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3831
      if (lastComparison != 0) {
3832
        return lastComparison;
3833
      }
3834
      if (isSetSuccess()) {
3835
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3836
        if (lastComparison != 0) {
3837
          return lastComparison;
3838
        }
3839
      }
3840
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3841
      if (lastComparison != 0) {
3842
        return lastComparison;
3843
      }
3844
      if (isSetE()) {
3845
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3846
        if (lastComparison != 0) {
3847
          return lastComparison;
3848
        }
3849
      }
3850
      return 0;
3851
    }
3852
 
3853
    public _Fields fieldForId(int fieldId) {
3854
      return _Fields.findByThriftId(fieldId);
3855
    }
3856
 
3857
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3858
      org.apache.thrift.protocol.TField field;
3859
      iprot.readStructBegin();
3860
      while (true)
3861
      {
3862
        field = iprot.readFieldBegin();
3863
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3864
          break;
3865
        }
3866
        switch (field.id) {
3867
          case 0: // SUCCESS
3868
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3869
              this.success = new PurchaseOrder();
3870
              this.success.read(iprot);
3871
            } else { 
3872
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3873
            }
3874
            break;
3875
          case 1: // E
3876
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3877
              this.e = new PurchaseServiceException();
3878
              this.e.read(iprot);
3879
            } else { 
3880
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3881
            }
3882
            break;
3883
          default:
3884
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3885
        }
3886
        iprot.readFieldEnd();
3887
      }
3888
      iprot.readStructEnd();
3889
      validate();
3890
    }
3891
 
3892
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3893
      oprot.writeStructBegin(STRUCT_DESC);
3894
 
3895
      if (this.isSetSuccess()) {
3896
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3897
        this.success.write(oprot);
3898
        oprot.writeFieldEnd();
3899
      } else if (this.isSetE()) {
3900
        oprot.writeFieldBegin(E_FIELD_DESC);
3901
        this.e.write(oprot);
3902
        oprot.writeFieldEnd();
3903
      }
3904
      oprot.writeFieldStop();
3905
      oprot.writeStructEnd();
3906
    }
3907
 
3908
    @Override
3909
    public String toString() {
3910
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3911
      boolean first = true;
3912
 
3913
      sb.append("success:");
3914
      if (this.success == null) {
3915
        sb.append("null");
3916
      } else {
3917
        sb.append(this.success);
3918
      }
3919
      first = false;
3920
      if (!first) sb.append(", ");
3921
      sb.append("e:");
3922
      if (this.e == null) {
3923
        sb.append("null");
3924
      } else {
3925
        sb.append(this.e);
3926
      }
3927
      first = false;
3928
      sb.append(")");
3929
      return sb.toString();
3930
    }
3931
 
3932
    public void validate() throws org.apache.thrift.TException {
3933
      // check for required fields
3934
    }
3935
 
3936
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3937
      try {
3938
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3939
      } catch (org.apache.thrift.TException te) {
3940
        throw new java.io.IOException(te);
3941
      }
3942
    }
3943
 
3944
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3945
      try {
3946
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3947
      } catch (org.apache.thrift.TException te) {
3948
        throw new java.io.IOException(te);
3949
      }
3950
    }
3951
 
3952
  }
3953
 
3954
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3955
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3956
 
3957
    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);
3958
 
3959
    private POStatus status; // required
3960
 
3961
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3962
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3963
      /**
3964
       * 
3965
       * @see POStatus
3966
       */
3967
      STATUS((short)1, "status");
3968
 
3969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3970
 
3971
      static {
3972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3973
          byName.put(field.getFieldName(), field);
3974
        }
3975
      }
3976
 
3977
      /**
3978
       * Find the _Fields constant that matches fieldId, or null if its not found.
3979
       */
3980
      public static _Fields findByThriftId(int fieldId) {
3981
        switch(fieldId) {
3982
          case 1: // STATUS
3983
            return STATUS;
3984
          default:
3985
            return null;
3986
        }
3987
      }
3988
 
3989
      /**
3990
       * Find the _Fields constant that matches fieldId, throwing an exception
3991
       * if it is not found.
3992
       */
3993
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3994
        _Fields fields = findByThriftId(fieldId);
3995
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3996
        return fields;
3997
      }
3998
 
3999
      /**
4000
       * Find the _Fields constant that matches name, or null if its not found.
4001
       */
4002
      public static _Fields findByName(String name) {
4003
        return byName.get(name);
4004
      }
4005
 
4006
      private final short _thriftId;
4007
      private final String _fieldName;
4008
 
4009
      _Fields(short thriftId, String fieldName) {
4010
        _thriftId = thriftId;
4011
        _fieldName = fieldName;
4012
      }
4013
 
4014
      public short getThriftFieldId() {
4015
        return _thriftId;
4016
      }
4017
 
4018
      public String getFieldName() {
4019
        return _fieldName;
4020
      }
4021
    }
4022
 
4023
    // isset id assignments
4024
 
4025
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4026
    static {
4027
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4028
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4029
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
4030
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4031
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
4032
    }
4033
 
4034
    public getAllPurchaseOrders_args() {
4035
    }
4036
 
4037
    public getAllPurchaseOrders_args(
4038
      POStatus status)
4039
    {
4040
      this();
4041
      this.status = status;
4042
    }
4043
 
4044
    /**
4045
     * Performs a deep copy on <i>other</i>.
4046
     */
4047
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
4048
      if (other.isSetStatus()) {
4049
        this.status = other.status;
4050
      }
4051
    }
4052
 
4053
    public getAllPurchaseOrders_args deepCopy() {
4054
      return new getAllPurchaseOrders_args(this);
4055
    }
4056
 
4057
    @Override
4058
    public void clear() {
4059
      this.status = null;
4060
    }
4061
 
4062
    /**
4063
     * 
4064
     * @see POStatus
4065
     */
4066
    public POStatus getStatus() {
4067
      return this.status;
4068
    }
4069
 
4070
    /**
4071
     * 
4072
     * @see POStatus
4073
     */
4074
    public void setStatus(POStatus status) {
4075
      this.status = status;
4076
    }
4077
 
4078
    public void unsetStatus() {
4079
      this.status = null;
4080
    }
4081
 
4082
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
4083
    public boolean isSetStatus() {
4084
      return this.status != null;
4085
    }
4086
 
4087
    public void setStatusIsSet(boolean value) {
4088
      if (!value) {
4089
        this.status = null;
4090
      }
4091
    }
4092
 
4093
    public void setFieldValue(_Fields field, Object value) {
4094
      switch (field) {
4095
      case STATUS:
4096
        if (value == null) {
4097
          unsetStatus();
4098
        } else {
4099
          setStatus((POStatus)value);
4100
        }
4101
        break;
4102
 
4103
      }
4104
    }
4105
 
4106
    public Object getFieldValue(_Fields field) {
4107
      switch (field) {
4108
      case STATUS:
4109
        return getStatus();
4110
 
4111
      }
4112
      throw new IllegalStateException();
4113
    }
4114
 
4115
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4116
    public boolean isSet(_Fields field) {
4117
      if (field == null) {
4118
        throw new IllegalArgumentException();
4119
      }
4120
 
4121
      switch (field) {
4122
      case STATUS:
4123
        return isSetStatus();
4124
      }
4125
      throw new IllegalStateException();
4126
    }
4127
 
4128
    @Override
4129
    public boolean equals(Object that) {
4130
      if (that == null)
4131
        return false;
4132
      if (that instanceof getAllPurchaseOrders_args)
4133
        return this.equals((getAllPurchaseOrders_args)that);
4134
      return false;
4135
    }
4136
 
4137
    public boolean equals(getAllPurchaseOrders_args that) {
4138
      if (that == null)
4139
        return false;
4140
 
4141
      boolean this_present_status = true && this.isSetStatus();
4142
      boolean that_present_status = true && that.isSetStatus();
4143
      if (this_present_status || that_present_status) {
4144
        if (!(this_present_status && that_present_status))
4145
          return false;
4146
        if (!this.status.equals(that.status))
4147
          return false;
4148
      }
4149
 
4150
      return true;
4151
    }
4152
 
4153
    @Override
4154
    public int hashCode() {
4155
      return 0;
4156
    }
4157
 
4158
    public int compareTo(getAllPurchaseOrders_args other) {
4159
      if (!getClass().equals(other.getClass())) {
4160
        return getClass().getName().compareTo(other.getClass().getName());
4161
      }
4162
 
4163
      int lastComparison = 0;
4164
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4165
 
4166
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4167
      if (lastComparison != 0) {
4168
        return lastComparison;
4169
      }
4170
      if (isSetStatus()) {
4171
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4172
        if (lastComparison != 0) {
4173
          return lastComparison;
4174
        }
4175
      }
4176
      return 0;
4177
    }
4178
 
4179
    public _Fields fieldForId(int fieldId) {
4180
      return _Fields.findByThriftId(fieldId);
4181
    }
4182
 
4183
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4184
      org.apache.thrift.protocol.TField field;
4185
      iprot.readStructBegin();
4186
      while (true)
4187
      {
4188
        field = iprot.readFieldBegin();
4189
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4190
          break;
4191
        }
4192
        switch (field.id) {
4193
          case 1: // STATUS
4194
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4195
              this.status = POStatus.findByValue(iprot.readI32());
4196
            } else { 
4197
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4198
            }
4199
            break;
4200
          default:
4201
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4202
        }
4203
        iprot.readFieldEnd();
4204
      }
4205
      iprot.readStructEnd();
4206
      validate();
4207
    }
4208
 
4209
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4210
      validate();
4211
 
4212
      oprot.writeStructBegin(STRUCT_DESC);
4213
      if (this.status != null) {
4214
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4215
        oprot.writeI32(this.status.getValue());
4216
        oprot.writeFieldEnd();
4217
      }
4218
      oprot.writeFieldStop();
4219
      oprot.writeStructEnd();
4220
    }
4221
 
4222
    @Override
4223
    public String toString() {
4224
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4225
      boolean first = true;
4226
 
4227
      sb.append("status:");
4228
      if (this.status == null) {
4229
        sb.append("null");
4230
      } else {
4231
        sb.append(this.status);
4232
      }
4233
      first = false;
4234
      sb.append(")");
4235
      return sb.toString();
4236
    }
4237
 
4238
    public void validate() throws org.apache.thrift.TException {
4239
      // check for required fields
4240
    }
4241
 
4242
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4243
      try {
4244
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4245
      } catch (org.apache.thrift.TException te) {
4246
        throw new java.io.IOException(te);
4247
      }
4248
    }
4249
 
4250
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4251
      try {
4252
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4253
      } catch (org.apache.thrift.TException te) {
4254
        throw new java.io.IOException(te);
4255
      }
4256
    }
4257
 
4258
  }
4259
 
4260
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4261
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4262
 
4263
    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);
4264
    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);
4265
 
4266
    private List<PurchaseOrder> success; // required
4267
    private PurchaseServiceException e; // required
4268
 
4269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4270
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4271
      SUCCESS((short)0, "success"),
4272
      E((short)1, "e");
4273
 
4274
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4275
 
4276
      static {
4277
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4278
          byName.put(field.getFieldName(), field);
4279
        }
4280
      }
4281
 
4282
      /**
4283
       * Find the _Fields constant that matches fieldId, or null if its not found.
4284
       */
4285
      public static _Fields findByThriftId(int fieldId) {
4286
        switch(fieldId) {
4287
          case 0: // SUCCESS
4288
            return SUCCESS;
4289
          case 1: // E
4290
            return E;
4291
          default:
4292
            return null;
4293
        }
4294
      }
4295
 
4296
      /**
4297
       * Find the _Fields constant that matches fieldId, throwing an exception
4298
       * if it is not found.
4299
       */
4300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4301
        _Fields fields = findByThriftId(fieldId);
4302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4303
        return fields;
4304
      }
4305
 
4306
      /**
4307
       * Find the _Fields constant that matches name, or null if its not found.
4308
       */
4309
      public static _Fields findByName(String name) {
4310
        return byName.get(name);
4311
      }
4312
 
4313
      private final short _thriftId;
4314
      private final String _fieldName;
4315
 
4316
      _Fields(short thriftId, String fieldName) {
4317
        _thriftId = thriftId;
4318
        _fieldName = fieldName;
4319
      }
4320
 
4321
      public short getThriftFieldId() {
4322
        return _thriftId;
4323
      }
4324
 
4325
      public String getFieldName() {
4326
        return _fieldName;
4327
      }
4328
    }
4329
 
4330
    // isset id assignments
4331
 
4332
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4333
    static {
4334
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4335
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4336
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4337
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4338
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4339
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4340
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4341
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4342
    }
4343
 
4344
    public getAllPurchaseOrders_result() {
4345
    }
4346
 
4347
    public getAllPurchaseOrders_result(
4348
      List<PurchaseOrder> success,
4349
      PurchaseServiceException e)
4350
    {
4351
      this();
4352
      this.success = success;
4353
      this.e = e;
4354
    }
4355
 
4356
    /**
4357
     * Performs a deep copy on <i>other</i>.
4358
     */
4359
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4360
      if (other.isSetSuccess()) {
4361
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4362
        for (PurchaseOrder other_element : other.success) {
4363
          __this__success.add(new PurchaseOrder(other_element));
4364
        }
4365
        this.success = __this__success;
4366
      }
4367
      if (other.isSetE()) {
4368
        this.e = new PurchaseServiceException(other.e);
4369
      }
4370
    }
4371
 
4372
    public getAllPurchaseOrders_result deepCopy() {
4373
      return new getAllPurchaseOrders_result(this);
4374
    }
4375
 
4376
    @Override
4377
    public void clear() {
4378
      this.success = null;
4379
      this.e = null;
4380
    }
4381
 
4382
    public int getSuccessSize() {
4383
      return (this.success == null) ? 0 : this.success.size();
4384
    }
4385
 
4386
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4387
      return (this.success == null) ? null : this.success.iterator();
4388
    }
4389
 
4390
    public void addToSuccess(PurchaseOrder elem) {
4391
      if (this.success == null) {
4392
        this.success = new ArrayList<PurchaseOrder>();
4393
      }
4394
      this.success.add(elem);
4395
    }
4396
 
4397
    public List<PurchaseOrder> getSuccess() {
4398
      return this.success;
4399
    }
4400
 
4401
    public void setSuccess(List<PurchaseOrder> success) {
4402
      this.success = success;
4403
    }
4404
 
4405
    public void unsetSuccess() {
4406
      this.success = null;
4407
    }
4408
 
4409
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4410
    public boolean isSetSuccess() {
4411
      return this.success != null;
4412
    }
4413
 
4414
    public void setSuccessIsSet(boolean value) {
4415
      if (!value) {
4416
        this.success = null;
4417
      }
4418
    }
4419
 
4420
    public PurchaseServiceException getE() {
4421
      return this.e;
4422
    }
4423
 
4424
    public void setE(PurchaseServiceException e) {
4425
      this.e = e;
4426
    }
4427
 
4428
    public void unsetE() {
4429
      this.e = null;
4430
    }
4431
 
4432
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4433
    public boolean isSetE() {
4434
      return this.e != null;
4435
    }
4436
 
4437
    public void setEIsSet(boolean value) {
4438
      if (!value) {
4439
        this.e = null;
4440
      }
4441
    }
4442
 
4443
    public void setFieldValue(_Fields field, Object value) {
4444
      switch (field) {
4445
      case SUCCESS:
4446
        if (value == null) {
4447
          unsetSuccess();
4448
        } else {
4449
          setSuccess((List<PurchaseOrder>)value);
4450
        }
4451
        break;
4452
 
4453
      case E:
4454
        if (value == null) {
4455
          unsetE();
4456
        } else {
4457
          setE((PurchaseServiceException)value);
4458
        }
4459
        break;
4460
 
4461
      }
4462
    }
4463
 
4464
    public Object getFieldValue(_Fields field) {
4465
      switch (field) {
4466
      case SUCCESS:
4467
        return getSuccess();
4468
 
4469
      case E:
4470
        return getE();
4471
 
4472
      }
4473
      throw new IllegalStateException();
4474
    }
4475
 
4476
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4477
    public boolean isSet(_Fields field) {
4478
      if (field == null) {
4479
        throw new IllegalArgumentException();
4480
      }
4481
 
4482
      switch (field) {
4483
      case SUCCESS:
4484
        return isSetSuccess();
4485
      case E:
4486
        return isSetE();
4487
      }
4488
      throw new IllegalStateException();
4489
    }
4490
 
4491
    @Override
4492
    public boolean equals(Object that) {
4493
      if (that == null)
4494
        return false;
4495
      if (that instanceof getAllPurchaseOrders_result)
4496
        return this.equals((getAllPurchaseOrders_result)that);
4497
      return false;
4498
    }
4499
 
4500
    public boolean equals(getAllPurchaseOrders_result that) {
4501
      if (that == null)
4502
        return false;
4503
 
4504
      boolean this_present_success = true && this.isSetSuccess();
4505
      boolean that_present_success = true && that.isSetSuccess();
4506
      if (this_present_success || that_present_success) {
4507
        if (!(this_present_success && that_present_success))
4508
          return false;
4509
        if (!this.success.equals(that.success))
4510
          return false;
4511
      }
4512
 
4513
      boolean this_present_e = true && this.isSetE();
4514
      boolean that_present_e = true && that.isSetE();
4515
      if (this_present_e || that_present_e) {
4516
        if (!(this_present_e && that_present_e))
4517
          return false;
4518
        if (!this.e.equals(that.e))
4519
          return false;
4520
      }
4521
 
4522
      return true;
4523
    }
4524
 
4525
    @Override
4526
    public int hashCode() {
4527
      return 0;
4528
    }
4529
 
4530
    public int compareTo(getAllPurchaseOrders_result other) {
4531
      if (!getClass().equals(other.getClass())) {
4532
        return getClass().getName().compareTo(other.getClass().getName());
4533
      }
4534
 
4535
      int lastComparison = 0;
4536
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4537
 
4538
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4539
      if (lastComparison != 0) {
4540
        return lastComparison;
4541
      }
4542
      if (isSetSuccess()) {
4543
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4544
        if (lastComparison != 0) {
4545
          return lastComparison;
4546
        }
4547
      }
4548
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4549
      if (lastComparison != 0) {
4550
        return lastComparison;
4551
      }
4552
      if (isSetE()) {
4553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4554
        if (lastComparison != 0) {
4555
          return lastComparison;
4556
        }
4557
      }
4558
      return 0;
4559
    }
4560
 
4561
    public _Fields fieldForId(int fieldId) {
4562
      return _Fields.findByThriftId(fieldId);
4563
    }
4564
 
4565
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4566
      org.apache.thrift.protocol.TField field;
4567
      iprot.readStructBegin();
4568
      while (true)
4569
      {
4570
        field = iprot.readFieldBegin();
4571
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4572
          break;
4573
        }
4574
        switch (field.id) {
4575
          case 0: // SUCCESS
4576
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4577
              {
4578
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4579
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4580
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4581
                {
4582
                  PurchaseOrder _elem6; // required
4583
                  _elem6 = new PurchaseOrder();
4584
                  _elem6.read(iprot);
4585
                  this.success.add(_elem6);
4586
                }
4587
                iprot.readListEnd();
4588
              }
4589
            } else { 
4590
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4591
            }
4592
            break;
4593
          case 1: // E
4594
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4595
              this.e = new PurchaseServiceException();
4596
              this.e.read(iprot);
4597
            } else { 
4598
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4599
            }
4600
            break;
4601
          default:
4602
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4603
        }
4604
        iprot.readFieldEnd();
4605
      }
4606
      iprot.readStructEnd();
4607
      validate();
4608
    }
4609
 
4610
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4611
      oprot.writeStructBegin(STRUCT_DESC);
4612
 
4613
      if (this.isSetSuccess()) {
4614
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4615
        {
4616
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4617
          for (PurchaseOrder _iter7 : this.success)
4618
          {
4619
            _iter7.write(oprot);
4620
          }
4621
          oprot.writeListEnd();
4622
        }
4623
        oprot.writeFieldEnd();
4624
      } else if (this.isSetE()) {
4625
        oprot.writeFieldBegin(E_FIELD_DESC);
4626
        this.e.write(oprot);
4627
        oprot.writeFieldEnd();
4628
      }
4629
      oprot.writeFieldStop();
4630
      oprot.writeStructEnd();
4631
    }
4632
 
4633
    @Override
4634
    public String toString() {
4635
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4636
      boolean first = true;
4637
 
4638
      sb.append("success:");
4639
      if (this.success == null) {
4640
        sb.append("null");
4641
      } else {
4642
        sb.append(this.success);
4643
      }
4644
      first = false;
4645
      if (!first) sb.append(", ");
4646
      sb.append("e:");
4647
      if (this.e == null) {
4648
        sb.append("null");
4649
      } else {
4650
        sb.append(this.e);
4651
      }
4652
      first = false;
4653
      sb.append(")");
4654
      return sb.toString();
4655
    }
4656
 
4657
    public void validate() throws org.apache.thrift.TException {
4658
      // check for required fields
4659
    }
4660
 
4661
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4662
      try {
4663
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4664
      } catch (org.apache.thrift.TException te) {
4665
        throw new java.io.IOException(te);
4666
      }
4667
    }
4668
 
4669
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4670
      try {
4671
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4672
      } catch (org.apache.thrift.TException te) {
4673
        throw new java.io.IOException(te);
4674
      }
4675
    }
4676
 
4677
  }
4678
 
4679
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4680
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4681
 
4682
    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);
4683
 
4684
    private long id; // required
4685
 
4686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4687
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4688
      ID((short)1, "id");
4689
 
4690
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4691
 
4692
      static {
4693
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4694
          byName.put(field.getFieldName(), field);
4695
        }
4696
      }
4697
 
4698
      /**
4699
       * Find the _Fields constant that matches fieldId, or null if its not found.
4700
       */
4701
      public static _Fields findByThriftId(int fieldId) {
4702
        switch(fieldId) {
4703
          case 1: // ID
4704
            return ID;
4705
          default:
4706
            return null;
4707
        }
4708
      }
4709
 
4710
      /**
4711
       * Find the _Fields constant that matches fieldId, throwing an exception
4712
       * if it is not found.
4713
       */
4714
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4715
        _Fields fields = findByThriftId(fieldId);
4716
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4717
        return fields;
4718
      }
4719
 
4720
      /**
4721
       * Find the _Fields constant that matches name, or null if its not found.
4722
       */
4723
      public static _Fields findByName(String name) {
4724
        return byName.get(name);
4725
      }
4726
 
4727
      private final short _thriftId;
4728
      private final String _fieldName;
4729
 
4730
      _Fields(short thriftId, String fieldName) {
4731
        _thriftId = thriftId;
4732
        _fieldName = fieldName;
4733
      }
4734
 
4735
      public short getThriftFieldId() {
4736
        return _thriftId;
4737
      }
4738
 
4739
      public String getFieldName() {
4740
        return _fieldName;
4741
      }
4742
    }
4743
 
4744
    // isset id assignments
4745
    private static final int __ID_ISSET_ID = 0;
4746
    private BitSet __isset_bit_vector = new BitSet(1);
4747
 
4748
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4749
    static {
4750
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4751
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4752
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4753
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4754
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4755
    }
4756
 
4757
    public getSupplier_args() {
4758
    }
4759
 
4760
    public getSupplier_args(
4761
      long id)
4762
    {
4763
      this();
4764
      this.id = id;
4765
      setIdIsSet(true);
4766
    }
4767
 
4768
    /**
4769
     * Performs a deep copy on <i>other</i>.
4770
     */
4771
    public getSupplier_args(getSupplier_args other) {
4772
      __isset_bit_vector.clear();
4773
      __isset_bit_vector.or(other.__isset_bit_vector);
4774
      this.id = other.id;
4775
    }
4776
 
4777
    public getSupplier_args deepCopy() {
4778
      return new getSupplier_args(this);
4779
    }
4780
 
4781
    @Override
4782
    public void clear() {
4783
      setIdIsSet(false);
4784
      this.id = 0;
4785
    }
4786
 
4787
    public long getId() {
4788
      return this.id;
4789
    }
4790
 
4791
    public void setId(long id) {
4792
      this.id = id;
4793
      setIdIsSet(true);
4794
    }
4795
 
4796
    public void unsetId() {
4797
      __isset_bit_vector.clear(__ID_ISSET_ID);
4798
    }
4799
 
4800
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4801
    public boolean isSetId() {
4802
      return __isset_bit_vector.get(__ID_ISSET_ID);
4803
    }
4804
 
4805
    public void setIdIsSet(boolean value) {
4806
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4807
    }
4808
 
4809
    public void setFieldValue(_Fields field, Object value) {
4810
      switch (field) {
4811
      case ID:
4812
        if (value == null) {
4813
          unsetId();
4814
        } else {
4815
          setId((Long)value);
4816
        }
4817
        break;
4818
 
4819
      }
4820
    }
4821
 
4822
    public Object getFieldValue(_Fields field) {
4823
      switch (field) {
4824
      case ID:
4825
        return Long.valueOf(getId());
4826
 
4827
      }
4828
      throw new IllegalStateException();
4829
    }
4830
 
4831
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4832
    public boolean isSet(_Fields field) {
4833
      if (field == null) {
4834
        throw new IllegalArgumentException();
4835
      }
4836
 
4837
      switch (field) {
4838
      case ID:
4839
        return isSetId();
4840
      }
4841
      throw new IllegalStateException();
4842
    }
4843
 
4844
    @Override
4845
    public boolean equals(Object that) {
4846
      if (that == null)
4847
        return false;
4848
      if (that instanceof getSupplier_args)
4849
        return this.equals((getSupplier_args)that);
4850
      return false;
4851
    }
4852
 
4853
    public boolean equals(getSupplier_args that) {
4854
      if (that == null)
4855
        return false;
4856
 
4857
      boolean this_present_id = true;
4858
      boolean that_present_id = true;
4859
      if (this_present_id || that_present_id) {
4860
        if (!(this_present_id && that_present_id))
4861
          return false;
4862
        if (this.id != that.id)
4863
          return false;
4864
      }
4865
 
4866
      return true;
4867
    }
4868
 
4869
    @Override
4870
    public int hashCode() {
4871
      return 0;
4872
    }
4873
 
4874
    public int compareTo(getSupplier_args other) {
4875
      if (!getClass().equals(other.getClass())) {
4876
        return getClass().getName().compareTo(other.getClass().getName());
4877
      }
4878
 
4879
      int lastComparison = 0;
4880
      getSupplier_args typedOther = (getSupplier_args)other;
4881
 
4882
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4883
      if (lastComparison != 0) {
4884
        return lastComparison;
4885
      }
4886
      if (isSetId()) {
4887
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4888
        if (lastComparison != 0) {
4889
          return lastComparison;
4890
        }
4891
      }
4892
      return 0;
4893
    }
4894
 
4895
    public _Fields fieldForId(int fieldId) {
4896
      return _Fields.findByThriftId(fieldId);
4897
    }
4898
 
4899
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4900
      org.apache.thrift.protocol.TField field;
4901
      iprot.readStructBegin();
4902
      while (true)
4903
      {
4904
        field = iprot.readFieldBegin();
4905
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4906
          break;
4907
        }
4908
        switch (field.id) {
4909
          case 1: // ID
4910
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4911
              this.id = iprot.readI64();
4912
              setIdIsSet(true);
4913
            } else { 
4914
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4915
            }
4916
            break;
4917
          default:
4918
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4919
        }
4920
        iprot.readFieldEnd();
4921
      }
4922
      iprot.readStructEnd();
4923
      validate();
4924
    }
4925
 
4926
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4927
      validate();
4928
 
4929
      oprot.writeStructBegin(STRUCT_DESC);
4930
      oprot.writeFieldBegin(ID_FIELD_DESC);
4931
      oprot.writeI64(this.id);
4932
      oprot.writeFieldEnd();
4933
      oprot.writeFieldStop();
4934
      oprot.writeStructEnd();
4935
    }
4936
 
4937
    @Override
4938
    public String toString() {
4939
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4940
      boolean first = true;
4941
 
4942
      sb.append("id:");
4943
      sb.append(this.id);
4944
      first = false;
4945
      sb.append(")");
4946
      return sb.toString();
4947
    }
4948
 
4949
    public void validate() throws org.apache.thrift.TException {
4950
      // check for required fields
4951
    }
4952
 
4953
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4954
      try {
4955
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4956
      } catch (org.apache.thrift.TException te) {
4957
        throw new java.io.IOException(te);
4958
      }
4959
    }
4960
 
4961
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4962
      try {
4963
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4964
        __isset_bit_vector = new BitSet(1);
4965
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4966
      } catch (org.apache.thrift.TException te) {
4967
        throw new java.io.IOException(te);
4968
      }
4969
    }
4970
 
4971
  }
4972
 
4973
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4974
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4975
 
4976
    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);
4977
    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);
4978
 
4979
    private Supplier success; // required
4980
    private PurchaseServiceException e; // required
4981
 
4982
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4983
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4984
      SUCCESS((short)0, "success"),
4985
      E((short)1, "e");
4986
 
4987
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4988
 
4989
      static {
4990
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4991
          byName.put(field.getFieldName(), field);
4992
        }
4993
      }
4994
 
4995
      /**
4996
       * Find the _Fields constant that matches fieldId, or null if its not found.
4997
       */
4998
      public static _Fields findByThriftId(int fieldId) {
4999
        switch(fieldId) {
5000
          case 0: // SUCCESS
5001
            return SUCCESS;
5002
          case 1: // E
5003
            return E;
5004
          default:
5005
            return null;
5006
        }
5007
      }
5008
 
5009
      /**
5010
       * Find the _Fields constant that matches fieldId, throwing an exception
5011
       * if it is not found.
5012
       */
5013
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5014
        _Fields fields = findByThriftId(fieldId);
5015
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5016
        return fields;
5017
      }
5018
 
5019
      /**
5020
       * Find the _Fields constant that matches name, or null if its not found.
5021
       */
5022
      public static _Fields findByName(String name) {
5023
        return byName.get(name);
5024
      }
5025
 
5026
      private final short _thriftId;
5027
      private final String _fieldName;
5028
 
5029
      _Fields(short thriftId, String fieldName) {
5030
        _thriftId = thriftId;
5031
        _fieldName = fieldName;
5032
      }
5033
 
5034
      public short getThriftFieldId() {
5035
        return _thriftId;
5036
      }
5037
 
5038
      public String getFieldName() {
5039
        return _fieldName;
5040
      }
5041
    }
5042
 
5043
    // isset id assignments
5044
 
5045
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5046
    static {
5047
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5048
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5049
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
5050
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5051
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5052
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5053
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
5054
    }
5055
 
5056
    public getSupplier_result() {
5057
    }
5058
 
5059
    public getSupplier_result(
5060
      Supplier success,
5061
      PurchaseServiceException e)
5062
    {
5063
      this();
5064
      this.success = success;
5065
      this.e = e;
5066
    }
5067
 
5068
    /**
5069
     * Performs a deep copy on <i>other</i>.
5070
     */
5071
    public getSupplier_result(getSupplier_result other) {
5072
      if (other.isSetSuccess()) {
5073
        this.success = new Supplier(other.success);
5074
      }
5075
      if (other.isSetE()) {
5076
        this.e = new PurchaseServiceException(other.e);
5077
      }
5078
    }
5079
 
5080
    public getSupplier_result deepCopy() {
5081
      return new getSupplier_result(this);
5082
    }
5083
 
5084
    @Override
5085
    public void clear() {
5086
      this.success = null;
5087
      this.e = null;
5088
    }
5089
 
5090
    public Supplier getSuccess() {
5091
      return this.success;
5092
    }
5093
 
5094
    public void setSuccess(Supplier success) {
5095
      this.success = success;
5096
    }
5097
 
5098
    public void unsetSuccess() {
5099
      this.success = null;
5100
    }
5101
 
5102
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5103
    public boolean isSetSuccess() {
5104
      return this.success != null;
5105
    }
5106
 
5107
    public void setSuccessIsSet(boolean value) {
5108
      if (!value) {
5109
        this.success = null;
5110
      }
5111
    }
5112
 
5113
    public PurchaseServiceException getE() {
5114
      return this.e;
5115
    }
5116
 
5117
    public void setE(PurchaseServiceException e) {
5118
      this.e = e;
5119
    }
5120
 
5121
    public void unsetE() {
5122
      this.e = null;
5123
    }
5124
 
5125
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5126
    public boolean isSetE() {
5127
      return this.e != null;
5128
    }
5129
 
5130
    public void setEIsSet(boolean value) {
5131
      if (!value) {
5132
        this.e = null;
5133
      }
5134
    }
5135
 
5136
    public void setFieldValue(_Fields field, Object value) {
5137
      switch (field) {
5138
      case SUCCESS:
5139
        if (value == null) {
5140
          unsetSuccess();
5141
        } else {
5142
          setSuccess((Supplier)value);
5143
        }
5144
        break;
5145
 
5146
      case E:
5147
        if (value == null) {
5148
          unsetE();
5149
        } else {
5150
          setE((PurchaseServiceException)value);
5151
        }
5152
        break;
5153
 
5154
      }
5155
    }
5156
 
5157
    public Object getFieldValue(_Fields field) {
5158
      switch (field) {
5159
      case SUCCESS:
5160
        return getSuccess();
5161
 
5162
      case E:
5163
        return getE();
5164
 
5165
      }
5166
      throw new IllegalStateException();
5167
    }
5168
 
5169
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5170
    public boolean isSet(_Fields field) {
5171
      if (field == null) {
5172
        throw new IllegalArgumentException();
5173
      }
5174
 
5175
      switch (field) {
5176
      case SUCCESS:
5177
        return isSetSuccess();
5178
      case E:
5179
        return isSetE();
5180
      }
5181
      throw new IllegalStateException();
5182
    }
5183
 
5184
    @Override
5185
    public boolean equals(Object that) {
5186
      if (that == null)
5187
        return false;
5188
      if (that instanceof getSupplier_result)
5189
        return this.equals((getSupplier_result)that);
5190
      return false;
5191
    }
5192
 
5193
    public boolean equals(getSupplier_result that) {
5194
      if (that == null)
5195
        return false;
5196
 
5197
      boolean this_present_success = true && this.isSetSuccess();
5198
      boolean that_present_success = true && that.isSetSuccess();
5199
      if (this_present_success || that_present_success) {
5200
        if (!(this_present_success && that_present_success))
5201
          return false;
5202
        if (!this.success.equals(that.success))
5203
          return false;
5204
      }
5205
 
5206
      boolean this_present_e = true && this.isSetE();
5207
      boolean that_present_e = true && that.isSetE();
5208
      if (this_present_e || that_present_e) {
5209
        if (!(this_present_e && that_present_e))
5210
          return false;
5211
        if (!this.e.equals(that.e))
5212
          return false;
5213
      }
5214
 
5215
      return true;
5216
    }
5217
 
5218
    @Override
5219
    public int hashCode() {
5220
      return 0;
5221
    }
5222
 
5223
    public int compareTo(getSupplier_result other) {
5224
      if (!getClass().equals(other.getClass())) {
5225
        return getClass().getName().compareTo(other.getClass().getName());
5226
      }
5227
 
5228
      int lastComparison = 0;
5229
      getSupplier_result typedOther = (getSupplier_result)other;
5230
 
5231
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5232
      if (lastComparison != 0) {
5233
        return lastComparison;
5234
      }
5235
      if (isSetSuccess()) {
5236
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5237
        if (lastComparison != 0) {
5238
          return lastComparison;
5239
        }
5240
      }
5241
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5242
      if (lastComparison != 0) {
5243
        return lastComparison;
5244
      }
5245
      if (isSetE()) {
5246
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5247
        if (lastComparison != 0) {
5248
          return lastComparison;
5249
        }
5250
      }
5251
      return 0;
5252
    }
5253
 
5254
    public _Fields fieldForId(int fieldId) {
5255
      return _Fields.findByThriftId(fieldId);
5256
    }
5257
 
5258
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5259
      org.apache.thrift.protocol.TField field;
5260
      iprot.readStructBegin();
5261
      while (true)
5262
      {
5263
        field = iprot.readFieldBegin();
5264
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5265
          break;
5266
        }
5267
        switch (field.id) {
5268
          case 0: // SUCCESS
5269
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5270
              this.success = new Supplier();
5271
              this.success.read(iprot);
5272
            } else { 
5273
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5274
            }
5275
            break;
5276
          case 1: // E
5277
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5278
              this.e = new PurchaseServiceException();
5279
              this.e.read(iprot);
5280
            } else { 
5281
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5282
            }
5283
            break;
5284
          default:
5285
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5286
        }
5287
        iprot.readFieldEnd();
5288
      }
5289
      iprot.readStructEnd();
5290
      validate();
5291
    }
5292
 
5293
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5294
      oprot.writeStructBegin(STRUCT_DESC);
5295
 
5296
      if (this.isSetSuccess()) {
5297
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5298
        this.success.write(oprot);
5299
        oprot.writeFieldEnd();
5300
      } else if (this.isSetE()) {
5301
        oprot.writeFieldBegin(E_FIELD_DESC);
5302
        this.e.write(oprot);
5303
        oprot.writeFieldEnd();
5304
      }
5305
      oprot.writeFieldStop();
5306
      oprot.writeStructEnd();
5307
    }
5308
 
5309
    @Override
5310
    public String toString() {
5311
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5312
      boolean first = true;
5313
 
5314
      sb.append("success:");
5315
      if (this.success == null) {
5316
        sb.append("null");
5317
      } else {
5318
        sb.append(this.success);
5319
      }
5320
      first = false;
5321
      if (!first) sb.append(", ");
5322
      sb.append("e:");
5323
      if (this.e == null) {
5324
        sb.append("null");
5325
      } else {
5326
        sb.append(this.e);
5327
      }
5328
      first = false;
5329
      sb.append(")");
5330
      return sb.toString();
5331
    }
5332
 
5333
    public void validate() throws org.apache.thrift.TException {
5334
      // check for required fields
5335
    }
5336
 
5337
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5338
      try {
5339
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5340
      } catch (org.apache.thrift.TException te) {
5341
        throw new java.io.IOException(te);
5342
      }
5343
    }
5344
 
5345
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5346
      try {
5347
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5348
      } catch (org.apache.thrift.TException te) {
5349
        throw new java.io.IOException(te);
5350
      }
5351
    }
5352
 
5353
  }
5354
 
5355
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5356
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5357
 
5358
    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);
5359
    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);
5360
    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);
5361
 
5362
    private long purchaseOrderId; // required
5363
    private String invoiceNumber; // required
5364
    private double freightCharges; // required
5365
 
5366
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5367
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5368
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5369
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5370
      FREIGHT_CHARGES((short)3, "freightCharges");
5371
 
5372
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5373
 
5374
      static {
5375
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5376
          byName.put(field.getFieldName(), field);
5377
        }
5378
      }
5379
 
5380
      /**
5381
       * Find the _Fields constant that matches fieldId, or null if its not found.
5382
       */
5383
      public static _Fields findByThriftId(int fieldId) {
5384
        switch(fieldId) {
5385
          case 1: // PURCHASE_ORDER_ID
5386
            return PURCHASE_ORDER_ID;
5387
          case 2: // INVOICE_NUMBER
5388
            return INVOICE_NUMBER;
5389
          case 3: // FREIGHT_CHARGES
5390
            return FREIGHT_CHARGES;
5391
          default:
5392
            return null;
5393
        }
5394
      }
5395
 
5396
      /**
5397
       * Find the _Fields constant that matches fieldId, throwing an exception
5398
       * if it is not found.
5399
       */
5400
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5401
        _Fields fields = findByThriftId(fieldId);
5402
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5403
        return fields;
5404
      }
5405
 
5406
      /**
5407
       * Find the _Fields constant that matches name, or null if its not found.
5408
       */
5409
      public static _Fields findByName(String name) {
5410
        return byName.get(name);
5411
      }
5412
 
5413
      private final short _thriftId;
5414
      private final String _fieldName;
5415
 
5416
      _Fields(short thriftId, String fieldName) {
5417
        _thriftId = thriftId;
5418
        _fieldName = fieldName;
5419
      }
5420
 
5421
      public short getThriftFieldId() {
5422
        return _thriftId;
5423
      }
5424
 
5425
      public String getFieldName() {
5426
        return _fieldName;
5427
      }
5428
    }
5429
 
5430
    // isset id assignments
5431
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5432
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5433
    private BitSet __isset_bit_vector = new BitSet(2);
5434
 
5435
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5436
    static {
5437
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5438
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5439
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5440
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5441
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5442
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5443
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5444
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5445
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5446
    }
5447
 
5448
    public startPurchase_args() {
5449
    }
5450
 
5451
    public startPurchase_args(
5452
      long purchaseOrderId,
5453
      String invoiceNumber,
5454
      double freightCharges)
5455
    {
5456
      this();
5457
      this.purchaseOrderId = purchaseOrderId;
5458
      setPurchaseOrderIdIsSet(true);
5459
      this.invoiceNumber = invoiceNumber;
5460
      this.freightCharges = freightCharges;
5461
      setFreightChargesIsSet(true);
5462
    }
5463
 
5464
    /**
5465
     * Performs a deep copy on <i>other</i>.
5466
     */
5467
    public startPurchase_args(startPurchase_args other) {
5468
      __isset_bit_vector.clear();
5469
      __isset_bit_vector.or(other.__isset_bit_vector);
5470
      this.purchaseOrderId = other.purchaseOrderId;
5471
      if (other.isSetInvoiceNumber()) {
5472
        this.invoiceNumber = other.invoiceNumber;
5473
      }
5474
      this.freightCharges = other.freightCharges;
5475
    }
5476
 
5477
    public startPurchase_args deepCopy() {
5478
      return new startPurchase_args(this);
5479
    }
5480
 
5481
    @Override
5482
    public void clear() {
5483
      setPurchaseOrderIdIsSet(false);
5484
      this.purchaseOrderId = 0;
5485
      this.invoiceNumber = null;
5486
      setFreightChargesIsSet(false);
5487
      this.freightCharges = 0.0;
5488
    }
5489
 
5490
    public long getPurchaseOrderId() {
5491
      return this.purchaseOrderId;
5492
    }
5493
 
5494
    public void setPurchaseOrderId(long purchaseOrderId) {
5495
      this.purchaseOrderId = purchaseOrderId;
5496
      setPurchaseOrderIdIsSet(true);
5497
    }
5498
 
5499
    public void unsetPurchaseOrderId() {
5500
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5501
    }
5502
 
5503
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5504
    public boolean isSetPurchaseOrderId() {
5505
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5506
    }
5507
 
5508
    public void setPurchaseOrderIdIsSet(boolean value) {
5509
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5510
    }
5511
 
5512
    public String getInvoiceNumber() {
5513
      return this.invoiceNumber;
5514
    }
5515
 
5516
    public void setInvoiceNumber(String invoiceNumber) {
5517
      this.invoiceNumber = invoiceNumber;
5518
    }
5519
 
5520
    public void unsetInvoiceNumber() {
5521
      this.invoiceNumber = null;
5522
    }
5523
 
5524
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5525
    public boolean isSetInvoiceNumber() {
5526
      return this.invoiceNumber != null;
5527
    }
5528
 
5529
    public void setInvoiceNumberIsSet(boolean value) {
5530
      if (!value) {
5531
        this.invoiceNumber = null;
5532
      }
5533
    }
5534
 
5535
    public double getFreightCharges() {
5536
      return this.freightCharges;
5537
    }
5538
 
5539
    public void setFreightCharges(double freightCharges) {
5540
      this.freightCharges = freightCharges;
5541
      setFreightChargesIsSet(true);
5542
    }
5543
 
5544
    public void unsetFreightCharges() {
5545
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5546
    }
5547
 
5548
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5549
    public boolean isSetFreightCharges() {
5550
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5551
    }
5552
 
5553
    public void setFreightChargesIsSet(boolean value) {
5554
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5555
    }
5556
 
5557
    public void setFieldValue(_Fields field, Object value) {
5558
      switch (field) {
5559
      case PURCHASE_ORDER_ID:
5560
        if (value == null) {
5561
          unsetPurchaseOrderId();
5562
        } else {
5563
          setPurchaseOrderId((Long)value);
5564
        }
5565
        break;
5566
 
5567
      case INVOICE_NUMBER:
5568
        if (value == null) {
5569
          unsetInvoiceNumber();
5570
        } else {
5571
          setInvoiceNumber((String)value);
5572
        }
5573
        break;
5574
 
5575
      case FREIGHT_CHARGES:
5576
        if (value == null) {
5577
          unsetFreightCharges();
5578
        } else {
5579
          setFreightCharges((Double)value);
5580
        }
5581
        break;
5582
 
5583
      }
5584
    }
5585
 
5586
    public Object getFieldValue(_Fields field) {
5587
      switch (field) {
5588
      case PURCHASE_ORDER_ID:
5589
        return Long.valueOf(getPurchaseOrderId());
5590
 
5591
      case INVOICE_NUMBER:
5592
        return getInvoiceNumber();
5593
 
5594
      case FREIGHT_CHARGES:
5595
        return Double.valueOf(getFreightCharges());
5596
 
5597
      }
5598
      throw new IllegalStateException();
5599
    }
5600
 
5601
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5602
    public boolean isSet(_Fields field) {
5603
      if (field == null) {
5604
        throw new IllegalArgumentException();
5605
      }
5606
 
5607
      switch (field) {
5608
      case PURCHASE_ORDER_ID:
5609
        return isSetPurchaseOrderId();
5610
      case INVOICE_NUMBER:
5611
        return isSetInvoiceNumber();
5612
      case FREIGHT_CHARGES:
5613
        return isSetFreightCharges();
5614
      }
5615
      throw new IllegalStateException();
5616
    }
5617
 
5618
    @Override
5619
    public boolean equals(Object that) {
5620
      if (that == null)
5621
        return false;
5622
      if (that instanceof startPurchase_args)
5623
        return this.equals((startPurchase_args)that);
5624
      return false;
5625
    }
5626
 
5627
    public boolean equals(startPurchase_args that) {
5628
      if (that == null)
5629
        return false;
5630
 
5631
      boolean this_present_purchaseOrderId = true;
5632
      boolean that_present_purchaseOrderId = true;
5633
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5634
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5635
          return false;
5636
        if (this.purchaseOrderId != that.purchaseOrderId)
5637
          return false;
5638
      }
5639
 
5640
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5641
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5642
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5643
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5644
          return false;
5645
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5646
          return false;
5647
      }
5648
 
5649
      boolean this_present_freightCharges = true;
5650
      boolean that_present_freightCharges = true;
5651
      if (this_present_freightCharges || that_present_freightCharges) {
5652
        if (!(this_present_freightCharges && that_present_freightCharges))
5653
          return false;
5654
        if (this.freightCharges != that.freightCharges)
5655
          return false;
5656
      }
5657
 
5658
      return true;
5659
    }
5660
 
5661
    @Override
5662
    public int hashCode() {
5663
      return 0;
5664
    }
5665
 
5666
    public int compareTo(startPurchase_args other) {
5667
      if (!getClass().equals(other.getClass())) {
5668
        return getClass().getName().compareTo(other.getClass().getName());
5669
      }
5670
 
5671
      int lastComparison = 0;
5672
      startPurchase_args typedOther = (startPurchase_args)other;
5673
 
5674
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5675
      if (lastComparison != 0) {
5676
        return lastComparison;
5677
      }
5678
      if (isSetPurchaseOrderId()) {
5679
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5680
        if (lastComparison != 0) {
5681
          return lastComparison;
5682
        }
5683
      }
5684
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5685
      if (lastComparison != 0) {
5686
        return lastComparison;
5687
      }
5688
      if (isSetInvoiceNumber()) {
5689
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5690
        if (lastComparison != 0) {
5691
          return lastComparison;
5692
        }
5693
      }
5694
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5695
      if (lastComparison != 0) {
5696
        return lastComparison;
5697
      }
5698
      if (isSetFreightCharges()) {
5699
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5700
        if (lastComparison != 0) {
5701
          return lastComparison;
5702
        }
5703
      }
5704
      return 0;
5705
    }
5706
 
5707
    public _Fields fieldForId(int fieldId) {
5708
      return _Fields.findByThriftId(fieldId);
5709
    }
5710
 
5711
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5712
      org.apache.thrift.protocol.TField field;
5713
      iprot.readStructBegin();
5714
      while (true)
5715
      {
5716
        field = iprot.readFieldBegin();
5717
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5718
          break;
5719
        }
5720
        switch (field.id) {
5721
          case 1: // PURCHASE_ORDER_ID
5722
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5723
              this.purchaseOrderId = iprot.readI64();
5724
              setPurchaseOrderIdIsSet(true);
5725
            } else { 
5726
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5727
            }
5728
            break;
5729
          case 2: // INVOICE_NUMBER
5730
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5731
              this.invoiceNumber = iprot.readString();
5732
            } else { 
5733
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5734
            }
5735
            break;
5736
          case 3: // FREIGHT_CHARGES
5737
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5738
              this.freightCharges = iprot.readDouble();
5739
              setFreightChargesIsSet(true);
5740
            } else { 
5741
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5742
            }
5743
            break;
5744
          default:
5745
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5746
        }
5747
        iprot.readFieldEnd();
5748
      }
5749
      iprot.readStructEnd();
5750
      validate();
5751
    }
5752
 
5753
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5754
      validate();
5755
 
5756
      oprot.writeStructBegin(STRUCT_DESC);
5757
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5758
      oprot.writeI64(this.purchaseOrderId);
5759
      oprot.writeFieldEnd();
5760
      if (this.invoiceNumber != null) {
5761
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5762
        oprot.writeString(this.invoiceNumber);
5763
        oprot.writeFieldEnd();
5764
      }
5765
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5766
      oprot.writeDouble(this.freightCharges);
5767
      oprot.writeFieldEnd();
5768
      oprot.writeFieldStop();
5769
      oprot.writeStructEnd();
5770
    }
5771
 
5772
    @Override
5773
    public String toString() {
5774
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5775
      boolean first = true;
5776
 
5777
      sb.append("purchaseOrderId:");
5778
      sb.append(this.purchaseOrderId);
5779
      first = false;
5780
      if (!first) sb.append(", ");
5781
      sb.append("invoiceNumber:");
5782
      if (this.invoiceNumber == null) {
5783
        sb.append("null");
5784
      } else {
5785
        sb.append(this.invoiceNumber);
5786
      }
5787
      first = false;
5788
      if (!first) sb.append(", ");
5789
      sb.append("freightCharges:");
5790
      sb.append(this.freightCharges);
5791
      first = false;
5792
      sb.append(")");
5793
      return sb.toString();
5794
    }
5795
 
5796
    public void validate() throws org.apache.thrift.TException {
5797
      // check for required fields
5798
    }
5799
 
5800
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5801
      try {
5802
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5803
      } catch (org.apache.thrift.TException te) {
5804
        throw new java.io.IOException(te);
5805
      }
5806
    }
5807
 
5808
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5809
      try {
5810
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5811
      } catch (org.apache.thrift.TException te) {
5812
        throw new java.io.IOException(te);
5813
      }
5814
    }
5815
 
5816
  }
5817
 
5818
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5819
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5820
 
5821
    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);
5822
    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);
5823
 
5824
    private long success; // required
5825
    private PurchaseServiceException e; // required
5826
 
5827
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5828
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5829
      SUCCESS((short)0, "success"),
5830
      E((short)1, "e");
5831
 
5832
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5833
 
5834
      static {
5835
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5836
          byName.put(field.getFieldName(), field);
5837
        }
5838
      }
5839
 
5840
      /**
5841
       * Find the _Fields constant that matches fieldId, or null if its not found.
5842
       */
5843
      public static _Fields findByThriftId(int fieldId) {
5844
        switch(fieldId) {
5845
          case 0: // SUCCESS
5846
            return SUCCESS;
5847
          case 1: // E
5848
            return E;
5849
          default:
5850
            return null;
5851
        }
5852
      }
5853
 
5854
      /**
5855
       * Find the _Fields constant that matches fieldId, throwing an exception
5856
       * if it is not found.
5857
       */
5858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5859
        _Fields fields = findByThriftId(fieldId);
5860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5861
        return fields;
5862
      }
5863
 
5864
      /**
5865
       * Find the _Fields constant that matches name, or null if its not found.
5866
       */
5867
      public static _Fields findByName(String name) {
5868
        return byName.get(name);
5869
      }
5870
 
5871
      private final short _thriftId;
5872
      private final String _fieldName;
5873
 
5874
      _Fields(short thriftId, String fieldName) {
5875
        _thriftId = thriftId;
5876
        _fieldName = fieldName;
5877
      }
5878
 
5879
      public short getThriftFieldId() {
5880
        return _thriftId;
5881
      }
5882
 
5883
      public String getFieldName() {
5884
        return _fieldName;
5885
      }
5886
    }
5887
 
5888
    // isset id assignments
5889
    private static final int __SUCCESS_ISSET_ID = 0;
5890
    private BitSet __isset_bit_vector = new BitSet(1);
5891
 
5892
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5893
    static {
5894
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5895
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5896
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5897
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5898
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5899
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5900
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5901
    }
5902
 
5903
    public startPurchase_result() {
5904
    }
5905
 
5906
    public startPurchase_result(
5907
      long success,
5908
      PurchaseServiceException e)
5909
    {
5910
      this();
5911
      this.success = success;
5912
      setSuccessIsSet(true);
5913
      this.e = e;
5914
    }
5915
 
5916
    /**
5917
     * Performs a deep copy on <i>other</i>.
5918
     */
5919
    public startPurchase_result(startPurchase_result other) {
5920
      __isset_bit_vector.clear();
5921
      __isset_bit_vector.or(other.__isset_bit_vector);
5922
      this.success = other.success;
5923
      if (other.isSetE()) {
5924
        this.e = new PurchaseServiceException(other.e);
5925
      }
5926
    }
5927
 
5928
    public startPurchase_result deepCopy() {
5929
      return new startPurchase_result(this);
5930
    }
5931
 
5932
    @Override
5933
    public void clear() {
5934
      setSuccessIsSet(false);
5935
      this.success = 0;
5936
      this.e = null;
5937
    }
5938
 
5939
    public long getSuccess() {
5940
      return this.success;
5941
    }
5942
 
5943
    public void setSuccess(long success) {
5944
      this.success = success;
5945
      setSuccessIsSet(true);
5946
    }
5947
 
5948
    public void unsetSuccess() {
5949
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5950
    }
5951
 
5952
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5953
    public boolean isSetSuccess() {
5954
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5955
    }
5956
 
5957
    public void setSuccessIsSet(boolean value) {
5958
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5959
    }
5960
 
5961
    public PurchaseServiceException getE() {
5962
      return this.e;
5963
    }
5964
 
5965
    public void setE(PurchaseServiceException e) {
5966
      this.e = e;
5967
    }
5968
 
5969
    public void unsetE() {
5970
      this.e = null;
5971
    }
5972
 
5973
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5974
    public boolean isSetE() {
5975
      return this.e != null;
5976
    }
5977
 
5978
    public void setEIsSet(boolean value) {
5979
      if (!value) {
5980
        this.e = null;
5981
      }
5982
    }
5983
 
5984
    public void setFieldValue(_Fields field, Object value) {
5985
      switch (field) {
5986
      case SUCCESS:
5987
        if (value == null) {
5988
          unsetSuccess();
5989
        } else {
5990
          setSuccess((Long)value);
5991
        }
5992
        break;
5993
 
5994
      case E:
5995
        if (value == null) {
5996
          unsetE();
5997
        } else {
5998
          setE((PurchaseServiceException)value);
5999
        }
6000
        break;
6001
 
6002
      }
6003
    }
6004
 
6005
    public Object getFieldValue(_Fields field) {
6006
      switch (field) {
6007
      case SUCCESS:
6008
        return Long.valueOf(getSuccess());
6009
 
6010
      case E:
6011
        return getE();
6012
 
6013
      }
6014
      throw new IllegalStateException();
6015
    }
6016
 
6017
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6018
    public boolean isSet(_Fields field) {
6019
      if (field == null) {
6020
        throw new IllegalArgumentException();
6021
      }
6022
 
6023
      switch (field) {
6024
      case SUCCESS:
6025
        return isSetSuccess();
6026
      case E:
6027
        return isSetE();
6028
      }
6029
      throw new IllegalStateException();
6030
    }
6031
 
6032
    @Override
6033
    public boolean equals(Object that) {
6034
      if (that == null)
6035
        return false;
6036
      if (that instanceof startPurchase_result)
6037
        return this.equals((startPurchase_result)that);
6038
      return false;
6039
    }
6040
 
6041
    public boolean equals(startPurchase_result that) {
6042
      if (that == null)
6043
        return false;
6044
 
6045
      boolean this_present_success = true;
6046
      boolean that_present_success = true;
6047
      if (this_present_success || that_present_success) {
6048
        if (!(this_present_success && that_present_success))
6049
          return false;
6050
        if (this.success != that.success)
6051
          return false;
6052
      }
6053
 
6054
      boolean this_present_e = true && this.isSetE();
6055
      boolean that_present_e = true && that.isSetE();
6056
      if (this_present_e || that_present_e) {
6057
        if (!(this_present_e && that_present_e))
6058
          return false;
6059
        if (!this.e.equals(that.e))
6060
          return false;
6061
      }
6062
 
6063
      return true;
6064
    }
6065
 
6066
    @Override
6067
    public int hashCode() {
6068
      return 0;
6069
    }
6070
 
6071
    public int compareTo(startPurchase_result other) {
6072
      if (!getClass().equals(other.getClass())) {
6073
        return getClass().getName().compareTo(other.getClass().getName());
6074
      }
6075
 
6076
      int lastComparison = 0;
6077
      startPurchase_result typedOther = (startPurchase_result)other;
6078
 
6079
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6080
      if (lastComparison != 0) {
6081
        return lastComparison;
6082
      }
6083
      if (isSetSuccess()) {
6084
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6085
        if (lastComparison != 0) {
6086
          return lastComparison;
6087
        }
6088
      }
6089
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6090
      if (lastComparison != 0) {
6091
        return lastComparison;
6092
      }
6093
      if (isSetE()) {
6094
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6095
        if (lastComparison != 0) {
6096
          return lastComparison;
6097
        }
6098
      }
6099
      return 0;
6100
    }
6101
 
6102
    public _Fields fieldForId(int fieldId) {
6103
      return _Fields.findByThriftId(fieldId);
6104
    }
6105
 
6106
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6107
      org.apache.thrift.protocol.TField field;
6108
      iprot.readStructBegin();
6109
      while (true)
6110
      {
6111
        field = iprot.readFieldBegin();
6112
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6113
          break;
6114
        }
6115
        switch (field.id) {
6116
          case 0: // SUCCESS
6117
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6118
              this.success = iprot.readI64();
6119
              setSuccessIsSet(true);
6120
            } else { 
6121
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6122
            }
6123
            break;
6124
          case 1: // E
6125
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6126
              this.e = new PurchaseServiceException();
6127
              this.e.read(iprot);
6128
            } else { 
6129
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6130
            }
6131
            break;
6132
          default:
6133
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6134
        }
6135
        iprot.readFieldEnd();
6136
      }
6137
      iprot.readStructEnd();
6138
      validate();
6139
    }
6140
 
6141
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6142
      oprot.writeStructBegin(STRUCT_DESC);
6143
 
6144
      if (this.isSetSuccess()) {
6145
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6146
        oprot.writeI64(this.success);
6147
        oprot.writeFieldEnd();
6148
      } else if (this.isSetE()) {
6149
        oprot.writeFieldBegin(E_FIELD_DESC);
6150
        this.e.write(oprot);
6151
        oprot.writeFieldEnd();
6152
      }
6153
      oprot.writeFieldStop();
6154
      oprot.writeStructEnd();
6155
    }
6156
 
6157
    @Override
6158
    public String toString() {
6159
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6160
      boolean first = true;
6161
 
6162
      sb.append("success:");
6163
      sb.append(this.success);
6164
      first = false;
6165
      if (!first) sb.append(", ");
6166
      sb.append("e:");
6167
      if (this.e == null) {
6168
        sb.append("null");
6169
      } else {
6170
        sb.append(this.e);
6171
      }
6172
      first = false;
6173
      sb.append(")");
6174
      return sb.toString();
6175
    }
6176
 
6177
    public void validate() throws org.apache.thrift.TException {
6178
      // check for required fields
6179
    }
6180
 
6181
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6182
      try {
6183
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6184
      } catch (org.apache.thrift.TException te) {
6185
        throw new java.io.IOException(te);
6186
      }
6187
    }
6188
 
6189
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6190
      try {
6191
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6192
      } catch (org.apache.thrift.TException te) {
6193
        throw new java.io.IOException(te);
6194
      }
6195
    }
6196
 
6197
  }
6198
 
6199
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6200
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6201
 
6202
    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);
6203
 
6204
    private long purchaseId; // required
6205
 
6206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6207
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6208
      PURCHASE_ID((short)1, "purchaseId");
6209
 
6210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6211
 
6212
      static {
6213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6214
          byName.put(field.getFieldName(), field);
6215
        }
6216
      }
6217
 
6218
      /**
6219
       * Find the _Fields constant that matches fieldId, or null if its not found.
6220
       */
6221
      public static _Fields findByThriftId(int fieldId) {
6222
        switch(fieldId) {
6223
          case 1: // PURCHASE_ID
6224
            return PURCHASE_ID;
6225
          default:
6226
            return null;
6227
        }
6228
      }
6229
 
6230
      /**
6231
       * Find the _Fields constant that matches fieldId, throwing an exception
6232
       * if it is not found.
6233
       */
6234
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6235
        _Fields fields = findByThriftId(fieldId);
6236
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6237
        return fields;
6238
      }
6239
 
6240
      /**
6241
       * Find the _Fields constant that matches name, or null if its not found.
6242
       */
6243
      public static _Fields findByName(String name) {
6244
        return byName.get(name);
6245
      }
6246
 
6247
      private final short _thriftId;
6248
      private final String _fieldName;
6249
 
6250
      _Fields(short thriftId, String fieldName) {
6251
        _thriftId = thriftId;
6252
        _fieldName = fieldName;
6253
      }
6254
 
6255
      public short getThriftFieldId() {
6256
        return _thriftId;
6257
      }
6258
 
6259
      public String getFieldName() {
6260
        return _fieldName;
6261
      }
6262
    }
6263
 
6264
    // isset id assignments
6265
    private static final int __PURCHASEID_ISSET_ID = 0;
6266
    private BitSet __isset_bit_vector = new BitSet(1);
6267
 
6268
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6269
    static {
6270
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6271
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6272
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6273
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6274
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6275
    }
6276
 
6277
    public closePurchase_args() {
6278
    }
6279
 
6280
    public closePurchase_args(
6281
      long purchaseId)
6282
    {
6283
      this();
6284
      this.purchaseId = purchaseId;
6285
      setPurchaseIdIsSet(true);
6286
    }
6287
 
6288
    /**
6289
     * Performs a deep copy on <i>other</i>.
6290
     */
6291
    public closePurchase_args(closePurchase_args other) {
6292
      __isset_bit_vector.clear();
6293
      __isset_bit_vector.or(other.__isset_bit_vector);
6294
      this.purchaseId = other.purchaseId;
6295
    }
6296
 
6297
    public closePurchase_args deepCopy() {
6298
      return new closePurchase_args(this);
6299
    }
6300
 
6301
    @Override
6302
    public void clear() {
6303
      setPurchaseIdIsSet(false);
6304
      this.purchaseId = 0;
6305
    }
6306
 
6307
    public long getPurchaseId() {
6308
      return this.purchaseId;
6309
    }
6310
 
6311
    public void setPurchaseId(long purchaseId) {
6312
      this.purchaseId = purchaseId;
6313
      setPurchaseIdIsSet(true);
6314
    }
6315
 
6316
    public void unsetPurchaseId() {
6317
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6318
    }
6319
 
6320
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6321
    public boolean isSetPurchaseId() {
6322
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6323
    }
6324
 
6325
    public void setPurchaseIdIsSet(boolean value) {
6326
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6327
    }
6328
 
6329
    public void setFieldValue(_Fields field, Object value) {
6330
      switch (field) {
6331
      case PURCHASE_ID:
6332
        if (value == null) {
6333
          unsetPurchaseId();
6334
        } else {
6335
          setPurchaseId((Long)value);
6336
        }
6337
        break;
6338
 
6339
      }
6340
    }
6341
 
6342
    public Object getFieldValue(_Fields field) {
6343
      switch (field) {
6344
      case PURCHASE_ID:
6345
        return Long.valueOf(getPurchaseId());
6346
 
6347
      }
6348
      throw new IllegalStateException();
6349
    }
6350
 
6351
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6352
    public boolean isSet(_Fields field) {
6353
      if (field == null) {
6354
        throw new IllegalArgumentException();
6355
      }
6356
 
6357
      switch (field) {
6358
      case PURCHASE_ID:
6359
        return isSetPurchaseId();
6360
      }
6361
      throw new IllegalStateException();
6362
    }
6363
 
6364
    @Override
6365
    public boolean equals(Object that) {
6366
      if (that == null)
6367
        return false;
6368
      if (that instanceof closePurchase_args)
6369
        return this.equals((closePurchase_args)that);
6370
      return false;
6371
    }
6372
 
6373
    public boolean equals(closePurchase_args that) {
6374
      if (that == null)
6375
        return false;
6376
 
6377
      boolean this_present_purchaseId = true;
6378
      boolean that_present_purchaseId = true;
6379
      if (this_present_purchaseId || that_present_purchaseId) {
6380
        if (!(this_present_purchaseId && that_present_purchaseId))
6381
          return false;
6382
        if (this.purchaseId != that.purchaseId)
6383
          return false;
6384
      }
6385
 
6386
      return true;
6387
    }
6388
 
6389
    @Override
6390
    public int hashCode() {
6391
      return 0;
6392
    }
6393
 
6394
    public int compareTo(closePurchase_args other) {
6395
      if (!getClass().equals(other.getClass())) {
6396
        return getClass().getName().compareTo(other.getClass().getName());
6397
      }
6398
 
6399
      int lastComparison = 0;
6400
      closePurchase_args typedOther = (closePurchase_args)other;
6401
 
6402
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6403
      if (lastComparison != 0) {
6404
        return lastComparison;
6405
      }
6406
      if (isSetPurchaseId()) {
6407
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6408
        if (lastComparison != 0) {
6409
          return lastComparison;
6410
        }
6411
      }
6412
      return 0;
6413
    }
6414
 
6415
    public _Fields fieldForId(int fieldId) {
6416
      return _Fields.findByThriftId(fieldId);
6417
    }
6418
 
6419
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6420
      org.apache.thrift.protocol.TField field;
6421
      iprot.readStructBegin();
6422
      while (true)
6423
      {
6424
        field = iprot.readFieldBegin();
6425
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6426
          break;
6427
        }
6428
        switch (field.id) {
6429
          case 1: // PURCHASE_ID
6430
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6431
              this.purchaseId = iprot.readI64();
6432
              setPurchaseIdIsSet(true);
6433
            } else { 
6434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6435
            }
6436
            break;
6437
          default:
6438
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6439
        }
6440
        iprot.readFieldEnd();
6441
      }
6442
      iprot.readStructEnd();
6443
      validate();
6444
    }
6445
 
6446
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6447
      validate();
6448
 
6449
      oprot.writeStructBegin(STRUCT_DESC);
6450
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6451
      oprot.writeI64(this.purchaseId);
6452
      oprot.writeFieldEnd();
6453
      oprot.writeFieldStop();
6454
      oprot.writeStructEnd();
6455
    }
6456
 
6457
    @Override
6458
    public String toString() {
6459
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6460
      boolean first = true;
6461
 
6462
      sb.append("purchaseId:");
6463
      sb.append(this.purchaseId);
6464
      first = false;
6465
      sb.append(")");
6466
      return sb.toString();
6467
    }
6468
 
6469
    public void validate() throws org.apache.thrift.TException {
6470
      // check for required fields
6471
    }
6472
 
6473
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6474
      try {
6475
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6476
      } catch (org.apache.thrift.TException te) {
6477
        throw new java.io.IOException(te);
6478
      }
6479
    }
6480
 
6481
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6482
      try {
6483
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6484
      } catch (org.apache.thrift.TException te) {
6485
        throw new java.io.IOException(te);
6486
      }
6487
    }
6488
 
6489
  }
6490
 
6491
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6492
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6493
 
6494
    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);
6495
    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);
6496
 
6497
    private long success; // required
6498
    private PurchaseServiceException e; // required
6499
 
6500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6501
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6502
      SUCCESS((short)0, "success"),
6503
      E((short)1, "e");
6504
 
6505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6506
 
6507
      static {
6508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6509
          byName.put(field.getFieldName(), field);
6510
        }
6511
      }
6512
 
6513
      /**
6514
       * Find the _Fields constant that matches fieldId, or null if its not found.
6515
       */
6516
      public static _Fields findByThriftId(int fieldId) {
6517
        switch(fieldId) {
6518
          case 0: // SUCCESS
6519
            return SUCCESS;
6520
          case 1: // E
6521
            return E;
6522
          default:
6523
            return null;
6524
        }
6525
      }
6526
 
6527
      /**
6528
       * Find the _Fields constant that matches fieldId, throwing an exception
6529
       * if it is not found.
6530
       */
6531
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6532
        _Fields fields = findByThriftId(fieldId);
6533
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6534
        return fields;
6535
      }
6536
 
6537
      /**
6538
       * Find the _Fields constant that matches name, or null if its not found.
6539
       */
6540
      public static _Fields findByName(String name) {
6541
        return byName.get(name);
6542
      }
6543
 
6544
      private final short _thriftId;
6545
      private final String _fieldName;
6546
 
6547
      _Fields(short thriftId, String fieldName) {
6548
        _thriftId = thriftId;
6549
        _fieldName = fieldName;
6550
      }
6551
 
6552
      public short getThriftFieldId() {
6553
        return _thriftId;
6554
      }
6555
 
6556
      public String getFieldName() {
6557
        return _fieldName;
6558
      }
6559
    }
6560
 
6561
    // isset id assignments
6562
    private static final int __SUCCESS_ISSET_ID = 0;
6563
    private BitSet __isset_bit_vector = new BitSet(1);
6564
 
6565
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6566
    static {
6567
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6568
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6569
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6570
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6571
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6572
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6573
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6574
    }
6575
 
6576
    public closePurchase_result() {
6577
    }
6578
 
6579
    public closePurchase_result(
6580
      long success,
6581
      PurchaseServiceException e)
6582
    {
6583
      this();
6584
      this.success = success;
6585
      setSuccessIsSet(true);
6586
      this.e = e;
6587
    }
6588
 
6589
    /**
6590
     * Performs a deep copy on <i>other</i>.
6591
     */
6592
    public closePurchase_result(closePurchase_result other) {
6593
      __isset_bit_vector.clear();
6594
      __isset_bit_vector.or(other.__isset_bit_vector);
6595
      this.success = other.success;
6596
      if (other.isSetE()) {
6597
        this.e = new PurchaseServiceException(other.e);
6598
      }
6599
    }
6600
 
6601
    public closePurchase_result deepCopy() {
6602
      return new closePurchase_result(this);
6603
    }
6604
 
6605
    @Override
6606
    public void clear() {
6607
      setSuccessIsSet(false);
6608
      this.success = 0;
6609
      this.e = null;
6610
    }
6611
 
6612
    public long getSuccess() {
6613
      return this.success;
6614
    }
6615
 
6616
    public void setSuccess(long success) {
6617
      this.success = success;
6618
      setSuccessIsSet(true);
6619
    }
6620
 
6621
    public void unsetSuccess() {
6622
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6623
    }
6624
 
6625
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6626
    public boolean isSetSuccess() {
6627
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6628
    }
6629
 
6630
    public void setSuccessIsSet(boolean value) {
6631
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6632
    }
6633
 
6634
    public PurchaseServiceException getE() {
6635
      return this.e;
6636
    }
6637
 
6638
    public void setE(PurchaseServiceException e) {
6639
      this.e = e;
6640
    }
6641
 
6642
    public void unsetE() {
6643
      this.e = null;
6644
    }
6645
 
6646
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6647
    public boolean isSetE() {
6648
      return this.e != null;
6649
    }
6650
 
6651
    public void setEIsSet(boolean value) {
6652
      if (!value) {
6653
        this.e = null;
6654
      }
6655
    }
6656
 
6657
    public void setFieldValue(_Fields field, Object value) {
6658
      switch (field) {
6659
      case SUCCESS:
6660
        if (value == null) {
6661
          unsetSuccess();
6662
        } else {
6663
          setSuccess((Long)value);
6664
        }
6665
        break;
6666
 
6667
      case E:
6668
        if (value == null) {
6669
          unsetE();
6670
        } else {
6671
          setE((PurchaseServiceException)value);
6672
        }
6673
        break;
6674
 
6675
      }
6676
    }
6677
 
6678
    public Object getFieldValue(_Fields field) {
6679
      switch (field) {
6680
      case SUCCESS:
6681
        return Long.valueOf(getSuccess());
6682
 
6683
      case E:
6684
        return getE();
6685
 
6686
      }
6687
      throw new IllegalStateException();
6688
    }
6689
 
6690
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6691
    public boolean isSet(_Fields field) {
6692
      if (field == null) {
6693
        throw new IllegalArgumentException();
6694
      }
6695
 
6696
      switch (field) {
6697
      case SUCCESS:
6698
        return isSetSuccess();
6699
      case E:
6700
        return isSetE();
6701
      }
6702
      throw new IllegalStateException();
6703
    }
6704
 
6705
    @Override
6706
    public boolean equals(Object that) {
6707
      if (that == null)
6708
        return false;
6709
      if (that instanceof closePurchase_result)
6710
        return this.equals((closePurchase_result)that);
6711
      return false;
6712
    }
6713
 
6714
    public boolean equals(closePurchase_result that) {
6715
      if (that == null)
6716
        return false;
6717
 
6718
      boolean this_present_success = true;
6719
      boolean that_present_success = true;
6720
      if (this_present_success || that_present_success) {
6721
        if (!(this_present_success && that_present_success))
6722
          return false;
6723
        if (this.success != that.success)
6724
          return false;
6725
      }
6726
 
6727
      boolean this_present_e = true && this.isSetE();
6728
      boolean that_present_e = true && that.isSetE();
6729
      if (this_present_e || that_present_e) {
6730
        if (!(this_present_e && that_present_e))
6731
          return false;
6732
        if (!this.e.equals(that.e))
6733
          return false;
6734
      }
6735
 
6736
      return true;
6737
    }
6738
 
6739
    @Override
6740
    public int hashCode() {
6741
      return 0;
6742
    }
6743
 
6744
    public int compareTo(closePurchase_result other) {
6745
      if (!getClass().equals(other.getClass())) {
6746
        return getClass().getName().compareTo(other.getClass().getName());
6747
      }
6748
 
6749
      int lastComparison = 0;
6750
      closePurchase_result typedOther = (closePurchase_result)other;
6751
 
6752
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6753
      if (lastComparison != 0) {
6754
        return lastComparison;
6755
      }
6756
      if (isSetSuccess()) {
6757
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6758
        if (lastComparison != 0) {
6759
          return lastComparison;
6760
        }
6761
      }
6762
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6763
      if (lastComparison != 0) {
6764
        return lastComparison;
6765
      }
6766
      if (isSetE()) {
6767
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6768
        if (lastComparison != 0) {
6769
          return lastComparison;
6770
        }
6771
      }
6772
      return 0;
6773
    }
6774
 
6775
    public _Fields fieldForId(int fieldId) {
6776
      return _Fields.findByThriftId(fieldId);
6777
    }
6778
 
6779
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6780
      org.apache.thrift.protocol.TField field;
6781
      iprot.readStructBegin();
6782
      while (true)
6783
      {
6784
        field = iprot.readFieldBegin();
6785
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6786
          break;
6787
        }
6788
        switch (field.id) {
6789
          case 0: // SUCCESS
6790
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6791
              this.success = iprot.readI64();
6792
              setSuccessIsSet(true);
6793
            } else { 
6794
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6795
            }
6796
            break;
6797
          case 1: // E
6798
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6799
              this.e = new PurchaseServiceException();
6800
              this.e.read(iprot);
6801
            } else { 
6802
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6803
            }
6804
            break;
6805
          default:
6806
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6807
        }
6808
        iprot.readFieldEnd();
6809
      }
6810
      iprot.readStructEnd();
6811
      validate();
6812
    }
6813
 
6814
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6815
      oprot.writeStructBegin(STRUCT_DESC);
6816
 
6817
      if (this.isSetSuccess()) {
6818
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6819
        oprot.writeI64(this.success);
6820
        oprot.writeFieldEnd();
6821
      } else if (this.isSetE()) {
6822
        oprot.writeFieldBegin(E_FIELD_DESC);
6823
        this.e.write(oprot);
6824
        oprot.writeFieldEnd();
6825
      }
6826
      oprot.writeFieldStop();
6827
      oprot.writeStructEnd();
6828
    }
6829
 
6830
    @Override
6831
    public String toString() {
6832
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6833
      boolean first = true;
6834
 
6835
      sb.append("success:");
6836
      sb.append(this.success);
6837
      first = false;
6838
      if (!first) sb.append(", ");
6839
      sb.append("e:");
6840
      if (this.e == null) {
6841
        sb.append("null");
6842
      } else {
6843
        sb.append(this.e);
6844
      }
6845
      first = false;
6846
      sb.append(")");
6847
      return sb.toString();
6848
    }
6849
 
6850
    public void validate() throws org.apache.thrift.TException {
6851
      // check for required fields
6852
    }
6853
 
6854
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6855
      try {
6856
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6857
      } catch (org.apache.thrift.TException te) {
6858
        throw new java.io.IOException(te);
6859
      }
6860
    }
6861
 
6862
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6863
      try {
6864
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6865
      } catch (org.apache.thrift.TException te) {
6866
        throw new java.io.IOException(te);
6867
      }
6868
    }
6869
 
6870
  }
6871
 
6872
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6873
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6874
 
6875
    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);
6876
    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);
6877
 
6878
    private long purchaseOrderId; // required
6879
    private boolean open; // required
6880
 
6881
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6882
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6883
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6884
      OPEN((short)2, "open");
6885
 
6886
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6887
 
6888
      static {
6889
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6890
          byName.put(field.getFieldName(), field);
6891
        }
6892
      }
6893
 
6894
      /**
6895
       * Find the _Fields constant that matches fieldId, or null if its not found.
6896
       */
6897
      public static _Fields findByThriftId(int fieldId) {
6898
        switch(fieldId) {
6899
          case 1: // PURCHASE_ORDER_ID
6900
            return PURCHASE_ORDER_ID;
6901
          case 2: // OPEN
6902
            return OPEN;
6903
          default:
6904
            return null;
6905
        }
6906
      }
6907
 
6908
      /**
6909
       * Find the _Fields constant that matches fieldId, throwing an exception
6910
       * if it is not found.
6911
       */
6912
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6913
        _Fields fields = findByThriftId(fieldId);
6914
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6915
        return fields;
6916
      }
6917
 
6918
      /**
6919
       * Find the _Fields constant that matches name, or null if its not found.
6920
       */
6921
      public static _Fields findByName(String name) {
6922
        return byName.get(name);
6923
      }
6924
 
6925
      private final short _thriftId;
6926
      private final String _fieldName;
6927
 
6928
      _Fields(short thriftId, String fieldName) {
6929
        _thriftId = thriftId;
6930
        _fieldName = fieldName;
6931
      }
6932
 
6933
      public short getThriftFieldId() {
6934
        return _thriftId;
6935
      }
6936
 
6937
      public String getFieldName() {
6938
        return _fieldName;
6939
      }
6940
    }
6941
 
6942
    // isset id assignments
6943
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6944
    private static final int __OPEN_ISSET_ID = 1;
6945
    private BitSet __isset_bit_vector = new BitSet(2);
6946
 
6947
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6948
    static {
6949
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6950
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6951
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6952
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6953
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6954
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6955
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6956
    }
6957
 
6958
    public getAllPurchases_args() {
6959
    }
6960
 
6961
    public getAllPurchases_args(
6962
      long purchaseOrderId,
6963
      boolean open)
6964
    {
6965
      this();
6966
      this.purchaseOrderId = purchaseOrderId;
6967
      setPurchaseOrderIdIsSet(true);
6968
      this.open = open;
6969
      setOpenIsSet(true);
6970
    }
6971
 
6972
    /**
6973
     * Performs a deep copy on <i>other</i>.
6974
     */
6975
    public getAllPurchases_args(getAllPurchases_args other) {
6976
      __isset_bit_vector.clear();
6977
      __isset_bit_vector.or(other.__isset_bit_vector);
6978
      this.purchaseOrderId = other.purchaseOrderId;
6979
      this.open = other.open;
6980
    }
6981
 
6982
    public getAllPurchases_args deepCopy() {
6983
      return new getAllPurchases_args(this);
6984
    }
6985
 
6986
    @Override
6987
    public void clear() {
6988
      setPurchaseOrderIdIsSet(false);
6989
      this.purchaseOrderId = 0;
6990
      setOpenIsSet(false);
6991
      this.open = false;
6992
    }
6993
 
6994
    public long getPurchaseOrderId() {
6995
      return this.purchaseOrderId;
6996
    }
6997
 
6998
    public void setPurchaseOrderId(long purchaseOrderId) {
6999
      this.purchaseOrderId = purchaseOrderId;
7000
      setPurchaseOrderIdIsSet(true);
7001
    }
7002
 
7003
    public void unsetPurchaseOrderId() {
7004
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7005
    }
7006
 
7007
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7008
    public boolean isSetPurchaseOrderId() {
7009
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7010
    }
7011
 
7012
    public void setPurchaseOrderIdIsSet(boolean value) {
7013
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7014
    }
7015
 
7016
    public boolean isOpen() {
7017
      return this.open;
7018
    }
7019
 
7020
    public void setOpen(boolean open) {
7021
      this.open = open;
7022
      setOpenIsSet(true);
7023
    }
7024
 
7025
    public void unsetOpen() {
7026
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
7027
    }
7028
 
7029
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
7030
    public boolean isSetOpen() {
7031
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
7032
    }
7033
 
7034
    public void setOpenIsSet(boolean value) {
7035
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
7036
    }
7037
 
7038
    public void setFieldValue(_Fields field, Object value) {
7039
      switch (field) {
7040
      case PURCHASE_ORDER_ID:
7041
        if (value == null) {
7042
          unsetPurchaseOrderId();
7043
        } else {
7044
          setPurchaseOrderId((Long)value);
7045
        }
7046
        break;
7047
 
7048
      case OPEN:
7049
        if (value == null) {
7050
          unsetOpen();
7051
        } else {
7052
          setOpen((Boolean)value);
7053
        }
7054
        break;
7055
 
7056
      }
7057
    }
7058
 
7059
    public Object getFieldValue(_Fields field) {
7060
      switch (field) {
7061
      case PURCHASE_ORDER_ID:
7062
        return Long.valueOf(getPurchaseOrderId());
7063
 
7064
      case OPEN:
7065
        return Boolean.valueOf(isOpen());
7066
 
7067
      }
7068
      throw new IllegalStateException();
7069
    }
7070
 
7071
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7072
    public boolean isSet(_Fields field) {
7073
      if (field == null) {
7074
        throw new IllegalArgumentException();
7075
      }
7076
 
7077
      switch (field) {
7078
      case PURCHASE_ORDER_ID:
7079
        return isSetPurchaseOrderId();
7080
      case OPEN:
7081
        return isSetOpen();
7082
      }
7083
      throw new IllegalStateException();
7084
    }
7085
 
7086
    @Override
7087
    public boolean equals(Object that) {
7088
      if (that == null)
7089
        return false;
7090
      if (that instanceof getAllPurchases_args)
7091
        return this.equals((getAllPurchases_args)that);
7092
      return false;
7093
    }
7094
 
7095
    public boolean equals(getAllPurchases_args that) {
7096
      if (that == null)
7097
        return false;
7098
 
7099
      boolean this_present_purchaseOrderId = true;
7100
      boolean that_present_purchaseOrderId = true;
7101
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7102
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7103
          return false;
7104
        if (this.purchaseOrderId != that.purchaseOrderId)
7105
          return false;
7106
      }
7107
 
7108
      boolean this_present_open = true;
7109
      boolean that_present_open = true;
7110
      if (this_present_open || that_present_open) {
7111
        if (!(this_present_open && that_present_open))
7112
          return false;
7113
        if (this.open != that.open)
7114
          return false;
7115
      }
7116
 
7117
      return true;
7118
    }
7119
 
7120
    @Override
7121
    public int hashCode() {
7122
      return 0;
7123
    }
7124
 
7125
    public int compareTo(getAllPurchases_args other) {
7126
      if (!getClass().equals(other.getClass())) {
7127
        return getClass().getName().compareTo(other.getClass().getName());
7128
      }
7129
 
7130
      int lastComparison = 0;
7131
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7132
 
7133
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7134
      if (lastComparison != 0) {
7135
        return lastComparison;
7136
      }
7137
      if (isSetPurchaseOrderId()) {
7138
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7139
        if (lastComparison != 0) {
7140
          return lastComparison;
7141
        }
7142
      }
7143
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7144
      if (lastComparison != 0) {
7145
        return lastComparison;
7146
      }
7147
      if (isSetOpen()) {
7148
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7149
        if (lastComparison != 0) {
7150
          return lastComparison;
7151
        }
7152
      }
7153
      return 0;
7154
    }
7155
 
7156
    public _Fields fieldForId(int fieldId) {
7157
      return _Fields.findByThriftId(fieldId);
7158
    }
7159
 
7160
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7161
      org.apache.thrift.protocol.TField field;
7162
      iprot.readStructBegin();
7163
      while (true)
7164
      {
7165
        field = iprot.readFieldBegin();
7166
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7167
          break;
7168
        }
7169
        switch (field.id) {
7170
          case 1: // PURCHASE_ORDER_ID
7171
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7172
              this.purchaseOrderId = iprot.readI64();
7173
              setPurchaseOrderIdIsSet(true);
7174
            } else { 
7175
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7176
            }
7177
            break;
7178
          case 2: // OPEN
7179
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7180
              this.open = iprot.readBool();
7181
              setOpenIsSet(true);
7182
            } else { 
7183
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7184
            }
7185
            break;
7186
          default:
7187
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7188
        }
7189
        iprot.readFieldEnd();
7190
      }
7191
      iprot.readStructEnd();
7192
      validate();
7193
    }
7194
 
7195
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7196
      validate();
7197
 
7198
      oprot.writeStructBegin(STRUCT_DESC);
7199
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7200
      oprot.writeI64(this.purchaseOrderId);
7201
      oprot.writeFieldEnd();
7202
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7203
      oprot.writeBool(this.open);
7204
      oprot.writeFieldEnd();
7205
      oprot.writeFieldStop();
7206
      oprot.writeStructEnd();
7207
    }
7208
 
7209
    @Override
7210
    public String toString() {
7211
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7212
      boolean first = true;
7213
 
7214
      sb.append("purchaseOrderId:");
7215
      sb.append(this.purchaseOrderId);
7216
      first = false;
7217
      if (!first) sb.append(", ");
7218
      sb.append("open:");
7219
      sb.append(this.open);
7220
      first = false;
7221
      sb.append(")");
7222
      return sb.toString();
7223
    }
7224
 
7225
    public void validate() throws org.apache.thrift.TException {
7226
      // check for required fields
7227
    }
7228
 
7229
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7230
      try {
7231
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7232
      } catch (org.apache.thrift.TException te) {
7233
        throw new java.io.IOException(te);
7234
      }
7235
    }
7236
 
7237
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7238
      try {
7239
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7240
      } catch (org.apache.thrift.TException te) {
7241
        throw new java.io.IOException(te);
7242
      }
7243
    }
7244
 
7245
  }
7246
 
7247
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7248
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7249
 
7250
    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);
7251
    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);
7252
 
7253
    private List<Purchase> success; // required
7254
    private PurchaseServiceException e; // required
7255
 
7256
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7257
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7258
      SUCCESS((short)0, "success"),
7259
      E((short)1, "e");
7260
 
7261
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7262
 
7263
      static {
7264
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7265
          byName.put(field.getFieldName(), field);
7266
        }
7267
      }
7268
 
7269
      /**
7270
       * Find the _Fields constant that matches fieldId, or null if its not found.
7271
       */
7272
      public static _Fields findByThriftId(int fieldId) {
7273
        switch(fieldId) {
7274
          case 0: // SUCCESS
7275
            return SUCCESS;
7276
          case 1: // E
7277
            return E;
7278
          default:
7279
            return null;
7280
        }
7281
      }
7282
 
7283
      /**
7284
       * Find the _Fields constant that matches fieldId, throwing an exception
7285
       * if it is not found.
7286
       */
7287
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7288
        _Fields fields = findByThriftId(fieldId);
7289
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7290
        return fields;
7291
      }
7292
 
7293
      /**
7294
       * Find the _Fields constant that matches name, or null if its not found.
7295
       */
7296
      public static _Fields findByName(String name) {
7297
        return byName.get(name);
7298
      }
7299
 
7300
      private final short _thriftId;
7301
      private final String _fieldName;
7302
 
7303
      _Fields(short thriftId, String fieldName) {
7304
        _thriftId = thriftId;
7305
        _fieldName = fieldName;
7306
      }
7307
 
7308
      public short getThriftFieldId() {
7309
        return _thriftId;
7310
      }
7311
 
7312
      public String getFieldName() {
7313
        return _fieldName;
7314
      }
7315
    }
7316
 
7317
    // isset id assignments
7318
 
7319
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7320
    static {
7321
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7322
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7323
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7324
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7325
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7326
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7327
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7328
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7329
    }
7330
 
7331
    public getAllPurchases_result() {
7332
    }
7333
 
7334
    public getAllPurchases_result(
7335
      List<Purchase> success,
7336
      PurchaseServiceException e)
7337
    {
7338
      this();
7339
      this.success = success;
7340
      this.e = e;
7341
    }
7342
 
7343
    /**
7344
     * Performs a deep copy on <i>other</i>.
7345
     */
7346
    public getAllPurchases_result(getAllPurchases_result other) {
7347
      if (other.isSetSuccess()) {
7348
        List<Purchase> __this__success = new ArrayList<Purchase>();
7349
        for (Purchase other_element : other.success) {
7350
          __this__success.add(new Purchase(other_element));
7351
        }
7352
        this.success = __this__success;
7353
      }
7354
      if (other.isSetE()) {
7355
        this.e = new PurchaseServiceException(other.e);
7356
      }
7357
    }
7358
 
7359
    public getAllPurchases_result deepCopy() {
7360
      return new getAllPurchases_result(this);
7361
    }
7362
 
7363
    @Override
7364
    public void clear() {
7365
      this.success = null;
7366
      this.e = null;
7367
    }
7368
 
7369
    public int getSuccessSize() {
7370
      return (this.success == null) ? 0 : this.success.size();
7371
    }
7372
 
7373
    public java.util.Iterator<Purchase> getSuccessIterator() {
7374
      return (this.success == null) ? null : this.success.iterator();
7375
    }
7376
 
7377
    public void addToSuccess(Purchase elem) {
7378
      if (this.success == null) {
7379
        this.success = new ArrayList<Purchase>();
7380
      }
7381
      this.success.add(elem);
7382
    }
7383
 
7384
    public List<Purchase> getSuccess() {
7385
      return this.success;
7386
    }
7387
 
7388
    public void setSuccess(List<Purchase> success) {
7389
      this.success = success;
7390
    }
7391
 
7392
    public void unsetSuccess() {
7393
      this.success = null;
7394
    }
7395
 
7396
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7397
    public boolean isSetSuccess() {
7398
      return this.success != null;
7399
    }
7400
 
7401
    public void setSuccessIsSet(boolean value) {
7402
      if (!value) {
7403
        this.success = null;
7404
      }
7405
    }
7406
 
7407
    public PurchaseServiceException getE() {
7408
      return this.e;
7409
    }
7410
 
7411
    public void setE(PurchaseServiceException e) {
7412
      this.e = e;
7413
    }
7414
 
7415
    public void unsetE() {
7416
      this.e = null;
7417
    }
7418
 
7419
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7420
    public boolean isSetE() {
7421
      return this.e != null;
7422
    }
7423
 
7424
    public void setEIsSet(boolean value) {
7425
      if (!value) {
7426
        this.e = null;
7427
      }
7428
    }
7429
 
7430
    public void setFieldValue(_Fields field, Object value) {
7431
      switch (field) {
7432
      case SUCCESS:
7433
        if (value == null) {
7434
          unsetSuccess();
7435
        } else {
7436
          setSuccess((List<Purchase>)value);
7437
        }
7438
        break;
7439
 
7440
      case E:
7441
        if (value == null) {
7442
          unsetE();
7443
        } else {
7444
          setE((PurchaseServiceException)value);
7445
        }
7446
        break;
7447
 
7448
      }
7449
    }
7450
 
7451
    public Object getFieldValue(_Fields field) {
7452
      switch (field) {
7453
      case SUCCESS:
7454
        return getSuccess();
7455
 
7456
      case E:
7457
        return getE();
7458
 
7459
      }
7460
      throw new IllegalStateException();
7461
    }
7462
 
7463
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7464
    public boolean isSet(_Fields field) {
7465
      if (field == null) {
7466
        throw new IllegalArgumentException();
7467
      }
7468
 
7469
      switch (field) {
7470
      case SUCCESS:
7471
        return isSetSuccess();
7472
      case E:
7473
        return isSetE();
7474
      }
7475
      throw new IllegalStateException();
7476
    }
7477
 
7478
    @Override
7479
    public boolean equals(Object that) {
7480
      if (that == null)
7481
        return false;
7482
      if (that instanceof getAllPurchases_result)
7483
        return this.equals((getAllPurchases_result)that);
7484
      return false;
7485
    }
7486
 
7487
    public boolean equals(getAllPurchases_result that) {
7488
      if (that == null)
7489
        return false;
7490
 
7491
      boolean this_present_success = true && this.isSetSuccess();
7492
      boolean that_present_success = true && that.isSetSuccess();
7493
      if (this_present_success || that_present_success) {
7494
        if (!(this_present_success && that_present_success))
7495
          return false;
7496
        if (!this.success.equals(that.success))
7497
          return false;
7498
      }
7499
 
7500
      boolean this_present_e = true && this.isSetE();
7501
      boolean that_present_e = true && that.isSetE();
7502
      if (this_present_e || that_present_e) {
7503
        if (!(this_present_e && that_present_e))
7504
          return false;
7505
        if (!this.e.equals(that.e))
7506
          return false;
7507
      }
7508
 
7509
      return true;
7510
    }
7511
 
7512
    @Override
7513
    public int hashCode() {
7514
      return 0;
7515
    }
7516
 
7517
    public int compareTo(getAllPurchases_result other) {
7518
      if (!getClass().equals(other.getClass())) {
7519
        return getClass().getName().compareTo(other.getClass().getName());
7520
      }
7521
 
7522
      int lastComparison = 0;
7523
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7524
 
7525
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7526
      if (lastComparison != 0) {
7527
        return lastComparison;
7528
      }
7529
      if (isSetSuccess()) {
7530
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7531
        if (lastComparison != 0) {
7532
          return lastComparison;
7533
        }
7534
      }
7535
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7536
      if (lastComparison != 0) {
7537
        return lastComparison;
7538
      }
7539
      if (isSetE()) {
7540
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7541
        if (lastComparison != 0) {
7542
          return lastComparison;
7543
        }
7544
      }
7545
      return 0;
7546
    }
7547
 
7548
    public _Fields fieldForId(int fieldId) {
7549
      return _Fields.findByThriftId(fieldId);
7550
    }
7551
 
7552
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7553
      org.apache.thrift.protocol.TField field;
7554
      iprot.readStructBegin();
7555
      while (true)
7556
      {
7557
        field = iprot.readFieldBegin();
7558
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7559
          break;
7560
        }
7561
        switch (field.id) {
7562
          case 0: // SUCCESS
7563
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7564
              {
7565
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7566
                this.success = new ArrayList<Purchase>(_list8.size);
7567
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7568
                {
7569
                  Purchase _elem10; // required
7570
                  _elem10 = new Purchase();
7571
                  _elem10.read(iprot);
7572
                  this.success.add(_elem10);
7573
                }
7574
                iprot.readListEnd();
7575
              }
7576
            } else { 
7577
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7578
            }
7579
            break;
7580
          case 1: // E
7581
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7582
              this.e = new PurchaseServiceException();
7583
              this.e.read(iprot);
7584
            } else { 
7585
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7586
            }
7587
            break;
7588
          default:
7589
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7590
        }
7591
        iprot.readFieldEnd();
7592
      }
7593
      iprot.readStructEnd();
7594
      validate();
7595
    }
7596
 
7597
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7598
      oprot.writeStructBegin(STRUCT_DESC);
7599
 
7600
      if (this.isSetSuccess()) {
7601
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7602
        {
7603
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7604
          for (Purchase _iter11 : this.success)
7605
          {
7606
            _iter11.write(oprot);
7607
          }
7608
          oprot.writeListEnd();
7609
        }
7610
        oprot.writeFieldEnd();
7611
      } else if (this.isSetE()) {
7612
        oprot.writeFieldBegin(E_FIELD_DESC);
7613
        this.e.write(oprot);
7614
        oprot.writeFieldEnd();
7615
      }
7616
      oprot.writeFieldStop();
7617
      oprot.writeStructEnd();
7618
    }
7619
 
7620
    @Override
7621
    public String toString() {
7622
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7623
      boolean first = true;
7624
 
7625
      sb.append("success:");
7626
      if (this.success == null) {
7627
        sb.append("null");
7628
      } else {
7629
        sb.append(this.success);
7630
      }
7631
      first = false;
7632
      if (!first) sb.append(", ");
7633
      sb.append("e:");
7634
      if (this.e == null) {
7635
        sb.append("null");
7636
      } else {
7637
        sb.append(this.e);
7638
      }
7639
      first = false;
7640
      sb.append(")");
7641
      return sb.toString();
7642
    }
7643
 
7644
    public void validate() throws org.apache.thrift.TException {
7645
      // check for required fields
7646
    }
7647
 
7648
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7649
      try {
7650
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7651
      } catch (org.apache.thrift.TException te) {
7652
        throw new java.io.IOException(te);
7653
      }
7654
    }
7655
 
7656
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7657
      try {
7658
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7659
      } catch (org.apache.thrift.TException te) {
7660
        throw new java.io.IOException(te);
7661
      }
7662
    }
7663
 
7664
  }
7665
 
6385 amar.kumar 7666
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7667
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7668
 
7669
    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);
7670
 
7671
    private long purchaseOrderId; // required
7672
 
7673
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7674
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7675
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7676
 
7677
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7678
 
7679
      static {
7680
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7681
          byName.put(field.getFieldName(), field);
7682
        }
7683
      }
7684
 
7685
      /**
7686
       * Find the _Fields constant that matches fieldId, or null if its not found.
7687
       */
7688
      public static _Fields findByThriftId(int fieldId) {
7689
        switch(fieldId) {
7690
          case 1: // PURCHASE_ORDER_ID
7691
            return PURCHASE_ORDER_ID;
7692
          default:
7693
            return null;
7694
        }
7695
      }
7696
 
7697
      /**
7698
       * Find the _Fields constant that matches fieldId, throwing an exception
7699
       * if it is not found.
7700
       */
7701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7702
        _Fields fields = findByThriftId(fieldId);
7703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7704
        return fields;
7705
      }
7706
 
7707
      /**
7708
       * Find the _Fields constant that matches name, or null if its not found.
7709
       */
7710
      public static _Fields findByName(String name) {
7711
        return byName.get(name);
7712
      }
7713
 
7714
      private final short _thriftId;
7715
      private final String _fieldName;
7716
 
7717
      _Fields(short thriftId, String fieldName) {
7718
        _thriftId = thriftId;
7719
        _fieldName = fieldName;
7720
      }
7721
 
7722
      public short getThriftFieldId() {
7723
        return _thriftId;
7724
      }
7725
 
7726
      public String getFieldName() {
7727
        return _fieldName;
7728
      }
7729
    }
7730
 
7731
    // isset id assignments
7732
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7733
    private BitSet __isset_bit_vector = new BitSet(1);
7734
 
7735
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7736
    static {
7737
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7738
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7739
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7740
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7741
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7742
    }
7743
 
7744
    public getPurchasesForPO_args() {
7745
    }
7746
 
7747
    public getPurchasesForPO_args(
7748
      long purchaseOrderId)
7749
    {
7750
      this();
7751
      this.purchaseOrderId = purchaseOrderId;
7752
      setPurchaseOrderIdIsSet(true);
7753
    }
7754
 
7755
    /**
7756
     * Performs a deep copy on <i>other</i>.
7757
     */
7758
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7759
      __isset_bit_vector.clear();
7760
      __isset_bit_vector.or(other.__isset_bit_vector);
7761
      this.purchaseOrderId = other.purchaseOrderId;
7762
    }
7763
 
7764
    public getPurchasesForPO_args deepCopy() {
7765
      return new getPurchasesForPO_args(this);
7766
    }
7767
 
7768
    @Override
7769
    public void clear() {
7770
      setPurchaseOrderIdIsSet(false);
7771
      this.purchaseOrderId = 0;
7772
    }
7773
 
7774
    public long getPurchaseOrderId() {
7775
      return this.purchaseOrderId;
7776
    }
7777
 
7778
    public void setPurchaseOrderId(long purchaseOrderId) {
7779
      this.purchaseOrderId = purchaseOrderId;
7780
      setPurchaseOrderIdIsSet(true);
7781
    }
7782
 
7783
    public void unsetPurchaseOrderId() {
7784
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7785
    }
7786
 
7787
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7788
    public boolean isSetPurchaseOrderId() {
7789
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7790
    }
7791
 
7792
    public void setPurchaseOrderIdIsSet(boolean value) {
7793
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7794
    }
7795
 
7796
    public void setFieldValue(_Fields field, Object value) {
7797
      switch (field) {
7798
      case PURCHASE_ORDER_ID:
7799
        if (value == null) {
7800
          unsetPurchaseOrderId();
7801
        } else {
7802
          setPurchaseOrderId((Long)value);
7803
        }
7804
        break;
7805
 
7806
      }
7807
    }
7808
 
7809
    public Object getFieldValue(_Fields field) {
7810
      switch (field) {
7811
      case PURCHASE_ORDER_ID:
7812
        return Long.valueOf(getPurchaseOrderId());
7813
 
7814
      }
7815
      throw new IllegalStateException();
7816
    }
7817
 
7818
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7819
    public boolean isSet(_Fields field) {
7820
      if (field == null) {
7821
        throw new IllegalArgumentException();
7822
      }
7823
 
7824
      switch (field) {
7825
      case PURCHASE_ORDER_ID:
7826
        return isSetPurchaseOrderId();
7827
      }
7828
      throw new IllegalStateException();
7829
    }
7830
 
7831
    @Override
7832
    public boolean equals(Object that) {
7833
      if (that == null)
7834
        return false;
7835
      if (that instanceof getPurchasesForPO_args)
7836
        return this.equals((getPurchasesForPO_args)that);
7837
      return false;
7838
    }
7839
 
7840
    public boolean equals(getPurchasesForPO_args that) {
7841
      if (that == null)
7842
        return false;
7843
 
7844
      boolean this_present_purchaseOrderId = true;
7845
      boolean that_present_purchaseOrderId = true;
7846
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7847
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7848
          return false;
7849
        if (this.purchaseOrderId != that.purchaseOrderId)
7850
          return false;
7851
      }
7852
 
7853
      return true;
7854
    }
7855
 
7856
    @Override
7857
    public int hashCode() {
7858
      return 0;
7859
    }
7860
 
7861
    public int compareTo(getPurchasesForPO_args other) {
7862
      if (!getClass().equals(other.getClass())) {
7863
        return getClass().getName().compareTo(other.getClass().getName());
7864
      }
7865
 
7866
      int lastComparison = 0;
7867
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7868
 
7869
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7870
      if (lastComparison != 0) {
7871
        return lastComparison;
7872
      }
7873
      if (isSetPurchaseOrderId()) {
7874
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7875
        if (lastComparison != 0) {
7876
          return lastComparison;
7877
        }
7878
      }
7879
      return 0;
7880
    }
7881
 
7882
    public _Fields fieldForId(int fieldId) {
7883
      return _Fields.findByThriftId(fieldId);
7884
    }
7885
 
7886
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7887
      org.apache.thrift.protocol.TField field;
7888
      iprot.readStructBegin();
7889
      while (true)
7890
      {
7891
        field = iprot.readFieldBegin();
7892
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7893
          break;
7894
        }
7895
        switch (field.id) {
7896
          case 1: // PURCHASE_ORDER_ID
7897
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7898
              this.purchaseOrderId = iprot.readI64();
7899
              setPurchaseOrderIdIsSet(true);
7900
            } else { 
7901
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7902
            }
7903
            break;
7904
          default:
7905
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7906
        }
7907
        iprot.readFieldEnd();
7908
      }
7909
      iprot.readStructEnd();
7910
      validate();
7911
    }
7912
 
7913
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7914
      validate();
7915
 
7916
      oprot.writeStructBegin(STRUCT_DESC);
7917
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7918
      oprot.writeI64(this.purchaseOrderId);
7919
      oprot.writeFieldEnd();
7920
      oprot.writeFieldStop();
7921
      oprot.writeStructEnd();
7922
    }
7923
 
7924
    @Override
7925
    public String toString() {
7926
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7927
      boolean first = true;
7928
 
7929
      sb.append("purchaseOrderId:");
7930
      sb.append(this.purchaseOrderId);
7931
      first = false;
7932
      sb.append(")");
7933
      return sb.toString();
7934
    }
7935
 
7936
    public void validate() throws org.apache.thrift.TException {
7937
      // check for required fields
7938
    }
7939
 
7940
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7941
      try {
7942
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7943
      } catch (org.apache.thrift.TException te) {
7944
        throw new java.io.IOException(te);
7945
      }
7946
    }
7947
 
7948
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7949
      try {
7950
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7951
        __isset_bit_vector = new BitSet(1);
7952
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7953
      } catch (org.apache.thrift.TException te) {
7954
        throw new java.io.IOException(te);
7955
      }
7956
    }
7957
 
7958
  }
7959
 
7960
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7961
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7962
 
7963
    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);
7964
    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);
7965
 
7966
    private List<Purchase> success; // required
7967
    private PurchaseServiceException e; // required
7968
 
7969
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7970
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7971
      SUCCESS((short)0, "success"),
7972
      E((short)1, "e");
7973
 
7974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7975
 
7976
      static {
7977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7978
          byName.put(field.getFieldName(), field);
7979
        }
7980
      }
7981
 
7982
      /**
7983
       * Find the _Fields constant that matches fieldId, or null if its not found.
7984
       */
7985
      public static _Fields findByThriftId(int fieldId) {
7986
        switch(fieldId) {
7987
          case 0: // SUCCESS
7988
            return SUCCESS;
7989
          case 1: // E
7990
            return E;
7991
          default:
7992
            return null;
7993
        }
7994
      }
7995
 
7996
      /**
7997
       * Find the _Fields constant that matches fieldId, throwing an exception
7998
       * if it is not found.
7999
       */
8000
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8001
        _Fields fields = findByThriftId(fieldId);
8002
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8003
        return fields;
8004
      }
8005
 
8006
      /**
8007
       * Find the _Fields constant that matches name, or null if its not found.
8008
       */
8009
      public static _Fields findByName(String name) {
8010
        return byName.get(name);
8011
      }
8012
 
8013
      private final short _thriftId;
8014
      private final String _fieldName;
8015
 
8016
      _Fields(short thriftId, String fieldName) {
8017
        _thriftId = thriftId;
8018
        _fieldName = fieldName;
8019
      }
8020
 
8021
      public short getThriftFieldId() {
8022
        return _thriftId;
8023
      }
8024
 
8025
      public String getFieldName() {
8026
        return _fieldName;
8027
      }
8028
    }
8029
 
8030
    // isset id assignments
8031
 
8032
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8033
    static {
8034
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8035
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8036
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8037
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
8038
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8039
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8040
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8041
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
8042
    }
8043
 
8044
    public getPurchasesForPO_result() {
8045
    }
8046
 
8047
    public getPurchasesForPO_result(
8048
      List<Purchase> success,
8049
      PurchaseServiceException e)
8050
    {
8051
      this();
8052
      this.success = success;
8053
      this.e = e;
8054
    }
8055
 
8056
    /**
8057
     * Performs a deep copy on <i>other</i>.
8058
     */
8059
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
8060
      if (other.isSetSuccess()) {
8061
        List<Purchase> __this__success = new ArrayList<Purchase>();
8062
        for (Purchase other_element : other.success) {
8063
          __this__success.add(new Purchase(other_element));
8064
        }
8065
        this.success = __this__success;
8066
      }
8067
      if (other.isSetE()) {
8068
        this.e = new PurchaseServiceException(other.e);
8069
      }
8070
    }
8071
 
8072
    public getPurchasesForPO_result deepCopy() {
8073
      return new getPurchasesForPO_result(this);
8074
    }
8075
 
8076
    @Override
8077
    public void clear() {
8078
      this.success = null;
8079
      this.e = null;
8080
    }
8081
 
8082
    public int getSuccessSize() {
8083
      return (this.success == null) ? 0 : this.success.size();
8084
    }
8085
 
8086
    public java.util.Iterator<Purchase> getSuccessIterator() {
8087
      return (this.success == null) ? null : this.success.iterator();
8088
    }
8089
 
8090
    public void addToSuccess(Purchase elem) {
8091
      if (this.success == null) {
8092
        this.success = new ArrayList<Purchase>();
8093
      }
8094
      this.success.add(elem);
8095
    }
8096
 
8097
    public List<Purchase> getSuccess() {
8098
      return this.success;
8099
    }
8100
 
8101
    public void setSuccess(List<Purchase> success) {
8102
      this.success = success;
8103
    }
8104
 
8105
    public void unsetSuccess() {
8106
      this.success = null;
8107
    }
8108
 
8109
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8110
    public boolean isSetSuccess() {
8111
      return this.success != null;
8112
    }
8113
 
8114
    public void setSuccessIsSet(boolean value) {
8115
      if (!value) {
8116
        this.success = null;
8117
      }
8118
    }
8119
 
8120
    public PurchaseServiceException getE() {
8121
      return this.e;
8122
    }
8123
 
8124
    public void setE(PurchaseServiceException e) {
8125
      this.e = e;
8126
    }
8127
 
8128
    public void unsetE() {
8129
      this.e = null;
8130
    }
8131
 
8132
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8133
    public boolean isSetE() {
8134
      return this.e != null;
8135
    }
8136
 
8137
    public void setEIsSet(boolean value) {
8138
      if (!value) {
8139
        this.e = null;
8140
      }
8141
    }
8142
 
8143
    public void setFieldValue(_Fields field, Object value) {
8144
      switch (field) {
8145
      case SUCCESS:
8146
        if (value == null) {
8147
          unsetSuccess();
8148
        } else {
8149
          setSuccess((List<Purchase>)value);
8150
        }
8151
        break;
8152
 
8153
      case E:
8154
        if (value == null) {
8155
          unsetE();
8156
        } else {
8157
          setE((PurchaseServiceException)value);
8158
        }
8159
        break;
8160
 
8161
      }
8162
    }
8163
 
8164
    public Object getFieldValue(_Fields field) {
8165
      switch (field) {
8166
      case SUCCESS:
8167
        return getSuccess();
8168
 
8169
      case E:
8170
        return getE();
8171
 
8172
      }
8173
      throw new IllegalStateException();
8174
    }
8175
 
8176
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8177
    public boolean isSet(_Fields field) {
8178
      if (field == null) {
8179
        throw new IllegalArgumentException();
8180
      }
8181
 
8182
      switch (field) {
8183
      case SUCCESS:
8184
        return isSetSuccess();
8185
      case E:
8186
        return isSetE();
8187
      }
8188
      throw new IllegalStateException();
8189
    }
8190
 
8191
    @Override
8192
    public boolean equals(Object that) {
8193
      if (that == null)
8194
        return false;
8195
      if (that instanceof getPurchasesForPO_result)
8196
        return this.equals((getPurchasesForPO_result)that);
8197
      return false;
8198
    }
8199
 
8200
    public boolean equals(getPurchasesForPO_result that) {
8201
      if (that == null)
8202
        return false;
8203
 
8204
      boolean this_present_success = true && this.isSetSuccess();
8205
      boolean that_present_success = true && that.isSetSuccess();
8206
      if (this_present_success || that_present_success) {
8207
        if (!(this_present_success && that_present_success))
8208
          return false;
8209
        if (!this.success.equals(that.success))
8210
          return false;
8211
      }
8212
 
8213
      boolean this_present_e = true && this.isSetE();
8214
      boolean that_present_e = true && that.isSetE();
8215
      if (this_present_e || that_present_e) {
8216
        if (!(this_present_e && that_present_e))
8217
          return false;
8218
        if (!this.e.equals(that.e))
8219
          return false;
8220
      }
8221
 
8222
      return true;
8223
    }
8224
 
8225
    @Override
8226
    public int hashCode() {
8227
      return 0;
8228
    }
8229
 
8230
    public int compareTo(getPurchasesForPO_result other) {
8231
      if (!getClass().equals(other.getClass())) {
8232
        return getClass().getName().compareTo(other.getClass().getName());
8233
      }
8234
 
8235
      int lastComparison = 0;
8236
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8237
 
8238
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8239
      if (lastComparison != 0) {
8240
        return lastComparison;
8241
      }
8242
      if (isSetSuccess()) {
8243
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8244
        if (lastComparison != 0) {
8245
          return lastComparison;
8246
        }
8247
      }
8248
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8249
      if (lastComparison != 0) {
8250
        return lastComparison;
8251
      }
8252
      if (isSetE()) {
8253
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8254
        if (lastComparison != 0) {
8255
          return lastComparison;
8256
        }
8257
      }
8258
      return 0;
8259
    }
8260
 
8261
    public _Fields fieldForId(int fieldId) {
8262
      return _Fields.findByThriftId(fieldId);
8263
    }
8264
 
8265
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8266
      org.apache.thrift.protocol.TField field;
8267
      iprot.readStructBegin();
8268
      while (true)
8269
      {
8270
        field = iprot.readFieldBegin();
8271
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8272
          break;
8273
        }
8274
        switch (field.id) {
8275
          case 0: // SUCCESS
8276
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8277
              {
8278
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8279
                this.success = new ArrayList<Purchase>(_list12.size);
8280
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8281
                {
8282
                  Purchase _elem14; // required
8283
                  _elem14 = new Purchase();
8284
                  _elem14.read(iprot);
8285
                  this.success.add(_elem14);
8286
                }
8287
                iprot.readListEnd();
8288
              }
8289
            } else { 
8290
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8291
            }
8292
            break;
8293
          case 1: // E
8294
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8295
              this.e = new PurchaseServiceException();
8296
              this.e.read(iprot);
8297
            } else { 
8298
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8299
            }
8300
            break;
8301
          default:
8302
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8303
        }
8304
        iprot.readFieldEnd();
8305
      }
8306
      iprot.readStructEnd();
8307
      validate();
8308
    }
8309
 
8310
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8311
      oprot.writeStructBegin(STRUCT_DESC);
8312
 
8313
      if (this.isSetSuccess()) {
8314
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8315
        {
8316
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8317
          for (Purchase _iter15 : this.success)
8318
          {
8319
            _iter15.write(oprot);
8320
          }
8321
          oprot.writeListEnd();
8322
        }
8323
        oprot.writeFieldEnd();
8324
      } else if (this.isSetE()) {
8325
        oprot.writeFieldBegin(E_FIELD_DESC);
8326
        this.e.write(oprot);
8327
        oprot.writeFieldEnd();
8328
      }
8329
      oprot.writeFieldStop();
8330
      oprot.writeStructEnd();
8331
    }
8332
 
8333
    @Override
8334
    public String toString() {
8335
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8336
      boolean first = true;
8337
 
8338
      sb.append("success:");
8339
      if (this.success == null) {
8340
        sb.append("null");
8341
      } else {
8342
        sb.append(this.success);
8343
      }
8344
      first = false;
8345
      if (!first) sb.append(", ");
8346
      sb.append("e:");
8347
      if (this.e == null) {
8348
        sb.append("null");
8349
      } else {
8350
        sb.append(this.e);
8351
      }
8352
      first = false;
8353
      sb.append(")");
8354
      return sb.toString();
8355
    }
8356
 
8357
    public void validate() throws org.apache.thrift.TException {
8358
      // check for required fields
8359
    }
8360
 
8361
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8362
      try {
8363
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8364
      } catch (org.apache.thrift.TException te) {
8365
        throw new java.io.IOException(te);
8366
      }
8367
    }
8368
 
8369
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8370
      try {
8371
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8372
      } catch (org.apache.thrift.TException te) {
8373
        throw new java.io.IOException(te);
8374
      }
8375
    }
8376
 
8377
  }
8378
 
4555 mandeep.dh 8379
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8380
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8381
 
8382
    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);
8383
 
8384
    private long purchaseId; // required
8385
 
8386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8387
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8388
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8389
 
8390
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8391
 
8392
      static {
8393
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8394
          byName.put(field.getFieldName(), field);
8395
        }
8396
      }
8397
 
8398
      /**
8399
       * Find the _Fields constant that matches fieldId, or null if its not found.
8400
       */
8401
      public static _Fields findByThriftId(int fieldId) {
8402
        switch(fieldId) {
8403
          case 1: // PURCHASE_ID
8404
            return PURCHASE_ID;
8405
          default:
8406
            return null;
8407
        }
8408
      }
8409
 
8410
      /**
8411
       * Find the _Fields constant that matches fieldId, throwing an exception
8412
       * if it is not found.
8413
       */
8414
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8415
        _Fields fields = findByThriftId(fieldId);
8416
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8417
        return fields;
8418
      }
8419
 
8420
      /**
8421
       * Find the _Fields constant that matches name, or null if its not found.
8422
       */
8423
      public static _Fields findByName(String name) {
8424
        return byName.get(name);
8425
      }
8426
 
8427
      private final short _thriftId;
8428
      private final String _fieldName;
8429
 
8430
      _Fields(short thriftId, String fieldName) {
8431
        _thriftId = thriftId;
8432
        _fieldName = fieldName;
8433
      }
8434
 
8435
      public short getThriftFieldId() {
8436
        return _thriftId;
8437
      }
8438
 
8439
      public String getFieldName() {
8440
        return _fieldName;
8441
      }
8442
    }
8443
 
8444
    // isset id assignments
8445
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8446
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8447
 
8448
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8449
    static {
8450
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8451
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8452
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8453
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8454
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8455
    }
8456
 
4555 mandeep.dh 8457
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8458
    }
8459
 
4555 mandeep.dh 8460
    public getPurchaseOrderForPurchase_args(
8461
      long purchaseId)
4496 mandeep.dh 8462
    {
8463
      this();
8464
      this.purchaseId = purchaseId;
8465
      setPurchaseIdIsSet(true);
8466
    }
8467
 
8468
    /**
8469
     * Performs a deep copy on <i>other</i>.
8470
     */
4555 mandeep.dh 8471
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8472
      __isset_bit_vector.clear();
8473
      __isset_bit_vector.or(other.__isset_bit_vector);
8474
      this.purchaseId = other.purchaseId;
8475
    }
8476
 
4555 mandeep.dh 8477
    public getPurchaseOrderForPurchase_args deepCopy() {
8478
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8479
    }
8480
 
8481
    @Override
8482
    public void clear() {
8483
      setPurchaseIdIsSet(false);
8484
      this.purchaseId = 0;
8485
    }
8486
 
8487
    public long getPurchaseId() {
8488
      return this.purchaseId;
8489
    }
8490
 
8491
    public void setPurchaseId(long purchaseId) {
8492
      this.purchaseId = purchaseId;
8493
      setPurchaseIdIsSet(true);
8494
    }
8495
 
8496
    public void unsetPurchaseId() {
8497
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8498
    }
8499
 
8500
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8501
    public boolean isSetPurchaseId() {
8502
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8503
    }
8504
 
8505
    public void setPurchaseIdIsSet(boolean value) {
8506
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8507
    }
8508
 
8509
    public void setFieldValue(_Fields field, Object value) {
8510
      switch (field) {
8511
      case PURCHASE_ID:
8512
        if (value == null) {
8513
          unsetPurchaseId();
8514
        } else {
8515
          setPurchaseId((Long)value);
8516
        }
8517
        break;
8518
 
8519
      }
8520
    }
8521
 
8522
    public Object getFieldValue(_Fields field) {
8523
      switch (field) {
8524
      case PURCHASE_ID:
8525
        return Long.valueOf(getPurchaseId());
8526
 
8527
      }
8528
      throw new IllegalStateException();
8529
    }
8530
 
8531
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8532
    public boolean isSet(_Fields field) {
8533
      if (field == null) {
8534
        throw new IllegalArgumentException();
8535
      }
8536
 
8537
      switch (field) {
8538
      case PURCHASE_ID:
8539
        return isSetPurchaseId();
8540
      }
8541
      throw new IllegalStateException();
8542
    }
8543
 
8544
    @Override
8545
    public boolean equals(Object that) {
8546
      if (that == null)
8547
        return false;
4555 mandeep.dh 8548
      if (that instanceof getPurchaseOrderForPurchase_args)
8549
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8550
      return false;
8551
    }
8552
 
4555 mandeep.dh 8553
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8554
      if (that == null)
8555
        return false;
8556
 
8557
      boolean this_present_purchaseId = true;
8558
      boolean that_present_purchaseId = true;
8559
      if (this_present_purchaseId || that_present_purchaseId) {
8560
        if (!(this_present_purchaseId && that_present_purchaseId))
8561
          return false;
8562
        if (this.purchaseId != that.purchaseId)
8563
          return false;
8564
      }
8565
 
8566
      return true;
8567
    }
8568
 
8569
    @Override
8570
    public int hashCode() {
8571
      return 0;
8572
    }
8573
 
4555 mandeep.dh 8574
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8575
      if (!getClass().equals(other.getClass())) {
8576
        return getClass().getName().compareTo(other.getClass().getName());
8577
      }
8578
 
8579
      int lastComparison = 0;
4555 mandeep.dh 8580
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8581
 
8582
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8583
      if (lastComparison != 0) {
8584
        return lastComparison;
8585
      }
8586
      if (isSetPurchaseId()) {
8587
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8588
        if (lastComparison != 0) {
8589
          return lastComparison;
8590
        }
8591
      }
8592
      return 0;
8593
    }
8594
 
8595
    public _Fields fieldForId(int fieldId) {
8596
      return _Fields.findByThriftId(fieldId);
8597
    }
8598
 
8599
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8600
      org.apache.thrift.protocol.TField field;
8601
      iprot.readStructBegin();
8602
      while (true)
8603
      {
8604
        field = iprot.readFieldBegin();
8605
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8606
          break;
8607
        }
8608
        switch (field.id) {
8609
          case 1: // PURCHASE_ID
8610
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8611
              this.purchaseId = iprot.readI64();
8612
              setPurchaseIdIsSet(true);
8613
            } else { 
8614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8615
            }
8616
            break;
8617
          default:
8618
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8619
        }
8620
        iprot.readFieldEnd();
8621
      }
8622
      iprot.readStructEnd();
8623
      validate();
8624
    }
8625
 
8626
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8627
      validate();
8628
 
8629
      oprot.writeStructBegin(STRUCT_DESC);
8630
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8631
      oprot.writeI64(this.purchaseId);
8632
      oprot.writeFieldEnd();
8633
      oprot.writeFieldStop();
8634
      oprot.writeStructEnd();
8635
    }
8636
 
8637
    @Override
8638
    public String toString() {
4555 mandeep.dh 8639
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8640
      boolean first = true;
8641
 
8642
      sb.append("purchaseId:");
8643
      sb.append(this.purchaseId);
8644
      first = false;
8645
      sb.append(")");
8646
      return sb.toString();
8647
    }
8648
 
8649
    public void validate() throws org.apache.thrift.TException {
8650
      // check for required fields
8651
    }
8652
 
8653
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8654
      try {
8655
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8656
      } catch (org.apache.thrift.TException te) {
8657
        throw new java.io.IOException(te);
8658
      }
8659
    }
8660
 
8661
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8662
      try {
4555 mandeep.dh 8663
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8664
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8665
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8666
      } catch (org.apache.thrift.TException te) {
8667
        throw new java.io.IOException(te);
8668
      }
8669
    }
8670
 
8671
  }
8672
 
4555 mandeep.dh 8673
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8674
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8675
 
4555 mandeep.dh 8676
    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 8677
 
4555 mandeep.dh 8678
    private PurchaseOrder success; // required
4496 mandeep.dh 8679
 
8680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8681
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8682
      SUCCESS((short)0, "success");
8683
 
8684
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8685
 
8686
      static {
8687
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8688
          byName.put(field.getFieldName(), field);
8689
        }
8690
      }
8691
 
8692
      /**
8693
       * Find the _Fields constant that matches fieldId, or null if its not found.
8694
       */
8695
      public static _Fields findByThriftId(int fieldId) {
8696
        switch(fieldId) {
8697
          case 0: // SUCCESS
8698
            return SUCCESS;
8699
          default:
8700
            return null;
8701
        }
8702
      }
8703
 
8704
      /**
8705
       * Find the _Fields constant that matches fieldId, throwing an exception
8706
       * if it is not found.
8707
       */
8708
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8709
        _Fields fields = findByThriftId(fieldId);
8710
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8711
        return fields;
8712
      }
8713
 
8714
      /**
8715
       * Find the _Fields constant that matches name, or null if its not found.
8716
       */
8717
      public static _Fields findByName(String name) {
8718
        return byName.get(name);
8719
      }
8720
 
8721
      private final short _thriftId;
8722
      private final String _fieldName;
8723
 
8724
      _Fields(short thriftId, String fieldName) {
8725
        _thriftId = thriftId;
8726
        _fieldName = fieldName;
8727
      }
8728
 
8729
      public short getThriftFieldId() {
8730
        return _thriftId;
8731
      }
8732
 
8733
      public String getFieldName() {
8734
        return _fieldName;
8735
      }
8736
    }
8737
 
8738
    // isset id assignments
8739
 
8740
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8741
    static {
8742
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8743
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8744
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8745
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8746
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8747
    }
8748
 
4555 mandeep.dh 8749
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8750
    }
8751
 
4555 mandeep.dh 8752
    public getPurchaseOrderForPurchase_result(
8753
      PurchaseOrder success)
4496 mandeep.dh 8754
    {
8755
      this();
8756
      this.success = success;
8757
    }
8758
 
8759
    /**
8760
     * Performs a deep copy on <i>other</i>.
8761
     */
4555 mandeep.dh 8762
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8763
      if (other.isSetSuccess()) {
8764
        this.success = new PurchaseOrder(other.success);
8765
      }
4496 mandeep.dh 8766
    }
8767
 
4555 mandeep.dh 8768
    public getPurchaseOrderForPurchase_result deepCopy() {
8769
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8770
    }
8771
 
8772
    @Override
8773
    public void clear() {
4555 mandeep.dh 8774
      this.success = null;
4496 mandeep.dh 8775
    }
8776
 
4555 mandeep.dh 8777
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8778
      return this.success;
8779
    }
8780
 
4555 mandeep.dh 8781
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8782
      this.success = success;
8783
    }
8784
 
8785
    public void unsetSuccess() {
4555 mandeep.dh 8786
      this.success = null;
4496 mandeep.dh 8787
    }
8788
 
8789
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8790
    public boolean isSetSuccess() {
4555 mandeep.dh 8791
      return this.success != null;
4496 mandeep.dh 8792
    }
8793
 
8794
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8795
      if (!value) {
8796
        this.success = null;
8797
      }
4496 mandeep.dh 8798
    }
8799
 
8800
    public void setFieldValue(_Fields field, Object value) {
8801
      switch (field) {
8802
      case SUCCESS:
8803
        if (value == null) {
8804
          unsetSuccess();
8805
        } else {
4555 mandeep.dh 8806
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8807
        }
8808
        break;
8809
 
8810
      }
8811
    }
8812
 
8813
    public Object getFieldValue(_Fields field) {
8814
      switch (field) {
8815
      case SUCCESS:
4555 mandeep.dh 8816
        return getSuccess();
4496 mandeep.dh 8817
 
8818
      }
8819
      throw new IllegalStateException();
8820
    }
8821
 
8822
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8823
    public boolean isSet(_Fields field) {
8824
      if (field == null) {
8825
        throw new IllegalArgumentException();
8826
      }
8827
 
8828
      switch (field) {
8829
      case SUCCESS:
8830
        return isSetSuccess();
8831
      }
8832
      throw new IllegalStateException();
8833
    }
8834
 
8835
    @Override
8836
    public boolean equals(Object that) {
8837
      if (that == null)
8838
        return false;
4555 mandeep.dh 8839
      if (that instanceof getPurchaseOrderForPurchase_result)
8840
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8841
      return false;
8842
    }
8843
 
4555 mandeep.dh 8844
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8845
      if (that == null)
8846
        return false;
8847
 
4555 mandeep.dh 8848
      boolean this_present_success = true && this.isSetSuccess();
8849
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8850
      if (this_present_success || that_present_success) {
8851
        if (!(this_present_success && that_present_success))
8852
          return false;
4555 mandeep.dh 8853
        if (!this.success.equals(that.success))
4496 mandeep.dh 8854
          return false;
8855
      }
8856
 
8857
      return true;
8858
    }
8859
 
8860
    @Override
8861
    public int hashCode() {
8862
      return 0;
8863
    }
8864
 
4555 mandeep.dh 8865
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8866
      if (!getClass().equals(other.getClass())) {
8867
        return getClass().getName().compareTo(other.getClass().getName());
8868
      }
8869
 
8870
      int lastComparison = 0;
4555 mandeep.dh 8871
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8872
 
8873
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8874
      if (lastComparison != 0) {
8875
        return lastComparison;
8876
      }
8877
      if (isSetSuccess()) {
8878
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8879
        if (lastComparison != 0) {
8880
          return lastComparison;
8881
        }
8882
      }
8883
      return 0;
8884
    }
8885
 
8886
    public _Fields fieldForId(int fieldId) {
8887
      return _Fields.findByThriftId(fieldId);
8888
    }
8889
 
8890
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8891
      org.apache.thrift.protocol.TField field;
8892
      iprot.readStructBegin();
8893
      while (true)
8894
      {
8895
        field = iprot.readFieldBegin();
8896
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8897
          break;
8898
        }
8899
        switch (field.id) {
8900
          case 0: // SUCCESS
4555 mandeep.dh 8901
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8902
              this.success = new PurchaseOrder();
8903
              this.success.read(iprot);
4496 mandeep.dh 8904
            } else { 
8905
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8906
            }
8907
            break;
8908
          default:
8909
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8910
        }
8911
        iprot.readFieldEnd();
8912
      }
8913
      iprot.readStructEnd();
8914
      validate();
8915
    }
8916
 
8917
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8918
      oprot.writeStructBegin(STRUCT_DESC);
8919
 
8920
      if (this.isSetSuccess()) {
8921
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8922
        this.success.write(oprot);
4496 mandeep.dh 8923
        oprot.writeFieldEnd();
8924
      }
8925
      oprot.writeFieldStop();
8926
      oprot.writeStructEnd();
8927
    }
8928
 
8929
    @Override
8930
    public String toString() {
4555 mandeep.dh 8931
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8932
      boolean first = true;
8933
 
8934
      sb.append("success:");
4555 mandeep.dh 8935
      if (this.success == null) {
8936
        sb.append("null");
8937
      } else {
8938
        sb.append(this.success);
8939
      }
4496 mandeep.dh 8940
      first = false;
8941
      sb.append(")");
8942
      return sb.toString();
8943
    }
8944
 
8945
    public void validate() throws org.apache.thrift.TException {
8946
      // check for required fields
8947
    }
8948
 
8949
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8950
      try {
8951
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8952
      } catch (org.apache.thrift.TException te) {
8953
        throw new java.io.IOException(te);
8954
      }
8955
    }
8956
 
8957
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8958
      try {
8959
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8960
      } catch (org.apache.thrift.TException te) {
8961
        throw new java.io.IOException(te);
8962
      }
8963
    }
8964
 
8965
  }
8966
 
4754 mandeep.dh 8967
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8968
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8969
 
8970
    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);
8971
 
8972
    private long warehouseId; // required
8973
 
8974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8975
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8976
      WAREHOUSE_ID((short)1, "warehouseId");
8977
 
8978
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8979
 
8980
      static {
8981
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8982
          byName.put(field.getFieldName(), field);
8983
        }
8984
      }
8985
 
8986
      /**
8987
       * Find the _Fields constant that matches fieldId, or null if its not found.
8988
       */
8989
      public static _Fields findByThriftId(int fieldId) {
8990
        switch(fieldId) {
8991
          case 1: // WAREHOUSE_ID
8992
            return WAREHOUSE_ID;
8993
          default:
8994
            return null;
8995
        }
8996
      }
8997
 
8998
      /**
8999
       * Find the _Fields constant that matches fieldId, throwing an exception
9000
       * if it is not found.
9001
       */
9002
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9003
        _Fields fields = findByThriftId(fieldId);
9004
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9005
        return fields;
9006
      }
9007
 
9008
      /**
9009
       * Find the _Fields constant that matches name, or null if its not found.
9010
       */
9011
      public static _Fields findByName(String name) {
9012
        return byName.get(name);
9013
      }
9014
 
9015
      private final short _thriftId;
9016
      private final String _fieldName;
9017
 
9018
      _Fields(short thriftId, String fieldName) {
9019
        _thriftId = thriftId;
9020
        _fieldName = fieldName;
9021
      }
9022
 
9023
      public short getThriftFieldId() {
9024
        return _thriftId;
9025
      }
9026
 
9027
      public String getFieldName() {
9028
        return _fieldName;
9029
      }
9030
    }
9031
 
9032
    // isset id assignments
9033
    private static final int __WAREHOUSEID_ISSET_ID = 0;
9034
    private BitSet __isset_bit_vector = new BitSet(1);
9035
 
9036
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9037
    static {
9038
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9039
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9040
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9041
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9042
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
9043
    }
9044
 
9045
    public getPendingPurchaseOrders_args() {
9046
    }
9047
 
9048
    public getPendingPurchaseOrders_args(
9049
      long warehouseId)
9050
    {
9051
      this();
9052
      this.warehouseId = warehouseId;
9053
      setWarehouseIdIsSet(true);
9054
    }
9055
 
9056
    /**
9057
     * Performs a deep copy on <i>other</i>.
9058
     */
9059
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
9060
      __isset_bit_vector.clear();
9061
      __isset_bit_vector.or(other.__isset_bit_vector);
9062
      this.warehouseId = other.warehouseId;
9063
    }
9064
 
9065
    public getPendingPurchaseOrders_args deepCopy() {
9066
      return new getPendingPurchaseOrders_args(this);
9067
    }
9068
 
9069
    @Override
9070
    public void clear() {
9071
      setWarehouseIdIsSet(false);
9072
      this.warehouseId = 0;
9073
    }
9074
 
9075
    public long getWarehouseId() {
9076
      return this.warehouseId;
9077
    }
9078
 
9079
    public void setWarehouseId(long warehouseId) {
9080
      this.warehouseId = warehouseId;
9081
      setWarehouseIdIsSet(true);
9082
    }
9083
 
9084
    public void unsetWarehouseId() {
9085
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
9086
    }
9087
 
9088
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
9089
    public boolean isSetWarehouseId() {
9090
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9091
    }
9092
 
9093
    public void setWarehouseIdIsSet(boolean value) {
9094
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9095
    }
9096
 
9097
    public void setFieldValue(_Fields field, Object value) {
9098
      switch (field) {
9099
      case WAREHOUSE_ID:
9100
        if (value == null) {
9101
          unsetWarehouseId();
9102
        } else {
9103
          setWarehouseId((Long)value);
9104
        }
9105
        break;
9106
 
9107
      }
9108
    }
9109
 
9110
    public Object getFieldValue(_Fields field) {
9111
      switch (field) {
9112
      case WAREHOUSE_ID:
9113
        return Long.valueOf(getWarehouseId());
9114
 
9115
      }
9116
      throw new IllegalStateException();
9117
    }
9118
 
9119
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9120
    public boolean isSet(_Fields field) {
9121
      if (field == null) {
9122
        throw new IllegalArgumentException();
9123
      }
9124
 
9125
      switch (field) {
9126
      case WAREHOUSE_ID:
9127
        return isSetWarehouseId();
9128
      }
9129
      throw new IllegalStateException();
9130
    }
9131
 
9132
    @Override
9133
    public boolean equals(Object that) {
9134
      if (that == null)
9135
        return false;
9136
      if (that instanceof getPendingPurchaseOrders_args)
9137
        return this.equals((getPendingPurchaseOrders_args)that);
9138
      return false;
9139
    }
9140
 
9141
    public boolean equals(getPendingPurchaseOrders_args that) {
9142
      if (that == null)
9143
        return false;
9144
 
9145
      boolean this_present_warehouseId = true;
9146
      boolean that_present_warehouseId = true;
9147
      if (this_present_warehouseId || that_present_warehouseId) {
9148
        if (!(this_present_warehouseId && that_present_warehouseId))
9149
          return false;
9150
        if (this.warehouseId != that.warehouseId)
9151
          return false;
9152
      }
9153
 
9154
      return true;
9155
    }
9156
 
9157
    @Override
9158
    public int hashCode() {
9159
      return 0;
9160
    }
9161
 
9162
    public int compareTo(getPendingPurchaseOrders_args other) {
9163
      if (!getClass().equals(other.getClass())) {
9164
        return getClass().getName().compareTo(other.getClass().getName());
9165
      }
9166
 
9167
      int lastComparison = 0;
9168
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9169
 
9170
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9171
      if (lastComparison != 0) {
9172
        return lastComparison;
9173
      }
9174
      if (isSetWarehouseId()) {
9175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9176
        if (lastComparison != 0) {
9177
          return lastComparison;
9178
        }
9179
      }
9180
      return 0;
9181
    }
9182
 
9183
    public _Fields fieldForId(int fieldId) {
9184
      return _Fields.findByThriftId(fieldId);
9185
    }
9186
 
9187
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9188
      org.apache.thrift.protocol.TField field;
9189
      iprot.readStructBegin();
9190
      while (true)
9191
      {
9192
        field = iprot.readFieldBegin();
9193
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9194
          break;
9195
        }
9196
        switch (field.id) {
9197
          case 1: // WAREHOUSE_ID
9198
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9199
              this.warehouseId = iprot.readI64();
9200
              setWarehouseIdIsSet(true);
9201
            } else { 
9202
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9203
            }
9204
            break;
9205
          default:
9206
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9207
        }
9208
        iprot.readFieldEnd();
9209
      }
9210
      iprot.readStructEnd();
9211
      validate();
9212
    }
9213
 
9214
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9215
      validate();
9216
 
9217
      oprot.writeStructBegin(STRUCT_DESC);
9218
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9219
      oprot.writeI64(this.warehouseId);
9220
      oprot.writeFieldEnd();
9221
      oprot.writeFieldStop();
9222
      oprot.writeStructEnd();
9223
    }
9224
 
9225
    @Override
9226
    public String toString() {
9227
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9228
      boolean first = true;
9229
 
9230
      sb.append("warehouseId:");
9231
      sb.append(this.warehouseId);
9232
      first = false;
9233
      sb.append(")");
9234
      return sb.toString();
9235
    }
9236
 
9237
    public void validate() throws org.apache.thrift.TException {
9238
      // check for required fields
9239
    }
9240
 
9241
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9242
      try {
9243
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9244
      } catch (org.apache.thrift.TException te) {
9245
        throw new java.io.IOException(te);
9246
      }
9247
    }
9248
 
9249
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9250
      try {
9251
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9252
        __isset_bit_vector = new BitSet(1);
9253
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9254
      } catch (org.apache.thrift.TException te) {
9255
        throw new java.io.IOException(te);
9256
      }
9257
    }
9258
 
9259
  }
9260
 
9261
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9262
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9263
 
9264
    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);
9265
    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);
9266
 
9267
    private List<PurchaseOrder> success; // required
9268
    private PurchaseServiceException e; // required
9269
 
9270
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9271
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9272
      SUCCESS((short)0, "success"),
9273
      E((short)1, "e");
9274
 
9275
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9276
 
9277
      static {
9278
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9279
          byName.put(field.getFieldName(), field);
9280
        }
9281
      }
9282
 
9283
      /**
9284
       * Find the _Fields constant that matches fieldId, or null if its not found.
9285
       */
9286
      public static _Fields findByThriftId(int fieldId) {
9287
        switch(fieldId) {
9288
          case 0: // SUCCESS
9289
            return SUCCESS;
9290
          case 1: // E
9291
            return E;
9292
          default:
9293
            return null;
9294
        }
9295
      }
9296
 
9297
      /**
9298
       * Find the _Fields constant that matches fieldId, throwing an exception
9299
       * if it is not found.
9300
       */
9301
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9302
        _Fields fields = findByThriftId(fieldId);
9303
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9304
        return fields;
9305
      }
9306
 
9307
      /**
9308
       * Find the _Fields constant that matches name, or null if its not found.
9309
       */
9310
      public static _Fields findByName(String name) {
9311
        return byName.get(name);
9312
      }
9313
 
9314
      private final short _thriftId;
9315
      private final String _fieldName;
9316
 
9317
      _Fields(short thriftId, String fieldName) {
9318
        _thriftId = thriftId;
9319
        _fieldName = fieldName;
9320
      }
9321
 
9322
      public short getThriftFieldId() {
9323
        return _thriftId;
9324
      }
9325
 
9326
      public String getFieldName() {
9327
        return _fieldName;
9328
      }
9329
    }
9330
 
9331
    // isset id assignments
9332
 
9333
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9334
    static {
9335
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9336
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9337
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9338
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9339
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9341
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9342
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9343
    }
9344
 
9345
    public getPendingPurchaseOrders_result() {
9346
    }
9347
 
9348
    public getPendingPurchaseOrders_result(
9349
      List<PurchaseOrder> success,
9350
      PurchaseServiceException e)
9351
    {
9352
      this();
9353
      this.success = success;
9354
      this.e = e;
9355
    }
9356
 
9357
    /**
9358
     * Performs a deep copy on <i>other</i>.
9359
     */
9360
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9361
      if (other.isSetSuccess()) {
9362
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9363
        for (PurchaseOrder other_element : other.success) {
9364
          __this__success.add(new PurchaseOrder(other_element));
9365
        }
9366
        this.success = __this__success;
9367
      }
9368
      if (other.isSetE()) {
9369
        this.e = new PurchaseServiceException(other.e);
9370
      }
9371
    }
9372
 
9373
    public getPendingPurchaseOrders_result deepCopy() {
9374
      return new getPendingPurchaseOrders_result(this);
9375
    }
9376
 
9377
    @Override
9378
    public void clear() {
9379
      this.success = null;
9380
      this.e = null;
9381
    }
9382
 
9383
    public int getSuccessSize() {
9384
      return (this.success == null) ? 0 : this.success.size();
9385
    }
9386
 
9387
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9388
      return (this.success == null) ? null : this.success.iterator();
9389
    }
9390
 
9391
    public void addToSuccess(PurchaseOrder elem) {
9392
      if (this.success == null) {
9393
        this.success = new ArrayList<PurchaseOrder>();
9394
      }
9395
      this.success.add(elem);
9396
    }
9397
 
9398
    public List<PurchaseOrder> getSuccess() {
9399
      return this.success;
9400
    }
9401
 
9402
    public void setSuccess(List<PurchaseOrder> success) {
9403
      this.success = success;
9404
    }
9405
 
9406
    public void unsetSuccess() {
9407
      this.success = null;
9408
    }
9409
 
9410
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9411
    public boolean isSetSuccess() {
9412
      return this.success != null;
9413
    }
9414
 
9415
    public void setSuccessIsSet(boolean value) {
9416
      if (!value) {
9417
        this.success = null;
9418
      }
9419
    }
9420
 
9421
    public PurchaseServiceException getE() {
9422
      return this.e;
9423
    }
9424
 
9425
    public void setE(PurchaseServiceException e) {
9426
      this.e = e;
9427
    }
9428
 
9429
    public void unsetE() {
9430
      this.e = null;
9431
    }
9432
 
9433
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9434
    public boolean isSetE() {
9435
      return this.e != null;
9436
    }
9437
 
9438
    public void setEIsSet(boolean value) {
9439
      if (!value) {
9440
        this.e = null;
9441
      }
9442
    }
9443
 
9444
    public void setFieldValue(_Fields field, Object value) {
9445
      switch (field) {
9446
      case SUCCESS:
9447
        if (value == null) {
9448
          unsetSuccess();
9449
        } else {
9450
          setSuccess((List<PurchaseOrder>)value);
9451
        }
9452
        break;
9453
 
9454
      case E:
9455
        if (value == null) {
9456
          unsetE();
9457
        } else {
9458
          setE((PurchaseServiceException)value);
9459
        }
9460
        break;
9461
 
9462
      }
9463
    }
9464
 
9465
    public Object getFieldValue(_Fields field) {
9466
      switch (field) {
9467
      case SUCCESS:
9468
        return getSuccess();
9469
 
9470
      case E:
9471
        return getE();
9472
 
9473
      }
9474
      throw new IllegalStateException();
9475
    }
9476
 
9477
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9478
    public boolean isSet(_Fields field) {
9479
      if (field == null) {
9480
        throw new IllegalArgumentException();
9481
      }
9482
 
9483
      switch (field) {
9484
      case SUCCESS:
9485
        return isSetSuccess();
9486
      case E:
9487
        return isSetE();
9488
      }
9489
      throw new IllegalStateException();
9490
    }
9491
 
9492
    @Override
9493
    public boolean equals(Object that) {
9494
      if (that == null)
9495
        return false;
9496
      if (that instanceof getPendingPurchaseOrders_result)
9497
        return this.equals((getPendingPurchaseOrders_result)that);
9498
      return false;
9499
    }
9500
 
9501
    public boolean equals(getPendingPurchaseOrders_result that) {
9502
      if (that == null)
9503
        return false;
9504
 
9505
      boolean this_present_success = true && this.isSetSuccess();
9506
      boolean that_present_success = true && that.isSetSuccess();
9507
      if (this_present_success || that_present_success) {
9508
        if (!(this_present_success && that_present_success))
9509
          return false;
9510
        if (!this.success.equals(that.success))
9511
          return false;
9512
      }
9513
 
9514
      boolean this_present_e = true && this.isSetE();
9515
      boolean that_present_e = true && that.isSetE();
9516
      if (this_present_e || that_present_e) {
9517
        if (!(this_present_e && that_present_e))
9518
          return false;
9519
        if (!this.e.equals(that.e))
9520
          return false;
9521
      }
9522
 
9523
      return true;
9524
    }
9525
 
9526
    @Override
9527
    public int hashCode() {
9528
      return 0;
9529
    }
9530
 
9531
    public int compareTo(getPendingPurchaseOrders_result other) {
9532
      if (!getClass().equals(other.getClass())) {
9533
        return getClass().getName().compareTo(other.getClass().getName());
9534
      }
9535
 
9536
      int lastComparison = 0;
9537
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9538
 
9539
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9540
      if (lastComparison != 0) {
9541
        return lastComparison;
9542
      }
9543
      if (isSetSuccess()) {
9544
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9545
        if (lastComparison != 0) {
9546
          return lastComparison;
9547
        }
9548
      }
9549
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9550
      if (lastComparison != 0) {
9551
        return lastComparison;
9552
      }
9553
      if (isSetE()) {
9554
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9555
        if (lastComparison != 0) {
9556
          return lastComparison;
9557
        }
9558
      }
9559
      return 0;
9560
    }
9561
 
9562
    public _Fields fieldForId(int fieldId) {
9563
      return _Fields.findByThriftId(fieldId);
9564
    }
9565
 
9566
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9567
      org.apache.thrift.protocol.TField field;
9568
      iprot.readStructBegin();
9569
      while (true)
9570
      {
9571
        field = iprot.readFieldBegin();
9572
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9573
          break;
9574
        }
9575
        switch (field.id) {
9576
          case 0: // SUCCESS
9577
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9578
              {
6385 amar.kumar 9579
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9580
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9581
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9582
                {
6385 amar.kumar 9583
                  PurchaseOrder _elem18; // required
9584
                  _elem18 = new PurchaseOrder();
9585
                  _elem18.read(iprot);
9586
                  this.success.add(_elem18);
4754 mandeep.dh 9587
                }
9588
                iprot.readListEnd();
9589
              }
9590
            } else { 
9591
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9592
            }
9593
            break;
9594
          case 1: // E
9595
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9596
              this.e = new PurchaseServiceException();
9597
              this.e.read(iprot);
9598
            } else { 
9599
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9600
            }
9601
            break;
9602
          default:
9603
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9604
        }
9605
        iprot.readFieldEnd();
9606
      }
9607
      iprot.readStructEnd();
9608
      validate();
9609
    }
9610
 
9611
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9612
      oprot.writeStructBegin(STRUCT_DESC);
9613
 
9614
      if (this.isSetSuccess()) {
9615
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9616
        {
9617
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9618
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9619
          {
6385 amar.kumar 9620
            _iter19.write(oprot);
4754 mandeep.dh 9621
          }
9622
          oprot.writeListEnd();
9623
        }
9624
        oprot.writeFieldEnd();
9625
      } else if (this.isSetE()) {
9626
        oprot.writeFieldBegin(E_FIELD_DESC);
9627
        this.e.write(oprot);
9628
        oprot.writeFieldEnd();
9629
      }
9630
      oprot.writeFieldStop();
9631
      oprot.writeStructEnd();
9632
    }
9633
 
9634
    @Override
9635
    public String toString() {
9636
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9637
      boolean first = true;
9638
 
9639
      sb.append("success:");
9640
      if (this.success == null) {
9641
        sb.append("null");
9642
      } else {
9643
        sb.append(this.success);
9644
      }
9645
      first = false;
9646
      if (!first) sb.append(", ");
9647
      sb.append("e:");
9648
      if (this.e == null) {
9649
        sb.append("null");
9650
      } else {
9651
        sb.append(this.e);
9652
      }
9653
      first = false;
9654
      sb.append(")");
9655
      return sb.toString();
9656
    }
9657
 
9658
    public void validate() throws org.apache.thrift.TException {
9659
      // check for required fields
9660
    }
9661
 
9662
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9663
      try {
9664
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9665
      } catch (org.apache.thrift.TException te) {
9666
        throw new java.io.IOException(te);
9667
      }
9668
    }
9669
 
9670
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9671
      try {
9672
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9673
      } catch (org.apache.thrift.TException te) {
9674
        throw new java.io.IOException(te);
9675
      }
9676
    }
9677
 
9678
  }
9679
 
9680
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9681
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9682
 
9683
 
9684
 
9685
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9686
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9687
;
9688
 
9689
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9690
 
9691
      static {
9692
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9693
          byName.put(field.getFieldName(), field);
9694
        }
9695
      }
9696
 
9697
      /**
9698
       * Find the _Fields constant that matches fieldId, or null if its not found.
9699
       */
9700
      public static _Fields findByThriftId(int fieldId) {
9701
        switch(fieldId) {
9702
          default:
9703
            return null;
9704
        }
9705
      }
9706
 
9707
      /**
9708
       * Find the _Fields constant that matches fieldId, throwing an exception
9709
       * if it is not found.
9710
       */
9711
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9712
        _Fields fields = findByThriftId(fieldId);
9713
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9714
        return fields;
9715
      }
9716
 
9717
      /**
9718
       * Find the _Fields constant that matches name, or null if its not found.
9719
       */
9720
      public static _Fields findByName(String name) {
9721
        return byName.get(name);
9722
      }
9723
 
9724
      private final short _thriftId;
9725
      private final String _fieldName;
9726
 
9727
      _Fields(short thriftId, String fieldName) {
9728
        _thriftId = thriftId;
9729
        _fieldName = fieldName;
9730
      }
9731
 
9732
      public short getThriftFieldId() {
9733
        return _thriftId;
9734
      }
9735
 
9736
      public String getFieldName() {
9737
        return _fieldName;
9738
      }
9739
    }
9740
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9741
    static {
9742
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9743
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9744
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9745
    }
9746
 
9747
    public getSuppliers_args() {
9748
    }
9749
 
9750
    /**
9751
     * Performs a deep copy on <i>other</i>.
9752
     */
9753
    public getSuppliers_args(getSuppliers_args other) {
9754
    }
9755
 
9756
    public getSuppliers_args deepCopy() {
9757
      return new getSuppliers_args(this);
9758
    }
9759
 
9760
    @Override
9761
    public void clear() {
9762
    }
9763
 
9764
    public void setFieldValue(_Fields field, Object value) {
9765
      switch (field) {
9766
      }
9767
    }
9768
 
9769
    public Object getFieldValue(_Fields field) {
9770
      switch (field) {
9771
      }
9772
      throw new IllegalStateException();
9773
    }
9774
 
9775
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9776
    public boolean isSet(_Fields field) {
9777
      if (field == null) {
9778
        throw new IllegalArgumentException();
9779
      }
9780
 
9781
      switch (field) {
9782
      }
9783
      throw new IllegalStateException();
9784
    }
9785
 
9786
    @Override
9787
    public boolean equals(Object that) {
9788
      if (that == null)
9789
        return false;
9790
      if (that instanceof getSuppliers_args)
9791
        return this.equals((getSuppliers_args)that);
9792
      return false;
9793
    }
9794
 
9795
    public boolean equals(getSuppliers_args that) {
9796
      if (that == null)
9797
        return false;
9798
 
9799
      return true;
9800
    }
9801
 
9802
    @Override
9803
    public int hashCode() {
9804
      return 0;
9805
    }
9806
 
9807
    public int compareTo(getSuppliers_args other) {
9808
      if (!getClass().equals(other.getClass())) {
9809
        return getClass().getName().compareTo(other.getClass().getName());
9810
      }
9811
 
9812
      int lastComparison = 0;
9813
      getSuppliers_args typedOther = (getSuppliers_args)other;
9814
 
9815
      return 0;
9816
    }
9817
 
9818
    public _Fields fieldForId(int fieldId) {
9819
      return _Fields.findByThriftId(fieldId);
9820
    }
9821
 
9822
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9823
      org.apache.thrift.protocol.TField field;
9824
      iprot.readStructBegin();
9825
      while (true)
9826
      {
9827
        field = iprot.readFieldBegin();
9828
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9829
          break;
9830
        }
9831
        switch (field.id) {
9832
          default:
9833
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9834
        }
9835
        iprot.readFieldEnd();
9836
      }
9837
      iprot.readStructEnd();
9838
      validate();
9839
    }
9840
 
9841
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9842
      validate();
9843
 
9844
      oprot.writeStructBegin(STRUCT_DESC);
9845
      oprot.writeFieldStop();
9846
      oprot.writeStructEnd();
9847
    }
9848
 
9849
    @Override
9850
    public String toString() {
9851
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9852
      boolean first = true;
9853
 
9854
      sb.append(")");
9855
      return sb.toString();
9856
    }
9857
 
9858
    public void validate() throws org.apache.thrift.TException {
9859
      // check for required fields
9860
    }
9861
 
9862
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9863
      try {
9864
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9865
      } catch (org.apache.thrift.TException te) {
9866
        throw new java.io.IOException(te);
9867
      }
9868
    }
9869
 
9870
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9871
      try {
9872
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9873
      } catch (org.apache.thrift.TException te) {
9874
        throw new java.io.IOException(te);
9875
      }
9876
    }
9877
 
9878
  }
9879
 
9880
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9881
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9882
 
9883
    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);
9884
    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);
9885
 
9886
    private List<Supplier> success; // required
9887
    private PurchaseServiceException e; // required
9888
 
9889
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9890
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9891
      SUCCESS((short)0, "success"),
9892
      E((short)1, "e");
9893
 
9894
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9895
 
9896
      static {
9897
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9898
          byName.put(field.getFieldName(), field);
9899
        }
9900
      }
9901
 
9902
      /**
9903
       * Find the _Fields constant that matches fieldId, or null if its not found.
9904
       */
9905
      public static _Fields findByThriftId(int fieldId) {
9906
        switch(fieldId) {
9907
          case 0: // SUCCESS
9908
            return SUCCESS;
9909
          case 1: // E
9910
            return E;
9911
          default:
9912
            return null;
9913
        }
9914
      }
9915
 
9916
      /**
9917
       * Find the _Fields constant that matches fieldId, throwing an exception
9918
       * if it is not found.
9919
       */
9920
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9921
        _Fields fields = findByThriftId(fieldId);
9922
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9923
        return fields;
9924
      }
9925
 
9926
      /**
9927
       * Find the _Fields constant that matches name, or null if its not found.
9928
       */
9929
      public static _Fields findByName(String name) {
9930
        return byName.get(name);
9931
      }
9932
 
9933
      private final short _thriftId;
9934
      private final String _fieldName;
9935
 
9936
      _Fields(short thriftId, String fieldName) {
9937
        _thriftId = thriftId;
9938
        _fieldName = fieldName;
9939
      }
9940
 
9941
      public short getThriftFieldId() {
9942
        return _thriftId;
9943
      }
9944
 
9945
      public String getFieldName() {
9946
        return _fieldName;
9947
      }
9948
    }
9949
 
9950
    // isset id assignments
9951
 
9952
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9953
    static {
9954
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9955
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9956
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9957
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9958
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9959
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9960
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9961
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9962
    }
9963
 
9964
    public getSuppliers_result() {
9965
    }
9966
 
9967
    public getSuppliers_result(
9968
      List<Supplier> success,
9969
      PurchaseServiceException e)
9970
    {
9971
      this();
9972
      this.success = success;
9973
      this.e = e;
9974
    }
9975
 
9976
    /**
9977
     * Performs a deep copy on <i>other</i>.
9978
     */
9979
    public getSuppliers_result(getSuppliers_result other) {
9980
      if (other.isSetSuccess()) {
9981
        List<Supplier> __this__success = new ArrayList<Supplier>();
9982
        for (Supplier other_element : other.success) {
9983
          __this__success.add(new Supplier(other_element));
9984
        }
9985
        this.success = __this__success;
9986
      }
9987
      if (other.isSetE()) {
9988
        this.e = new PurchaseServiceException(other.e);
9989
      }
9990
    }
9991
 
9992
    public getSuppliers_result deepCopy() {
9993
      return new getSuppliers_result(this);
9994
    }
9995
 
9996
    @Override
9997
    public void clear() {
9998
      this.success = null;
9999
      this.e = null;
10000
    }
10001
 
10002
    public int getSuccessSize() {
10003
      return (this.success == null) ? 0 : this.success.size();
10004
    }
10005
 
10006
    public java.util.Iterator<Supplier> getSuccessIterator() {
10007
      return (this.success == null) ? null : this.success.iterator();
10008
    }
10009
 
10010
    public void addToSuccess(Supplier elem) {
10011
      if (this.success == null) {
10012
        this.success = new ArrayList<Supplier>();
10013
      }
10014
      this.success.add(elem);
10015
    }
10016
 
10017
    public List<Supplier> getSuccess() {
10018
      return this.success;
10019
    }
10020
 
10021
    public void setSuccess(List<Supplier> success) {
10022
      this.success = success;
10023
    }
10024
 
10025
    public void unsetSuccess() {
10026
      this.success = null;
10027
    }
10028
 
10029
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10030
    public boolean isSetSuccess() {
10031
      return this.success != null;
10032
    }
10033
 
10034
    public void setSuccessIsSet(boolean value) {
10035
      if (!value) {
10036
        this.success = null;
10037
      }
10038
    }
10039
 
10040
    public PurchaseServiceException getE() {
10041
      return this.e;
10042
    }
10043
 
10044
    public void setE(PurchaseServiceException e) {
10045
      this.e = e;
10046
    }
10047
 
10048
    public void unsetE() {
10049
      this.e = null;
10050
    }
10051
 
10052
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10053
    public boolean isSetE() {
10054
      return this.e != null;
10055
    }
10056
 
10057
    public void setEIsSet(boolean value) {
10058
      if (!value) {
10059
        this.e = null;
10060
      }
10061
    }
10062
 
10063
    public void setFieldValue(_Fields field, Object value) {
10064
      switch (field) {
10065
      case SUCCESS:
10066
        if (value == null) {
10067
          unsetSuccess();
10068
        } else {
10069
          setSuccess((List<Supplier>)value);
10070
        }
10071
        break;
10072
 
10073
      case E:
10074
        if (value == null) {
10075
          unsetE();
10076
        } else {
10077
          setE((PurchaseServiceException)value);
10078
        }
10079
        break;
10080
 
10081
      }
10082
    }
10083
 
10084
    public Object getFieldValue(_Fields field) {
10085
      switch (field) {
10086
      case SUCCESS:
10087
        return getSuccess();
10088
 
10089
      case E:
10090
        return getE();
10091
 
10092
      }
10093
      throw new IllegalStateException();
10094
    }
10095
 
10096
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10097
    public boolean isSet(_Fields field) {
10098
      if (field == null) {
10099
        throw new IllegalArgumentException();
10100
      }
10101
 
10102
      switch (field) {
10103
      case SUCCESS:
10104
        return isSetSuccess();
10105
      case E:
10106
        return isSetE();
10107
      }
10108
      throw new IllegalStateException();
10109
    }
10110
 
10111
    @Override
10112
    public boolean equals(Object that) {
10113
      if (that == null)
10114
        return false;
10115
      if (that instanceof getSuppliers_result)
10116
        return this.equals((getSuppliers_result)that);
10117
      return false;
10118
    }
10119
 
10120
    public boolean equals(getSuppliers_result that) {
10121
      if (that == null)
10122
        return false;
10123
 
10124
      boolean this_present_success = true && this.isSetSuccess();
10125
      boolean that_present_success = true && that.isSetSuccess();
10126
      if (this_present_success || that_present_success) {
10127
        if (!(this_present_success && that_present_success))
10128
          return false;
10129
        if (!this.success.equals(that.success))
10130
          return false;
10131
      }
10132
 
10133
      boolean this_present_e = true && this.isSetE();
10134
      boolean that_present_e = true && that.isSetE();
10135
      if (this_present_e || that_present_e) {
10136
        if (!(this_present_e && that_present_e))
10137
          return false;
10138
        if (!this.e.equals(that.e))
10139
          return false;
10140
      }
10141
 
10142
      return true;
10143
    }
10144
 
10145
    @Override
10146
    public int hashCode() {
10147
      return 0;
10148
    }
10149
 
10150
    public int compareTo(getSuppliers_result other) {
10151
      if (!getClass().equals(other.getClass())) {
10152
        return getClass().getName().compareTo(other.getClass().getName());
10153
      }
10154
 
10155
      int lastComparison = 0;
10156
      getSuppliers_result typedOther = (getSuppliers_result)other;
10157
 
10158
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10159
      if (lastComparison != 0) {
10160
        return lastComparison;
10161
      }
10162
      if (isSetSuccess()) {
10163
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10164
        if (lastComparison != 0) {
10165
          return lastComparison;
10166
        }
10167
      }
10168
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10169
      if (lastComparison != 0) {
10170
        return lastComparison;
10171
      }
10172
      if (isSetE()) {
10173
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10174
        if (lastComparison != 0) {
10175
          return lastComparison;
10176
        }
10177
      }
10178
      return 0;
10179
    }
10180
 
10181
    public _Fields fieldForId(int fieldId) {
10182
      return _Fields.findByThriftId(fieldId);
10183
    }
10184
 
10185
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10186
      org.apache.thrift.protocol.TField field;
10187
      iprot.readStructBegin();
10188
      while (true)
10189
      {
10190
        field = iprot.readFieldBegin();
10191
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10192
          break;
10193
        }
10194
        switch (field.id) {
10195
          case 0: // SUCCESS
10196
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10197
              {
6385 amar.kumar 10198
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10199
                this.success = new ArrayList<Supplier>(_list20.size);
10200
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10201
                {
6385 amar.kumar 10202
                  Supplier _elem22; // required
10203
                  _elem22 = new Supplier();
10204
                  _elem22.read(iprot);
10205
                  this.success.add(_elem22);
4754 mandeep.dh 10206
                }
10207
                iprot.readListEnd();
10208
              }
10209
            } else { 
10210
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10211
            }
10212
            break;
10213
          case 1: // E
10214
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10215
              this.e = new PurchaseServiceException();
10216
              this.e.read(iprot);
10217
            } else { 
10218
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10219
            }
10220
            break;
10221
          default:
10222
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10223
        }
10224
        iprot.readFieldEnd();
10225
      }
10226
      iprot.readStructEnd();
10227
      validate();
10228
    }
10229
 
10230
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10231
      oprot.writeStructBegin(STRUCT_DESC);
10232
 
10233
      if (this.isSetSuccess()) {
10234
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10235
        {
10236
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10237
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10238
          {
6385 amar.kumar 10239
            _iter23.write(oprot);
4754 mandeep.dh 10240
          }
10241
          oprot.writeListEnd();
10242
        }
10243
        oprot.writeFieldEnd();
10244
      } else if (this.isSetE()) {
10245
        oprot.writeFieldBegin(E_FIELD_DESC);
10246
        this.e.write(oprot);
10247
        oprot.writeFieldEnd();
10248
      }
10249
      oprot.writeFieldStop();
10250
      oprot.writeStructEnd();
10251
    }
10252
 
10253
    @Override
10254
    public String toString() {
10255
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10256
      boolean first = true;
10257
 
10258
      sb.append("success:");
10259
      if (this.success == null) {
10260
        sb.append("null");
10261
      } else {
10262
        sb.append(this.success);
10263
      }
10264
      first = false;
10265
      if (!first) sb.append(", ");
10266
      sb.append("e:");
10267
      if (this.e == null) {
10268
        sb.append("null");
10269
      } else {
10270
        sb.append(this.e);
10271
      }
10272
      first = false;
10273
      sb.append(")");
10274
      return sb.toString();
10275
    }
10276
 
10277
    public void validate() throws org.apache.thrift.TException {
10278
      // check for required fields
10279
    }
10280
 
10281
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10282
      try {
10283
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10284
      } catch (org.apache.thrift.TException te) {
10285
        throw new java.io.IOException(te);
10286
      }
10287
    }
10288
 
10289
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10290
      try {
10291
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10292
      } catch (org.apache.thrift.TException te) {
10293
        throw new java.io.IOException(te);
10294
      }
10295
    }
10296
 
10297
  }
10298
 
10299
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10300
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10301
 
10302
    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);
10303
    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);
10304
    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);
10305
 
10306
    private long purchaseOrderId; // required
10307
    private long itemId; // required
10308
    private long quantity; // required
10309
 
10310
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10311
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10312
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10313
      ITEM_ID((short)2, "itemId"),
10314
      QUANTITY((short)3, "quantity");
10315
 
10316
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10317
 
10318
      static {
10319
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10320
          byName.put(field.getFieldName(), field);
10321
        }
10322
      }
10323
 
10324
      /**
10325
       * Find the _Fields constant that matches fieldId, or null if its not found.
10326
       */
10327
      public static _Fields findByThriftId(int fieldId) {
10328
        switch(fieldId) {
10329
          case 1: // PURCHASE_ORDER_ID
10330
            return PURCHASE_ORDER_ID;
10331
          case 2: // ITEM_ID
10332
            return ITEM_ID;
10333
          case 3: // QUANTITY
10334
            return QUANTITY;
10335
          default:
10336
            return null;
10337
        }
10338
      }
10339
 
10340
      /**
10341
       * Find the _Fields constant that matches fieldId, throwing an exception
10342
       * if it is not found.
10343
       */
10344
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10345
        _Fields fields = findByThriftId(fieldId);
10346
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10347
        return fields;
10348
      }
10349
 
10350
      /**
10351
       * Find the _Fields constant that matches name, or null if its not found.
10352
       */
10353
      public static _Fields findByName(String name) {
10354
        return byName.get(name);
10355
      }
10356
 
10357
      private final short _thriftId;
10358
      private final String _fieldName;
10359
 
10360
      _Fields(short thriftId, String fieldName) {
10361
        _thriftId = thriftId;
10362
        _fieldName = fieldName;
10363
      }
10364
 
10365
      public short getThriftFieldId() {
10366
        return _thriftId;
10367
      }
10368
 
10369
      public String getFieldName() {
10370
        return _fieldName;
10371
      }
10372
    }
10373
 
10374
    // isset id assignments
10375
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10376
    private static final int __ITEMID_ISSET_ID = 1;
10377
    private static final int __QUANTITY_ISSET_ID = 2;
10378
    private BitSet __isset_bit_vector = new BitSet(3);
10379
 
10380
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10381
    static {
10382
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10383
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10384
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10385
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10386
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10387
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10388
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10389
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10390
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10391
    }
10392
 
10393
    public fulfillPO_args() {
10394
    }
10395
 
10396
    public fulfillPO_args(
10397
      long purchaseOrderId,
10398
      long itemId,
10399
      long quantity)
10400
    {
10401
      this();
10402
      this.purchaseOrderId = purchaseOrderId;
10403
      setPurchaseOrderIdIsSet(true);
10404
      this.itemId = itemId;
10405
      setItemIdIsSet(true);
10406
      this.quantity = quantity;
10407
      setQuantityIsSet(true);
10408
    }
10409
 
10410
    /**
10411
     * Performs a deep copy on <i>other</i>.
10412
     */
10413
    public fulfillPO_args(fulfillPO_args other) {
10414
      __isset_bit_vector.clear();
10415
      __isset_bit_vector.or(other.__isset_bit_vector);
10416
      this.purchaseOrderId = other.purchaseOrderId;
10417
      this.itemId = other.itemId;
10418
      this.quantity = other.quantity;
10419
    }
10420
 
10421
    public fulfillPO_args deepCopy() {
10422
      return new fulfillPO_args(this);
10423
    }
10424
 
10425
    @Override
10426
    public void clear() {
10427
      setPurchaseOrderIdIsSet(false);
10428
      this.purchaseOrderId = 0;
10429
      setItemIdIsSet(false);
10430
      this.itemId = 0;
10431
      setQuantityIsSet(false);
10432
      this.quantity = 0;
10433
    }
10434
 
10435
    public long getPurchaseOrderId() {
10436
      return this.purchaseOrderId;
10437
    }
10438
 
10439
    public void setPurchaseOrderId(long purchaseOrderId) {
10440
      this.purchaseOrderId = purchaseOrderId;
10441
      setPurchaseOrderIdIsSet(true);
10442
    }
10443
 
10444
    public void unsetPurchaseOrderId() {
10445
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10446
    }
10447
 
10448
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10449
    public boolean isSetPurchaseOrderId() {
10450
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10451
    }
10452
 
10453
    public void setPurchaseOrderIdIsSet(boolean value) {
10454
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10455
    }
10456
 
10457
    public long getItemId() {
10458
      return this.itemId;
10459
    }
10460
 
10461
    public void setItemId(long itemId) {
10462
      this.itemId = itemId;
10463
      setItemIdIsSet(true);
10464
    }
10465
 
10466
    public void unsetItemId() {
10467
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10468
    }
10469
 
10470
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10471
    public boolean isSetItemId() {
10472
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10473
    }
10474
 
10475
    public void setItemIdIsSet(boolean value) {
10476
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10477
    }
10478
 
10479
    public long getQuantity() {
10480
      return this.quantity;
10481
    }
10482
 
10483
    public void setQuantity(long quantity) {
10484
      this.quantity = quantity;
10485
      setQuantityIsSet(true);
10486
    }
10487
 
10488
    public void unsetQuantity() {
10489
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10490
    }
10491
 
10492
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10493
    public boolean isSetQuantity() {
10494
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10495
    }
10496
 
10497
    public void setQuantityIsSet(boolean value) {
10498
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10499
    }
10500
 
10501
    public void setFieldValue(_Fields field, Object value) {
10502
      switch (field) {
10503
      case PURCHASE_ORDER_ID:
10504
        if (value == null) {
10505
          unsetPurchaseOrderId();
10506
        } else {
10507
          setPurchaseOrderId((Long)value);
10508
        }
10509
        break;
10510
 
10511
      case ITEM_ID:
10512
        if (value == null) {
10513
          unsetItemId();
10514
        } else {
10515
          setItemId((Long)value);
10516
        }
10517
        break;
10518
 
10519
      case QUANTITY:
10520
        if (value == null) {
10521
          unsetQuantity();
10522
        } else {
10523
          setQuantity((Long)value);
10524
        }
10525
        break;
10526
 
10527
      }
10528
    }
10529
 
10530
    public Object getFieldValue(_Fields field) {
10531
      switch (field) {
10532
      case PURCHASE_ORDER_ID:
10533
        return Long.valueOf(getPurchaseOrderId());
10534
 
10535
      case ITEM_ID:
10536
        return Long.valueOf(getItemId());
10537
 
10538
      case QUANTITY:
10539
        return Long.valueOf(getQuantity());
10540
 
10541
      }
10542
      throw new IllegalStateException();
10543
    }
10544
 
10545
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10546
    public boolean isSet(_Fields field) {
10547
      if (field == null) {
10548
        throw new IllegalArgumentException();
10549
      }
10550
 
10551
      switch (field) {
10552
      case PURCHASE_ORDER_ID:
10553
        return isSetPurchaseOrderId();
10554
      case ITEM_ID:
10555
        return isSetItemId();
10556
      case QUANTITY:
10557
        return isSetQuantity();
10558
      }
10559
      throw new IllegalStateException();
10560
    }
10561
 
10562
    @Override
10563
    public boolean equals(Object that) {
10564
      if (that == null)
10565
        return false;
10566
      if (that instanceof fulfillPO_args)
10567
        return this.equals((fulfillPO_args)that);
10568
      return false;
10569
    }
10570
 
10571
    public boolean equals(fulfillPO_args that) {
10572
      if (that == null)
10573
        return false;
10574
 
10575
      boolean this_present_purchaseOrderId = true;
10576
      boolean that_present_purchaseOrderId = true;
10577
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10578
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10579
          return false;
10580
        if (this.purchaseOrderId != that.purchaseOrderId)
10581
          return false;
10582
      }
10583
 
10584
      boolean this_present_itemId = true;
10585
      boolean that_present_itemId = true;
10586
      if (this_present_itemId || that_present_itemId) {
10587
        if (!(this_present_itemId && that_present_itemId))
10588
          return false;
10589
        if (this.itemId != that.itemId)
10590
          return false;
10591
      }
10592
 
10593
      boolean this_present_quantity = true;
10594
      boolean that_present_quantity = true;
10595
      if (this_present_quantity || that_present_quantity) {
10596
        if (!(this_present_quantity && that_present_quantity))
10597
          return false;
10598
        if (this.quantity != that.quantity)
10599
          return false;
10600
      }
10601
 
10602
      return true;
10603
    }
10604
 
10605
    @Override
10606
    public int hashCode() {
10607
      return 0;
10608
    }
10609
 
10610
    public int compareTo(fulfillPO_args other) {
10611
      if (!getClass().equals(other.getClass())) {
10612
        return getClass().getName().compareTo(other.getClass().getName());
10613
      }
10614
 
10615
      int lastComparison = 0;
10616
      fulfillPO_args typedOther = (fulfillPO_args)other;
10617
 
10618
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10619
      if (lastComparison != 0) {
10620
        return lastComparison;
10621
      }
10622
      if (isSetPurchaseOrderId()) {
10623
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10624
        if (lastComparison != 0) {
10625
          return lastComparison;
10626
        }
10627
      }
10628
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10629
      if (lastComparison != 0) {
10630
        return lastComparison;
10631
      }
10632
      if (isSetItemId()) {
10633
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10634
        if (lastComparison != 0) {
10635
          return lastComparison;
10636
        }
10637
      }
10638
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10639
      if (lastComparison != 0) {
10640
        return lastComparison;
10641
      }
10642
      if (isSetQuantity()) {
10643
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10644
        if (lastComparison != 0) {
10645
          return lastComparison;
10646
        }
10647
      }
10648
      return 0;
10649
    }
10650
 
10651
    public _Fields fieldForId(int fieldId) {
10652
      return _Fields.findByThriftId(fieldId);
10653
    }
10654
 
10655
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10656
      org.apache.thrift.protocol.TField field;
10657
      iprot.readStructBegin();
10658
      while (true)
10659
      {
10660
        field = iprot.readFieldBegin();
10661
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10662
          break;
10663
        }
10664
        switch (field.id) {
10665
          case 1: // PURCHASE_ORDER_ID
10666
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10667
              this.purchaseOrderId = iprot.readI64();
10668
              setPurchaseOrderIdIsSet(true);
10669
            } else { 
10670
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10671
            }
10672
            break;
10673
          case 2: // ITEM_ID
10674
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10675
              this.itemId = iprot.readI64();
10676
              setItemIdIsSet(true);
10677
            } else { 
10678
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10679
            }
10680
            break;
10681
          case 3: // QUANTITY
10682
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10683
              this.quantity = iprot.readI64();
10684
              setQuantityIsSet(true);
10685
            } else { 
10686
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10687
            }
10688
            break;
10689
          default:
10690
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10691
        }
10692
        iprot.readFieldEnd();
10693
      }
10694
      iprot.readStructEnd();
10695
      validate();
10696
    }
10697
 
10698
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10699
      validate();
10700
 
10701
      oprot.writeStructBegin(STRUCT_DESC);
10702
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10703
      oprot.writeI64(this.purchaseOrderId);
10704
      oprot.writeFieldEnd();
10705
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10706
      oprot.writeI64(this.itemId);
10707
      oprot.writeFieldEnd();
10708
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10709
      oprot.writeI64(this.quantity);
10710
      oprot.writeFieldEnd();
10711
      oprot.writeFieldStop();
10712
      oprot.writeStructEnd();
10713
    }
10714
 
10715
    @Override
10716
    public String toString() {
10717
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10718
      boolean first = true;
10719
 
10720
      sb.append("purchaseOrderId:");
10721
      sb.append(this.purchaseOrderId);
10722
      first = false;
10723
      if (!first) sb.append(", ");
10724
      sb.append("itemId:");
10725
      sb.append(this.itemId);
10726
      first = false;
10727
      if (!first) sb.append(", ");
10728
      sb.append("quantity:");
10729
      sb.append(this.quantity);
10730
      first = false;
10731
      sb.append(")");
10732
      return sb.toString();
10733
    }
10734
 
10735
    public void validate() throws org.apache.thrift.TException {
10736
      // check for required fields
10737
    }
10738
 
10739
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10740
      try {
10741
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10742
      } catch (org.apache.thrift.TException te) {
10743
        throw new java.io.IOException(te);
10744
      }
10745
    }
10746
 
10747
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10748
      try {
10749
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10750
        __isset_bit_vector = new BitSet(1);
10751
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10752
      } catch (org.apache.thrift.TException te) {
10753
        throw new java.io.IOException(te);
10754
      }
10755
    }
10756
 
10757
  }
10758
 
10759
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10760
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10761
 
10762
    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);
10763
 
10764
    private PurchaseServiceException e; // required
10765
 
10766
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10767
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10768
      E((short)1, "e");
10769
 
10770
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10771
 
10772
      static {
10773
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10774
          byName.put(field.getFieldName(), field);
10775
        }
10776
      }
10777
 
10778
      /**
10779
       * Find the _Fields constant that matches fieldId, or null if its not found.
10780
       */
10781
      public static _Fields findByThriftId(int fieldId) {
10782
        switch(fieldId) {
10783
          case 1: // E
10784
            return E;
10785
          default:
10786
            return null;
10787
        }
10788
      }
10789
 
10790
      /**
10791
       * Find the _Fields constant that matches fieldId, throwing an exception
10792
       * if it is not found.
10793
       */
10794
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10795
        _Fields fields = findByThriftId(fieldId);
10796
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10797
        return fields;
10798
      }
10799
 
10800
      /**
10801
       * Find the _Fields constant that matches name, or null if its not found.
10802
       */
10803
      public static _Fields findByName(String name) {
10804
        return byName.get(name);
10805
      }
10806
 
10807
      private final short _thriftId;
10808
      private final String _fieldName;
10809
 
10810
      _Fields(short thriftId, String fieldName) {
10811
        _thriftId = thriftId;
10812
        _fieldName = fieldName;
10813
      }
10814
 
10815
      public short getThriftFieldId() {
10816
        return _thriftId;
10817
      }
10818
 
10819
      public String getFieldName() {
10820
        return _fieldName;
10821
      }
10822
    }
10823
 
10824
    // isset id assignments
10825
 
10826
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10827
    static {
10828
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10829
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10830
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10831
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10832
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10833
    }
10834
 
10835
    public fulfillPO_result() {
10836
    }
10837
 
10838
    public fulfillPO_result(
10839
      PurchaseServiceException e)
10840
    {
10841
      this();
10842
      this.e = e;
10843
    }
10844
 
10845
    /**
10846
     * Performs a deep copy on <i>other</i>.
10847
     */
10848
    public fulfillPO_result(fulfillPO_result other) {
10849
      if (other.isSetE()) {
10850
        this.e = new PurchaseServiceException(other.e);
10851
      }
10852
    }
10853
 
10854
    public fulfillPO_result deepCopy() {
10855
      return new fulfillPO_result(this);
10856
    }
10857
 
10858
    @Override
10859
    public void clear() {
10860
      this.e = null;
10861
    }
10862
 
10863
    public PurchaseServiceException getE() {
10864
      return this.e;
10865
    }
10866
 
10867
    public void setE(PurchaseServiceException e) {
10868
      this.e = e;
10869
    }
10870
 
10871
    public void unsetE() {
10872
      this.e = null;
10873
    }
10874
 
10875
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10876
    public boolean isSetE() {
10877
      return this.e != null;
10878
    }
10879
 
10880
    public void setEIsSet(boolean value) {
10881
      if (!value) {
10882
        this.e = null;
10883
      }
10884
    }
10885
 
10886
    public void setFieldValue(_Fields field, Object value) {
10887
      switch (field) {
10888
      case E:
10889
        if (value == null) {
10890
          unsetE();
10891
        } else {
10892
          setE((PurchaseServiceException)value);
10893
        }
10894
        break;
10895
 
10896
      }
10897
    }
10898
 
10899
    public Object getFieldValue(_Fields field) {
10900
      switch (field) {
10901
      case E:
10902
        return getE();
10903
 
10904
      }
10905
      throw new IllegalStateException();
10906
    }
10907
 
10908
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10909
    public boolean isSet(_Fields field) {
10910
      if (field == null) {
10911
        throw new IllegalArgumentException();
10912
      }
10913
 
10914
      switch (field) {
10915
      case E:
10916
        return isSetE();
10917
      }
10918
      throw new IllegalStateException();
10919
    }
10920
 
10921
    @Override
10922
    public boolean equals(Object that) {
10923
      if (that == null)
10924
        return false;
10925
      if (that instanceof fulfillPO_result)
10926
        return this.equals((fulfillPO_result)that);
10927
      return false;
10928
    }
10929
 
10930
    public boolean equals(fulfillPO_result that) {
10931
      if (that == null)
10932
        return false;
10933
 
10934
      boolean this_present_e = true && this.isSetE();
10935
      boolean that_present_e = true && that.isSetE();
10936
      if (this_present_e || that_present_e) {
10937
        if (!(this_present_e && that_present_e))
10938
          return false;
10939
        if (!this.e.equals(that.e))
10940
          return false;
10941
      }
10942
 
10943
      return true;
10944
    }
10945
 
10946
    @Override
10947
    public int hashCode() {
10948
      return 0;
10949
    }
10950
 
10951
    public int compareTo(fulfillPO_result other) {
10952
      if (!getClass().equals(other.getClass())) {
10953
        return getClass().getName().compareTo(other.getClass().getName());
10954
      }
10955
 
10956
      int lastComparison = 0;
10957
      fulfillPO_result typedOther = (fulfillPO_result)other;
10958
 
10959
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10960
      if (lastComparison != 0) {
10961
        return lastComparison;
10962
      }
10963
      if (isSetE()) {
10964
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10965
        if (lastComparison != 0) {
10966
          return lastComparison;
10967
        }
10968
      }
10969
      return 0;
10970
    }
10971
 
10972
    public _Fields fieldForId(int fieldId) {
10973
      return _Fields.findByThriftId(fieldId);
10974
    }
10975
 
10976
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10977
      org.apache.thrift.protocol.TField field;
10978
      iprot.readStructBegin();
10979
      while (true)
10980
      {
10981
        field = iprot.readFieldBegin();
10982
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10983
          break;
10984
        }
10985
        switch (field.id) {
10986
          case 1: // E
10987
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10988
              this.e = new PurchaseServiceException();
10989
              this.e.read(iprot);
10990
            } else { 
10991
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10992
            }
10993
            break;
10994
          default:
10995
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10996
        }
10997
        iprot.readFieldEnd();
10998
      }
10999
      iprot.readStructEnd();
11000
      validate();
11001
    }
11002
 
11003
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11004
      oprot.writeStructBegin(STRUCT_DESC);
11005
 
11006
      if (this.isSetE()) {
11007
        oprot.writeFieldBegin(E_FIELD_DESC);
11008
        this.e.write(oprot);
11009
        oprot.writeFieldEnd();
11010
      }
11011
      oprot.writeFieldStop();
11012
      oprot.writeStructEnd();
11013
    }
11014
 
11015
    @Override
11016
    public String toString() {
11017
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
11018
      boolean first = true;
11019
 
11020
      sb.append("e:");
11021
      if (this.e == null) {
11022
        sb.append("null");
11023
      } else {
11024
        sb.append(this.e);
11025
      }
11026
      first = false;
11027
      sb.append(")");
11028
      return sb.toString();
11029
    }
11030
 
11031
    public void validate() throws org.apache.thrift.TException {
11032
      // check for required fields
11033
    }
11034
 
11035
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11036
      try {
11037
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11038
      } catch (org.apache.thrift.TException te) {
11039
        throw new java.io.IOException(te);
11040
      }
11041
    }
11042
 
11043
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11044
      try {
11045
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11046
      } catch (org.apache.thrift.TException te) {
11047
        throw new java.io.IOException(te);
11048
      }
11049
    }
11050
 
11051
  }
11052
 
11053
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
11054
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
11055
 
11056
    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);
11057
 
11058
    private PurchaseOrder purchaseOrder; // required
11059
 
11060
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11061
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11062
      PURCHASE_ORDER((short)1, "purchaseOrder");
11063
 
11064
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11065
 
11066
      static {
11067
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11068
          byName.put(field.getFieldName(), field);
11069
        }
11070
      }
11071
 
11072
      /**
11073
       * Find the _Fields constant that matches fieldId, or null if its not found.
11074
       */
11075
      public static _Fields findByThriftId(int fieldId) {
11076
        switch(fieldId) {
11077
          case 1: // PURCHASE_ORDER
11078
            return PURCHASE_ORDER;
11079
          default:
11080
            return null;
11081
        }
11082
      }
11083
 
11084
      /**
11085
       * Find the _Fields constant that matches fieldId, throwing an exception
11086
       * if it is not found.
11087
       */
11088
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11089
        _Fields fields = findByThriftId(fieldId);
11090
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11091
        return fields;
11092
      }
11093
 
11094
      /**
11095
       * Find the _Fields constant that matches name, or null if its not found.
11096
       */
11097
      public static _Fields findByName(String name) {
11098
        return byName.get(name);
11099
      }
11100
 
11101
      private final short _thriftId;
11102
      private final String _fieldName;
11103
 
11104
      _Fields(short thriftId, String fieldName) {
11105
        _thriftId = thriftId;
11106
        _fieldName = fieldName;
11107
      }
11108
 
11109
      public short getThriftFieldId() {
11110
        return _thriftId;
11111
      }
11112
 
11113
      public String getFieldName() {
11114
        return _fieldName;
11115
      }
11116
    }
11117
 
11118
    // isset id assignments
11119
 
11120
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11121
    static {
11122
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11123
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11124
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
11125
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11126
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
11127
    }
11128
 
11129
    public updatePurchaseOrder_args() {
11130
    }
11131
 
11132
    public updatePurchaseOrder_args(
11133
      PurchaseOrder purchaseOrder)
11134
    {
11135
      this();
11136
      this.purchaseOrder = purchaseOrder;
11137
    }
11138
 
11139
    /**
11140
     * Performs a deep copy on <i>other</i>.
11141
     */
11142
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
11143
      if (other.isSetPurchaseOrder()) {
11144
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
11145
      }
11146
    }
11147
 
11148
    public updatePurchaseOrder_args deepCopy() {
11149
      return new updatePurchaseOrder_args(this);
11150
    }
11151
 
11152
    @Override
11153
    public void clear() {
11154
      this.purchaseOrder = null;
11155
    }
11156
 
11157
    public PurchaseOrder getPurchaseOrder() {
11158
      return this.purchaseOrder;
11159
    }
11160
 
11161
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
11162
      this.purchaseOrder = purchaseOrder;
11163
    }
11164
 
11165
    public void unsetPurchaseOrder() {
11166
      this.purchaseOrder = null;
11167
    }
11168
 
11169
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
11170
    public boolean isSetPurchaseOrder() {
11171
      return this.purchaseOrder != null;
11172
    }
11173
 
11174
    public void setPurchaseOrderIsSet(boolean value) {
11175
      if (!value) {
11176
        this.purchaseOrder = null;
11177
      }
11178
    }
11179
 
11180
    public void setFieldValue(_Fields field, Object value) {
11181
      switch (field) {
11182
      case PURCHASE_ORDER:
11183
        if (value == null) {
11184
          unsetPurchaseOrder();
11185
        } else {
11186
          setPurchaseOrder((PurchaseOrder)value);
11187
        }
11188
        break;
11189
 
11190
      }
11191
    }
11192
 
11193
    public Object getFieldValue(_Fields field) {
11194
      switch (field) {
11195
      case PURCHASE_ORDER:
11196
        return getPurchaseOrder();
11197
 
11198
      }
11199
      throw new IllegalStateException();
11200
    }
11201
 
11202
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11203
    public boolean isSet(_Fields field) {
11204
      if (field == null) {
11205
        throw new IllegalArgumentException();
11206
      }
11207
 
11208
      switch (field) {
11209
      case PURCHASE_ORDER:
11210
        return isSetPurchaseOrder();
11211
      }
11212
      throw new IllegalStateException();
11213
    }
11214
 
11215
    @Override
11216
    public boolean equals(Object that) {
11217
      if (that == null)
11218
        return false;
11219
      if (that instanceof updatePurchaseOrder_args)
11220
        return this.equals((updatePurchaseOrder_args)that);
11221
      return false;
11222
    }
11223
 
11224
    public boolean equals(updatePurchaseOrder_args that) {
11225
      if (that == null)
11226
        return false;
11227
 
11228
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11229
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11230
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11231
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11232
          return false;
11233
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11234
          return false;
11235
      }
11236
 
11237
      return true;
11238
    }
11239
 
11240
    @Override
11241
    public int hashCode() {
11242
      return 0;
11243
    }
11244
 
11245
    public int compareTo(updatePurchaseOrder_args other) {
11246
      if (!getClass().equals(other.getClass())) {
11247
        return getClass().getName().compareTo(other.getClass().getName());
11248
      }
11249
 
11250
      int lastComparison = 0;
11251
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11252
 
11253
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11254
      if (lastComparison != 0) {
11255
        return lastComparison;
11256
      }
11257
      if (isSetPurchaseOrder()) {
11258
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11259
        if (lastComparison != 0) {
11260
          return lastComparison;
11261
        }
11262
      }
11263
      return 0;
11264
    }
11265
 
11266
    public _Fields fieldForId(int fieldId) {
11267
      return _Fields.findByThriftId(fieldId);
11268
    }
11269
 
11270
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11271
      org.apache.thrift.protocol.TField field;
11272
      iprot.readStructBegin();
11273
      while (true)
11274
      {
11275
        field = iprot.readFieldBegin();
11276
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11277
          break;
11278
        }
11279
        switch (field.id) {
11280
          case 1: // PURCHASE_ORDER
11281
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11282
              this.purchaseOrder = new PurchaseOrder();
11283
              this.purchaseOrder.read(iprot);
11284
            } else { 
11285
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11286
            }
11287
            break;
11288
          default:
11289
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11290
        }
11291
        iprot.readFieldEnd();
11292
      }
11293
      iprot.readStructEnd();
11294
      validate();
11295
    }
11296
 
11297
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11298
      validate();
11299
 
11300
      oprot.writeStructBegin(STRUCT_DESC);
11301
      if (this.purchaseOrder != null) {
11302
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11303
        this.purchaseOrder.write(oprot);
11304
        oprot.writeFieldEnd();
11305
      }
11306
      oprot.writeFieldStop();
11307
      oprot.writeStructEnd();
11308
    }
11309
 
11310
    @Override
11311
    public String toString() {
11312
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11313
      boolean first = true;
11314
 
11315
      sb.append("purchaseOrder:");
11316
      if (this.purchaseOrder == null) {
11317
        sb.append("null");
11318
      } else {
11319
        sb.append(this.purchaseOrder);
11320
      }
11321
      first = false;
11322
      sb.append(")");
11323
      return sb.toString();
11324
    }
11325
 
11326
    public void validate() throws org.apache.thrift.TException {
11327
      // check for required fields
11328
    }
11329
 
11330
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11331
      try {
11332
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11333
      } catch (org.apache.thrift.TException te) {
11334
        throw new java.io.IOException(te);
11335
      }
11336
    }
11337
 
11338
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11339
      try {
11340
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11341
      } catch (org.apache.thrift.TException te) {
11342
        throw new java.io.IOException(te);
11343
      }
11344
    }
11345
 
11346
  }
11347
 
11348
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11349
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11350
 
11351
    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);
11352
 
11353
    private PurchaseServiceException e; // required
11354
 
11355
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11356
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11357
      E((short)1, "e");
11358
 
11359
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11360
 
11361
      static {
11362
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11363
          byName.put(field.getFieldName(), field);
11364
        }
11365
      }
11366
 
11367
      /**
11368
       * Find the _Fields constant that matches fieldId, or null if its not found.
11369
       */
11370
      public static _Fields findByThriftId(int fieldId) {
11371
        switch(fieldId) {
11372
          case 1: // E
11373
            return E;
11374
          default:
11375
            return null;
11376
        }
11377
      }
11378
 
11379
      /**
11380
       * Find the _Fields constant that matches fieldId, throwing an exception
11381
       * if it is not found.
11382
       */
11383
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11384
        _Fields fields = findByThriftId(fieldId);
11385
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11386
        return fields;
11387
      }
11388
 
11389
      /**
11390
       * Find the _Fields constant that matches name, or null if its not found.
11391
       */
11392
      public static _Fields findByName(String name) {
11393
        return byName.get(name);
11394
      }
11395
 
11396
      private final short _thriftId;
11397
      private final String _fieldName;
11398
 
11399
      _Fields(short thriftId, String fieldName) {
11400
        _thriftId = thriftId;
11401
        _fieldName = fieldName;
11402
      }
11403
 
11404
      public short getThriftFieldId() {
11405
        return _thriftId;
11406
      }
11407
 
11408
      public String getFieldName() {
11409
        return _fieldName;
11410
      }
11411
    }
11412
 
11413
    // isset id assignments
11414
 
11415
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11416
    static {
11417
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11418
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11419
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11420
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11421
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11422
    }
11423
 
11424
    public updatePurchaseOrder_result() {
11425
    }
11426
 
11427
    public updatePurchaseOrder_result(
11428
      PurchaseServiceException e)
11429
    {
11430
      this();
11431
      this.e = e;
11432
    }
11433
 
11434
    /**
11435
     * Performs a deep copy on <i>other</i>.
11436
     */
11437
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11438
      if (other.isSetE()) {
11439
        this.e = new PurchaseServiceException(other.e);
11440
      }
11441
    }
11442
 
11443
    public updatePurchaseOrder_result deepCopy() {
11444
      return new updatePurchaseOrder_result(this);
11445
    }
11446
 
11447
    @Override
11448
    public void clear() {
11449
      this.e = null;
11450
    }
11451
 
11452
    public PurchaseServiceException getE() {
11453
      return this.e;
11454
    }
11455
 
11456
    public void setE(PurchaseServiceException e) {
11457
      this.e = e;
11458
    }
11459
 
11460
    public void unsetE() {
11461
      this.e = null;
11462
    }
11463
 
11464
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11465
    public boolean isSetE() {
11466
      return this.e != null;
11467
    }
11468
 
11469
    public void setEIsSet(boolean value) {
11470
      if (!value) {
11471
        this.e = null;
11472
      }
11473
    }
11474
 
11475
    public void setFieldValue(_Fields field, Object value) {
11476
      switch (field) {
11477
      case E:
11478
        if (value == null) {
11479
          unsetE();
11480
        } else {
11481
          setE((PurchaseServiceException)value);
11482
        }
11483
        break;
11484
 
11485
      }
11486
    }
11487
 
11488
    public Object getFieldValue(_Fields field) {
11489
      switch (field) {
11490
      case E:
11491
        return getE();
11492
 
11493
      }
11494
      throw new IllegalStateException();
11495
    }
11496
 
11497
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11498
    public boolean isSet(_Fields field) {
11499
      if (field == null) {
11500
        throw new IllegalArgumentException();
11501
      }
11502
 
11503
      switch (field) {
11504
      case E:
11505
        return isSetE();
11506
      }
11507
      throw new IllegalStateException();
11508
    }
11509
 
11510
    @Override
11511
    public boolean equals(Object that) {
11512
      if (that == null)
11513
        return false;
11514
      if (that instanceof updatePurchaseOrder_result)
11515
        return this.equals((updatePurchaseOrder_result)that);
11516
      return false;
11517
    }
11518
 
11519
    public boolean equals(updatePurchaseOrder_result that) {
11520
      if (that == null)
11521
        return false;
11522
 
11523
      boolean this_present_e = true && this.isSetE();
11524
      boolean that_present_e = true && that.isSetE();
11525
      if (this_present_e || that_present_e) {
11526
        if (!(this_present_e && that_present_e))
11527
          return false;
11528
        if (!this.e.equals(that.e))
11529
          return false;
11530
      }
11531
 
11532
      return true;
11533
    }
11534
 
11535
    @Override
11536
    public int hashCode() {
11537
      return 0;
11538
    }
11539
 
11540
    public int compareTo(updatePurchaseOrder_result other) {
11541
      if (!getClass().equals(other.getClass())) {
11542
        return getClass().getName().compareTo(other.getClass().getName());
11543
      }
11544
 
11545
      int lastComparison = 0;
11546
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11547
 
11548
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11549
      if (lastComparison != 0) {
11550
        return lastComparison;
11551
      }
11552
      if (isSetE()) {
11553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11554
        if (lastComparison != 0) {
11555
          return lastComparison;
11556
        }
11557
      }
11558
      return 0;
11559
    }
11560
 
11561
    public _Fields fieldForId(int fieldId) {
11562
      return _Fields.findByThriftId(fieldId);
11563
    }
11564
 
11565
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11566
      org.apache.thrift.protocol.TField field;
11567
      iprot.readStructBegin();
11568
      while (true)
11569
      {
11570
        field = iprot.readFieldBegin();
11571
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11572
          break;
11573
        }
11574
        switch (field.id) {
11575
          case 1: // E
11576
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11577
              this.e = new PurchaseServiceException();
11578
              this.e.read(iprot);
11579
            } else { 
11580
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11581
            }
11582
            break;
11583
          default:
11584
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11585
        }
11586
        iprot.readFieldEnd();
11587
      }
11588
      iprot.readStructEnd();
11589
      validate();
11590
    }
11591
 
11592
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11593
      oprot.writeStructBegin(STRUCT_DESC);
11594
 
11595
      if (this.isSetE()) {
11596
        oprot.writeFieldBegin(E_FIELD_DESC);
11597
        this.e.write(oprot);
11598
        oprot.writeFieldEnd();
11599
      }
11600
      oprot.writeFieldStop();
11601
      oprot.writeStructEnd();
11602
    }
11603
 
11604
    @Override
11605
    public String toString() {
11606
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11607
      boolean first = true;
11608
 
11609
      sb.append("e:");
11610
      if (this.e == null) {
11611
        sb.append("null");
11612
      } else {
11613
        sb.append(this.e);
11614
      }
11615
      first = false;
11616
      sb.append(")");
11617
      return sb.toString();
11618
    }
11619
 
11620
    public void validate() throws org.apache.thrift.TException {
11621
      // check for required fields
11622
    }
11623
 
11624
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11625
      try {
11626
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11627
      } catch (org.apache.thrift.TException te) {
11628
        throw new java.io.IOException(te);
11629
      }
11630
    }
11631
 
11632
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11633
      try {
11634
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11635
      } catch (org.apache.thrift.TException te) {
11636
        throw new java.io.IOException(te);
11637
      }
11638
    }
11639
 
11640
  }
11641
 
5185 mandeep.dh 11642
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11643
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11644
 
11645
    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);
11646
    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);
11647
    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);
11648
 
11649
    private long purchaseId; // required
11650
    private long itemId; // required
11651
    private long quantity; // required
11652
 
11653
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11654
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11655
      PURCHASE_ID((short)1, "purchaseId"),
11656
      ITEM_ID((short)2, "itemId"),
11657
      QUANTITY((short)3, "quantity");
11658
 
11659
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11660
 
11661
      static {
11662
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11663
          byName.put(field.getFieldName(), field);
11664
        }
11665
      }
11666
 
11667
      /**
11668
       * Find the _Fields constant that matches fieldId, or null if its not found.
11669
       */
11670
      public static _Fields findByThriftId(int fieldId) {
11671
        switch(fieldId) {
11672
          case 1: // PURCHASE_ID
11673
            return PURCHASE_ID;
11674
          case 2: // ITEM_ID
11675
            return ITEM_ID;
11676
          case 3: // QUANTITY
11677
            return QUANTITY;
11678
          default:
11679
            return null;
11680
        }
11681
      }
11682
 
11683
      /**
11684
       * Find the _Fields constant that matches fieldId, throwing an exception
11685
       * if it is not found.
11686
       */
11687
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11688
        _Fields fields = findByThriftId(fieldId);
11689
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11690
        return fields;
11691
      }
11692
 
11693
      /**
11694
       * Find the _Fields constant that matches name, or null if its not found.
11695
       */
11696
      public static _Fields findByName(String name) {
11697
        return byName.get(name);
11698
      }
11699
 
11700
      private final short _thriftId;
11701
      private final String _fieldName;
11702
 
11703
      _Fields(short thriftId, String fieldName) {
11704
        _thriftId = thriftId;
11705
        _fieldName = fieldName;
11706
      }
11707
 
11708
      public short getThriftFieldId() {
11709
        return _thriftId;
11710
      }
11711
 
11712
      public String getFieldName() {
11713
        return _fieldName;
11714
      }
11715
    }
11716
 
11717
    // isset id assignments
11718
    private static final int __PURCHASEID_ISSET_ID = 0;
11719
    private static final int __ITEMID_ISSET_ID = 1;
11720
    private static final int __QUANTITY_ISSET_ID = 2;
11721
    private BitSet __isset_bit_vector = new BitSet(3);
11722
 
11723
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11724
    static {
11725
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11726
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11727
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11728
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11729
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11730
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11731
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11732
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11733
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11734
    }
11735
 
11736
    public unFulfillPO_args() {
11737
    }
11738
 
11739
    public unFulfillPO_args(
11740
      long purchaseId,
11741
      long itemId,
11742
      long quantity)
11743
    {
11744
      this();
11745
      this.purchaseId = purchaseId;
11746
      setPurchaseIdIsSet(true);
11747
      this.itemId = itemId;
11748
      setItemIdIsSet(true);
11749
      this.quantity = quantity;
11750
      setQuantityIsSet(true);
11751
    }
11752
 
11753
    /**
11754
     * Performs a deep copy on <i>other</i>.
11755
     */
11756
    public unFulfillPO_args(unFulfillPO_args other) {
11757
      __isset_bit_vector.clear();
11758
      __isset_bit_vector.or(other.__isset_bit_vector);
11759
      this.purchaseId = other.purchaseId;
11760
      this.itemId = other.itemId;
11761
      this.quantity = other.quantity;
11762
    }
11763
 
11764
    public unFulfillPO_args deepCopy() {
11765
      return new unFulfillPO_args(this);
11766
    }
11767
 
11768
    @Override
11769
    public void clear() {
11770
      setPurchaseIdIsSet(false);
11771
      this.purchaseId = 0;
11772
      setItemIdIsSet(false);
11773
      this.itemId = 0;
11774
      setQuantityIsSet(false);
11775
      this.quantity = 0;
11776
    }
11777
 
11778
    public long getPurchaseId() {
11779
      return this.purchaseId;
11780
    }
11781
 
11782
    public void setPurchaseId(long purchaseId) {
11783
      this.purchaseId = purchaseId;
11784
      setPurchaseIdIsSet(true);
11785
    }
11786
 
11787
    public void unsetPurchaseId() {
11788
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11789
    }
11790
 
11791
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11792
    public boolean isSetPurchaseId() {
11793
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11794
    }
11795
 
11796
    public void setPurchaseIdIsSet(boolean value) {
11797
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11798
    }
11799
 
11800
    public long getItemId() {
11801
      return this.itemId;
11802
    }
11803
 
11804
    public void setItemId(long itemId) {
11805
      this.itemId = itemId;
11806
      setItemIdIsSet(true);
11807
    }
11808
 
11809
    public void unsetItemId() {
11810
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11811
    }
11812
 
11813
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11814
    public boolean isSetItemId() {
11815
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11816
    }
11817
 
11818
    public void setItemIdIsSet(boolean value) {
11819
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11820
    }
11821
 
11822
    public long getQuantity() {
11823
      return this.quantity;
11824
    }
11825
 
11826
    public void setQuantity(long quantity) {
11827
      this.quantity = quantity;
11828
      setQuantityIsSet(true);
11829
    }
11830
 
11831
    public void unsetQuantity() {
11832
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11833
    }
11834
 
11835
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11836
    public boolean isSetQuantity() {
11837
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11838
    }
11839
 
11840
    public void setQuantityIsSet(boolean value) {
11841
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11842
    }
11843
 
11844
    public void setFieldValue(_Fields field, Object value) {
11845
      switch (field) {
11846
      case PURCHASE_ID:
11847
        if (value == null) {
11848
          unsetPurchaseId();
11849
        } else {
11850
          setPurchaseId((Long)value);
11851
        }
11852
        break;
11853
 
11854
      case ITEM_ID:
11855
        if (value == null) {
11856
          unsetItemId();
11857
        } else {
11858
          setItemId((Long)value);
11859
        }
11860
        break;
11861
 
11862
      case QUANTITY:
11863
        if (value == null) {
11864
          unsetQuantity();
11865
        } else {
11866
          setQuantity((Long)value);
11867
        }
11868
        break;
11869
 
11870
      }
11871
    }
11872
 
11873
    public Object getFieldValue(_Fields field) {
11874
      switch (field) {
11875
      case PURCHASE_ID:
11876
        return Long.valueOf(getPurchaseId());
11877
 
11878
      case ITEM_ID:
11879
        return Long.valueOf(getItemId());
11880
 
11881
      case QUANTITY:
11882
        return Long.valueOf(getQuantity());
11883
 
11884
      }
11885
      throw new IllegalStateException();
11886
    }
11887
 
11888
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11889
    public boolean isSet(_Fields field) {
11890
      if (field == null) {
11891
        throw new IllegalArgumentException();
11892
      }
11893
 
11894
      switch (field) {
11895
      case PURCHASE_ID:
11896
        return isSetPurchaseId();
11897
      case ITEM_ID:
11898
        return isSetItemId();
11899
      case QUANTITY:
11900
        return isSetQuantity();
11901
      }
11902
      throw new IllegalStateException();
11903
    }
11904
 
11905
    @Override
11906
    public boolean equals(Object that) {
11907
      if (that == null)
11908
        return false;
11909
      if (that instanceof unFulfillPO_args)
11910
        return this.equals((unFulfillPO_args)that);
11911
      return false;
11912
    }
11913
 
11914
    public boolean equals(unFulfillPO_args that) {
11915
      if (that == null)
11916
        return false;
11917
 
11918
      boolean this_present_purchaseId = true;
11919
      boolean that_present_purchaseId = true;
11920
      if (this_present_purchaseId || that_present_purchaseId) {
11921
        if (!(this_present_purchaseId && that_present_purchaseId))
11922
          return false;
11923
        if (this.purchaseId != that.purchaseId)
11924
          return false;
11925
      }
11926
 
11927
      boolean this_present_itemId = true;
11928
      boolean that_present_itemId = true;
11929
      if (this_present_itemId || that_present_itemId) {
11930
        if (!(this_present_itemId && that_present_itemId))
11931
          return false;
11932
        if (this.itemId != that.itemId)
11933
          return false;
11934
      }
11935
 
11936
      boolean this_present_quantity = true;
11937
      boolean that_present_quantity = true;
11938
      if (this_present_quantity || that_present_quantity) {
11939
        if (!(this_present_quantity && that_present_quantity))
11940
          return false;
11941
        if (this.quantity != that.quantity)
11942
          return false;
11943
      }
11944
 
11945
      return true;
11946
    }
11947
 
11948
    @Override
11949
    public int hashCode() {
11950
      return 0;
11951
    }
11952
 
11953
    public int compareTo(unFulfillPO_args other) {
11954
      if (!getClass().equals(other.getClass())) {
11955
        return getClass().getName().compareTo(other.getClass().getName());
11956
      }
11957
 
11958
      int lastComparison = 0;
11959
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11960
 
11961
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11962
      if (lastComparison != 0) {
11963
        return lastComparison;
11964
      }
11965
      if (isSetPurchaseId()) {
11966
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11967
        if (lastComparison != 0) {
11968
          return lastComparison;
11969
        }
11970
      }
11971
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11972
      if (lastComparison != 0) {
11973
        return lastComparison;
11974
      }
11975
      if (isSetItemId()) {
11976
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11977
        if (lastComparison != 0) {
11978
          return lastComparison;
11979
        }
11980
      }
11981
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11982
      if (lastComparison != 0) {
11983
        return lastComparison;
11984
      }
11985
      if (isSetQuantity()) {
11986
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11987
        if (lastComparison != 0) {
11988
          return lastComparison;
11989
        }
11990
      }
11991
      return 0;
11992
    }
11993
 
11994
    public _Fields fieldForId(int fieldId) {
11995
      return _Fields.findByThriftId(fieldId);
11996
    }
11997
 
11998
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11999
      org.apache.thrift.protocol.TField field;
12000
      iprot.readStructBegin();
12001
      while (true)
12002
      {
12003
        field = iprot.readFieldBegin();
12004
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12005
          break;
12006
        }
12007
        switch (field.id) {
12008
          case 1: // PURCHASE_ID
12009
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12010
              this.purchaseId = iprot.readI64();
12011
              setPurchaseIdIsSet(true);
12012
            } else { 
12013
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12014
            }
12015
            break;
12016
          case 2: // ITEM_ID
12017
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12018
              this.itemId = iprot.readI64();
12019
              setItemIdIsSet(true);
12020
            } else { 
12021
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12022
            }
12023
            break;
12024
          case 3: // QUANTITY
12025
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12026
              this.quantity = iprot.readI64();
12027
              setQuantityIsSet(true);
12028
            } else { 
12029
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12030
            }
12031
            break;
12032
          default:
12033
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12034
        }
12035
        iprot.readFieldEnd();
12036
      }
12037
      iprot.readStructEnd();
12038
      validate();
12039
    }
12040
 
12041
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12042
      validate();
12043
 
12044
      oprot.writeStructBegin(STRUCT_DESC);
12045
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
12046
      oprot.writeI64(this.purchaseId);
12047
      oprot.writeFieldEnd();
12048
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
12049
      oprot.writeI64(this.itemId);
12050
      oprot.writeFieldEnd();
12051
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
12052
      oprot.writeI64(this.quantity);
12053
      oprot.writeFieldEnd();
12054
      oprot.writeFieldStop();
12055
      oprot.writeStructEnd();
12056
    }
12057
 
12058
    @Override
12059
    public String toString() {
12060
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
12061
      boolean first = true;
12062
 
12063
      sb.append("purchaseId:");
12064
      sb.append(this.purchaseId);
12065
      first = false;
12066
      if (!first) sb.append(", ");
12067
      sb.append("itemId:");
12068
      sb.append(this.itemId);
12069
      first = false;
12070
      if (!first) sb.append(", ");
12071
      sb.append("quantity:");
12072
      sb.append(this.quantity);
12073
      first = false;
12074
      sb.append(")");
12075
      return sb.toString();
12076
    }
12077
 
12078
    public void validate() throws org.apache.thrift.TException {
12079
      // check for required fields
12080
    }
12081
 
12082
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12083
      try {
12084
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12085
      } catch (org.apache.thrift.TException te) {
12086
        throw new java.io.IOException(te);
12087
      }
12088
    }
12089
 
12090
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12091
      try {
12092
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12093
        __isset_bit_vector = new BitSet(1);
12094
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12095
      } catch (org.apache.thrift.TException te) {
12096
        throw new java.io.IOException(te);
12097
      }
12098
    }
12099
 
12100
  }
12101
 
12102
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
12103
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
12104
 
12105
    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);
12106
 
12107
    private PurchaseServiceException e; // required
12108
 
12109
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12110
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12111
      E((short)1, "e");
12112
 
12113
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12114
 
12115
      static {
12116
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12117
          byName.put(field.getFieldName(), field);
12118
        }
12119
      }
12120
 
12121
      /**
12122
       * Find the _Fields constant that matches fieldId, or null if its not found.
12123
       */
12124
      public static _Fields findByThriftId(int fieldId) {
12125
        switch(fieldId) {
12126
          case 1: // E
12127
            return E;
12128
          default:
12129
            return null;
12130
        }
12131
      }
12132
 
12133
      /**
12134
       * Find the _Fields constant that matches fieldId, throwing an exception
12135
       * if it is not found.
12136
       */
12137
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12138
        _Fields fields = findByThriftId(fieldId);
12139
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12140
        return fields;
12141
      }
12142
 
12143
      /**
12144
       * Find the _Fields constant that matches name, or null if its not found.
12145
       */
12146
      public static _Fields findByName(String name) {
12147
        return byName.get(name);
12148
      }
12149
 
12150
      private final short _thriftId;
12151
      private final String _fieldName;
12152
 
12153
      _Fields(short thriftId, String fieldName) {
12154
        _thriftId = thriftId;
12155
        _fieldName = fieldName;
12156
      }
12157
 
12158
      public short getThriftFieldId() {
12159
        return _thriftId;
12160
      }
12161
 
12162
      public String getFieldName() {
12163
        return _fieldName;
12164
      }
12165
    }
12166
 
12167
    // isset id assignments
12168
 
12169
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12170
    static {
12171
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12172
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12173
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12174
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12175
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
12176
    }
12177
 
12178
    public unFulfillPO_result() {
12179
    }
12180
 
12181
    public unFulfillPO_result(
12182
      PurchaseServiceException e)
12183
    {
12184
      this();
12185
      this.e = e;
12186
    }
12187
 
12188
    /**
12189
     * Performs a deep copy on <i>other</i>.
12190
     */
12191
    public unFulfillPO_result(unFulfillPO_result other) {
12192
      if (other.isSetE()) {
12193
        this.e = new PurchaseServiceException(other.e);
12194
      }
12195
    }
12196
 
12197
    public unFulfillPO_result deepCopy() {
12198
      return new unFulfillPO_result(this);
12199
    }
12200
 
12201
    @Override
12202
    public void clear() {
12203
      this.e = null;
12204
    }
12205
 
12206
    public PurchaseServiceException getE() {
12207
      return this.e;
12208
    }
12209
 
12210
    public void setE(PurchaseServiceException e) {
12211
      this.e = e;
12212
    }
12213
 
12214
    public void unsetE() {
12215
      this.e = null;
12216
    }
12217
 
12218
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12219
    public boolean isSetE() {
12220
      return this.e != null;
12221
    }
12222
 
12223
    public void setEIsSet(boolean value) {
12224
      if (!value) {
12225
        this.e = null;
12226
      }
12227
    }
12228
 
12229
    public void setFieldValue(_Fields field, Object value) {
12230
      switch (field) {
12231
      case E:
12232
        if (value == null) {
12233
          unsetE();
12234
        } else {
12235
          setE((PurchaseServiceException)value);
12236
        }
12237
        break;
12238
 
12239
      }
12240
    }
12241
 
12242
    public Object getFieldValue(_Fields field) {
12243
      switch (field) {
12244
      case E:
12245
        return getE();
12246
 
12247
      }
12248
      throw new IllegalStateException();
12249
    }
12250
 
12251
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12252
    public boolean isSet(_Fields field) {
12253
      if (field == null) {
12254
        throw new IllegalArgumentException();
12255
      }
12256
 
12257
      switch (field) {
12258
      case E:
12259
        return isSetE();
12260
      }
12261
      throw new IllegalStateException();
12262
    }
12263
 
12264
    @Override
12265
    public boolean equals(Object that) {
12266
      if (that == null)
12267
        return false;
12268
      if (that instanceof unFulfillPO_result)
12269
        return this.equals((unFulfillPO_result)that);
12270
      return false;
12271
    }
12272
 
12273
    public boolean equals(unFulfillPO_result that) {
12274
      if (that == null)
12275
        return false;
12276
 
12277
      boolean this_present_e = true && this.isSetE();
12278
      boolean that_present_e = true && that.isSetE();
12279
      if (this_present_e || that_present_e) {
12280
        if (!(this_present_e && that_present_e))
12281
          return false;
12282
        if (!this.e.equals(that.e))
12283
          return false;
12284
      }
12285
 
12286
      return true;
12287
    }
12288
 
12289
    @Override
12290
    public int hashCode() {
12291
      return 0;
12292
    }
12293
 
12294
    public int compareTo(unFulfillPO_result other) {
12295
      if (!getClass().equals(other.getClass())) {
12296
        return getClass().getName().compareTo(other.getClass().getName());
12297
      }
12298
 
12299
      int lastComparison = 0;
12300
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12301
 
12302
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12303
      if (lastComparison != 0) {
12304
        return lastComparison;
12305
      }
12306
      if (isSetE()) {
12307
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12308
        if (lastComparison != 0) {
12309
          return lastComparison;
12310
        }
12311
      }
12312
      return 0;
12313
    }
12314
 
12315
    public _Fields fieldForId(int fieldId) {
12316
      return _Fields.findByThriftId(fieldId);
12317
    }
12318
 
12319
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12320
      org.apache.thrift.protocol.TField field;
12321
      iprot.readStructBegin();
12322
      while (true)
12323
      {
12324
        field = iprot.readFieldBegin();
12325
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12326
          break;
12327
        }
12328
        switch (field.id) {
12329
          case 1: // E
12330
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12331
              this.e = new PurchaseServiceException();
12332
              this.e.read(iprot);
12333
            } else { 
12334
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12335
            }
12336
            break;
12337
          default:
12338
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12339
        }
12340
        iprot.readFieldEnd();
12341
      }
12342
      iprot.readStructEnd();
12343
      validate();
12344
    }
12345
 
12346
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12347
      oprot.writeStructBegin(STRUCT_DESC);
12348
 
12349
      if (this.isSetE()) {
12350
        oprot.writeFieldBegin(E_FIELD_DESC);
12351
        this.e.write(oprot);
12352
        oprot.writeFieldEnd();
12353
      }
12354
      oprot.writeFieldStop();
12355
      oprot.writeStructEnd();
12356
    }
12357
 
12358
    @Override
12359
    public String toString() {
12360
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12361
      boolean first = true;
12362
 
12363
      sb.append("e:");
12364
      if (this.e == null) {
12365
        sb.append("null");
12366
      } else {
12367
        sb.append(this.e);
12368
      }
12369
      first = false;
12370
      sb.append(")");
12371
      return sb.toString();
12372
    }
12373
 
12374
    public void validate() throws org.apache.thrift.TException {
12375
      // check for required fields
12376
    }
12377
 
12378
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12379
      try {
12380
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12381
      } catch (org.apache.thrift.TException te) {
12382
        throw new java.io.IOException(te);
12383
      }
12384
    }
12385
 
12386
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12387
      try {
12388
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12389
      } catch (org.apache.thrift.TException te) {
12390
        throw new java.io.IOException(te);
12391
      }
12392
    }
12393
 
12394
  }
12395
 
5443 mandeep.dh 12396
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12397
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12398
 
12399
    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);
12400
 
12401
    private long date; // required
12402
 
12403
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12404
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12405
      DATE((short)1, "date");
12406
 
12407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12408
 
12409
      static {
12410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12411
          byName.put(field.getFieldName(), field);
12412
        }
12413
      }
12414
 
12415
      /**
12416
       * Find the _Fields constant that matches fieldId, or null if its not found.
12417
       */
12418
      public static _Fields findByThriftId(int fieldId) {
12419
        switch(fieldId) {
12420
          case 1: // DATE
12421
            return DATE;
12422
          default:
12423
            return null;
12424
        }
12425
      }
12426
 
12427
      /**
12428
       * Find the _Fields constant that matches fieldId, throwing an exception
12429
       * if it is not found.
12430
       */
12431
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12432
        _Fields fields = findByThriftId(fieldId);
12433
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12434
        return fields;
12435
      }
12436
 
12437
      /**
12438
       * Find the _Fields constant that matches name, or null if its not found.
12439
       */
12440
      public static _Fields findByName(String name) {
12441
        return byName.get(name);
12442
      }
12443
 
12444
      private final short _thriftId;
12445
      private final String _fieldName;
12446
 
12447
      _Fields(short thriftId, String fieldName) {
12448
        _thriftId = thriftId;
12449
        _fieldName = fieldName;
12450
      }
12451
 
12452
      public short getThriftFieldId() {
12453
        return _thriftId;
12454
      }
12455
 
12456
      public String getFieldName() {
12457
        return _fieldName;
12458
      }
12459
    }
12460
 
12461
    // isset id assignments
12462
    private static final int __DATE_ISSET_ID = 0;
12463
    private BitSet __isset_bit_vector = new BitSet(1);
12464
 
12465
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12466
    static {
12467
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12468
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12469
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12470
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12471
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12472
    }
12473
 
12474
    public getInvoices_args() {
12475
    }
12476
 
12477
    public getInvoices_args(
12478
      long date)
12479
    {
12480
      this();
12481
      this.date = date;
12482
      setDateIsSet(true);
12483
    }
12484
 
12485
    /**
12486
     * Performs a deep copy on <i>other</i>.
12487
     */
12488
    public getInvoices_args(getInvoices_args other) {
12489
      __isset_bit_vector.clear();
12490
      __isset_bit_vector.or(other.__isset_bit_vector);
12491
      this.date = other.date;
12492
    }
12493
 
12494
    public getInvoices_args deepCopy() {
12495
      return new getInvoices_args(this);
12496
    }
12497
 
12498
    @Override
12499
    public void clear() {
12500
      setDateIsSet(false);
12501
      this.date = 0;
12502
    }
12503
 
12504
    public long getDate() {
12505
      return this.date;
12506
    }
12507
 
12508
    public void setDate(long date) {
12509
      this.date = date;
12510
      setDateIsSet(true);
12511
    }
12512
 
12513
    public void unsetDate() {
12514
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12515
    }
12516
 
12517
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12518
    public boolean isSetDate() {
12519
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12520
    }
12521
 
12522
    public void setDateIsSet(boolean value) {
12523
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12524
    }
12525
 
12526
    public void setFieldValue(_Fields field, Object value) {
12527
      switch (field) {
12528
      case DATE:
12529
        if (value == null) {
12530
          unsetDate();
12531
        } else {
12532
          setDate((Long)value);
12533
        }
12534
        break;
12535
 
12536
      }
12537
    }
12538
 
12539
    public Object getFieldValue(_Fields field) {
12540
      switch (field) {
12541
      case DATE:
12542
        return Long.valueOf(getDate());
12543
 
12544
      }
12545
      throw new IllegalStateException();
12546
    }
12547
 
12548
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12549
    public boolean isSet(_Fields field) {
12550
      if (field == null) {
12551
        throw new IllegalArgumentException();
12552
      }
12553
 
12554
      switch (field) {
12555
      case DATE:
12556
        return isSetDate();
12557
      }
12558
      throw new IllegalStateException();
12559
    }
12560
 
12561
    @Override
12562
    public boolean equals(Object that) {
12563
      if (that == null)
12564
        return false;
12565
      if (that instanceof getInvoices_args)
12566
        return this.equals((getInvoices_args)that);
12567
      return false;
12568
    }
12569
 
12570
    public boolean equals(getInvoices_args that) {
12571
      if (that == null)
12572
        return false;
12573
 
12574
      boolean this_present_date = true;
12575
      boolean that_present_date = true;
12576
      if (this_present_date || that_present_date) {
12577
        if (!(this_present_date && that_present_date))
12578
          return false;
12579
        if (this.date != that.date)
12580
          return false;
12581
      }
12582
 
12583
      return true;
12584
    }
12585
 
12586
    @Override
12587
    public int hashCode() {
12588
      return 0;
12589
    }
12590
 
12591
    public int compareTo(getInvoices_args other) {
12592
      if (!getClass().equals(other.getClass())) {
12593
        return getClass().getName().compareTo(other.getClass().getName());
12594
      }
12595
 
12596
      int lastComparison = 0;
12597
      getInvoices_args typedOther = (getInvoices_args)other;
12598
 
12599
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12600
      if (lastComparison != 0) {
12601
        return lastComparison;
12602
      }
12603
      if (isSetDate()) {
12604
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12605
        if (lastComparison != 0) {
12606
          return lastComparison;
12607
        }
12608
      }
12609
      return 0;
12610
    }
12611
 
12612
    public _Fields fieldForId(int fieldId) {
12613
      return _Fields.findByThriftId(fieldId);
12614
    }
12615
 
12616
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12617
      org.apache.thrift.protocol.TField field;
12618
      iprot.readStructBegin();
12619
      while (true)
12620
      {
12621
        field = iprot.readFieldBegin();
12622
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12623
          break;
12624
        }
12625
        switch (field.id) {
12626
          case 1: // DATE
12627
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12628
              this.date = iprot.readI64();
12629
              setDateIsSet(true);
12630
            } else { 
12631
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12632
            }
12633
            break;
12634
          default:
12635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12636
        }
12637
        iprot.readFieldEnd();
12638
      }
12639
      iprot.readStructEnd();
12640
      validate();
12641
    }
12642
 
12643
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12644
      validate();
12645
 
12646
      oprot.writeStructBegin(STRUCT_DESC);
12647
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12648
      oprot.writeI64(this.date);
12649
      oprot.writeFieldEnd();
12650
      oprot.writeFieldStop();
12651
      oprot.writeStructEnd();
12652
    }
12653
 
12654
    @Override
12655
    public String toString() {
12656
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12657
      boolean first = true;
12658
 
12659
      sb.append("date:");
12660
      sb.append(this.date);
12661
      first = false;
12662
      sb.append(")");
12663
      return sb.toString();
12664
    }
12665
 
12666
    public void validate() throws org.apache.thrift.TException {
12667
      // check for required fields
12668
    }
12669
 
12670
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12671
      try {
12672
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12673
      } catch (org.apache.thrift.TException te) {
12674
        throw new java.io.IOException(te);
12675
      }
12676
    }
12677
 
12678
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12679
      try {
12680
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12681
        __isset_bit_vector = new BitSet(1);
12682
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12683
      } catch (org.apache.thrift.TException te) {
12684
        throw new java.io.IOException(te);
12685
      }
12686
    }
12687
 
12688
  }
12689
 
12690
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12691
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12692
 
12693
    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);
12694
 
12695
    private List<Invoice> success; // required
12696
 
12697
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12698
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12699
      SUCCESS((short)0, "success");
12700
 
12701
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12702
 
12703
      static {
12704
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12705
          byName.put(field.getFieldName(), field);
12706
        }
12707
      }
12708
 
12709
      /**
12710
       * Find the _Fields constant that matches fieldId, or null if its not found.
12711
       */
12712
      public static _Fields findByThriftId(int fieldId) {
12713
        switch(fieldId) {
12714
          case 0: // SUCCESS
12715
            return SUCCESS;
12716
          default:
12717
            return null;
12718
        }
12719
      }
12720
 
12721
      /**
12722
       * Find the _Fields constant that matches fieldId, throwing an exception
12723
       * if it is not found.
12724
       */
12725
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12726
        _Fields fields = findByThriftId(fieldId);
12727
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12728
        return fields;
12729
      }
12730
 
12731
      /**
12732
       * Find the _Fields constant that matches name, or null if its not found.
12733
       */
12734
      public static _Fields findByName(String name) {
12735
        return byName.get(name);
12736
      }
12737
 
12738
      private final short _thriftId;
12739
      private final String _fieldName;
12740
 
12741
      _Fields(short thriftId, String fieldName) {
12742
        _thriftId = thriftId;
12743
        _fieldName = fieldName;
12744
      }
12745
 
12746
      public short getThriftFieldId() {
12747
        return _thriftId;
12748
      }
12749
 
12750
      public String getFieldName() {
12751
        return _fieldName;
12752
      }
12753
    }
12754
 
12755
    // isset id assignments
12756
 
12757
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12758
    static {
12759
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12760
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12761
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12762
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12763
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12764
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12765
    }
12766
 
12767
    public getInvoices_result() {
12768
    }
12769
 
12770
    public getInvoices_result(
12771
      List<Invoice> success)
12772
    {
12773
      this();
12774
      this.success = success;
12775
    }
12776
 
12777
    /**
12778
     * Performs a deep copy on <i>other</i>.
12779
     */
12780
    public getInvoices_result(getInvoices_result other) {
12781
      if (other.isSetSuccess()) {
12782
        List<Invoice> __this__success = new ArrayList<Invoice>();
12783
        for (Invoice other_element : other.success) {
12784
          __this__success.add(new Invoice(other_element));
12785
        }
12786
        this.success = __this__success;
12787
      }
12788
    }
12789
 
12790
    public getInvoices_result deepCopy() {
12791
      return new getInvoices_result(this);
12792
    }
12793
 
12794
    @Override
12795
    public void clear() {
12796
      this.success = null;
12797
    }
12798
 
12799
    public int getSuccessSize() {
12800
      return (this.success == null) ? 0 : this.success.size();
12801
    }
12802
 
12803
    public java.util.Iterator<Invoice> getSuccessIterator() {
12804
      return (this.success == null) ? null : this.success.iterator();
12805
    }
12806
 
12807
    public void addToSuccess(Invoice elem) {
12808
      if (this.success == null) {
12809
        this.success = new ArrayList<Invoice>();
12810
      }
12811
      this.success.add(elem);
12812
    }
12813
 
12814
    public List<Invoice> getSuccess() {
12815
      return this.success;
12816
    }
12817
 
12818
    public void setSuccess(List<Invoice> success) {
12819
      this.success = success;
12820
    }
12821
 
12822
    public void unsetSuccess() {
12823
      this.success = null;
12824
    }
12825
 
12826
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12827
    public boolean isSetSuccess() {
12828
      return this.success != null;
12829
    }
12830
 
12831
    public void setSuccessIsSet(boolean value) {
12832
      if (!value) {
12833
        this.success = null;
12834
      }
12835
    }
12836
 
12837
    public void setFieldValue(_Fields field, Object value) {
12838
      switch (field) {
12839
      case SUCCESS:
12840
        if (value == null) {
12841
          unsetSuccess();
12842
        } else {
12843
          setSuccess((List<Invoice>)value);
12844
        }
12845
        break;
12846
 
12847
      }
12848
    }
12849
 
12850
    public Object getFieldValue(_Fields field) {
12851
      switch (field) {
12852
      case SUCCESS:
12853
        return getSuccess();
12854
 
12855
      }
12856
      throw new IllegalStateException();
12857
    }
12858
 
12859
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12860
    public boolean isSet(_Fields field) {
12861
      if (field == null) {
12862
        throw new IllegalArgumentException();
12863
      }
12864
 
12865
      switch (field) {
12866
      case SUCCESS:
12867
        return isSetSuccess();
12868
      }
12869
      throw new IllegalStateException();
12870
    }
12871
 
12872
    @Override
12873
    public boolean equals(Object that) {
12874
      if (that == null)
12875
        return false;
12876
      if (that instanceof getInvoices_result)
12877
        return this.equals((getInvoices_result)that);
12878
      return false;
12879
    }
12880
 
12881
    public boolean equals(getInvoices_result that) {
12882
      if (that == null)
12883
        return false;
12884
 
12885
      boolean this_present_success = true && this.isSetSuccess();
12886
      boolean that_present_success = true && that.isSetSuccess();
12887
      if (this_present_success || that_present_success) {
12888
        if (!(this_present_success && that_present_success))
12889
          return false;
12890
        if (!this.success.equals(that.success))
12891
          return false;
12892
      }
12893
 
12894
      return true;
12895
    }
12896
 
12897
    @Override
12898
    public int hashCode() {
12899
      return 0;
12900
    }
12901
 
12902
    public int compareTo(getInvoices_result other) {
12903
      if (!getClass().equals(other.getClass())) {
12904
        return getClass().getName().compareTo(other.getClass().getName());
12905
      }
12906
 
12907
      int lastComparison = 0;
12908
      getInvoices_result typedOther = (getInvoices_result)other;
12909
 
12910
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12911
      if (lastComparison != 0) {
12912
        return lastComparison;
12913
      }
12914
      if (isSetSuccess()) {
12915
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12916
        if (lastComparison != 0) {
12917
          return lastComparison;
12918
        }
12919
      }
12920
      return 0;
12921
    }
12922
 
12923
    public _Fields fieldForId(int fieldId) {
12924
      return _Fields.findByThriftId(fieldId);
12925
    }
12926
 
12927
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12928
      org.apache.thrift.protocol.TField field;
12929
      iprot.readStructBegin();
12930
      while (true)
12931
      {
12932
        field = iprot.readFieldBegin();
12933
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12934
          break;
12935
        }
12936
        switch (field.id) {
12937
          case 0: // SUCCESS
12938
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12939
              {
6385 amar.kumar 12940
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12941
                this.success = new ArrayList<Invoice>(_list24.size);
12942
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12943
                {
6385 amar.kumar 12944
                  Invoice _elem26; // required
12945
                  _elem26 = new Invoice();
12946
                  _elem26.read(iprot);
12947
                  this.success.add(_elem26);
5443 mandeep.dh 12948
                }
12949
                iprot.readListEnd();
12950
              }
12951
            } else { 
12952
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12953
            }
12954
            break;
12955
          default:
12956
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12957
        }
12958
        iprot.readFieldEnd();
12959
      }
12960
      iprot.readStructEnd();
12961
      validate();
12962
    }
12963
 
12964
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12965
      oprot.writeStructBegin(STRUCT_DESC);
12966
 
12967
      if (this.isSetSuccess()) {
12968
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12969
        {
12970
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12971
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12972
          {
6385 amar.kumar 12973
            _iter27.write(oprot);
5443 mandeep.dh 12974
          }
12975
          oprot.writeListEnd();
12976
        }
12977
        oprot.writeFieldEnd();
12978
      }
12979
      oprot.writeFieldStop();
12980
      oprot.writeStructEnd();
12981
    }
12982
 
12983
    @Override
12984
    public String toString() {
12985
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12986
      boolean first = true;
12987
 
12988
      sb.append("success:");
12989
      if (this.success == null) {
12990
        sb.append("null");
12991
      } else {
12992
        sb.append(this.success);
12993
      }
12994
      first = false;
12995
      sb.append(")");
12996
      return sb.toString();
12997
    }
12998
 
12999
    public void validate() throws org.apache.thrift.TException {
13000
      // check for required fields
13001
    }
13002
 
13003
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13004
      try {
13005
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13006
      } catch (org.apache.thrift.TException te) {
13007
        throw new java.io.IOException(te);
13008
      }
13009
    }
13010
 
13011
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13012
      try {
13013
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13014
      } catch (org.apache.thrift.TException te) {
13015
        throw new java.io.IOException(te);
13016
      }
13017
    }
13018
 
13019
  }
13020
 
7410 amar.kumar 13021
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
13022
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
13023
 
13024
    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);
13025
    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);
13026
    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);
13027
 
13028
    private long warehouseId; // required
13029
    private long supplierId; // required
13030
    private long date; // required
13031
 
13032
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13033
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13034
      WAREHOUSE_ID((short)1, "warehouseId"),
13035
      SUPPLIER_ID((short)2, "supplierId"),
13036
      DATE((short)3, "date");
13037
 
13038
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13039
 
13040
      static {
13041
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13042
          byName.put(field.getFieldName(), field);
13043
        }
13044
      }
13045
 
13046
      /**
13047
       * Find the _Fields constant that matches fieldId, or null if its not found.
13048
       */
13049
      public static _Fields findByThriftId(int fieldId) {
13050
        switch(fieldId) {
13051
          case 1: // WAREHOUSE_ID
13052
            return WAREHOUSE_ID;
13053
          case 2: // SUPPLIER_ID
13054
            return SUPPLIER_ID;
13055
          case 3: // DATE
13056
            return DATE;
13057
          default:
13058
            return null;
13059
        }
13060
      }
13061
 
13062
      /**
13063
       * Find the _Fields constant that matches fieldId, throwing an exception
13064
       * if it is not found.
13065
       */
13066
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13067
        _Fields fields = findByThriftId(fieldId);
13068
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13069
        return fields;
13070
      }
13071
 
13072
      /**
13073
       * Find the _Fields constant that matches name, or null if its not found.
13074
       */
13075
      public static _Fields findByName(String name) {
13076
        return byName.get(name);
13077
      }
13078
 
13079
      private final short _thriftId;
13080
      private final String _fieldName;
13081
 
13082
      _Fields(short thriftId, String fieldName) {
13083
        _thriftId = thriftId;
13084
        _fieldName = fieldName;
13085
      }
13086
 
13087
      public short getThriftFieldId() {
13088
        return _thriftId;
13089
      }
13090
 
13091
      public String getFieldName() {
13092
        return _fieldName;
13093
      }
13094
    }
13095
 
13096
    // isset id assignments
13097
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13098
    private static final int __SUPPLIERID_ISSET_ID = 1;
13099
    private static final int __DATE_ISSET_ID = 2;
13100
    private BitSet __isset_bit_vector = new BitSet(3);
13101
 
13102
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13103
    static {
13104
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13105
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13106
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13107
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13109
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13110
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13111
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13112
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
13113
    }
13114
 
13115
    public getInvoicesForWarehouse_args() {
13116
    }
13117
 
13118
    public getInvoicesForWarehouse_args(
13119
      long warehouseId,
13120
      long supplierId,
13121
      long date)
13122
    {
13123
      this();
13124
      this.warehouseId = warehouseId;
13125
      setWarehouseIdIsSet(true);
13126
      this.supplierId = supplierId;
13127
      setSupplierIdIsSet(true);
13128
      this.date = date;
13129
      setDateIsSet(true);
13130
    }
13131
 
13132
    /**
13133
     * Performs a deep copy on <i>other</i>.
13134
     */
13135
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
13136
      __isset_bit_vector.clear();
13137
      __isset_bit_vector.or(other.__isset_bit_vector);
13138
      this.warehouseId = other.warehouseId;
13139
      this.supplierId = other.supplierId;
13140
      this.date = other.date;
13141
    }
13142
 
13143
    public getInvoicesForWarehouse_args deepCopy() {
13144
      return new getInvoicesForWarehouse_args(this);
13145
    }
13146
 
13147
    @Override
13148
    public void clear() {
13149
      setWarehouseIdIsSet(false);
13150
      this.warehouseId = 0;
13151
      setSupplierIdIsSet(false);
13152
      this.supplierId = 0;
13153
      setDateIsSet(false);
13154
      this.date = 0;
13155
    }
13156
 
13157
    public long getWarehouseId() {
13158
      return this.warehouseId;
13159
    }
13160
 
13161
    public void setWarehouseId(long warehouseId) {
13162
      this.warehouseId = warehouseId;
13163
      setWarehouseIdIsSet(true);
13164
    }
13165
 
13166
    public void unsetWarehouseId() {
13167
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13168
    }
13169
 
13170
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
13171
    public boolean isSetWarehouseId() {
13172
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13173
    }
13174
 
13175
    public void setWarehouseIdIsSet(boolean value) {
13176
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13177
    }
13178
 
13179
    public long getSupplierId() {
13180
      return this.supplierId;
13181
    }
13182
 
13183
    public void setSupplierId(long supplierId) {
13184
      this.supplierId = supplierId;
13185
      setSupplierIdIsSet(true);
13186
    }
13187
 
13188
    public void unsetSupplierId() {
13189
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13190
    }
13191
 
13192
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13193
    public boolean isSetSupplierId() {
13194
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13195
    }
13196
 
13197
    public void setSupplierIdIsSet(boolean value) {
13198
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13199
    }
13200
 
13201
    public long getDate() {
13202
      return this.date;
13203
    }
13204
 
13205
    public void setDate(long date) {
13206
      this.date = date;
13207
      setDateIsSet(true);
13208
    }
13209
 
13210
    public void unsetDate() {
13211
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13212
    }
13213
 
13214
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13215
    public boolean isSetDate() {
13216
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13217
    }
13218
 
13219
    public void setDateIsSet(boolean value) {
13220
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13221
    }
13222
 
13223
    public void setFieldValue(_Fields field, Object value) {
13224
      switch (field) {
13225
      case WAREHOUSE_ID:
13226
        if (value == null) {
13227
          unsetWarehouseId();
13228
        } else {
13229
          setWarehouseId((Long)value);
13230
        }
13231
        break;
13232
 
13233
      case SUPPLIER_ID:
13234
        if (value == null) {
13235
          unsetSupplierId();
13236
        } else {
13237
          setSupplierId((Long)value);
13238
        }
13239
        break;
13240
 
13241
      case DATE:
13242
        if (value == null) {
13243
          unsetDate();
13244
        } else {
13245
          setDate((Long)value);
13246
        }
13247
        break;
13248
 
13249
      }
13250
    }
13251
 
13252
    public Object getFieldValue(_Fields field) {
13253
      switch (field) {
13254
      case WAREHOUSE_ID:
13255
        return Long.valueOf(getWarehouseId());
13256
 
13257
      case SUPPLIER_ID:
13258
        return Long.valueOf(getSupplierId());
13259
 
13260
      case DATE:
13261
        return Long.valueOf(getDate());
13262
 
13263
      }
13264
      throw new IllegalStateException();
13265
    }
13266
 
13267
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13268
    public boolean isSet(_Fields field) {
13269
      if (field == null) {
13270
        throw new IllegalArgumentException();
13271
      }
13272
 
13273
      switch (field) {
13274
      case WAREHOUSE_ID:
13275
        return isSetWarehouseId();
13276
      case SUPPLIER_ID:
13277
        return isSetSupplierId();
13278
      case DATE:
13279
        return isSetDate();
13280
      }
13281
      throw new IllegalStateException();
13282
    }
13283
 
13284
    @Override
13285
    public boolean equals(Object that) {
13286
      if (that == null)
13287
        return false;
13288
      if (that instanceof getInvoicesForWarehouse_args)
13289
        return this.equals((getInvoicesForWarehouse_args)that);
13290
      return false;
13291
    }
13292
 
13293
    public boolean equals(getInvoicesForWarehouse_args that) {
13294
      if (that == null)
13295
        return false;
13296
 
13297
      boolean this_present_warehouseId = true;
13298
      boolean that_present_warehouseId = true;
13299
      if (this_present_warehouseId || that_present_warehouseId) {
13300
        if (!(this_present_warehouseId && that_present_warehouseId))
13301
          return false;
13302
        if (this.warehouseId != that.warehouseId)
13303
          return false;
13304
      }
13305
 
13306
      boolean this_present_supplierId = true;
13307
      boolean that_present_supplierId = true;
13308
      if (this_present_supplierId || that_present_supplierId) {
13309
        if (!(this_present_supplierId && that_present_supplierId))
13310
          return false;
13311
        if (this.supplierId != that.supplierId)
13312
          return false;
13313
      }
13314
 
13315
      boolean this_present_date = true;
13316
      boolean that_present_date = true;
13317
      if (this_present_date || that_present_date) {
13318
        if (!(this_present_date && that_present_date))
13319
          return false;
13320
        if (this.date != that.date)
13321
          return false;
13322
      }
13323
 
13324
      return true;
13325
    }
13326
 
13327
    @Override
13328
    public int hashCode() {
13329
      return 0;
13330
    }
13331
 
13332
    public int compareTo(getInvoicesForWarehouse_args other) {
13333
      if (!getClass().equals(other.getClass())) {
13334
        return getClass().getName().compareTo(other.getClass().getName());
13335
      }
13336
 
13337
      int lastComparison = 0;
13338
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13339
 
13340
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13341
      if (lastComparison != 0) {
13342
        return lastComparison;
13343
      }
13344
      if (isSetWarehouseId()) {
13345
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13346
        if (lastComparison != 0) {
13347
          return lastComparison;
13348
        }
13349
      }
13350
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13351
      if (lastComparison != 0) {
13352
        return lastComparison;
13353
      }
13354
      if (isSetSupplierId()) {
13355
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13356
        if (lastComparison != 0) {
13357
          return lastComparison;
13358
        }
13359
      }
13360
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13361
      if (lastComparison != 0) {
13362
        return lastComparison;
13363
      }
13364
      if (isSetDate()) {
13365
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13366
        if (lastComparison != 0) {
13367
          return lastComparison;
13368
        }
13369
      }
13370
      return 0;
13371
    }
13372
 
13373
    public _Fields fieldForId(int fieldId) {
13374
      return _Fields.findByThriftId(fieldId);
13375
    }
13376
 
13377
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13378
      org.apache.thrift.protocol.TField field;
13379
      iprot.readStructBegin();
13380
      while (true)
13381
      {
13382
        field = iprot.readFieldBegin();
13383
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13384
          break;
13385
        }
13386
        switch (field.id) {
13387
          case 1: // WAREHOUSE_ID
13388
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13389
              this.warehouseId = iprot.readI64();
13390
              setWarehouseIdIsSet(true);
13391
            } else { 
13392
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13393
            }
13394
            break;
13395
          case 2: // SUPPLIER_ID
13396
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13397
              this.supplierId = iprot.readI64();
13398
              setSupplierIdIsSet(true);
13399
            } else { 
13400
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13401
            }
13402
            break;
13403
          case 3: // DATE
13404
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13405
              this.date = iprot.readI64();
13406
              setDateIsSet(true);
13407
            } else { 
13408
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13409
            }
13410
            break;
13411
          default:
13412
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13413
        }
13414
        iprot.readFieldEnd();
13415
      }
13416
      iprot.readStructEnd();
13417
      validate();
13418
    }
13419
 
13420
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13421
      validate();
13422
 
13423
      oprot.writeStructBegin(STRUCT_DESC);
13424
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13425
      oprot.writeI64(this.warehouseId);
13426
      oprot.writeFieldEnd();
13427
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13428
      oprot.writeI64(this.supplierId);
13429
      oprot.writeFieldEnd();
13430
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13431
      oprot.writeI64(this.date);
13432
      oprot.writeFieldEnd();
13433
      oprot.writeFieldStop();
13434
      oprot.writeStructEnd();
13435
    }
13436
 
13437
    @Override
13438
    public String toString() {
13439
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13440
      boolean first = true;
13441
 
13442
      sb.append("warehouseId:");
13443
      sb.append(this.warehouseId);
13444
      first = false;
13445
      if (!first) sb.append(", ");
13446
      sb.append("supplierId:");
13447
      sb.append(this.supplierId);
13448
      first = false;
13449
      if (!first) sb.append(", ");
13450
      sb.append("date:");
13451
      sb.append(this.date);
13452
      first = false;
13453
      sb.append(")");
13454
      return sb.toString();
13455
    }
13456
 
13457
    public void validate() throws org.apache.thrift.TException {
13458
      // check for required fields
13459
    }
13460
 
13461
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13462
      try {
13463
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13464
      } catch (org.apache.thrift.TException te) {
13465
        throw new java.io.IOException(te);
13466
      }
13467
    }
13468
 
13469
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13470
      try {
13471
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13472
        __isset_bit_vector = new BitSet(1);
13473
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13474
      } catch (org.apache.thrift.TException te) {
13475
        throw new java.io.IOException(te);
13476
      }
13477
    }
13478
 
13479
  }
13480
 
13481
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13482
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13483
 
13484
    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);
13485
 
13486
    private List<Invoice> success; // required
13487
 
13488
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13489
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13490
      SUCCESS((short)0, "success");
13491
 
13492
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13493
 
13494
      static {
13495
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13496
          byName.put(field.getFieldName(), field);
13497
        }
13498
      }
13499
 
13500
      /**
13501
       * Find the _Fields constant that matches fieldId, or null if its not found.
13502
       */
13503
      public static _Fields findByThriftId(int fieldId) {
13504
        switch(fieldId) {
13505
          case 0: // SUCCESS
13506
            return SUCCESS;
13507
          default:
13508
            return null;
13509
        }
13510
      }
13511
 
13512
      /**
13513
       * Find the _Fields constant that matches fieldId, throwing an exception
13514
       * if it is not found.
13515
       */
13516
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13517
        _Fields fields = findByThriftId(fieldId);
13518
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13519
        return fields;
13520
      }
13521
 
13522
      /**
13523
       * Find the _Fields constant that matches name, or null if its not found.
13524
       */
13525
      public static _Fields findByName(String name) {
13526
        return byName.get(name);
13527
      }
13528
 
13529
      private final short _thriftId;
13530
      private final String _fieldName;
13531
 
13532
      _Fields(short thriftId, String fieldName) {
13533
        _thriftId = thriftId;
13534
        _fieldName = fieldName;
13535
      }
13536
 
13537
      public short getThriftFieldId() {
13538
        return _thriftId;
13539
      }
13540
 
13541
      public String getFieldName() {
13542
        return _fieldName;
13543
      }
13544
    }
13545
 
13546
    // isset id assignments
13547
 
13548
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13549
    static {
13550
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13551
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13552
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13553
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13554
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13555
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
13556
    }
13557
 
13558
    public getInvoicesForWarehouse_result() {
13559
    }
13560
 
13561
    public getInvoicesForWarehouse_result(
13562
      List<Invoice> success)
13563
    {
13564
      this();
13565
      this.success = success;
13566
    }
13567
 
13568
    /**
13569
     * Performs a deep copy on <i>other</i>.
13570
     */
13571
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
13572
      if (other.isSetSuccess()) {
13573
        List<Invoice> __this__success = new ArrayList<Invoice>();
13574
        for (Invoice other_element : other.success) {
13575
          __this__success.add(new Invoice(other_element));
13576
        }
13577
        this.success = __this__success;
13578
      }
13579
    }
13580
 
13581
    public getInvoicesForWarehouse_result deepCopy() {
13582
      return new getInvoicesForWarehouse_result(this);
13583
    }
13584
 
13585
    @Override
13586
    public void clear() {
13587
      this.success = null;
13588
    }
13589
 
13590
    public int getSuccessSize() {
13591
      return (this.success == null) ? 0 : this.success.size();
13592
    }
13593
 
13594
    public java.util.Iterator<Invoice> getSuccessIterator() {
13595
      return (this.success == null) ? null : this.success.iterator();
13596
    }
13597
 
13598
    public void addToSuccess(Invoice elem) {
13599
      if (this.success == null) {
13600
        this.success = new ArrayList<Invoice>();
13601
      }
13602
      this.success.add(elem);
13603
    }
13604
 
13605
    public List<Invoice> getSuccess() {
13606
      return this.success;
13607
    }
13608
 
13609
    public void setSuccess(List<Invoice> success) {
13610
      this.success = success;
13611
    }
13612
 
13613
    public void unsetSuccess() {
13614
      this.success = null;
13615
    }
13616
 
13617
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13618
    public boolean isSetSuccess() {
13619
      return this.success != null;
13620
    }
13621
 
13622
    public void setSuccessIsSet(boolean value) {
13623
      if (!value) {
13624
        this.success = null;
13625
      }
13626
    }
13627
 
13628
    public void setFieldValue(_Fields field, Object value) {
13629
      switch (field) {
13630
      case SUCCESS:
13631
        if (value == null) {
13632
          unsetSuccess();
13633
        } else {
13634
          setSuccess((List<Invoice>)value);
13635
        }
13636
        break;
13637
 
13638
      }
13639
    }
13640
 
13641
    public Object getFieldValue(_Fields field) {
13642
      switch (field) {
13643
      case SUCCESS:
13644
        return getSuccess();
13645
 
13646
      }
13647
      throw new IllegalStateException();
13648
    }
13649
 
13650
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13651
    public boolean isSet(_Fields field) {
13652
      if (field == null) {
13653
        throw new IllegalArgumentException();
13654
      }
13655
 
13656
      switch (field) {
13657
      case SUCCESS:
13658
        return isSetSuccess();
13659
      }
13660
      throw new IllegalStateException();
13661
    }
13662
 
13663
    @Override
13664
    public boolean equals(Object that) {
13665
      if (that == null)
13666
        return false;
13667
      if (that instanceof getInvoicesForWarehouse_result)
13668
        return this.equals((getInvoicesForWarehouse_result)that);
13669
      return false;
13670
    }
13671
 
13672
    public boolean equals(getInvoicesForWarehouse_result that) {
13673
      if (that == null)
13674
        return false;
13675
 
13676
      boolean this_present_success = true && this.isSetSuccess();
13677
      boolean that_present_success = true && that.isSetSuccess();
13678
      if (this_present_success || that_present_success) {
13679
        if (!(this_present_success && that_present_success))
13680
          return false;
13681
        if (!this.success.equals(that.success))
13682
          return false;
13683
      }
13684
 
13685
      return true;
13686
    }
13687
 
13688
    @Override
13689
    public int hashCode() {
13690
      return 0;
13691
    }
13692
 
13693
    public int compareTo(getInvoicesForWarehouse_result other) {
13694
      if (!getClass().equals(other.getClass())) {
13695
        return getClass().getName().compareTo(other.getClass().getName());
13696
      }
13697
 
13698
      int lastComparison = 0;
13699
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
13700
 
13701
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13702
      if (lastComparison != 0) {
13703
        return lastComparison;
13704
      }
13705
      if (isSetSuccess()) {
13706
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13707
        if (lastComparison != 0) {
13708
          return lastComparison;
13709
        }
13710
      }
13711
      return 0;
13712
    }
13713
 
13714
    public _Fields fieldForId(int fieldId) {
13715
      return _Fields.findByThriftId(fieldId);
13716
    }
13717
 
13718
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13719
      org.apache.thrift.protocol.TField field;
13720
      iprot.readStructBegin();
13721
      while (true)
13722
      {
13723
        field = iprot.readFieldBegin();
13724
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13725
          break;
13726
        }
13727
        switch (field.id) {
13728
          case 0: // SUCCESS
13729
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13730
              {
13731
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13732
                this.success = new ArrayList<Invoice>(_list28.size);
13733
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13734
                {
13735
                  Invoice _elem30; // required
13736
                  _elem30 = new Invoice();
13737
                  _elem30.read(iprot);
13738
                  this.success.add(_elem30);
13739
                }
13740
                iprot.readListEnd();
13741
              }
13742
            } else { 
13743
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13744
            }
13745
            break;
13746
          default:
13747
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13748
        }
13749
        iprot.readFieldEnd();
13750
      }
13751
      iprot.readStructEnd();
13752
      validate();
13753
    }
13754
 
13755
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13756
      oprot.writeStructBegin(STRUCT_DESC);
13757
 
13758
      if (this.isSetSuccess()) {
13759
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13760
        {
13761
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13762
          for (Invoice _iter31 : this.success)
13763
          {
13764
            _iter31.write(oprot);
13765
          }
13766
          oprot.writeListEnd();
13767
        }
13768
        oprot.writeFieldEnd();
13769
      }
13770
      oprot.writeFieldStop();
13771
      oprot.writeStructEnd();
13772
    }
13773
 
13774
    @Override
13775
    public String toString() {
13776
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
13777
      boolean first = true;
13778
 
13779
      sb.append("success:");
13780
      if (this.success == null) {
13781
        sb.append("null");
13782
      } else {
13783
        sb.append(this.success);
13784
      }
13785
      first = false;
13786
      sb.append(")");
13787
      return sb.toString();
13788
    }
13789
 
13790
    public void validate() throws org.apache.thrift.TException {
13791
      // check for required fields
13792
    }
13793
 
13794
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13795
      try {
13796
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13797
      } catch (org.apache.thrift.TException te) {
13798
        throw new java.io.IOException(te);
13799
      }
13800
    }
13801
 
13802
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13803
      try {
13804
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13805
      } catch (org.apache.thrift.TException te) {
13806
        throw new java.io.IOException(te);
13807
      }
13808
    }
13809
 
13810
  }
13811
 
5443 mandeep.dh 13812
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
13813
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
13814
 
13815
    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);
13816
 
13817
    private Invoice invoice; // required
13818
 
13819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13820
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13821
      INVOICE((short)1, "invoice");
13822
 
13823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13824
 
13825
      static {
13826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13827
          byName.put(field.getFieldName(), field);
13828
        }
13829
      }
13830
 
13831
      /**
13832
       * Find the _Fields constant that matches fieldId, or null if its not found.
13833
       */
13834
      public static _Fields findByThriftId(int fieldId) {
13835
        switch(fieldId) {
13836
          case 1: // INVOICE
13837
            return INVOICE;
13838
          default:
13839
            return null;
13840
        }
13841
      }
13842
 
13843
      /**
13844
       * Find the _Fields constant that matches fieldId, throwing an exception
13845
       * if it is not found.
13846
       */
13847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13848
        _Fields fields = findByThriftId(fieldId);
13849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13850
        return fields;
13851
      }
13852
 
13853
      /**
13854
       * Find the _Fields constant that matches name, or null if its not found.
13855
       */
13856
      public static _Fields findByName(String name) {
13857
        return byName.get(name);
13858
      }
13859
 
13860
      private final short _thriftId;
13861
      private final String _fieldName;
13862
 
13863
      _Fields(short thriftId, String fieldName) {
13864
        _thriftId = thriftId;
13865
        _fieldName = fieldName;
13866
      }
13867
 
13868
      public short getThriftFieldId() {
13869
        return _thriftId;
13870
      }
13871
 
13872
      public String getFieldName() {
13873
        return _fieldName;
13874
      }
13875
    }
13876
 
13877
    // isset id assignments
13878
 
13879
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13880
    static {
13881
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13882
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13883
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
13884
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13885
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
13886
    }
13887
 
13888
    public createInvoice_args() {
13889
    }
13890
 
13891
    public createInvoice_args(
13892
      Invoice invoice)
13893
    {
13894
      this();
13895
      this.invoice = invoice;
13896
    }
13897
 
13898
    /**
13899
     * Performs a deep copy on <i>other</i>.
13900
     */
13901
    public createInvoice_args(createInvoice_args other) {
13902
      if (other.isSetInvoice()) {
13903
        this.invoice = new Invoice(other.invoice);
13904
      }
13905
    }
13906
 
13907
    public createInvoice_args deepCopy() {
13908
      return new createInvoice_args(this);
13909
    }
13910
 
13911
    @Override
13912
    public void clear() {
13913
      this.invoice = null;
13914
    }
13915
 
13916
    public Invoice getInvoice() {
13917
      return this.invoice;
13918
    }
13919
 
13920
    public void setInvoice(Invoice invoice) {
13921
      this.invoice = invoice;
13922
    }
13923
 
13924
    public void unsetInvoice() {
13925
      this.invoice = null;
13926
    }
13927
 
13928
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
13929
    public boolean isSetInvoice() {
13930
      return this.invoice != null;
13931
    }
13932
 
13933
    public void setInvoiceIsSet(boolean value) {
13934
      if (!value) {
13935
        this.invoice = null;
13936
      }
13937
    }
13938
 
13939
    public void setFieldValue(_Fields field, Object value) {
13940
      switch (field) {
13941
      case INVOICE:
13942
        if (value == null) {
13943
          unsetInvoice();
13944
        } else {
13945
          setInvoice((Invoice)value);
13946
        }
13947
        break;
13948
 
13949
      }
13950
    }
13951
 
13952
    public Object getFieldValue(_Fields field) {
13953
      switch (field) {
13954
      case INVOICE:
13955
        return getInvoice();
13956
 
13957
      }
13958
      throw new IllegalStateException();
13959
    }
13960
 
13961
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13962
    public boolean isSet(_Fields field) {
13963
      if (field == null) {
13964
        throw new IllegalArgumentException();
13965
      }
13966
 
13967
      switch (field) {
13968
      case INVOICE:
13969
        return isSetInvoice();
13970
      }
13971
      throw new IllegalStateException();
13972
    }
13973
 
13974
    @Override
13975
    public boolean equals(Object that) {
13976
      if (that == null)
13977
        return false;
13978
      if (that instanceof createInvoice_args)
13979
        return this.equals((createInvoice_args)that);
13980
      return false;
13981
    }
13982
 
13983
    public boolean equals(createInvoice_args that) {
13984
      if (that == null)
13985
        return false;
13986
 
13987
      boolean this_present_invoice = true && this.isSetInvoice();
13988
      boolean that_present_invoice = true && that.isSetInvoice();
13989
      if (this_present_invoice || that_present_invoice) {
13990
        if (!(this_present_invoice && that_present_invoice))
13991
          return false;
13992
        if (!this.invoice.equals(that.invoice))
13993
          return false;
13994
      }
13995
 
13996
      return true;
13997
    }
13998
 
13999
    @Override
14000
    public int hashCode() {
14001
      return 0;
14002
    }
14003
 
14004
    public int compareTo(createInvoice_args other) {
14005
      if (!getClass().equals(other.getClass())) {
14006
        return getClass().getName().compareTo(other.getClass().getName());
14007
      }
14008
 
14009
      int lastComparison = 0;
14010
      createInvoice_args typedOther = (createInvoice_args)other;
14011
 
14012
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
14013
      if (lastComparison != 0) {
14014
        return lastComparison;
14015
      }
14016
      if (isSetInvoice()) {
14017
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
14018
        if (lastComparison != 0) {
14019
          return lastComparison;
14020
        }
14021
      }
14022
      return 0;
14023
    }
14024
 
14025
    public _Fields fieldForId(int fieldId) {
14026
      return _Fields.findByThriftId(fieldId);
14027
    }
14028
 
14029
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14030
      org.apache.thrift.protocol.TField field;
14031
      iprot.readStructBegin();
14032
      while (true)
14033
      {
14034
        field = iprot.readFieldBegin();
14035
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14036
          break;
14037
        }
14038
        switch (field.id) {
14039
          case 1: // INVOICE
14040
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14041
              this.invoice = new Invoice();
14042
              this.invoice.read(iprot);
14043
            } else { 
14044
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14045
            }
14046
            break;
14047
          default:
14048
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14049
        }
14050
        iprot.readFieldEnd();
14051
      }
14052
      iprot.readStructEnd();
14053
      validate();
14054
    }
14055
 
14056
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14057
      validate();
14058
 
14059
      oprot.writeStructBegin(STRUCT_DESC);
14060
      if (this.invoice != null) {
14061
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
14062
        this.invoice.write(oprot);
14063
        oprot.writeFieldEnd();
14064
      }
14065
      oprot.writeFieldStop();
14066
      oprot.writeStructEnd();
14067
    }
14068
 
14069
    @Override
14070
    public String toString() {
14071
      StringBuilder sb = new StringBuilder("createInvoice_args(");
14072
      boolean first = true;
14073
 
14074
      sb.append("invoice:");
14075
      if (this.invoice == null) {
14076
        sb.append("null");
14077
      } else {
14078
        sb.append(this.invoice);
14079
      }
14080
      first = false;
14081
      sb.append(")");
14082
      return sb.toString();
14083
    }
14084
 
14085
    public void validate() throws org.apache.thrift.TException {
14086
      // check for required fields
14087
    }
14088
 
14089
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14090
      try {
14091
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14092
      } catch (org.apache.thrift.TException te) {
14093
        throw new java.io.IOException(te);
14094
      }
14095
    }
14096
 
14097
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14098
      try {
14099
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14100
      } catch (org.apache.thrift.TException te) {
14101
        throw new java.io.IOException(te);
14102
      }
14103
    }
14104
 
14105
  }
14106
 
14107
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
14108
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
14109
 
14110
    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);
14111
 
14112
    private PurchaseServiceException e; // required
14113
 
14114
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14115
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14116
      E((short)1, "e");
14117
 
14118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14119
 
14120
      static {
14121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14122
          byName.put(field.getFieldName(), field);
14123
        }
14124
      }
14125
 
14126
      /**
14127
       * Find the _Fields constant that matches fieldId, or null if its not found.
14128
       */
14129
      public static _Fields findByThriftId(int fieldId) {
14130
        switch(fieldId) {
14131
          case 1: // E
14132
            return E;
14133
          default:
14134
            return null;
14135
        }
14136
      }
14137
 
14138
      /**
14139
       * Find the _Fields constant that matches fieldId, throwing an exception
14140
       * if it is not found.
14141
       */
14142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14143
        _Fields fields = findByThriftId(fieldId);
14144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14145
        return fields;
14146
      }
14147
 
14148
      /**
14149
       * Find the _Fields constant that matches name, or null if its not found.
14150
       */
14151
      public static _Fields findByName(String name) {
14152
        return byName.get(name);
14153
      }
14154
 
14155
      private final short _thriftId;
14156
      private final String _fieldName;
14157
 
14158
      _Fields(short thriftId, String fieldName) {
14159
        _thriftId = thriftId;
14160
        _fieldName = fieldName;
14161
      }
14162
 
14163
      public short getThriftFieldId() {
14164
        return _thriftId;
14165
      }
14166
 
14167
      public String getFieldName() {
14168
        return _fieldName;
14169
      }
14170
    }
14171
 
14172
    // isset id assignments
14173
 
14174
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14175
    static {
14176
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14177
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14178
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14179
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14180
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14181
    }
14182
 
14183
    public createInvoice_result() {
14184
    }
14185
 
14186
    public createInvoice_result(
14187
      PurchaseServiceException e)
14188
    {
14189
      this();
14190
      this.e = e;
14191
    }
14192
 
14193
    /**
14194
     * Performs a deep copy on <i>other</i>.
14195
     */
14196
    public createInvoice_result(createInvoice_result other) {
14197
      if (other.isSetE()) {
14198
        this.e = new PurchaseServiceException(other.e);
14199
      }
14200
    }
14201
 
14202
    public createInvoice_result deepCopy() {
14203
      return new createInvoice_result(this);
14204
    }
14205
 
14206
    @Override
14207
    public void clear() {
14208
      this.e = null;
14209
    }
14210
 
14211
    public PurchaseServiceException getE() {
14212
      return this.e;
14213
    }
14214
 
14215
    public void setE(PurchaseServiceException e) {
14216
      this.e = e;
14217
    }
14218
 
14219
    public void unsetE() {
14220
      this.e = null;
14221
    }
14222
 
14223
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14224
    public boolean isSetE() {
14225
      return this.e != null;
14226
    }
14227
 
14228
    public void setEIsSet(boolean value) {
14229
      if (!value) {
14230
        this.e = null;
14231
      }
14232
    }
14233
 
14234
    public void setFieldValue(_Fields field, Object value) {
14235
      switch (field) {
14236
      case E:
14237
        if (value == null) {
14238
          unsetE();
14239
        } else {
14240
          setE((PurchaseServiceException)value);
14241
        }
14242
        break;
14243
 
14244
      }
14245
    }
14246
 
14247
    public Object getFieldValue(_Fields field) {
14248
      switch (field) {
14249
      case E:
14250
        return getE();
14251
 
14252
      }
14253
      throw new IllegalStateException();
14254
    }
14255
 
14256
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14257
    public boolean isSet(_Fields field) {
14258
      if (field == null) {
14259
        throw new IllegalArgumentException();
14260
      }
14261
 
14262
      switch (field) {
14263
      case E:
14264
        return isSetE();
14265
      }
14266
      throw new IllegalStateException();
14267
    }
14268
 
14269
    @Override
14270
    public boolean equals(Object that) {
14271
      if (that == null)
14272
        return false;
14273
      if (that instanceof createInvoice_result)
14274
        return this.equals((createInvoice_result)that);
14275
      return false;
14276
    }
14277
 
14278
    public boolean equals(createInvoice_result that) {
14279
      if (that == null)
14280
        return false;
14281
 
14282
      boolean this_present_e = true && this.isSetE();
14283
      boolean that_present_e = true && that.isSetE();
14284
      if (this_present_e || that_present_e) {
14285
        if (!(this_present_e && that_present_e))
14286
          return false;
14287
        if (!this.e.equals(that.e))
14288
          return false;
14289
      }
14290
 
14291
      return true;
14292
    }
14293
 
14294
    @Override
14295
    public int hashCode() {
14296
      return 0;
14297
    }
14298
 
14299
    public int compareTo(createInvoice_result other) {
14300
      if (!getClass().equals(other.getClass())) {
14301
        return getClass().getName().compareTo(other.getClass().getName());
14302
      }
14303
 
14304
      int lastComparison = 0;
14305
      createInvoice_result typedOther = (createInvoice_result)other;
14306
 
14307
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14308
      if (lastComparison != 0) {
14309
        return lastComparison;
14310
      }
14311
      if (isSetE()) {
14312
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14313
        if (lastComparison != 0) {
14314
          return lastComparison;
14315
        }
14316
      }
14317
      return 0;
14318
    }
14319
 
14320
    public _Fields fieldForId(int fieldId) {
14321
      return _Fields.findByThriftId(fieldId);
14322
    }
14323
 
14324
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14325
      org.apache.thrift.protocol.TField field;
14326
      iprot.readStructBegin();
14327
      while (true)
14328
      {
14329
        field = iprot.readFieldBegin();
14330
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14331
          break;
14332
        }
14333
        switch (field.id) {
14334
          case 1: // E
14335
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14336
              this.e = new PurchaseServiceException();
14337
              this.e.read(iprot);
14338
            } else { 
14339
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14340
            }
14341
            break;
14342
          default:
14343
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14344
        }
14345
        iprot.readFieldEnd();
14346
      }
14347
      iprot.readStructEnd();
14348
      validate();
14349
    }
14350
 
14351
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14352
      oprot.writeStructBegin(STRUCT_DESC);
14353
 
14354
      if (this.isSetE()) {
14355
        oprot.writeFieldBegin(E_FIELD_DESC);
14356
        this.e.write(oprot);
14357
        oprot.writeFieldEnd();
14358
      }
14359
      oprot.writeFieldStop();
14360
      oprot.writeStructEnd();
14361
    }
14362
 
14363
    @Override
14364
    public String toString() {
14365
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14366
      boolean first = true;
14367
 
14368
      sb.append("e:");
14369
      if (this.e == null) {
14370
        sb.append("null");
14371
      } else {
14372
        sb.append(this.e);
14373
      }
14374
      first = false;
14375
      sb.append(")");
14376
      return sb.toString();
14377
    }
14378
 
14379
    public void validate() throws org.apache.thrift.TException {
14380
      // check for required fields
14381
    }
14382
 
14383
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14384
      try {
14385
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14386
      } catch (org.apache.thrift.TException te) {
14387
        throw new java.io.IOException(te);
14388
      }
14389
    }
14390
 
14391
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14392
      try {
14393
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14394
      } catch (org.apache.thrift.TException te) {
14395
        throw new java.io.IOException(te);
14396
      }
14397
    }
14398
 
14399
  }
14400
 
5591 mandeep.dh 14401
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14402
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14403
 
14404
    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);
14405
 
14406
    private Supplier supplier; // required
14407
 
14408
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14409
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14410
      SUPPLIER((short)1, "supplier");
14411
 
14412
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14413
 
14414
      static {
14415
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14416
          byName.put(field.getFieldName(), field);
14417
        }
14418
      }
14419
 
14420
      /**
14421
       * Find the _Fields constant that matches fieldId, or null if its not found.
14422
       */
14423
      public static _Fields findByThriftId(int fieldId) {
14424
        switch(fieldId) {
14425
          case 1: // SUPPLIER
14426
            return SUPPLIER;
14427
          default:
14428
            return null;
14429
        }
14430
      }
14431
 
14432
      /**
14433
       * Find the _Fields constant that matches fieldId, throwing an exception
14434
       * if it is not found.
14435
       */
14436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14437
        _Fields fields = findByThriftId(fieldId);
14438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14439
        return fields;
14440
      }
14441
 
14442
      /**
14443
       * Find the _Fields constant that matches name, or null if its not found.
14444
       */
14445
      public static _Fields findByName(String name) {
14446
        return byName.get(name);
14447
      }
14448
 
14449
      private final short _thriftId;
14450
      private final String _fieldName;
14451
 
14452
      _Fields(short thriftId, String fieldName) {
14453
        _thriftId = thriftId;
14454
        _fieldName = fieldName;
14455
      }
14456
 
14457
      public short getThriftFieldId() {
14458
        return _thriftId;
14459
      }
14460
 
14461
      public String getFieldName() {
14462
        return _fieldName;
14463
      }
14464
    }
14465
 
14466
    // isset id assignments
14467
 
14468
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14469
    static {
14470
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14471
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14472
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14473
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14474
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14475
    }
14476
 
14477
    public addSupplier_args() {
14478
    }
14479
 
14480
    public addSupplier_args(
14481
      Supplier supplier)
14482
    {
14483
      this();
14484
      this.supplier = supplier;
14485
    }
14486
 
14487
    /**
14488
     * Performs a deep copy on <i>other</i>.
14489
     */
14490
    public addSupplier_args(addSupplier_args other) {
14491
      if (other.isSetSupplier()) {
14492
        this.supplier = new Supplier(other.supplier);
14493
      }
14494
    }
14495
 
14496
    public addSupplier_args deepCopy() {
14497
      return new addSupplier_args(this);
14498
    }
14499
 
14500
    @Override
14501
    public void clear() {
14502
      this.supplier = null;
14503
    }
14504
 
14505
    public Supplier getSupplier() {
14506
      return this.supplier;
14507
    }
14508
 
14509
    public void setSupplier(Supplier supplier) {
14510
      this.supplier = supplier;
14511
    }
14512
 
14513
    public void unsetSupplier() {
14514
      this.supplier = null;
14515
    }
14516
 
14517
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14518
    public boolean isSetSupplier() {
14519
      return this.supplier != null;
14520
    }
14521
 
14522
    public void setSupplierIsSet(boolean value) {
14523
      if (!value) {
14524
        this.supplier = null;
14525
      }
14526
    }
14527
 
14528
    public void setFieldValue(_Fields field, Object value) {
14529
      switch (field) {
14530
      case SUPPLIER:
14531
        if (value == null) {
14532
          unsetSupplier();
14533
        } else {
14534
          setSupplier((Supplier)value);
14535
        }
14536
        break;
14537
 
14538
      }
14539
    }
14540
 
14541
    public Object getFieldValue(_Fields field) {
14542
      switch (field) {
14543
      case SUPPLIER:
14544
        return getSupplier();
14545
 
14546
      }
14547
      throw new IllegalStateException();
14548
    }
14549
 
14550
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14551
    public boolean isSet(_Fields field) {
14552
      if (field == null) {
14553
        throw new IllegalArgumentException();
14554
      }
14555
 
14556
      switch (field) {
14557
      case SUPPLIER:
14558
        return isSetSupplier();
14559
      }
14560
      throw new IllegalStateException();
14561
    }
14562
 
14563
    @Override
14564
    public boolean equals(Object that) {
14565
      if (that == null)
14566
        return false;
14567
      if (that instanceof addSupplier_args)
14568
        return this.equals((addSupplier_args)that);
14569
      return false;
14570
    }
14571
 
14572
    public boolean equals(addSupplier_args that) {
14573
      if (that == null)
14574
        return false;
14575
 
14576
      boolean this_present_supplier = true && this.isSetSupplier();
14577
      boolean that_present_supplier = true && that.isSetSupplier();
14578
      if (this_present_supplier || that_present_supplier) {
14579
        if (!(this_present_supplier && that_present_supplier))
14580
          return false;
14581
        if (!this.supplier.equals(that.supplier))
14582
          return false;
14583
      }
14584
 
14585
      return true;
14586
    }
14587
 
14588
    @Override
14589
    public int hashCode() {
14590
      return 0;
14591
    }
14592
 
14593
    public int compareTo(addSupplier_args other) {
14594
      if (!getClass().equals(other.getClass())) {
14595
        return getClass().getName().compareTo(other.getClass().getName());
14596
      }
14597
 
14598
      int lastComparison = 0;
14599
      addSupplier_args typedOther = (addSupplier_args)other;
14600
 
14601
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
14602
      if (lastComparison != 0) {
14603
        return lastComparison;
14604
      }
14605
      if (isSetSupplier()) {
14606
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
14607
        if (lastComparison != 0) {
14608
          return lastComparison;
14609
        }
14610
      }
14611
      return 0;
14612
    }
14613
 
14614
    public _Fields fieldForId(int fieldId) {
14615
      return _Fields.findByThriftId(fieldId);
14616
    }
14617
 
14618
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14619
      org.apache.thrift.protocol.TField field;
14620
      iprot.readStructBegin();
14621
      while (true)
14622
      {
14623
        field = iprot.readFieldBegin();
14624
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14625
          break;
14626
        }
14627
        switch (field.id) {
14628
          case 1: // SUPPLIER
14629
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14630
              this.supplier = new Supplier();
14631
              this.supplier.read(iprot);
14632
            } else { 
14633
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14634
            }
14635
            break;
14636
          default:
14637
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14638
        }
14639
        iprot.readFieldEnd();
14640
      }
14641
      iprot.readStructEnd();
14642
      validate();
14643
    }
14644
 
14645
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14646
      validate();
14647
 
14648
      oprot.writeStructBegin(STRUCT_DESC);
14649
      if (this.supplier != null) {
14650
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14651
        this.supplier.write(oprot);
14652
        oprot.writeFieldEnd();
14653
      }
14654
      oprot.writeFieldStop();
14655
      oprot.writeStructEnd();
14656
    }
14657
 
14658
    @Override
14659
    public String toString() {
14660
      StringBuilder sb = new StringBuilder("addSupplier_args(");
14661
      boolean first = true;
14662
 
14663
      sb.append("supplier:");
14664
      if (this.supplier == null) {
14665
        sb.append("null");
14666
      } else {
14667
        sb.append(this.supplier);
14668
      }
14669
      first = false;
14670
      sb.append(")");
14671
      return sb.toString();
14672
    }
14673
 
14674
    public void validate() throws org.apache.thrift.TException {
14675
      // check for required fields
14676
    }
14677
 
14678
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14679
      try {
14680
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14681
      } catch (org.apache.thrift.TException te) {
14682
        throw new java.io.IOException(te);
14683
      }
14684
    }
14685
 
14686
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14687
      try {
14688
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14689
      } catch (org.apache.thrift.TException te) {
14690
        throw new java.io.IOException(te);
14691
      }
14692
    }
14693
 
14694
  }
14695
 
14696
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14697
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
14698
 
14699
    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);
14700
 
14701
    private Supplier success; // required
14702
 
14703
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14704
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14705
      SUCCESS((short)0, "success");
14706
 
14707
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14708
 
14709
      static {
14710
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14711
          byName.put(field.getFieldName(), field);
14712
        }
14713
      }
14714
 
14715
      /**
14716
       * Find the _Fields constant that matches fieldId, or null if its not found.
14717
       */
14718
      public static _Fields findByThriftId(int fieldId) {
14719
        switch(fieldId) {
14720
          case 0: // SUCCESS
14721
            return SUCCESS;
14722
          default:
14723
            return null;
14724
        }
14725
      }
14726
 
14727
      /**
14728
       * Find the _Fields constant that matches fieldId, throwing an exception
14729
       * if it is not found.
14730
       */
14731
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14732
        _Fields fields = findByThriftId(fieldId);
14733
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14734
        return fields;
14735
      }
14736
 
14737
      /**
14738
       * Find the _Fields constant that matches name, or null if its not found.
14739
       */
14740
      public static _Fields findByName(String name) {
14741
        return byName.get(name);
14742
      }
14743
 
14744
      private final short _thriftId;
14745
      private final String _fieldName;
14746
 
14747
      _Fields(short thriftId, String fieldName) {
14748
        _thriftId = thriftId;
14749
        _fieldName = fieldName;
14750
      }
14751
 
14752
      public short getThriftFieldId() {
14753
        return _thriftId;
14754
      }
14755
 
14756
      public String getFieldName() {
14757
        return _fieldName;
14758
      }
14759
    }
14760
 
14761
    // isset id assignments
14762
 
14763
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14764
    static {
14765
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14766
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14767
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14768
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14769
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
14770
    }
14771
 
14772
    public addSupplier_result() {
14773
    }
14774
 
14775
    public addSupplier_result(
14776
      Supplier success)
14777
    {
14778
      this();
14779
      this.success = success;
14780
    }
14781
 
14782
    /**
14783
     * Performs a deep copy on <i>other</i>.
14784
     */
14785
    public addSupplier_result(addSupplier_result other) {
14786
      if (other.isSetSuccess()) {
14787
        this.success = new Supplier(other.success);
14788
      }
14789
    }
14790
 
14791
    public addSupplier_result deepCopy() {
14792
      return new addSupplier_result(this);
14793
    }
14794
 
14795
    @Override
14796
    public void clear() {
14797
      this.success = null;
14798
    }
14799
 
14800
    public Supplier getSuccess() {
14801
      return this.success;
14802
    }
14803
 
14804
    public void setSuccess(Supplier success) {
14805
      this.success = success;
14806
    }
14807
 
14808
    public void unsetSuccess() {
14809
      this.success = null;
14810
    }
14811
 
14812
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14813
    public boolean isSetSuccess() {
14814
      return this.success != null;
14815
    }
14816
 
14817
    public void setSuccessIsSet(boolean value) {
14818
      if (!value) {
14819
        this.success = null;
14820
      }
14821
    }
14822
 
14823
    public void setFieldValue(_Fields field, Object value) {
14824
      switch (field) {
14825
      case SUCCESS:
14826
        if (value == null) {
14827
          unsetSuccess();
14828
        } else {
14829
          setSuccess((Supplier)value);
14830
        }
14831
        break;
14832
 
14833
      }
14834
    }
14835
 
14836
    public Object getFieldValue(_Fields field) {
14837
      switch (field) {
14838
      case SUCCESS:
14839
        return getSuccess();
14840
 
14841
      }
14842
      throw new IllegalStateException();
14843
    }
14844
 
14845
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14846
    public boolean isSet(_Fields field) {
14847
      if (field == null) {
14848
        throw new IllegalArgumentException();
14849
      }
14850
 
14851
      switch (field) {
14852
      case SUCCESS:
14853
        return isSetSuccess();
14854
      }
14855
      throw new IllegalStateException();
14856
    }
14857
 
14858
    @Override
14859
    public boolean equals(Object that) {
14860
      if (that == null)
14861
        return false;
14862
      if (that instanceof addSupplier_result)
14863
        return this.equals((addSupplier_result)that);
14864
      return false;
14865
    }
14866
 
14867
    public boolean equals(addSupplier_result that) {
14868
      if (that == null)
14869
        return false;
14870
 
14871
      boolean this_present_success = true && this.isSetSuccess();
14872
      boolean that_present_success = true && that.isSetSuccess();
14873
      if (this_present_success || that_present_success) {
14874
        if (!(this_present_success && that_present_success))
14875
          return false;
14876
        if (!this.success.equals(that.success))
14877
          return false;
14878
      }
14879
 
14880
      return true;
14881
    }
14882
 
14883
    @Override
14884
    public int hashCode() {
14885
      return 0;
14886
    }
14887
 
14888
    public int compareTo(addSupplier_result other) {
14889
      if (!getClass().equals(other.getClass())) {
14890
        return getClass().getName().compareTo(other.getClass().getName());
14891
      }
14892
 
14893
      int lastComparison = 0;
14894
      addSupplier_result typedOther = (addSupplier_result)other;
14895
 
14896
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14897
      if (lastComparison != 0) {
14898
        return lastComparison;
14899
      }
14900
      if (isSetSuccess()) {
14901
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14902
        if (lastComparison != 0) {
14903
          return lastComparison;
14904
        }
14905
      }
14906
      return 0;
14907
    }
14908
 
14909
    public _Fields fieldForId(int fieldId) {
14910
      return _Fields.findByThriftId(fieldId);
14911
    }
14912
 
14913
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14914
      org.apache.thrift.protocol.TField field;
14915
      iprot.readStructBegin();
14916
      while (true)
14917
      {
14918
        field = iprot.readFieldBegin();
14919
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14920
          break;
14921
        }
14922
        switch (field.id) {
14923
          case 0: // SUCCESS
14924
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14925
              this.success = new Supplier();
14926
              this.success.read(iprot);
14927
            } else { 
14928
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14929
            }
14930
            break;
14931
          default:
14932
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14933
        }
14934
        iprot.readFieldEnd();
14935
      }
14936
      iprot.readStructEnd();
14937
      validate();
14938
    }
14939
 
14940
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14941
      oprot.writeStructBegin(STRUCT_DESC);
14942
 
14943
      if (this.isSetSuccess()) {
14944
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14945
        this.success.write(oprot);
14946
        oprot.writeFieldEnd();
14947
      }
14948
      oprot.writeFieldStop();
14949
      oprot.writeStructEnd();
14950
    }
14951
 
14952
    @Override
14953
    public String toString() {
14954
      StringBuilder sb = new StringBuilder("addSupplier_result(");
14955
      boolean first = true;
14956
 
14957
      sb.append("success:");
14958
      if (this.success == null) {
14959
        sb.append("null");
14960
      } else {
14961
        sb.append(this.success);
14962
      }
14963
      first = false;
14964
      sb.append(")");
14965
      return sb.toString();
14966
    }
14967
 
14968
    public void validate() throws org.apache.thrift.TException {
14969
      // check for required fields
14970
    }
14971
 
14972
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14973
      try {
14974
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14975
      } catch (org.apache.thrift.TException te) {
14976
        throw new java.io.IOException(te);
14977
      }
14978
    }
14979
 
14980
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14981
      try {
14982
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14983
      } catch (org.apache.thrift.TException te) {
14984
        throw new java.io.IOException(te);
14985
      }
14986
    }
14987
 
14988
  }
14989
 
14990
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14991
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
14992
 
14993
    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);
14994
 
14995
    private Supplier supplier; // required
14996
 
14997
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14998
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14999
      SUPPLIER((short)1, "supplier");
15000
 
15001
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15002
 
15003
      static {
15004
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15005
          byName.put(field.getFieldName(), field);
15006
        }
15007
      }
15008
 
15009
      /**
15010
       * Find the _Fields constant that matches fieldId, or null if its not found.
15011
       */
15012
      public static _Fields findByThriftId(int fieldId) {
15013
        switch(fieldId) {
15014
          case 1: // SUPPLIER
15015
            return SUPPLIER;
15016
          default:
15017
            return null;
15018
        }
15019
      }
15020
 
15021
      /**
15022
       * Find the _Fields constant that matches fieldId, throwing an exception
15023
       * if it is not found.
15024
       */
15025
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15026
        _Fields fields = findByThriftId(fieldId);
15027
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15028
        return fields;
15029
      }
15030
 
15031
      /**
15032
       * Find the _Fields constant that matches name, or null if its not found.
15033
       */
15034
      public static _Fields findByName(String name) {
15035
        return byName.get(name);
15036
      }
15037
 
15038
      private final short _thriftId;
15039
      private final String _fieldName;
15040
 
15041
      _Fields(short thriftId, String fieldName) {
15042
        _thriftId = thriftId;
15043
        _fieldName = fieldName;
15044
      }
15045
 
15046
      public short getThriftFieldId() {
15047
        return _thriftId;
15048
      }
15049
 
15050
      public String getFieldName() {
15051
        return _fieldName;
15052
      }
15053
    }
15054
 
15055
    // isset id assignments
15056
 
15057
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15058
    static {
15059
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15060
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15061
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
15062
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15063
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
15064
    }
15065
 
15066
    public updateSupplier_args() {
15067
    }
15068
 
15069
    public updateSupplier_args(
15070
      Supplier supplier)
15071
    {
15072
      this();
15073
      this.supplier = supplier;
15074
    }
15075
 
15076
    /**
15077
     * Performs a deep copy on <i>other</i>.
15078
     */
15079
    public updateSupplier_args(updateSupplier_args other) {
15080
      if (other.isSetSupplier()) {
15081
        this.supplier = new Supplier(other.supplier);
15082
      }
15083
    }
15084
 
15085
    public updateSupplier_args deepCopy() {
15086
      return new updateSupplier_args(this);
15087
    }
15088
 
15089
    @Override
15090
    public void clear() {
15091
      this.supplier = null;
15092
    }
15093
 
15094
    public Supplier getSupplier() {
15095
      return this.supplier;
15096
    }
15097
 
15098
    public void setSupplier(Supplier supplier) {
15099
      this.supplier = supplier;
15100
    }
15101
 
15102
    public void unsetSupplier() {
15103
      this.supplier = null;
15104
    }
15105
 
15106
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15107
    public boolean isSetSupplier() {
15108
      return this.supplier != null;
15109
    }
15110
 
15111
    public void setSupplierIsSet(boolean value) {
15112
      if (!value) {
15113
        this.supplier = null;
15114
      }
15115
    }
15116
 
15117
    public void setFieldValue(_Fields field, Object value) {
15118
      switch (field) {
15119
      case SUPPLIER:
15120
        if (value == null) {
15121
          unsetSupplier();
15122
        } else {
15123
          setSupplier((Supplier)value);
15124
        }
15125
        break;
15126
 
15127
      }
15128
    }
15129
 
15130
    public Object getFieldValue(_Fields field) {
15131
      switch (field) {
15132
      case SUPPLIER:
15133
        return getSupplier();
15134
 
15135
      }
15136
      throw new IllegalStateException();
15137
    }
15138
 
15139
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15140
    public boolean isSet(_Fields field) {
15141
      if (field == null) {
15142
        throw new IllegalArgumentException();
15143
      }
15144
 
15145
      switch (field) {
15146
      case SUPPLIER:
15147
        return isSetSupplier();
15148
      }
15149
      throw new IllegalStateException();
15150
    }
15151
 
15152
    @Override
15153
    public boolean equals(Object that) {
15154
      if (that == null)
15155
        return false;
15156
      if (that instanceof updateSupplier_args)
15157
        return this.equals((updateSupplier_args)that);
15158
      return false;
15159
    }
15160
 
15161
    public boolean equals(updateSupplier_args that) {
15162
      if (that == null)
15163
        return false;
15164
 
15165
      boolean this_present_supplier = true && this.isSetSupplier();
15166
      boolean that_present_supplier = true && that.isSetSupplier();
15167
      if (this_present_supplier || that_present_supplier) {
15168
        if (!(this_present_supplier && that_present_supplier))
15169
          return false;
15170
        if (!this.supplier.equals(that.supplier))
15171
          return false;
15172
      }
15173
 
15174
      return true;
15175
    }
15176
 
15177
    @Override
15178
    public int hashCode() {
15179
      return 0;
15180
    }
15181
 
15182
    public int compareTo(updateSupplier_args other) {
15183
      if (!getClass().equals(other.getClass())) {
15184
        return getClass().getName().compareTo(other.getClass().getName());
15185
      }
15186
 
15187
      int lastComparison = 0;
15188
      updateSupplier_args typedOther = (updateSupplier_args)other;
15189
 
15190
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15191
      if (lastComparison != 0) {
15192
        return lastComparison;
15193
      }
15194
      if (isSetSupplier()) {
15195
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15196
        if (lastComparison != 0) {
15197
          return lastComparison;
15198
        }
15199
      }
15200
      return 0;
15201
    }
15202
 
15203
    public _Fields fieldForId(int fieldId) {
15204
      return _Fields.findByThriftId(fieldId);
15205
    }
15206
 
15207
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15208
      org.apache.thrift.protocol.TField field;
15209
      iprot.readStructBegin();
15210
      while (true)
15211
      {
15212
        field = iprot.readFieldBegin();
15213
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15214
          break;
15215
        }
15216
        switch (field.id) {
15217
          case 1: // SUPPLIER
15218
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15219
              this.supplier = new Supplier();
15220
              this.supplier.read(iprot);
15221
            } else { 
15222
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15223
            }
15224
            break;
15225
          default:
15226
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15227
        }
15228
        iprot.readFieldEnd();
15229
      }
15230
      iprot.readStructEnd();
15231
      validate();
15232
    }
15233
 
15234
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15235
      validate();
15236
 
15237
      oprot.writeStructBegin(STRUCT_DESC);
15238
      if (this.supplier != null) {
15239
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15240
        this.supplier.write(oprot);
15241
        oprot.writeFieldEnd();
15242
      }
15243
      oprot.writeFieldStop();
15244
      oprot.writeStructEnd();
15245
    }
15246
 
15247
    @Override
15248
    public String toString() {
15249
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15250
      boolean first = true;
15251
 
15252
      sb.append("supplier:");
15253
      if (this.supplier == null) {
15254
        sb.append("null");
15255
      } else {
15256
        sb.append(this.supplier);
15257
      }
15258
      first = false;
15259
      sb.append(")");
15260
      return sb.toString();
15261
    }
15262
 
15263
    public void validate() throws org.apache.thrift.TException {
15264
      // check for required fields
15265
    }
15266
 
15267
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15268
      try {
15269
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15270
      } catch (org.apache.thrift.TException te) {
15271
        throw new java.io.IOException(te);
15272
      }
15273
    }
15274
 
15275
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15276
      try {
15277
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15278
      } catch (org.apache.thrift.TException te) {
15279
        throw new java.io.IOException(te);
15280
      }
15281
    }
15282
 
15283
  }
15284
 
15285
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15286
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15287
 
15288
 
15289
 
15290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15291
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15292
;
15293
 
15294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15295
 
15296
      static {
15297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15298
          byName.put(field.getFieldName(), field);
15299
        }
15300
      }
15301
 
15302
      /**
15303
       * Find the _Fields constant that matches fieldId, or null if its not found.
15304
       */
15305
      public static _Fields findByThriftId(int fieldId) {
15306
        switch(fieldId) {
15307
          default:
15308
            return null;
15309
        }
15310
      }
15311
 
15312
      /**
15313
       * Find the _Fields constant that matches fieldId, throwing an exception
15314
       * if it is not found.
15315
       */
15316
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15317
        _Fields fields = findByThriftId(fieldId);
15318
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15319
        return fields;
15320
      }
15321
 
15322
      /**
15323
       * Find the _Fields constant that matches name, or null if its not found.
15324
       */
15325
      public static _Fields findByName(String name) {
15326
        return byName.get(name);
15327
      }
15328
 
15329
      private final short _thriftId;
15330
      private final String _fieldName;
15331
 
15332
      _Fields(short thriftId, String fieldName) {
15333
        _thriftId = thriftId;
15334
        _fieldName = fieldName;
15335
      }
15336
 
15337
      public short getThriftFieldId() {
15338
        return _thriftId;
15339
      }
15340
 
15341
      public String getFieldName() {
15342
        return _fieldName;
15343
      }
15344
    }
15345
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15346
    static {
15347
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15348
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15349
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15350
    }
15351
 
15352
    public updateSupplier_result() {
15353
    }
15354
 
15355
    /**
15356
     * Performs a deep copy on <i>other</i>.
15357
     */
15358
    public updateSupplier_result(updateSupplier_result other) {
15359
    }
15360
 
15361
    public updateSupplier_result deepCopy() {
15362
      return new updateSupplier_result(this);
15363
    }
15364
 
15365
    @Override
15366
    public void clear() {
15367
    }
15368
 
15369
    public void setFieldValue(_Fields field, Object value) {
15370
      switch (field) {
15371
      }
15372
    }
15373
 
15374
    public Object getFieldValue(_Fields field) {
15375
      switch (field) {
15376
      }
15377
      throw new IllegalStateException();
15378
    }
15379
 
15380
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15381
    public boolean isSet(_Fields field) {
15382
      if (field == null) {
15383
        throw new IllegalArgumentException();
15384
      }
15385
 
15386
      switch (field) {
15387
      }
15388
      throw new IllegalStateException();
15389
    }
15390
 
15391
    @Override
15392
    public boolean equals(Object that) {
15393
      if (that == null)
15394
        return false;
15395
      if (that instanceof updateSupplier_result)
15396
        return this.equals((updateSupplier_result)that);
15397
      return false;
15398
    }
15399
 
15400
    public boolean equals(updateSupplier_result that) {
15401
      if (that == null)
15402
        return false;
15403
 
15404
      return true;
15405
    }
15406
 
15407
    @Override
15408
    public int hashCode() {
15409
      return 0;
15410
    }
15411
 
15412
    public int compareTo(updateSupplier_result other) {
15413
      if (!getClass().equals(other.getClass())) {
15414
        return getClass().getName().compareTo(other.getClass().getName());
15415
      }
15416
 
15417
      int lastComparison = 0;
15418
      updateSupplier_result typedOther = (updateSupplier_result)other;
15419
 
15420
      return 0;
15421
    }
15422
 
15423
    public _Fields fieldForId(int fieldId) {
15424
      return _Fields.findByThriftId(fieldId);
15425
    }
15426
 
15427
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15428
      org.apache.thrift.protocol.TField field;
15429
      iprot.readStructBegin();
15430
      while (true)
15431
      {
15432
        field = iprot.readFieldBegin();
15433
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15434
          break;
15435
        }
15436
        switch (field.id) {
15437
          default:
15438
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15439
        }
15440
        iprot.readFieldEnd();
15441
      }
15442
      iprot.readStructEnd();
15443
      validate();
15444
    }
15445
 
15446
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15447
      oprot.writeStructBegin(STRUCT_DESC);
15448
 
15449
      oprot.writeFieldStop();
15450
      oprot.writeStructEnd();
15451
    }
15452
 
15453
    @Override
15454
    public String toString() {
15455
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15456
      boolean first = true;
15457
 
15458
      sb.append(")");
15459
      return sb.toString();
15460
    }
15461
 
15462
    public void validate() throws org.apache.thrift.TException {
15463
      // check for required fields
15464
    }
15465
 
15466
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15467
      try {
15468
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15469
      } catch (org.apache.thrift.TException te) {
15470
        throw new java.io.IOException(te);
15471
      }
15472
    }
15473
 
15474
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15475
      try {
15476
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15477
      } catch (org.apache.thrift.TException te) {
15478
        throw new java.io.IOException(te);
15479
      }
15480
    }
15481
 
15482
  }
15483
 
6467 amar.kumar 15484
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15485
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15486
 
15487
    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);
15488
 
15489
    private PurchaseReturn purchaseReturn; // required
15490
 
15491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15492
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15493
      PURCHASE_RETURN((short)1, "purchaseReturn");
15494
 
15495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15496
 
15497
      static {
15498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15499
          byName.put(field.getFieldName(), field);
15500
        }
15501
      }
15502
 
15503
      /**
15504
       * Find the _Fields constant that matches fieldId, or null if its not found.
15505
       */
15506
      public static _Fields findByThriftId(int fieldId) {
15507
        switch(fieldId) {
15508
          case 1: // PURCHASE_RETURN
15509
            return PURCHASE_RETURN;
15510
          default:
15511
            return null;
15512
        }
15513
      }
15514
 
15515
      /**
15516
       * Find the _Fields constant that matches fieldId, throwing an exception
15517
       * if it is not found.
15518
       */
15519
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15520
        _Fields fields = findByThriftId(fieldId);
15521
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15522
        return fields;
15523
      }
15524
 
15525
      /**
15526
       * Find the _Fields constant that matches name, or null if its not found.
15527
       */
15528
      public static _Fields findByName(String name) {
15529
        return byName.get(name);
15530
      }
15531
 
15532
      private final short _thriftId;
15533
      private final String _fieldName;
15534
 
15535
      _Fields(short thriftId, String fieldName) {
15536
        _thriftId = thriftId;
15537
        _fieldName = fieldName;
15538
      }
15539
 
15540
      public short getThriftFieldId() {
15541
        return _thriftId;
15542
      }
15543
 
15544
      public String getFieldName() {
15545
        return _fieldName;
15546
      }
15547
    }
15548
 
15549
    // isset id assignments
15550
 
15551
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15552
    static {
15553
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15554
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15555
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
15556
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15557
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
15558
    }
15559
 
15560
    public createPurchaseReturn_args() {
15561
    }
15562
 
15563
    public createPurchaseReturn_args(
15564
      PurchaseReturn purchaseReturn)
15565
    {
15566
      this();
15567
      this.purchaseReturn = purchaseReturn;
15568
    }
15569
 
15570
    /**
15571
     * Performs a deep copy on <i>other</i>.
15572
     */
15573
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
15574
      if (other.isSetPurchaseReturn()) {
15575
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
15576
      }
15577
    }
15578
 
15579
    public createPurchaseReturn_args deepCopy() {
15580
      return new createPurchaseReturn_args(this);
15581
    }
15582
 
15583
    @Override
15584
    public void clear() {
15585
      this.purchaseReturn = null;
15586
    }
15587
 
15588
    public PurchaseReturn getPurchaseReturn() {
15589
      return this.purchaseReturn;
15590
    }
15591
 
15592
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
15593
      this.purchaseReturn = purchaseReturn;
15594
    }
15595
 
15596
    public void unsetPurchaseReturn() {
15597
      this.purchaseReturn = null;
15598
    }
15599
 
15600
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
15601
    public boolean isSetPurchaseReturn() {
15602
      return this.purchaseReturn != null;
15603
    }
15604
 
15605
    public void setPurchaseReturnIsSet(boolean value) {
15606
      if (!value) {
15607
        this.purchaseReturn = null;
15608
      }
15609
    }
15610
 
15611
    public void setFieldValue(_Fields field, Object value) {
15612
      switch (field) {
15613
      case PURCHASE_RETURN:
15614
        if (value == null) {
15615
          unsetPurchaseReturn();
15616
        } else {
15617
          setPurchaseReturn((PurchaseReturn)value);
15618
        }
15619
        break;
15620
 
15621
      }
15622
    }
15623
 
15624
    public Object getFieldValue(_Fields field) {
15625
      switch (field) {
15626
      case PURCHASE_RETURN:
15627
        return getPurchaseReturn();
15628
 
15629
      }
15630
      throw new IllegalStateException();
15631
    }
15632
 
15633
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15634
    public boolean isSet(_Fields field) {
15635
      if (field == null) {
15636
        throw new IllegalArgumentException();
15637
      }
15638
 
15639
      switch (field) {
15640
      case PURCHASE_RETURN:
15641
        return isSetPurchaseReturn();
15642
      }
15643
      throw new IllegalStateException();
15644
    }
15645
 
15646
    @Override
15647
    public boolean equals(Object that) {
15648
      if (that == null)
15649
        return false;
15650
      if (that instanceof createPurchaseReturn_args)
15651
        return this.equals((createPurchaseReturn_args)that);
15652
      return false;
15653
    }
15654
 
15655
    public boolean equals(createPurchaseReturn_args that) {
15656
      if (that == null)
15657
        return false;
15658
 
15659
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
15660
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
15661
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
15662
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
15663
          return false;
15664
        if (!this.purchaseReturn.equals(that.purchaseReturn))
15665
          return false;
15666
      }
15667
 
15668
      return true;
15669
    }
15670
 
15671
    @Override
15672
    public int hashCode() {
15673
      return 0;
15674
    }
15675
 
15676
    public int compareTo(createPurchaseReturn_args other) {
15677
      if (!getClass().equals(other.getClass())) {
15678
        return getClass().getName().compareTo(other.getClass().getName());
15679
      }
15680
 
15681
      int lastComparison = 0;
15682
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
15683
 
15684
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
15685
      if (lastComparison != 0) {
15686
        return lastComparison;
15687
      }
15688
      if (isSetPurchaseReturn()) {
15689
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
15690
        if (lastComparison != 0) {
15691
          return lastComparison;
15692
        }
15693
      }
15694
      return 0;
15695
    }
15696
 
15697
    public _Fields fieldForId(int fieldId) {
15698
      return _Fields.findByThriftId(fieldId);
15699
    }
15700
 
15701
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15702
      org.apache.thrift.protocol.TField field;
15703
      iprot.readStructBegin();
15704
      while (true)
15705
      {
15706
        field = iprot.readFieldBegin();
15707
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15708
          break;
15709
        }
15710
        switch (field.id) {
15711
          case 1: // PURCHASE_RETURN
15712
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15713
              this.purchaseReturn = new PurchaseReturn();
15714
              this.purchaseReturn.read(iprot);
15715
            } else { 
15716
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15717
            }
15718
            break;
15719
          default:
15720
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15721
        }
15722
        iprot.readFieldEnd();
15723
      }
15724
      iprot.readStructEnd();
15725
      validate();
15726
    }
15727
 
15728
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15729
      validate();
15730
 
15731
      oprot.writeStructBegin(STRUCT_DESC);
15732
      if (this.purchaseReturn != null) {
15733
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
15734
        this.purchaseReturn.write(oprot);
15735
        oprot.writeFieldEnd();
15736
      }
15737
      oprot.writeFieldStop();
15738
      oprot.writeStructEnd();
15739
    }
15740
 
15741
    @Override
15742
    public String toString() {
15743
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
15744
      boolean first = true;
15745
 
15746
      sb.append("purchaseReturn:");
15747
      if (this.purchaseReturn == null) {
15748
        sb.append("null");
15749
      } else {
15750
        sb.append(this.purchaseReturn);
15751
      }
15752
      first = false;
15753
      sb.append(")");
15754
      return sb.toString();
15755
    }
15756
 
15757
    public void validate() throws org.apache.thrift.TException {
15758
      // check for required fields
15759
    }
15760
 
15761
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15762
      try {
15763
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15764
      } catch (org.apache.thrift.TException te) {
15765
        throw new java.io.IOException(te);
15766
      }
15767
    }
15768
 
15769
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15770
      try {
15771
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15772
      } catch (org.apache.thrift.TException te) {
15773
        throw new java.io.IOException(te);
15774
      }
15775
    }
15776
 
15777
  }
15778
 
15779
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15780
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
15781
 
15782
    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);
15783
 
15784
    private long success; // required
15785
 
15786
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15787
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15788
      SUCCESS((short)0, "success");
15789
 
15790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15791
 
15792
      static {
15793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15794
          byName.put(field.getFieldName(), field);
15795
        }
15796
      }
15797
 
15798
      /**
15799
       * Find the _Fields constant that matches fieldId, or null if its not found.
15800
       */
15801
      public static _Fields findByThriftId(int fieldId) {
15802
        switch(fieldId) {
15803
          case 0: // SUCCESS
15804
            return SUCCESS;
15805
          default:
15806
            return null;
15807
        }
15808
      }
15809
 
15810
      /**
15811
       * Find the _Fields constant that matches fieldId, throwing an exception
15812
       * if it is not found.
15813
       */
15814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15815
        _Fields fields = findByThriftId(fieldId);
15816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15817
        return fields;
15818
      }
15819
 
15820
      /**
15821
       * Find the _Fields constant that matches name, or null if its not found.
15822
       */
15823
      public static _Fields findByName(String name) {
15824
        return byName.get(name);
15825
      }
15826
 
15827
      private final short _thriftId;
15828
      private final String _fieldName;
15829
 
15830
      _Fields(short thriftId, String fieldName) {
15831
        _thriftId = thriftId;
15832
        _fieldName = fieldName;
15833
      }
15834
 
15835
      public short getThriftFieldId() {
15836
        return _thriftId;
15837
      }
15838
 
15839
      public String getFieldName() {
15840
        return _fieldName;
15841
      }
15842
    }
15843
 
15844
    // isset id assignments
15845
    private static final int __SUCCESS_ISSET_ID = 0;
15846
    private BitSet __isset_bit_vector = new BitSet(1);
15847
 
15848
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15849
    static {
15850
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15851
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15852
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15853
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15854
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
15855
    }
15856
 
15857
    public createPurchaseReturn_result() {
15858
    }
15859
 
15860
    public createPurchaseReturn_result(
15861
      long success)
15862
    {
15863
      this();
15864
      this.success = success;
15865
      setSuccessIsSet(true);
15866
    }
15867
 
15868
    /**
15869
     * Performs a deep copy on <i>other</i>.
15870
     */
15871
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
15872
      __isset_bit_vector.clear();
15873
      __isset_bit_vector.or(other.__isset_bit_vector);
15874
      this.success = other.success;
15875
    }
15876
 
15877
    public createPurchaseReturn_result deepCopy() {
15878
      return new createPurchaseReturn_result(this);
15879
    }
15880
 
15881
    @Override
15882
    public void clear() {
15883
      setSuccessIsSet(false);
15884
      this.success = 0;
15885
    }
15886
 
15887
    public long getSuccess() {
15888
      return this.success;
15889
    }
15890
 
15891
    public void setSuccess(long success) {
15892
      this.success = success;
15893
      setSuccessIsSet(true);
15894
    }
15895
 
15896
    public void unsetSuccess() {
15897
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15898
    }
15899
 
15900
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15901
    public boolean isSetSuccess() {
15902
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15903
    }
15904
 
15905
    public void setSuccessIsSet(boolean value) {
15906
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15907
    }
15908
 
15909
    public void setFieldValue(_Fields field, Object value) {
15910
      switch (field) {
15911
      case SUCCESS:
15912
        if (value == null) {
15913
          unsetSuccess();
15914
        } else {
15915
          setSuccess((Long)value);
15916
        }
15917
        break;
15918
 
15919
      }
15920
    }
15921
 
15922
    public Object getFieldValue(_Fields field) {
15923
      switch (field) {
15924
      case SUCCESS:
15925
        return Long.valueOf(getSuccess());
15926
 
15927
      }
15928
      throw new IllegalStateException();
15929
    }
15930
 
15931
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15932
    public boolean isSet(_Fields field) {
15933
      if (field == null) {
15934
        throw new IllegalArgumentException();
15935
      }
15936
 
15937
      switch (field) {
15938
      case SUCCESS:
15939
        return isSetSuccess();
15940
      }
15941
      throw new IllegalStateException();
15942
    }
15943
 
15944
    @Override
15945
    public boolean equals(Object that) {
15946
      if (that == null)
15947
        return false;
15948
      if (that instanceof createPurchaseReturn_result)
15949
        return this.equals((createPurchaseReturn_result)that);
15950
      return false;
15951
    }
15952
 
15953
    public boolean equals(createPurchaseReturn_result that) {
15954
      if (that == null)
15955
        return false;
15956
 
15957
      boolean this_present_success = true;
15958
      boolean that_present_success = true;
15959
      if (this_present_success || that_present_success) {
15960
        if (!(this_present_success && that_present_success))
15961
          return false;
15962
        if (this.success != that.success)
15963
          return false;
15964
      }
15965
 
15966
      return true;
15967
    }
15968
 
15969
    @Override
15970
    public int hashCode() {
15971
      return 0;
15972
    }
15973
 
15974
    public int compareTo(createPurchaseReturn_result other) {
15975
      if (!getClass().equals(other.getClass())) {
15976
        return getClass().getName().compareTo(other.getClass().getName());
15977
      }
15978
 
15979
      int lastComparison = 0;
15980
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
15981
 
15982
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15983
      if (lastComparison != 0) {
15984
        return lastComparison;
15985
      }
15986
      if (isSetSuccess()) {
15987
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15988
        if (lastComparison != 0) {
15989
          return lastComparison;
15990
        }
15991
      }
15992
      return 0;
15993
    }
15994
 
15995
    public _Fields fieldForId(int fieldId) {
15996
      return _Fields.findByThriftId(fieldId);
15997
    }
15998
 
15999
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16000
      org.apache.thrift.protocol.TField field;
16001
      iprot.readStructBegin();
16002
      while (true)
16003
      {
16004
        field = iprot.readFieldBegin();
16005
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16006
          break;
16007
        }
16008
        switch (field.id) {
16009
          case 0: // SUCCESS
16010
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16011
              this.success = iprot.readI64();
16012
              setSuccessIsSet(true);
16013
            } else { 
16014
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16015
            }
16016
            break;
16017
          default:
16018
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16019
        }
16020
        iprot.readFieldEnd();
16021
      }
16022
      iprot.readStructEnd();
16023
      validate();
16024
    }
16025
 
16026
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16027
      oprot.writeStructBegin(STRUCT_DESC);
16028
 
16029
      if (this.isSetSuccess()) {
16030
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16031
        oprot.writeI64(this.success);
16032
        oprot.writeFieldEnd();
16033
      }
16034
      oprot.writeFieldStop();
16035
      oprot.writeStructEnd();
16036
    }
16037
 
16038
    @Override
16039
    public String toString() {
16040
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
16041
      boolean first = true;
16042
 
16043
      sb.append("success:");
16044
      sb.append(this.success);
16045
      first = false;
16046
      sb.append(")");
16047
      return sb.toString();
16048
    }
16049
 
16050
    public void validate() throws org.apache.thrift.TException {
16051
      // check for required fields
16052
    }
16053
 
16054
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16055
      try {
16056
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16057
      } catch (org.apache.thrift.TException te) {
16058
        throw new java.io.IOException(te);
16059
      }
16060
    }
16061
 
16062
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16063
      try {
16064
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16065
      } catch (org.apache.thrift.TException te) {
16066
        throw new java.io.IOException(te);
16067
      }
16068
    }
16069
 
16070
  }
16071
 
16072
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
16073
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
16074
 
16075
    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);
16076
 
16077
    private long id; // required
16078
 
16079
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16080
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16081
      ID((short)1, "id");
16082
 
16083
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16084
 
16085
      static {
16086
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16087
          byName.put(field.getFieldName(), field);
16088
        }
16089
      }
16090
 
16091
      /**
16092
       * Find the _Fields constant that matches fieldId, or null if its not found.
16093
       */
16094
      public static _Fields findByThriftId(int fieldId) {
16095
        switch(fieldId) {
16096
          case 1: // ID
16097
            return ID;
16098
          default:
16099
            return null;
16100
        }
16101
      }
16102
 
16103
      /**
16104
       * Find the _Fields constant that matches fieldId, throwing an exception
16105
       * if it is not found.
16106
       */
16107
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16108
        _Fields fields = findByThriftId(fieldId);
16109
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16110
        return fields;
16111
      }
16112
 
16113
      /**
16114
       * Find the _Fields constant that matches name, or null if its not found.
16115
       */
16116
      public static _Fields findByName(String name) {
16117
        return byName.get(name);
16118
      }
16119
 
16120
      private final short _thriftId;
16121
      private final String _fieldName;
16122
 
16123
      _Fields(short thriftId, String fieldName) {
16124
        _thriftId = thriftId;
16125
        _fieldName = fieldName;
16126
      }
16127
 
16128
      public short getThriftFieldId() {
16129
        return _thriftId;
16130
      }
16131
 
16132
      public String getFieldName() {
16133
        return _fieldName;
16134
      }
16135
    }
16136
 
16137
    // isset id assignments
16138
    private static final int __ID_ISSET_ID = 0;
16139
    private BitSet __isset_bit_vector = new BitSet(1);
16140
 
16141
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16142
    static {
16143
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16144
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16145
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16146
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16147
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
16148
    }
16149
 
16150
    public settlePurchaseReturn_args() {
16151
    }
16152
 
16153
    public settlePurchaseReturn_args(
16154
      long id)
16155
    {
16156
      this();
16157
      this.id = id;
16158
      setIdIsSet(true);
16159
    }
16160
 
16161
    /**
16162
     * Performs a deep copy on <i>other</i>.
16163
     */
16164
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
16165
      __isset_bit_vector.clear();
16166
      __isset_bit_vector.or(other.__isset_bit_vector);
16167
      this.id = other.id;
16168
    }
16169
 
16170
    public settlePurchaseReturn_args deepCopy() {
16171
      return new settlePurchaseReturn_args(this);
16172
    }
16173
 
16174
    @Override
16175
    public void clear() {
16176
      setIdIsSet(false);
16177
      this.id = 0;
16178
    }
16179
 
16180
    public long getId() {
16181
      return this.id;
16182
    }
16183
 
16184
    public void setId(long id) {
16185
      this.id = id;
16186
      setIdIsSet(true);
16187
    }
16188
 
16189
    public void unsetId() {
16190
      __isset_bit_vector.clear(__ID_ISSET_ID);
16191
    }
16192
 
16193
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16194
    public boolean isSetId() {
16195
      return __isset_bit_vector.get(__ID_ISSET_ID);
16196
    }
16197
 
16198
    public void setIdIsSet(boolean value) {
16199
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16200
    }
16201
 
16202
    public void setFieldValue(_Fields field, Object value) {
16203
      switch (field) {
16204
      case ID:
16205
        if (value == null) {
16206
          unsetId();
16207
        } else {
16208
          setId((Long)value);
16209
        }
16210
        break;
16211
 
16212
      }
16213
    }
16214
 
16215
    public Object getFieldValue(_Fields field) {
16216
      switch (field) {
16217
      case ID:
16218
        return Long.valueOf(getId());
16219
 
16220
      }
16221
      throw new IllegalStateException();
16222
    }
16223
 
16224
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16225
    public boolean isSet(_Fields field) {
16226
      if (field == null) {
16227
        throw new IllegalArgumentException();
16228
      }
16229
 
16230
      switch (field) {
16231
      case ID:
16232
        return isSetId();
16233
      }
16234
      throw new IllegalStateException();
16235
    }
16236
 
16237
    @Override
16238
    public boolean equals(Object that) {
16239
      if (that == null)
16240
        return false;
16241
      if (that instanceof settlePurchaseReturn_args)
16242
        return this.equals((settlePurchaseReturn_args)that);
16243
      return false;
16244
    }
16245
 
16246
    public boolean equals(settlePurchaseReturn_args that) {
16247
      if (that == null)
16248
        return false;
16249
 
16250
      boolean this_present_id = true;
16251
      boolean that_present_id = true;
16252
      if (this_present_id || that_present_id) {
16253
        if (!(this_present_id && that_present_id))
16254
          return false;
16255
        if (this.id != that.id)
16256
          return false;
16257
      }
16258
 
16259
      return true;
16260
    }
16261
 
16262
    @Override
16263
    public int hashCode() {
16264
      return 0;
16265
    }
16266
 
16267
    public int compareTo(settlePurchaseReturn_args other) {
16268
      if (!getClass().equals(other.getClass())) {
16269
        return getClass().getName().compareTo(other.getClass().getName());
16270
      }
16271
 
16272
      int lastComparison = 0;
16273
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16274
 
16275
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16276
      if (lastComparison != 0) {
16277
        return lastComparison;
16278
      }
16279
      if (isSetId()) {
16280
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16281
        if (lastComparison != 0) {
16282
          return lastComparison;
16283
        }
16284
      }
16285
      return 0;
16286
    }
16287
 
16288
    public _Fields fieldForId(int fieldId) {
16289
      return _Fields.findByThriftId(fieldId);
16290
    }
16291
 
16292
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16293
      org.apache.thrift.protocol.TField field;
16294
      iprot.readStructBegin();
16295
      while (true)
16296
      {
16297
        field = iprot.readFieldBegin();
16298
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16299
          break;
16300
        }
16301
        switch (field.id) {
16302
          case 1: // ID
16303
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16304
              this.id = iprot.readI64();
16305
              setIdIsSet(true);
16306
            } else { 
16307
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16308
            }
16309
            break;
16310
          default:
16311
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16312
        }
16313
        iprot.readFieldEnd();
16314
      }
16315
      iprot.readStructEnd();
16316
      validate();
16317
    }
16318
 
16319
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16320
      validate();
16321
 
16322
      oprot.writeStructBegin(STRUCT_DESC);
16323
      oprot.writeFieldBegin(ID_FIELD_DESC);
16324
      oprot.writeI64(this.id);
16325
      oprot.writeFieldEnd();
16326
      oprot.writeFieldStop();
16327
      oprot.writeStructEnd();
16328
    }
16329
 
16330
    @Override
16331
    public String toString() {
16332
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16333
      boolean first = true;
16334
 
16335
      sb.append("id:");
16336
      sb.append(this.id);
16337
      first = false;
16338
      sb.append(")");
16339
      return sb.toString();
16340
    }
16341
 
16342
    public void validate() throws org.apache.thrift.TException {
16343
      // check for required fields
16344
    }
16345
 
16346
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16347
      try {
16348
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16349
      } catch (org.apache.thrift.TException te) {
16350
        throw new java.io.IOException(te);
16351
      }
16352
    }
16353
 
16354
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16355
      try {
16356
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16357
        __isset_bit_vector = new BitSet(1);
16358
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16359
      } catch (org.apache.thrift.TException te) {
16360
        throw new java.io.IOException(te);
16361
      }
16362
    }
16363
 
16364
  }
16365
 
16366
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16367
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16368
 
16369
 
16370
 
16371
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16372
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16373
;
16374
 
16375
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16376
 
16377
      static {
16378
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16379
          byName.put(field.getFieldName(), field);
16380
        }
16381
      }
16382
 
16383
      /**
16384
       * Find the _Fields constant that matches fieldId, or null if its not found.
16385
       */
16386
      public static _Fields findByThriftId(int fieldId) {
16387
        switch(fieldId) {
16388
          default:
16389
            return null;
16390
        }
16391
      }
16392
 
16393
      /**
16394
       * Find the _Fields constant that matches fieldId, throwing an exception
16395
       * if it is not found.
16396
       */
16397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16398
        _Fields fields = findByThriftId(fieldId);
16399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16400
        return fields;
16401
      }
16402
 
16403
      /**
16404
       * Find the _Fields constant that matches name, or null if its not found.
16405
       */
16406
      public static _Fields findByName(String name) {
16407
        return byName.get(name);
16408
      }
16409
 
16410
      private final short _thriftId;
16411
      private final String _fieldName;
16412
 
16413
      _Fields(short thriftId, String fieldName) {
16414
        _thriftId = thriftId;
16415
        _fieldName = fieldName;
16416
      }
16417
 
16418
      public short getThriftFieldId() {
16419
        return _thriftId;
16420
      }
16421
 
16422
      public String getFieldName() {
16423
        return _fieldName;
16424
      }
16425
    }
16426
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16427
    static {
16428
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16429
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16430
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16431
    }
16432
 
16433
    public settlePurchaseReturn_result() {
16434
    }
16435
 
16436
    /**
16437
     * Performs a deep copy on <i>other</i>.
16438
     */
16439
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16440
    }
16441
 
16442
    public settlePurchaseReturn_result deepCopy() {
16443
      return new settlePurchaseReturn_result(this);
16444
    }
16445
 
16446
    @Override
16447
    public void clear() {
16448
    }
16449
 
16450
    public void setFieldValue(_Fields field, Object value) {
16451
      switch (field) {
16452
      }
16453
    }
16454
 
16455
    public Object getFieldValue(_Fields field) {
16456
      switch (field) {
16457
      }
16458
      throw new IllegalStateException();
16459
    }
16460
 
16461
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16462
    public boolean isSet(_Fields field) {
16463
      if (field == null) {
16464
        throw new IllegalArgumentException();
16465
      }
16466
 
16467
      switch (field) {
16468
      }
16469
      throw new IllegalStateException();
16470
    }
16471
 
16472
    @Override
16473
    public boolean equals(Object that) {
16474
      if (that == null)
16475
        return false;
16476
      if (that instanceof settlePurchaseReturn_result)
16477
        return this.equals((settlePurchaseReturn_result)that);
16478
      return false;
16479
    }
16480
 
16481
    public boolean equals(settlePurchaseReturn_result that) {
16482
      if (that == null)
16483
        return false;
16484
 
16485
      return true;
16486
    }
16487
 
16488
    @Override
16489
    public int hashCode() {
16490
      return 0;
16491
    }
16492
 
16493
    public int compareTo(settlePurchaseReturn_result other) {
16494
      if (!getClass().equals(other.getClass())) {
16495
        return getClass().getName().compareTo(other.getClass().getName());
16496
      }
16497
 
16498
      int lastComparison = 0;
16499
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16500
 
16501
      return 0;
16502
    }
16503
 
16504
    public _Fields fieldForId(int fieldId) {
16505
      return _Fields.findByThriftId(fieldId);
16506
    }
16507
 
16508
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16509
      org.apache.thrift.protocol.TField field;
16510
      iprot.readStructBegin();
16511
      while (true)
16512
      {
16513
        field = iprot.readFieldBegin();
16514
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16515
          break;
16516
        }
16517
        switch (field.id) {
16518
          default:
16519
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16520
        }
16521
        iprot.readFieldEnd();
16522
      }
16523
      iprot.readStructEnd();
16524
      validate();
16525
    }
16526
 
16527
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16528
      oprot.writeStructBegin(STRUCT_DESC);
16529
 
16530
      oprot.writeFieldStop();
16531
      oprot.writeStructEnd();
16532
    }
16533
 
16534
    @Override
16535
    public String toString() {
16536
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16537
      boolean first = true;
16538
 
16539
      sb.append(")");
16540
      return sb.toString();
16541
    }
16542
 
16543
    public void validate() throws org.apache.thrift.TException {
16544
      // check for required fields
16545
    }
16546
 
16547
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16548
      try {
16549
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16550
      } catch (org.apache.thrift.TException te) {
16551
        throw new java.io.IOException(te);
16552
      }
16553
    }
16554
 
16555
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16556
      try {
16557
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16558
      } catch (org.apache.thrift.TException te) {
16559
        throw new java.io.IOException(te);
16560
      }
16561
    }
16562
 
16563
  }
16564
 
16565
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
16566
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
16567
 
16568
 
16569
 
16570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16571
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16572
;
16573
 
16574
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16575
 
16576
      static {
16577
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16578
          byName.put(field.getFieldName(), field);
16579
        }
16580
      }
16581
 
16582
      /**
16583
       * Find the _Fields constant that matches fieldId, or null if its not found.
16584
       */
16585
      public static _Fields findByThriftId(int fieldId) {
16586
        switch(fieldId) {
16587
          default:
16588
            return null;
16589
        }
16590
      }
16591
 
16592
      /**
16593
       * Find the _Fields constant that matches fieldId, throwing an exception
16594
       * if it is not found.
16595
       */
16596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16597
        _Fields fields = findByThriftId(fieldId);
16598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16599
        return fields;
16600
      }
16601
 
16602
      /**
16603
       * Find the _Fields constant that matches name, or null if its not found.
16604
       */
16605
      public static _Fields findByName(String name) {
16606
        return byName.get(name);
16607
      }
16608
 
16609
      private final short _thriftId;
16610
      private final String _fieldName;
16611
 
16612
      _Fields(short thriftId, String fieldName) {
16613
        _thriftId = thriftId;
16614
        _fieldName = fieldName;
16615
      }
16616
 
16617
      public short getThriftFieldId() {
16618
        return _thriftId;
16619
      }
16620
 
16621
      public String getFieldName() {
16622
        return _fieldName;
16623
      }
16624
    }
16625
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16626
    static {
16627
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16628
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16629
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
16630
    }
16631
 
16632
    public getUnsettledPurchaseReturns_args() {
16633
    }
16634
 
16635
    /**
16636
     * Performs a deep copy on <i>other</i>.
16637
     */
16638
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
16639
    }
16640
 
16641
    public getUnsettledPurchaseReturns_args deepCopy() {
16642
      return new getUnsettledPurchaseReturns_args(this);
16643
    }
16644
 
16645
    @Override
16646
    public void clear() {
16647
    }
16648
 
16649
    public void setFieldValue(_Fields field, Object value) {
16650
      switch (field) {
16651
      }
16652
    }
16653
 
16654
    public Object getFieldValue(_Fields field) {
16655
      switch (field) {
16656
      }
16657
      throw new IllegalStateException();
16658
    }
16659
 
16660
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16661
    public boolean isSet(_Fields field) {
16662
      if (field == null) {
16663
        throw new IllegalArgumentException();
16664
      }
16665
 
16666
      switch (field) {
16667
      }
16668
      throw new IllegalStateException();
16669
    }
16670
 
16671
    @Override
16672
    public boolean equals(Object that) {
16673
      if (that == null)
16674
        return false;
16675
      if (that instanceof getUnsettledPurchaseReturns_args)
16676
        return this.equals((getUnsettledPurchaseReturns_args)that);
16677
      return false;
16678
    }
16679
 
16680
    public boolean equals(getUnsettledPurchaseReturns_args that) {
16681
      if (that == null)
16682
        return false;
16683
 
16684
      return true;
16685
    }
16686
 
16687
    @Override
16688
    public int hashCode() {
16689
      return 0;
16690
    }
16691
 
16692
    public int compareTo(getUnsettledPurchaseReturns_args other) {
16693
      if (!getClass().equals(other.getClass())) {
16694
        return getClass().getName().compareTo(other.getClass().getName());
16695
      }
16696
 
16697
      int lastComparison = 0;
16698
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
16699
 
16700
      return 0;
16701
    }
16702
 
16703
    public _Fields fieldForId(int fieldId) {
16704
      return _Fields.findByThriftId(fieldId);
16705
    }
16706
 
16707
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16708
      org.apache.thrift.protocol.TField field;
16709
      iprot.readStructBegin();
16710
      while (true)
16711
      {
16712
        field = iprot.readFieldBegin();
16713
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16714
          break;
16715
        }
16716
        switch (field.id) {
16717
          default:
16718
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16719
        }
16720
        iprot.readFieldEnd();
16721
      }
16722
      iprot.readStructEnd();
16723
      validate();
16724
    }
16725
 
16726
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16727
      validate();
16728
 
16729
      oprot.writeStructBegin(STRUCT_DESC);
16730
      oprot.writeFieldStop();
16731
      oprot.writeStructEnd();
16732
    }
16733
 
16734
    @Override
16735
    public String toString() {
16736
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
16737
      boolean first = true;
16738
 
16739
      sb.append(")");
16740
      return sb.toString();
16741
    }
16742
 
16743
    public void validate() throws org.apache.thrift.TException {
16744
      // check for required fields
16745
    }
16746
 
16747
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16748
      try {
16749
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16750
      } catch (org.apache.thrift.TException te) {
16751
        throw new java.io.IOException(te);
16752
      }
16753
    }
16754
 
16755
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16756
      try {
16757
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16758
      } catch (org.apache.thrift.TException te) {
16759
        throw new java.io.IOException(te);
16760
      }
16761
    }
16762
 
16763
  }
16764
 
16765
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
16766
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
16767
 
16768
    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);
16769
 
16770
    private List<PurchaseReturn> success; // required
16771
 
16772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16773
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16774
      SUCCESS((short)0, "success");
16775
 
16776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16777
 
16778
      static {
16779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16780
          byName.put(field.getFieldName(), field);
16781
        }
16782
      }
16783
 
16784
      /**
16785
       * Find the _Fields constant that matches fieldId, or null if its not found.
16786
       */
16787
      public static _Fields findByThriftId(int fieldId) {
16788
        switch(fieldId) {
16789
          case 0: // SUCCESS
16790
            return SUCCESS;
16791
          default:
16792
            return null;
16793
        }
16794
      }
16795
 
16796
      /**
16797
       * Find the _Fields constant that matches fieldId, throwing an exception
16798
       * if it is not found.
16799
       */
16800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16801
        _Fields fields = findByThriftId(fieldId);
16802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16803
        return fields;
16804
      }
16805
 
16806
      /**
16807
       * Find the _Fields constant that matches name, or null if its not found.
16808
       */
16809
      public static _Fields findByName(String name) {
16810
        return byName.get(name);
16811
      }
16812
 
16813
      private final short _thriftId;
16814
      private final String _fieldName;
16815
 
16816
      _Fields(short thriftId, String fieldName) {
16817
        _thriftId = thriftId;
16818
        _fieldName = fieldName;
16819
      }
16820
 
16821
      public short getThriftFieldId() {
16822
        return _thriftId;
16823
      }
16824
 
16825
      public String getFieldName() {
16826
        return _fieldName;
16827
      }
16828
    }
16829
 
16830
    // isset id assignments
16831
 
16832
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16833
    static {
16834
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16835
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16836
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16837
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16838
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16839
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
16840
    }
16841
 
16842
    public getUnsettledPurchaseReturns_result() {
16843
    }
16844
 
16845
    public getUnsettledPurchaseReturns_result(
16846
      List<PurchaseReturn> success)
16847
    {
16848
      this();
16849
      this.success = success;
16850
    }
16851
 
16852
    /**
16853
     * Performs a deep copy on <i>other</i>.
16854
     */
16855
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
16856
      if (other.isSetSuccess()) {
16857
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16858
        for (PurchaseReturn other_element : other.success) {
16859
          __this__success.add(new PurchaseReturn(other_element));
16860
        }
16861
        this.success = __this__success;
16862
      }
16863
    }
16864
 
16865
    public getUnsettledPurchaseReturns_result deepCopy() {
16866
      return new getUnsettledPurchaseReturns_result(this);
16867
    }
16868
 
16869
    @Override
16870
    public void clear() {
16871
      this.success = null;
16872
    }
16873
 
16874
    public int getSuccessSize() {
16875
      return (this.success == null) ? 0 : this.success.size();
16876
    }
16877
 
16878
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16879
      return (this.success == null) ? null : this.success.iterator();
16880
    }
16881
 
16882
    public void addToSuccess(PurchaseReturn elem) {
16883
      if (this.success == null) {
16884
        this.success = new ArrayList<PurchaseReturn>();
16885
      }
16886
      this.success.add(elem);
16887
    }
16888
 
16889
    public List<PurchaseReturn> getSuccess() {
16890
      return this.success;
16891
    }
16892
 
16893
    public void setSuccess(List<PurchaseReturn> success) {
16894
      this.success = success;
16895
    }
16896
 
16897
    public void unsetSuccess() {
16898
      this.success = null;
16899
    }
16900
 
16901
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16902
    public boolean isSetSuccess() {
16903
      return this.success != null;
16904
    }
16905
 
16906
    public void setSuccessIsSet(boolean value) {
16907
      if (!value) {
16908
        this.success = null;
16909
      }
16910
    }
16911
 
16912
    public void setFieldValue(_Fields field, Object value) {
16913
      switch (field) {
16914
      case SUCCESS:
16915
        if (value == null) {
16916
          unsetSuccess();
16917
        } else {
16918
          setSuccess((List<PurchaseReturn>)value);
16919
        }
16920
        break;
16921
 
16922
      }
16923
    }
16924
 
16925
    public Object getFieldValue(_Fields field) {
16926
      switch (field) {
16927
      case SUCCESS:
16928
        return getSuccess();
16929
 
16930
      }
16931
      throw new IllegalStateException();
16932
    }
16933
 
16934
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16935
    public boolean isSet(_Fields field) {
16936
      if (field == null) {
16937
        throw new IllegalArgumentException();
16938
      }
16939
 
16940
      switch (field) {
16941
      case SUCCESS:
16942
        return isSetSuccess();
16943
      }
16944
      throw new IllegalStateException();
16945
    }
16946
 
16947
    @Override
16948
    public boolean equals(Object that) {
16949
      if (that == null)
16950
        return false;
16951
      if (that instanceof getUnsettledPurchaseReturns_result)
16952
        return this.equals((getUnsettledPurchaseReturns_result)that);
16953
      return false;
16954
    }
16955
 
16956
    public boolean equals(getUnsettledPurchaseReturns_result that) {
16957
      if (that == null)
16958
        return false;
16959
 
16960
      boolean this_present_success = true && this.isSetSuccess();
16961
      boolean that_present_success = true && that.isSetSuccess();
16962
      if (this_present_success || that_present_success) {
16963
        if (!(this_present_success && that_present_success))
16964
          return false;
16965
        if (!this.success.equals(that.success))
16966
          return false;
16967
      }
16968
 
16969
      return true;
16970
    }
16971
 
16972
    @Override
16973
    public int hashCode() {
16974
      return 0;
16975
    }
16976
 
16977
    public int compareTo(getUnsettledPurchaseReturns_result other) {
16978
      if (!getClass().equals(other.getClass())) {
16979
        return getClass().getName().compareTo(other.getClass().getName());
16980
      }
16981
 
16982
      int lastComparison = 0;
16983
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
16984
 
16985
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16986
      if (lastComparison != 0) {
16987
        return lastComparison;
16988
      }
16989
      if (isSetSuccess()) {
16990
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16991
        if (lastComparison != 0) {
16992
          return lastComparison;
16993
        }
16994
      }
16995
      return 0;
16996
    }
16997
 
16998
    public _Fields fieldForId(int fieldId) {
16999
      return _Fields.findByThriftId(fieldId);
17000
    }
17001
 
17002
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17003
      org.apache.thrift.protocol.TField field;
17004
      iprot.readStructBegin();
17005
      while (true)
17006
      {
17007
        field = iprot.readFieldBegin();
17008
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17009
          break;
17010
        }
17011
        switch (field.id) {
17012
          case 0: // SUCCESS
17013
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17014
              {
7410 amar.kumar 17015
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
17016
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
17017
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 17018
                {
7410 amar.kumar 17019
                  PurchaseReturn _elem34; // required
17020
                  _elem34 = new PurchaseReturn();
17021
                  _elem34.read(iprot);
17022
                  this.success.add(_elem34);
6467 amar.kumar 17023
                }
17024
                iprot.readListEnd();
17025
              }
17026
            } else { 
17027
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17028
            }
17029
            break;
17030
          default:
17031
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17032
        }
17033
        iprot.readFieldEnd();
17034
      }
17035
      iprot.readStructEnd();
17036
      validate();
17037
    }
17038
 
17039
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17040
      oprot.writeStructBegin(STRUCT_DESC);
17041
 
17042
      if (this.isSetSuccess()) {
17043
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17044
        {
17045
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17046
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 17047
          {
7410 amar.kumar 17048
            _iter35.write(oprot);
6467 amar.kumar 17049
          }
17050
          oprot.writeListEnd();
17051
        }
17052
        oprot.writeFieldEnd();
17053
      }
17054
      oprot.writeFieldStop();
17055
      oprot.writeStructEnd();
17056
    }
17057
 
17058
    @Override
17059
    public String toString() {
17060
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
17061
      boolean first = true;
17062
 
17063
      sb.append("success:");
17064
      if (this.success == null) {
17065
        sb.append("null");
17066
      } else {
17067
        sb.append(this.success);
17068
      }
17069
      first = false;
17070
      sb.append(")");
17071
      return sb.toString();
17072
    }
17073
 
17074
    public void validate() throws org.apache.thrift.TException {
17075
      // check for required fields
17076
    }
17077
 
17078
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17079
      try {
17080
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17081
      } catch (org.apache.thrift.TException te) {
17082
        throw new java.io.IOException(te);
17083
      }
17084
    }
17085
 
17086
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17087
      try {
17088
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17089
      } catch (org.apache.thrift.TException te) {
17090
        throw new java.io.IOException(te);
17091
      }
17092
    }
17093
 
17094
  }
17095
 
6630 amar.kumar 17096
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
17097
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
17098
 
17099
    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);
17100
    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);
17101
 
17102
    private String invoiceNumber; // required
17103
    private long supplierId; // required
17104
 
17105
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17106
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17107
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17108
      SUPPLIER_ID((short)2, "supplierId");
17109
 
17110
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17111
 
17112
      static {
17113
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17114
          byName.put(field.getFieldName(), field);
17115
        }
17116
      }
17117
 
17118
      /**
17119
       * Find the _Fields constant that matches fieldId, or null if its not found.
17120
       */
17121
      public static _Fields findByThriftId(int fieldId) {
17122
        switch(fieldId) {
17123
          case 1: // INVOICE_NUMBER
17124
            return INVOICE_NUMBER;
17125
          case 2: // SUPPLIER_ID
17126
            return SUPPLIER_ID;
17127
          default:
17128
            return null;
17129
        }
17130
      }
17131
 
17132
      /**
17133
       * Find the _Fields constant that matches fieldId, throwing an exception
17134
       * if it is not found.
17135
       */
17136
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17137
        _Fields fields = findByThriftId(fieldId);
17138
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17139
        return fields;
17140
      }
17141
 
17142
      /**
17143
       * Find the _Fields constant that matches name, or null if its not found.
17144
       */
17145
      public static _Fields findByName(String name) {
17146
        return byName.get(name);
17147
      }
17148
 
17149
      private final short _thriftId;
17150
      private final String _fieldName;
17151
 
17152
      _Fields(short thriftId, String fieldName) {
17153
        _thriftId = thriftId;
17154
        _fieldName = fieldName;
17155
      }
17156
 
17157
      public short getThriftFieldId() {
17158
        return _thriftId;
17159
      }
17160
 
17161
      public String getFieldName() {
17162
        return _fieldName;
17163
      }
17164
    }
17165
 
17166
    // isset id assignments
17167
    private static final int __SUPPLIERID_ISSET_ID = 0;
17168
    private BitSet __isset_bit_vector = new BitSet(1);
17169
 
17170
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17171
    static {
17172
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17173
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17174
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17175
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17176
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17177
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17178
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
17179
    }
17180
 
17181
    public getInvoice_args() {
17182
    }
17183
 
17184
    public getInvoice_args(
17185
      String invoiceNumber,
17186
      long supplierId)
17187
    {
17188
      this();
17189
      this.invoiceNumber = invoiceNumber;
17190
      this.supplierId = supplierId;
17191
      setSupplierIdIsSet(true);
17192
    }
17193
 
17194
    /**
17195
     * Performs a deep copy on <i>other</i>.
17196
     */
17197
    public getInvoice_args(getInvoice_args other) {
17198
      __isset_bit_vector.clear();
17199
      __isset_bit_vector.or(other.__isset_bit_vector);
17200
      if (other.isSetInvoiceNumber()) {
17201
        this.invoiceNumber = other.invoiceNumber;
17202
      }
17203
      this.supplierId = other.supplierId;
17204
    }
17205
 
17206
    public getInvoice_args deepCopy() {
17207
      return new getInvoice_args(this);
17208
    }
17209
 
17210
    @Override
17211
    public void clear() {
17212
      this.invoiceNumber = null;
17213
      setSupplierIdIsSet(false);
17214
      this.supplierId = 0;
17215
    }
17216
 
17217
    public String getInvoiceNumber() {
17218
      return this.invoiceNumber;
17219
    }
17220
 
17221
    public void setInvoiceNumber(String invoiceNumber) {
17222
      this.invoiceNumber = invoiceNumber;
17223
    }
17224
 
17225
    public void unsetInvoiceNumber() {
17226
      this.invoiceNumber = null;
17227
    }
17228
 
17229
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17230
    public boolean isSetInvoiceNumber() {
17231
      return this.invoiceNumber != null;
17232
    }
17233
 
17234
    public void setInvoiceNumberIsSet(boolean value) {
17235
      if (!value) {
17236
        this.invoiceNumber = null;
17237
      }
17238
    }
17239
 
17240
    public long getSupplierId() {
17241
      return this.supplierId;
17242
    }
17243
 
17244
    public void setSupplierId(long supplierId) {
17245
      this.supplierId = supplierId;
17246
      setSupplierIdIsSet(true);
17247
    }
17248
 
17249
    public void unsetSupplierId() {
17250
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17251
    }
17252
 
17253
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17254
    public boolean isSetSupplierId() {
17255
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17256
    }
17257
 
17258
    public void setSupplierIdIsSet(boolean value) {
17259
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17260
    }
17261
 
17262
    public void setFieldValue(_Fields field, Object value) {
17263
      switch (field) {
17264
      case INVOICE_NUMBER:
17265
        if (value == null) {
17266
          unsetInvoiceNumber();
17267
        } else {
17268
          setInvoiceNumber((String)value);
17269
        }
17270
        break;
17271
 
17272
      case SUPPLIER_ID:
17273
        if (value == null) {
17274
          unsetSupplierId();
17275
        } else {
17276
          setSupplierId((Long)value);
17277
        }
17278
        break;
17279
 
17280
      }
17281
    }
17282
 
17283
    public Object getFieldValue(_Fields field) {
17284
      switch (field) {
17285
      case INVOICE_NUMBER:
17286
        return getInvoiceNumber();
17287
 
17288
      case SUPPLIER_ID:
17289
        return Long.valueOf(getSupplierId());
17290
 
17291
      }
17292
      throw new IllegalStateException();
17293
    }
17294
 
17295
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17296
    public boolean isSet(_Fields field) {
17297
      if (field == null) {
17298
        throw new IllegalArgumentException();
17299
      }
17300
 
17301
      switch (field) {
17302
      case INVOICE_NUMBER:
17303
        return isSetInvoiceNumber();
17304
      case SUPPLIER_ID:
17305
        return isSetSupplierId();
17306
      }
17307
      throw new IllegalStateException();
17308
    }
17309
 
17310
    @Override
17311
    public boolean equals(Object that) {
17312
      if (that == null)
17313
        return false;
17314
      if (that instanceof getInvoice_args)
17315
        return this.equals((getInvoice_args)that);
17316
      return false;
17317
    }
17318
 
17319
    public boolean equals(getInvoice_args that) {
17320
      if (that == null)
17321
        return false;
17322
 
17323
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17324
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17325
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17326
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17327
          return false;
17328
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17329
          return false;
17330
      }
17331
 
17332
      boolean this_present_supplierId = true;
17333
      boolean that_present_supplierId = true;
17334
      if (this_present_supplierId || that_present_supplierId) {
17335
        if (!(this_present_supplierId && that_present_supplierId))
17336
          return false;
17337
        if (this.supplierId != that.supplierId)
17338
          return false;
17339
      }
17340
 
17341
      return true;
17342
    }
17343
 
17344
    @Override
17345
    public int hashCode() {
17346
      return 0;
17347
    }
17348
 
17349
    public int compareTo(getInvoice_args other) {
17350
      if (!getClass().equals(other.getClass())) {
17351
        return getClass().getName().compareTo(other.getClass().getName());
17352
      }
17353
 
17354
      int lastComparison = 0;
17355
      getInvoice_args typedOther = (getInvoice_args)other;
17356
 
17357
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17358
      if (lastComparison != 0) {
17359
        return lastComparison;
17360
      }
17361
      if (isSetInvoiceNumber()) {
17362
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17363
        if (lastComparison != 0) {
17364
          return lastComparison;
17365
        }
17366
      }
17367
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17368
      if (lastComparison != 0) {
17369
        return lastComparison;
17370
      }
17371
      if (isSetSupplierId()) {
17372
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17373
        if (lastComparison != 0) {
17374
          return lastComparison;
17375
        }
17376
      }
17377
      return 0;
17378
    }
17379
 
17380
    public _Fields fieldForId(int fieldId) {
17381
      return _Fields.findByThriftId(fieldId);
17382
    }
17383
 
17384
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17385
      org.apache.thrift.protocol.TField field;
17386
      iprot.readStructBegin();
17387
      while (true)
17388
      {
17389
        field = iprot.readFieldBegin();
17390
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17391
          break;
17392
        }
17393
        switch (field.id) {
17394
          case 1: // INVOICE_NUMBER
17395
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17396
              this.invoiceNumber = iprot.readString();
17397
            } else { 
17398
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17399
            }
17400
            break;
17401
          case 2: // SUPPLIER_ID
17402
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17403
              this.supplierId = iprot.readI64();
17404
              setSupplierIdIsSet(true);
17405
            } else { 
17406
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17407
            }
17408
            break;
17409
          default:
17410
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17411
        }
17412
        iprot.readFieldEnd();
17413
      }
17414
      iprot.readStructEnd();
17415
      validate();
17416
    }
17417
 
17418
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17419
      validate();
17420
 
17421
      oprot.writeStructBegin(STRUCT_DESC);
17422
      if (this.invoiceNumber != null) {
17423
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17424
        oprot.writeString(this.invoiceNumber);
17425
        oprot.writeFieldEnd();
17426
      }
17427
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17428
      oprot.writeI64(this.supplierId);
17429
      oprot.writeFieldEnd();
17430
      oprot.writeFieldStop();
17431
      oprot.writeStructEnd();
17432
    }
17433
 
17434
    @Override
17435
    public String toString() {
17436
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17437
      boolean first = true;
17438
 
17439
      sb.append("invoiceNumber:");
17440
      if (this.invoiceNumber == null) {
17441
        sb.append("null");
17442
      } else {
17443
        sb.append(this.invoiceNumber);
17444
      }
17445
      first = false;
17446
      if (!first) sb.append(", ");
17447
      sb.append("supplierId:");
17448
      sb.append(this.supplierId);
17449
      first = false;
17450
      sb.append(")");
17451
      return sb.toString();
17452
    }
17453
 
17454
    public void validate() throws org.apache.thrift.TException {
17455
      // check for required fields
17456
    }
17457
 
17458
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17459
      try {
17460
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17461
      } catch (org.apache.thrift.TException te) {
17462
        throw new java.io.IOException(te);
17463
      }
17464
    }
17465
 
17466
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17467
      try {
17468
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17469
      } catch (org.apache.thrift.TException te) {
17470
        throw new java.io.IOException(te);
17471
      }
17472
    }
17473
 
17474
  }
17475
 
17476
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17477
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17478
 
17479
    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);
17480
 
17481
    private List<PurchaseReturn> success; // required
17482
 
17483
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17484
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17485
      SUCCESS((short)0, "success");
17486
 
17487
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17488
 
17489
      static {
17490
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17491
          byName.put(field.getFieldName(), field);
17492
        }
17493
      }
17494
 
17495
      /**
17496
       * Find the _Fields constant that matches fieldId, or null if its not found.
17497
       */
17498
      public static _Fields findByThriftId(int fieldId) {
17499
        switch(fieldId) {
17500
          case 0: // SUCCESS
17501
            return SUCCESS;
17502
          default:
17503
            return null;
17504
        }
17505
      }
17506
 
17507
      /**
17508
       * Find the _Fields constant that matches fieldId, throwing an exception
17509
       * if it is not found.
17510
       */
17511
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17512
        _Fields fields = findByThriftId(fieldId);
17513
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17514
        return fields;
17515
      }
17516
 
17517
      /**
17518
       * Find the _Fields constant that matches name, or null if its not found.
17519
       */
17520
      public static _Fields findByName(String name) {
17521
        return byName.get(name);
17522
      }
17523
 
17524
      private final short _thriftId;
17525
      private final String _fieldName;
17526
 
17527
      _Fields(short thriftId, String fieldName) {
17528
        _thriftId = thriftId;
17529
        _fieldName = fieldName;
17530
      }
17531
 
17532
      public short getThriftFieldId() {
17533
        return _thriftId;
17534
      }
17535
 
17536
      public String getFieldName() {
17537
        return _fieldName;
17538
      }
17539
    }
17540
 
17541
    // isset id assignments
17542
 
17543
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17544
    static {
17545
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17546
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17547
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17548
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17549
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17550
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17551
    }
17552
 
17553
    public getInvoice_result() {
17554
    }
17555
 
17556
    public getInvoice_result(
17557
      List<PurchaseReturn> success)
17558
    {
17559
      this();
17560
      this.success = success;
17561
    }
17562
 
17563
    /**
17564
     * Performs a deep copy on <i>other</i>.
17565
     */
17566
    public getInvoice_result(getInvoice_result other) {
17567
      if (other.isSetSuccess()) {
17568
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17569
        for (PurchaseReturn other_element : other.success) {
17570
          __this__success.add(new PurchaseReturn(other_element));
17571
        }
17572
        this.success = __this__success;
17573
      }
17574
    }
17575
 
17576
    public getInvoice_result deepCopy() {
17577
      return new getInvoice_result(this);
17578
    }
17579
 
17580
    @Override
17581
    public void clear() {
17582
      this.success = null;
17583
    }
17584
 
17585
    public int getSuccessSize() {
17586
      return (this.success == null) ? 0 : this.success.size();
17587
    }
17588
 
17589
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17590
      return (this.success == null) ? null : this.success.iterator();
17591
    }
17592
 
17593
    public void addToSuccess(PurchaseReturn elem) {
17594
      if (this.success == null) {
17595
        this.success = new ArrayList<PurchaseReturn>();
17596
      }
17597
      this.success.add(elem);
17598
    }
17599
 
17600
    public List<PurchaseReturn> getSuccess() {
17601
      return this.success;
17602
    }
17603
 
17604
    public void setSuccess(List<PurchaseReturn> success) {
17605
      this.success = success;
17606
    }
17607
 
17608
    public void unsetSuccess() {
17609
      this.success = null;
17610
    }
17611
 
17612
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17613
    public boolean isSetSuccess() {
17614
      return this.success != null;
17615
    }
17616
 
17617
    public void setSuccessIsSet(boolean value) {
17618
      if (!value) {
17619
        this.success = null;
17620
      }
17621
    }
17622
 
17623
    public void setFieldValue(_Fields field, Object value) {
17624
      switch (field) {
17625
      case SUCCESS:
17626
        if (value == null) {
17627
          unsetSuccess();
17628
        } else {
17629
          setSuccess((List<PurchaseReturn>)value);
17630
        }
17631
        break;
17632
 
17633
      }
17634
    }
17635
 
17636
    public Object getFieldValue(_Fields field) {
17637
      switch (field) {
17638
      case SUCCESS:
17639
        return getSuccess();
17640
 
17641
      }
17642
      throw new IllegalStateException();
17643
    }
17644
 
17645
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17646
    public boolean isSet(_Fields field) {
17647
      if (field == null) {
17648
        throw new IllegalArgumentException();
17649
      }
17650
 
17651
      switch (field) {
17652
      case SUCCESS:
17653
        return isSetSuccess();
17654
      }
17655
      throw new IllegalStateException();
17656
    }
17657
 
17658
    @Override
17659
    public boolean equals(Object that) {
17660
      if (that == null)
17661
        return false;
17662
      if (that instanceof getInvoice_result)
17663
        return this.equals((getInvoice_result)that);
17664
      return false;
17665
    }
17666
 
17667
    public boolean equals(getInvoice_result that) {
17668
      if (that == null)
17669
        return false;
17670
 
17671
      boolean this_present_success = true && this.isSetSuccess();
17672
      boolean that_present_success = true && that.isSetSuccess();
17673
      if (this_present_success || that_present_success) {
17674
        if (!(this_present_success && that_present_success))
17675
          return false;
17676
        if (!this.success.equals(that.success))
17677
          return false;
17678
      }
17679
 
17680
      return true;
17681
    }
17682
 
17683
    @Override
17684
    public int hashCode() {
17685
      return 0;
17686
    }
17687
 
17688
    public int compareTo(getInvoice_result other) {
17689
      if (!getClass().equals(other.getClass())) {
17690
        return getClass().getName().compareTo(other.getClass().getName());
17691
      }
17692
 
17693
      int lastComparison = 0;
17694
      getInvoice_result typedOther = (getInvoice_result)other;
17695
 
17696
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17697
      if (lastComparison != 0) {
17698
        return lastComparison;
17699
      }
17700
      if (isSetSuccess()) {
17701
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17702
        if (lastComparison != 0) {
17703
          return lastComparison;
17704
        }
17705
      }
17706
      return 0;
17707
    }
17708
 
17709
    public _Fields fieldForId(int fieldId) {
17710
      return _Fields.findByThriftId(fieldId);
17711
    }
17712
 
17713
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17714
      org.apache.thrift.protocol.TField field;
17715
      iprot.readStructBegin();
17716
      while (true)
17717
      {
17718
        field = iprot.readFieldBegin();
17719
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17720
          break;
17721
        }
17722
        switch (field.id) {
17723
          case 0: // SUCCESS
17724
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17725
              {
7410 amar.kumar 17726
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
17727
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
17728
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 17729
                {
7410 amar.kumar 17730
                  PurchaseReturn _elem38; // required
17731
                  _elem38 = new PurchaseReturn();
17732
                  _elem38.read(iprot);
17733
                  this.success.add(_elem38);
6630 amar.kumar 17734
                }
17735
                iprot.readListEnd();
17736
              }
17737
            } else { 
17738
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17739
            }
17740
            break;
17741
          default:
17742
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17743
        }
17744
        iprot.readFieldEnd();
17745
      }
17746
      iprot.readStructEnd();
17747
      validate();
17748
    }
17749
 
17750
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17751
      oprot.writeStructBegin(STRUCT_DESC);
17752
 
17753
      if (this.isSetSuccess()) {
17754
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17755
        {
17756
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17757
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 17758
          {
7410 amar.kumar 17759
            _iter39.write(oprot);
6630 amar.kumar 17760
          }
17761
          oprot.writeListEnd();
17762
        }
17763
        oprot.writeFieldEnd();
17764
      }
17765
      oprot.writeFieldStop();
17766
      oprot.writeStructEnd();
17767
    }
17768
 
17769
    @Override
17770
    public String toString() {
17771
      StringBuilder sb = new StringBuilder("getInvoice_result(");
17772
      boolean first = true;
17773
 
17774
      sb.append("success:");
17775
      if (this.success == null) {
17776
        sb.append("null");
17777
      } else {
17778
        sb.append(this.success);
17779
      }
17780
      first = false;
17781
      sb.append(")");
17782
      return sb.toString();
17783
    }
17784
 
17785
    public void validate() throws org.apache.thrift.TException {
17786
      // check for required fields
17787
    }
17788
 
17789
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17790
      try {
17791
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17792
      } catch (org.apache.thrift.TException te) {
17793
        throw new java.io.IOException(te);
17794
      }
17795
    }
17796
 
17797
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17798
      try {
17799
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17800
      } catch (org.apache.thrift.TException te) {
17801
        throw new java.io.IOException(te);
17802
      }
17803
    }
17804
 
17805
  }
17806
 
6762 amar.kumar 17807
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17808
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
17809
 
17810
    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);
17811
    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 17812
    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);
17813
    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 17814
 
17815
    private String invoiceNumber; // required
17816
    private double unitPrice; // required
7672 rajveer 17817
    private double nlc; // required
6762 amar.kumar 17818
    private long itemId; // required
17819
 
17820
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17821
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17822
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17823
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 17824
      NLC((short)3, "nlc"),
17825
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 17826
 
17827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17828
 
17829
      static {
17830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17831
          byName.put(field.getFieldName(), field);
17832
        }
17833
      }
17834
 
17835
      /**
17836
       * Find the _Fields constant that matches fieldId, or null if its not found.
17837
       */
17838
      public static _Fields findByThriftId(int fieldId) {
17839
        switch(fieldId) {
17840
          case 1: // INVOICE_NUMBER
17841
            return INVOICE_NUMBER;
17842
          case 2: // UNIT_PRICE
17843
            return UNIT_PRICE;
7672 rajveer 17844
          case 3: // NLC
17845
            return NLC;
17846
          case 4: // ITEM_ID
6762 amar.kumar 17847
            return ITEM_ID;
17848
          default:
17849
            return null;
17850
        }
17851
      }
17852
 
17853
      /**
17854
       * Find the _Fields constant that matches fieldId, throwing an exception
17855
       * if it is not found.
17856
       */
17857
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17858
        _Fields fields = findByThriftId(fieldId);
17859
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17860
        return fields;
17861
      }
17862
 
17863
      /**
17864
       * Find the _Fields constant that matches name, or null if its not found.
17865
       */
17866
      public static _Fields findByName(String name) {
17867
        return byName.get(name);
17868
      }
17869
 
17870
      private final short _thriftId;
17871
      private final String _fieldName;
17872
 
17873
      _Fields(short thriftId, String fieldName) {
17874
        _thriftId = thriftId;
17875
        _fieldName = fieldName;
17876
      }
17877
 
17878
      public short getThriftFieldId() {
17879
        return _thriftId;
17880
      }
17881
 
17882
      public String getFieldName() {
17883
        return _fieldName;
17884
      }
17885
    }
17886
 
17887
    // isset id assignments
17888
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 17889
    private static final int __NLC_ISSET_ID = 1;
17890
    private static final int __ITEMID_ISSET_ID = 2;
17891
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 17892
 
17893
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17894
    static {
17895
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17896
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17897
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17898
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17899
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 17900
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17901
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 17902
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17903
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17904
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17905
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
17906
    }
17907
 
17908
    public createPurchaseForOurExtBilling_args() {
17909
    }
17910
 
17911
    public createPurchaseForOurExtBilling_args(
17912
      String invoiceNumber,
17913
      double unitPrice,
7672 rajveer 17914
      double nlc,
6762 amar.kumar 17915
      long itemId)
17916
    {
17917
      this();
17918
      this.invoiceNumber = invoiceNumber;
17919
      this.unitPrice = unitPrice;
17920
      setUnitPriceIsSet(true);
7672 rajveer 17921
      this.nlc = nlc;
17922
      setNlcIsSet(true);
6762 amar.kumar 17923
      this.itemId = itemId;
17924
      setItemIdIsSet(true);
17925
    }
17926
 
17927
    /**
17928
     * Performs a deep copy on <i>other</i>.
17929
     */
17930
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
17931
      __isset_bit_vector.clear();
17932
      __isset_bit_vector.or(other.__isset_bit_vector);
17933
      if (other.isSetInvoiceNumber()) {
17934
        this.invoiceNumber = other.invoiceNumber;
17935
      }
17936
      this.unitPrice = other.unitPrice;
7672 rajveer 17937
      this.nlc = other.nlc;
6762 amar.kumar 17938
      this.itemId = other.itemId;
17939
    }
17940
 
17941
    public createPurchaseForOurExtBilling_args deepCopy() {
17942
      return new createPurchaseForOurExtBilling_args(this);
17943
    }
17944
 
17945
    @Override
17946
    public void clear() {
17947
      this.invoiceNumber = null;
17948
      setUnitPriceIsSet(false);
17949
      this.unitPrice = 0.0;
7672 rajveer 17950
      setNlcIsSet(false);
17951
      this.nlc = 0.0;
6762 amar.kumar 17952
      setItemIdIsSet(false);
17953
      this.itemId = 0;
17954
    }
17955
 
17956
    public String getInvoiceNumber() {
17957
      return this.invoiceNumber;
17958
    }
17959
 
17960
    public void setInvoiceNumber(String invoiceNumber) {
17961
      this.invoiceNumber = invoiceNumber;
17962
    }
17963
 
17964
    public void unsetInvoiceNumber() {
17965
      this.invoiceNumber = null;
17966
    }
17967
 
17968
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17969
    public boolean isSetInvoiceNumber() {
17970
      return this.invoiceNumber != null;
17971
    }
17972
 
17973
    public void setInvoiceNumberIsSet(boolean value) {
17974
      if (!value) {
17975
        this.invoiceNumber = null;
17976
      }
17977
    }
17978
 
17979
    public double getUnitPrice() {
17980
      return this.unitPrice;
17981
    }
17982
 
17983
    public void setUnitPrice(double unitPrice) {
17984
      this.unitPrice = unitPrice;
17985
      setUnitPriceIsSet(true);
17986
    }
17987
 
17988
    public void unsetUnitPrice() {
17989
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
17990
    }
17991
 
17992
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
17993
    public boolean isSetUnitPrice() {
17994
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
17995
    }
17996
 
17997
    public void setUnitPriceIsSet(boolean value) {
17998
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
17999
    }
18000
 
7672 rajveer 18001
    public double getNlc() {
18002
      return this.nlc;
18003
    }
18004
 
18005
    public void setNlc(double nlc) {
18006
      this.nlc = nlc;
18007
      setNlcIsSet(true);
18008
    }
18009
 
18010
    public void unsetNlc() {
18011
      __isset_bit_vector.clear(__NLC_ISSET_ID);
18012
    }
18013
 
18014
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
18015
    public boolean isSetNlc() {
18016
      return __isset_bit_vector.get(__NLC_ISSET_ID);
18017
    }
18018
 
18019
    public void setNlcIsSet(boolean value) {
18020
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
18021
    }
18022
 
6762 amar.kumar 18023
    public long getItemId() {
18024
      return this.itemId;
18025
    }
18026
 
18027
    public void setItemId(long itemId) {
18028
      this.itemId = itemId;
18029
      setItemIdIsSet(true);
18030
    }
18031
 
18032
    public void unsetItemId() {
18033
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18034
    }
18035
 
18036
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18037
    public boolean isSetItemId() {
18038
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18039
    }
18040
 
18041
    public void setItemIdIsSet(boolean value) {
18042
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18043
    }
18044
 
18045
    public void setFieldValue(_Fields field, Object value) {
18046
      switch (field) {
18047
      case INVOICE_NUMBER:
18048
        if (value == null) {
18049
          unsetInvoiceNumber();
18050
        } else {
18051
          setInvoiceNumber((String)value);
18052
        }
18053
        break;
18054
 
18055
      case UNIT_PRICE:
18056
        if (value == null) {
18057
          unsetUnitPrice();
18058
        } else {
18059
          setUnitPrice((Double)value);
18060
        }
18061
        break;
18062
 
7672 rajveer 18063
      case NLC:
18064
        if (value == null) {
18065
          unsetNlc();
18066
        } else {
18067
          setNlc((Double)value);
18068
        }
18069
        break;
18070
 
6762 amar.kumar 18071
      case ITEM_ID:
18072
        if (value == null) {
18073
          unsetItemId();
18074
        } else {
18075
          setItemId((Long)value);
18076
        }
18077
        break;
18078
 
18079
      }
18080
    }
18081
 
18082
    public Object getFieldValue(_Fields field) {
18083
      switch (field) {
18084
      case INVOICE_NUMBER:
18085
        return getInvoiceNumber();
18086
 
18087
      case UNIT_PRICE:
18088
        return Double.valueOf(getUnitPrice());
18089
 
7672 rajveer 18090
      case NLC:
18091
        return Double.valueOf(getNlc());
18092
 
6762 amar.kumar 18093
      case ITEM_ID:
18094
        return Long.valueOf(getItemId());
18095
 
18096
      }
18097
      throw new IllegalStateException();
18098
    }
18099
 
18100
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18101
    public boolean isSet(_Fields field) {
18102
      if (field == null) {
18103
        throw new IllegalArgumentException();
18104
      }
18105
 
18106
      switch (field) {
18107
      case INVOICE_NUMBER:
18108
        return isSetInvoiceNumber();
18109
      case UNIT_PRICE:
18110
        return isSetUnitPrice();
7672 rajveer 18111
      case NLC:
18112
        return isSetNlc();
6762 amar.kumar 18113
      case ITEM_ID:
18114
        return isSetItemId();
18115
      }
18116
      throw new IllegalStateException();
18117
    }
18118
 
18119
    @Override
18120
    public boolean equals(Object that) {
18121
      if (that == null)
18122
        return false;
18123
      if (that instanceof createPurchaseForOurExtBilling_args)
18124
        return this.equals((createPurchaseForOurExtBilling_args)that);
18125
      return false;
18126
    }
18127
 
18128
    public boolean equals(createPurchaseForOurExtBilling_args that) {
18129
      if (that == null)
18130
        return false;
18131
 
18132
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18133
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18134
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18135
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18136
          return false;
18137
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18138
          return false;
18139
      }
18140
 
18141
      boolean this_present_unitPrice = true;
18142
      boolean that_present_unitPrice = true;
18143
      if (this_present_unitPrice || that_present_unitPrice) {
18144
        if (!(this_present_unitPrice && that_present_unitPrice))
18145
          return false;
18146
        if (this.unitPrice != that.unitPrice)
18147
          return false;
18148
      }
18149
 
7672 rajveer 18150
      boolean this_present_nlc = true;
18151
      boolean that_present_nlc = true;
18152
      if (this_present_nlc || that_present_nlc) {
18153
        if (!(this_present_nlc && that_present_nlc))
18154
          return false;
18155
        if (this.nlc != that.nlc)
18156
          return false;
18157
      }
18158
 
6762 amar.kumar 18159
      boolean this_present_itemId = true;
18160
      boolean that_present_itemId = true;
18161
      if (this_present_itemId || that_present_itemId) {
18162
        if (!(this_present_itemId && that_present_itemId))
18163
          return false;
18164
        if (this.itemId != that.itemId)
18165
          return false;
18166
      }
18167
 
18168
      return true;
18169
    }
18170
 
18171
    @Override
18172
    public int hashCode() {
18173
      return 0;
18174
    }
18175
 
18176
    public int compareTo(createPurchaseForOurExtBilling_args other) {
18177
      if (!getClass().equals(other.getClass())) {
18178
        return getClass().getName().compareTo(other.getClass().getName());
18179
      }
18180
 
18181
      int lastComparison = 0;
18182
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18183
 
18184
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18185
      if (lastComparison != 0) {
18186
        return lastComparison;
18187
      }
18188
      if (isSetInvoiceNumber()) {
18189
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18190
        if (lastComparison != 0) {
18191
          return lastComparison;
18192
        }
18193
      }
18194
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18195
      if (lastComparison != 0) {
18196
        return lastComparison;
18197
      }
18198
      if (isSetUnitPrice()) {
18199
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18200
        if (lastComparison != 0) {
18201
          return lastComparison;
18202
        }
18203
      }
7672 rajveer 18204
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18205
      if (lastComparison != 0) {
18206
        return lastComparison;
18207
      }
18208
      if (isSetNlc()) {
18209
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18210
        if (lastComparison != 0) {
18211
          return lastComparison;
18212
        }
18213
      }
6762 amar.kumar 18214
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18215
      if (lastComparison != 0) {
18216
        return lastComparison;
18217
      }
18218
      if (isSetItemId()) {
18219
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18220
        if (lastComparison != 0) {
18221
          return lastComparison;
18222
        }
18223
      }
18224
      return 0;
18225
    }
18226
 
18227
    public _Fields fieldForId(int fieldId) {
18228
      return _Fields.findByThriftId(fieldId);
18229
    }
18230
 
18231
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18232
      org.apache.thrift.protocol.TField field;
18233
      iprot.readStructBegin();
18234
      while (true)
18235
      {
18236
        field = iprot.readFieldBegin();
18237
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18238
          break;
18239
        }
18240
        switch (field.id) {
18241
          case 1: // INVOICE_NUMBER
18242
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18243
              this.invoiceNumber = iprot.readString();
18244
            } else { 
18245
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18246
            }
18247
            break;
18248
          case 2: // UNIT_PRICE
18249
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18250
              this.unitPrice = iprot.readDouble();
18251
              setUnitPriceIsSet(true);
18252
            } else { 
18253
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18254
            }
18255
            break;
7672 rajveer 18256
          case 3: // NLC
18257
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18258
              this.nlc = iprot.readDouble();
18259
              setNlcIsSet(true);
18260
            } else { 
18261
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18262
            }
18263
            break;
18264
          case 4: // ITEM_ID
6762 amar.kumar 18265
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18266
              this.itemId = iprot.readI64();
18267
              setItemIdIsSet(true);
18268
            } else { 
18269
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18270
            }
18271
            break;
18272
          default:
18273
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18274
        }
18275
        iprot.readFieldEnd();
18276
      }
18277
      iprot.readStructEnd();
18278
      validate();
18279
    }
18280
 
18281
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18282
      validate();
18283
 
18284
      oprot.writeStructBegin(STRUCT_DESC);
18285
      if (this.invoiceNumber != null) {
18286
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18287
        oprot.writeString(this.invoiceNumber);
18288
        oprot.writeFieldEnd();
18289
      }
18290
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18291
      oprot.writeDouble(this.unitPrice);
18292
      oprot.writeFieldEnd();
7672 rajveer 18293
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18294
      oprot.writeDouble(this.nlc);
18295
      oprot.writeFieldEnd();
6762 amar.kumar 18296
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18297
      oprot.writeI64(this.itemId);
18298
      oprot.writeFieldEnd();
18299
      oprot.writeFieldStop();
18300
      oprot.writeStructEnd();
18301
    }
18302
 
18303
    @Override
18304
    public String toString() {
18305
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18306
      boolean first = true;
18307
 
18308
      sb.append("invoiceNumber:");
18309
      if (this.invoiceNumber == null) {
18310
        sb.append("null");
18311
      } else {
18312
        sb.append(this.invoiceNumber);
18313
      }
18314
      first = false;
18315
      if (!first) sb.append(", ");
18316
      sb.append("unitPrice:");
18317
      sb.append(this.unitPrice);
18318
      first = false;
18319
      if (!first) sb.append(", ");
7672 rajveer 18320
      sb.append("nlc:");
18321
      sb.append(this.nlc);
18322
      first = false;
18323
      if (!first) sb.append(", ");
6762 amar.kumar 18324
      sb.append("itemId:");
18325
      sb.append(this.itemId);
18326
      first = false;
18327
      sb.append(")");
18328
      return sb.toString();
18329
    }
18330
 
18331
    public void validate() throws org.apache.thrift.TException {
18332
      // check for required fields
18333
    }
18334
 
18335
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18336
      try {
18337
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18338
      } catch (org.apache.thrift.TException te) {
18339
        throw new java.io.IOException(te);
18340
      }
18341
    }
18342
 
18343
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18344
      try {
18345
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18346
        __isset_bit_vector = new BitSet(1);
18347
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18348
      } catch (org.apache.thrift.TException te) {
18349
        throw new java.io.IOException(te);
18350
      }
18351
    }
18352
 
18353
  }
18354
 
18355
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18356
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18357
 
18358
    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);
18359
 
18360
    private long success; // required
18361
 
18362
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18363
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18364
      SUCCESS((short)0, "success");
18365
 
18366
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18367
 
18368
      static {
18369
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18370
          byName.put(field.getFieldName(), field);
18371
        }
18372
      }
18373
 
18374
      /**
18375
       * Find the _Fields constant that matches fieldId, or null if its not found.
18376
       */
18377
      public static _Fields findByThriftId(int fieldId) {
18378
        switch(fieldId) {
18379
          case 0: // SUCCESS
18380
            return SUCCESS;
18381
          default:
18382
            return null;
18383
        }
18384
      }
18385
 
18386
      /**
18387
       * Find the _Fields constant that matches fieldId, throwing an exception
18388
       * if it is not found.
18389
       */
18390
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18391
        _Fields fields = findByThriftId(fieldId);
18392
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18393
        return fields;
18394
      }
18395
 
18396
      /**
18397
       * Find the _Fields constant that matches name, or null if its not found.
18398
       */
18399
      public static _Fields findByName(String name) {
18400
        return byName.get(name);
18401
      }
18402
 
18403
      private final short _thriftId;
18404
      private final String _fieldName;
18405
 
18406
      _Fields(short thriftId, String fieldName) {
18407
        _thriftId = thriftId;
18408
        _fieldName = fieldName;
18409
      }
18410
 
18411
      public short getThriftFieldId() {
18412
        return _thriftId;
18413
      }
18414
 
18415
      public String getFieldName() {
18416
        return _fieldName;
18417
      }
18418
    }
18419
 
18420
    // isset id assignments
18421
    private static final int __SUCCESS_ISSET_ID = 0;
18422
    private BitSet __isset_bit_vector = new BitSet(1);
18423
 
18424
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18425
    static {
18426
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18427
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18428
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18429
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18430
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18431
    }
18432
 
18433
    public createPurchaseForOurExtBilling_result() {
18434
    }
18435
 
18436
    public createPurchaseForOurExtBilling_result(
18437
      long success)
18438
    {
18439
      this();
18440
      this.success = success;
18441
      setSuccessIsSet(true);
18442
    }
18443
 
18444
    /**
18445
     * Performs a deep copy on <i>other</i>.
18446
     */
18447
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18448
      __isset_bit_vector.clear();
18449
      __isset_bit_vector.or(other.__isset_bit_vector);
18450
      this.success = other.success;
18451
    }
18452
 
18453
    public createPurchaseForOurExtBilling_result deepCopy() {
18454
      return new createPurchaseForOurExtBilling_result(this);
18455
    }
18456
 
18457
    @Override
18458
    public void clear() {
18459
      setSuccessIsSet(false);
18460
      this.success = 0;
18461
    }
18462
 
18463
    public long getSuccess() {
18464
      return this.success;
18465
    }
18466
 
18467
    public void setSuccess(long success) {
18468
      this.success = success;
18469
      setSuccessIsSet(true);
18470
    }
18471
 
18472
    public void unsetSuccess() {
18473
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18474
    }
18475
 
18476
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18477
    public boolean isSetSuccess() {
18478
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18479
    }
18480
 
18481
    public void setSuccessIsSet(boolean value) {
18482
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18483
    }
18484
 
18485
    public void setFieldValue(_Fields field, Object value) {
18486
      switch (field) {
18487
      case SUCCESS:
18488
        if (value == null) {
18489
          unsetSuccess();
18490
        } else {
18491
          setSuccess((Long)value);
18492
        }
18493
        break;
18494
 
18495
      }
18496
    }
18497
 
18498
    public Object getFieldValue(_Fields field) {
18499
      switch (field) {
18500
      case SUCCESS:
18501
        return Long.valueOf(getSuccess());
18502
 
18503
      }
18504
      throw new IllegalStateException();
18505
    }
18506
 
18507
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18508
    public boolean isSet(_Fields field) {
18509
      if (field == null) {
18510
        throw new IllegalArgumentException();
18511
      }
18512
 
18513
      switch (field) {
18514
      case SUCCESS:
18515
        return isSetSuccess();
18516
      }
18517
      throw new IllegalStateException();
18518
    }
18519
 
18520
    @Override
18521
    public boolean equals(Object that) {
18522
      if (that == null)
18523
        return false;
18524
      if (that instanceof createPurchaseForOurExtBilling_result)
18525
        return this.equals((createPurchaseForOurExtBilling_result)that);
18526
      return false;
18527
    }
18528
 
18529
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18530
      if (that == null)
18531
        return false;
18532
 
18533
      boolean this_present_success = true;
18534
      boolean that_present_success = true;
18535
      if (this_present_success || that_present_success) {
18536
        if (!(this_present_success && that_present_success))
18537
          return false;
18538
        if (this.success != that.success)
18539
          return false;
18540
      }
18541
 
18542
      return true;
18543
    }
18544
 
18545
    @Override
18546
    public int hashCode() {
18547
      return 0;
18548
    }
18549
 
18550
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18551
      if (!getClass().equals(other.getClass())) {
18552
        return getClass().getName().compareTo(other.getClass().getName());
18553
      }
18554
 
18555
      int lastComparison = 0;
18556
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
18557
 
18558
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18559
      if (lastComparison != 0) {
18560
        return lastComparison;
18561
      }
18562
      if (isSetSuccess()) {
18563
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18564
        if (lastComparison != 0) {
18565
          return lastComparison;
18566
        }
18567
      }
18568
      return 0;
18569
    }
18570
 
18571
    public _Fields fieldForId(int fieldId) {
18572
      return _Fields.findByThriftId(fieldId);
18573
    }
18574
 
18575
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18576
      org.apache.thrift.protocol.TField field;
18577
      iprot.readStructBegin();
18578
      while (true)
18579
      {
18580
        field = iprot.readFieldBegin();
18581
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18582
          break;
18583
        }
18584
        switch (field.id) {
18585
          case 0: // SUCCESS
18586
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18587
              this.success = iprot.readI64();
18588
              setSuccessIsSet(true);
18589
            } else { 
18590
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18591
            }
18592
            break;
18593
          default:
18594
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18595
        }
18596
        iprot.readFieldEnd();
18597
      }
18598
      iprot.readStructEnd();
18599
      validate();
18600
    }
18601
 
18602
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18603
      oprot.writeStructBegin(STRUCT_DESC);
18604
 
18605
      if (this.isSetSuccess()) {
18606
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18607
        oprot.writeI64(this.success);
18608
        oprot.writeFieldEnd();
18609
      }
18610
      oprot.writeFieldStop();
18611
      oprot.writeStructEnd();
18612
    }
18613
 
18614
    @Override
18615
    public String toString() {
18616
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
18617
      boolean first = true;
18618
 
18619
      sb.append("success:");
18620
      sb.append(this.success);
18621
      first = false;
18622
      sb.append(")");
18623
      return sb.toString();
18624
    }
18625
 
18626
    public void validate() throws org.apache.thrift.TException {
18627
      // check for required fields
18628
    }
18629
 
18630
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18631
      try {
18632
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18633
      } catch (org.apache.thrift.TException te) {
18634
        throw new java.io.IOException(te);
18635
      }
18636
    }
18637
 
18638
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18639
      try {
18640
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18641
      } catch (org.apache.thrift.TException te) {
18642
        throw new java.io.IOException(te);
18643
      }
18644
    }
18645
 
18646
  }
18647
 
18648
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18649
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
18650
 
18651
    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);
18652
    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);
18653
 
18654
    private long itemId; // required
18655
    private long quantity; // required
18656
 
18657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18658
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18659
      ITEM_ID((short)1, "itemId"),
18660
      QUANTITY((short)2, "quantity");
18661
 
18662
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18663
 
18664
      static {
18665
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18666
          byName.put(field.getFieldName(), field);
18667
        }
18668
      }
18669
 
18670
      /**
18671
       * Find the _Fields constant that matches fieldId, or null if its not found.
18672
       */
18673
      public static _Fields findByThriftId(int fieldId) {
18674
        switch(fieldId) {
18675
          case 1: // ITEM_ID
18676
            return ITEM_ID;
18677
          case 2: // QUANTITY
18678
            return QUANTITY;
18679
          default:
18680
            return null;
18681
        }
18682
      }
18683
 
18684
      /**
18685
       * Find the _Fields constant that matches fieldId, throwing an exception
18686
       * if it is not found.
18687
       */
18688
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18689
        _Fields fields = findByThriftId(fieldId);
18690
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18691
        return fields;
18692
      }
18693
 
18694
      /**
18695
       * Find the _Fields constant that matches name, or null if its not found.
18696
       */
18697
      public static _Fields findByName(String name) {
18698
        return byName.get(name);
18699
      }
18700
 
18701
      private final short _thriftId;
18702
      private final String _fieldName;
18703
 
18704
      _Fields(short thriftId, String fieldName) {
18705
        _thriftId = thriftId;
18706
        _fieldName = fieldName;
18707
      }
18708
 
18709
      public short getThriftFieldId() {
18710
        return _thriftId;
18711
      }
18712
 
18713
      public String getFieldName() {
18714
        return _fieldName;
18715
      }
18716
    }
18717
 
18718
    // isset id assignments
18719
    private static final int __ITEMID_ISSET_ID = 0;
18720
    private static final int __QUANTITY_ISSET_ID = 1;
18721
    private BitSet __isset_bit_vector = new BitSet(2);
18722
 
18723
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18724
    static {
18725
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18726
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18727
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18728
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18729
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18730
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18731
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
18732
    }
18733
 
18734
    public fulfillPOForExtBilling_args() {
18735
    }
18736
 
18737
    public fulfillPOForExtBilling_args(
18738
      long itemId,
18739
      long quantity)
18740
    {
18741
      this();
18742
      this.itemId = itemId;
18743
      setItemIdIsSet(true);
18744
      this.quantity = quantity;
18745
      setQuantityIsSet(true);
18746
    }
18747
 
18748
    /**
18749
     * Performs a deep copy on <i>other</i>.
18750
     */
18751
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
18752
      __isset_bit_vector.clear();
18753
      __isset_bit_vector.or(other.__isset_bit_vector);
18754
      this.itemId = other.itemId;
18755
      this.quantity = other.quantity;
18756
    }
18757
 
18758
    public fulfillPOForExtBilling_args deepCopy() {
18759
      return new fulfillPOForExtBilling_args(this);
18760
    }
18761
 
18762
    @Override
18763
    public void clear() {
18764
      setItemIdIsSet(false);
18765
      this.itemId = 0;
18766
      setQuantityIsSet(false);
18767
      this.quantity = 0;
18768
    }
18769
 
18770
    public long getItemId() {
18771
      return this.itemId;
18772
    }
18773
 
18774
    public void setItemId(long itemId) {
18775
      this.itemId = itemId;
18776
      setItemIdIsSet(true);
18777
    }
18778
 
18779
    public void unsetItemId() {
18780
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18781
    }
18782
 
18783
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18784
    public boolean isSetItemId() {
18785
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18786
    }
18787
 
18788
    public void setItemIdIsSet(boolean value) {
18789
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18790
    }
18791
 
18792
    public long getQuantity() {
18793
      return this.quantity;
18794
    }
18795
 
18796
    public void setQuantity(long quantity) {
18797
      this.quantity = quantity;
18798
      setQuantityIsSet(true);
18799
    }
18800
 
18801
    public void unsetQuantity() {
18802
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18803
    }
18804
 
18805
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
18806
    public boolean isSetQuantity() {
18807
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18808
    }
18809
 
18810
    public void setQuantityIsSet(boolean value) {
18811
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18812
    }
18813
 
18814
    public void setFieldValue(_Fields field, Object value) {
18815
      switch (field) {
18816
      case ITEM_ID:
18817
        if (value == null) {
18818
          unsetItemId();
18819
        } else {
18820
          setItemId((Long)value);
18821
        }
18822
        break;
18823
 
18824
      case QUANTITY:
18825
        if (value == null) {
18826
          unsetQuantity();
18827
        } else {
18828
          setQuantity((Long)value);
18829
        }
18830
        break;
18831
 
18832
      }
18833
    }
18834
 
18835
    public Object getFieldValue(_Fields field) {
18836
      switch (field) {
18837
      case ITEM_ID:
18838
        return Long.valueOf(getItemId());
18839
 
18840
      case QUANTITY:
18841
        return Long.valueOf(getQuantity());
18842
 
18843
      }
18844
      throw new IllegalStateException();
18845
    }
18846
 
18847
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18848
    public boolean isSet(_Fields field) {
18849
      if (field == null) {
18850
        throw new IllegalArgumentException();
18851
      }
18852
 
18853
      switch (field) {
18854
      case ITEM_ID:
18855
        return isSetItemId();
18856
      case QUANTITY:
18857
        return isSetQuantity();
18858
      }
18859
      throw new IllegalStateException();
18860
    }
18861
 
18862
    @Override
18863
    public boolean equals(Object that) {
18864
      if (that == null)
18865
        return false;
18866
      if (that instanceof fulfillPOForExtBilling_args)
18867
        return this.equals((fulfillPOForExtBilling_args)that);
18868
      return false;
18869
    }
18870
 
18871
    public boolean equals(fulfillPOForExtBilling_args that) {
18872
      if (that == null)
18873
        return false;
18874
 
18875
      boolean this_present_itemId = true;
18876
      boolean that_present_itemId = true;
18877
      if (this_present_itemId || that_present_itemId) {
18878
        if (!(this_present_itemId && that_present_itemId))
18879
          return false;
18880
        if (this.itemId != that.itemId)
18881
          return false;
18882
      }
18883
 
18884
      boolean this_present_quantity = true;
18885
      boolean that_present_quantity = true;
18886
      if (this_present_quantity || that_present_quantity) {
18887
        if (!(this_present_quantity && that_present_quantity))
18888
          return false;
18889
        if (this.quantity != that.quantity)
18890
          return false;
18891
      }
18892
 
18893
      return true;
18894
    }
18895
 
18896
    @Override
18897
    public int hashCode() {
18898
      return 0;
18899
    }
18900
 
18901
    public int compareTo(fulfillPOForExtBilling_args other) {
18902
      if (!getClass().equals(other.getClass())) {
18903
        return getClass().getName().compareTo(other.getClass().getName());
18904
      }
18905
 
18906
      int lastComparison = 0;
18907
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
18908
 
18909
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18910
      if (lastComparison != 0) {
18911
        return lastComparison;
18912
      }
18913
      if (isSetItemId()) {
18914
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18915
        if (lastComparison != 0) {
18916
          return lastComparison;
18917
        }
18918
      }
18919
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
18920
      if (lastComparison != 0) {
18921
        return lastComparison;
18922
      }
18923
      if (isSetQuantity()) {
18924
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
18925
        if (lastComparison != 0) {
18926
          return lastComparison;
18927
        }
18928
      }
18929
      return 0;
18930
    }
18931
 
18932
    public _Fields fieldForId(int fieldId) {
18933
      return _Fields.findByThriftId(fieldId);
18934
    }
18935
 
18936
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18937
      org.apache.thrift.protocol.TField field;
18938
      iprot.readStructBegin();
18939
      while (true)
18940
      {
18941
        field = iprot.readFieldBegin();
18942
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18943
          break;
18944
        }
18945
        switch (field.id) {
18946
          case 1: // ITEM_ID
18947
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18948
              this.itemId = iprot.readI64();
18949
              setItemIdIsSet(true);
18950
            } else { 
18951
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18952
            }
18953
            break;
18954
          case 2: // QUANTITY
18955
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18956
              this.quantity = iprot.readI64();
18957
              setQuantityIsSet(true);
18958
            } else { 
18959
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18960
            }
18961
            break;
18962
          default:
18963
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18964
        }
18965
        iprot.readFieldEnd();
18966
      }
18967
      iprot.readStructEnd();
18968
      validate();
18969
    }
18970
 
18971
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18972
      validate();
18973
 
18974
      oprot.writeStructBegin(STRUCT_DESC);
18975
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18976
      oprot.writeI64(this.itemId);
18977
      oprot.writeFieldEnd();
18978
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
18979
      oprot.writeI64(this.quantity);
18980
      oprot.writeFieldEnd();
18981
      oprot.writeFieldStop();
18982
      oprot.writeStructEnd();
18983
    }
18984
 
18985
    @Override
18986
    public String toString() {
18987
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
18988
      boolean first = true;
18989
 
18990
      sb.append("itemId:");
18991
      sb.append(this.itemId);
18992
      first = false;
18993
      if (!first) sb.append(", ");
18994
      sb.append("quantity:");
18995
      sb.append(this.quantity);
18996
      first = false;
18997
      sb.append(")");
18998
      return sb.toString();
18999
    }
19000
 
19001
    public void validate() throws org.apache.thrift.TException {
19002
      // check for required fields
19003
    }
19004
 
19005
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19006
      try {
19007
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19008
      } catch (org.apache.thrift.TException te) {
19009
        throw new java.io.IOException(te);
19010
      }
19011
    }
19012
 
19013
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19014
      try {
19015
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19016
        __isset_bit_vector = new BitSet(1);
19017
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19018
      } catch (org.apache.thrift.TException te) {
19019
        throw new java.io.IOException(te);
19020
      }
19021
    }
19022
 
19023
  }
19024
 
19025
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
19026
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
19027
 
19028
 
19029
 
19030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19031
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19032
;
19033
 
19034
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19035
 
19036
      static {
19037
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19038
          byName.put(field.getFieldName(), field);
19039
        }
19040
      }
19041
 
19042
      /**
19043
       * Find the _Fields constant that matches fieldId, or null if its not found.
19044
       */
19045
      public static _Fields findByThriftId(int fieldId) {
19046
        switch(fieldId) {
19047
          default:
19048
            return null;
19049
        }
19050
      }
19051
 
19052
      /**
19053
       * Find the _Fields constant that matches fieldId, throwing an exception
19054
       * if it is not found.
19055
       */
19056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19057
        _Fields fields = findByThriftId(fieldId);
19058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19059
        return fields;
19060
      }
19061
 
19062
      /**
19063
       * Find the _Fields constant that matches name, or null if its not found.
19064
       */
19065
      public static _Fields findByName(String name) {
19066
        return byName.get(name);
19067
      }
19068
 
19069
      private final short _thriftId;
19070
      private final String _fieldName;
19071
 
19072
      _Fields(short thriftId, String fieldName) {
19073
        _thriftId = thriftId;
19074
        _fieldName = fieldName;
19075
      }
19076
 
19077
      public short getThriftFieldId() {
19078
        return _thriftId;
19079
      }
19080
 
19081
      public String getFieldName() {
19082
        return _fieldName;
19083
      }
19084
    }
19085
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19086
    static {
19087
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19088
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19089
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
19090
    }
19091
 
19092
    public fulfillPOForExtBilling_result() {
19093
    }
19094
 
19095
    /**
19096
     * Performs a deep copy on <i>other</i>.
19097
     */
19098
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
19099
    }
19100
 
19101
    public fulfillPOForExtBilling_result deepCopy() {
19102
      return new fulfillPOForExtBilling_result(this);
19103
    }
19104
 
19105
    @Override
19106
    public void clear() {
19107
    }
19108
 
19109
    public void setFieldValue(_Fields field, Object value) {
19110
      switch (field) {
19111
      }
19112
    }
19113
 
19114
    public Object getFieldValue(_Fields field) {
19115
      switch (field) {
19116
      }
19117
      throw new IllegalStateException();
19118
    }
19119
 
19120
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19121
    public boolean isSet(_Fields field) {
19122
      if (field == null) {
19123
        throw new IllegalArgumentException();
19124
      }
19125
 
19126
      switch (field) {
19127
      }
19128
      throw new IllegalStateException();
19129
    }
19130
 
19131
    @Override
19132
    public boolean equals(Object that) {
19133
      if (that == null)
19134
        return false;
19135
      if (that instanceof fulfillPOForExtBilling_result)
19136
        return this.equals((fulfillPOForExtBilling_result)that);
19137
      return false;
19138
    }
19139
 
19140
    public boolean equals(fulfillPOForExtBilling_result that) {
19141
      if (that == null)
19142
        return false;
19143
 
19144
      return true;
19145
    }
19146
 
19147
    @Override
19148
    public int hashCode() {
19149
      return 0;
19150
    }
19151
 
19152
    public int compareTo(fulfillPOForExtBilling_result other) {
19153
      if (!getClass().equals(other.getClass())) {
19154
        return getClass().getName().compareTo(other.getClass().getName());
19155
      }
19156
 
19157
      int lastComparison = 0;
19158
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
19159
 
19160
      return 0;
19161
    }
19162
 
19163
    public _Fields fieldForId(int fieldId) {
19164
      return _Fields.findByThriftId(fieldId);
19165
    }
19166
 
19167
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19168
      org.apache.thrift.protocol.TField field;
19169
      iprot.readStructBegin();
19170
      while (true)
19171
      {
19172
        field = iprot.readFieldBegin();
19173
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19174
          break;
19175
        }
19176
        switch (field.id) {
19177
          default:
19178
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19179
        }
19180
        iprot.readFieldEnd();
19181
      }
19182
      iprot.readStructEnd();
19183
      validate();
19184
    }
19185
 
19186
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19187
      oprot.writeStructBegin(STRUCT_DESC);
19188
 
19189
      oprot.writeFieldStop();
19190
      oprot.writeStructEnd();
19191
    }
19192
 
19193
    @Override
19194
    public String toString() {
19195
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19196
      boolean first = true;
19197
 
19198
      sb.append(")");
19199
      return sb.toString();
19200
    }
19201
 
19202
    public void validate() throws org.apache.thrift.TException {
19203
      // check for required fields
19204
    }
19205
 
19206
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19207
      try {
19208
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19209
      } catch (org.apache.thrift.TException te) {
19210
        throw new java.io.IOException(te);
19211
      }
19212
    }
19213
 
19214
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19215
      try {
19216
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19217
      } catch (org.apache.thrift.TException te) {
19218
        throw new java.io.IOException(te);
19219
      }
19220
    }
19221
 
19222
  }
19223
 
7410 amar.kumar 19224
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19225
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19226
 
19227
    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);
19228
 
19229
    private long poId; // required
19230
 
19231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19232
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19233
      PO_ID((short)1, "poId");
19234
 
19235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19236
 
19237
      static {
19238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19239
          byName.put(field.getFieldName(), field);
19240
        }
19241
      }
19242
 
19243
      /**
19244
       * Find the _Fields constant that matches fieldId, or null if its not found.
19245
       */
19246
      public static _Fields findByThriftId(int fieldId) {
19247
        switch(fieldId) {
19248
          case 1: // PO_ID
19249
            return PO_ID;
19250
          default:
19251
            return null;
19252
        }
19253
      }
19254
 
19255
      /**
19256
       * Find the _Fields constant that matches fieldId, throwing an exception
19257
       * if it is not found.
19258
       */
19259
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19260
        _Fields fields = findByThriftId(fieldId);
19261
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19262
        return fields;
19263
      }
19264
 
19265
      /**
19266
       * Find the _Fields constant that matches name, or null if its not found.
19267
       */
19268
      public static _Fields findByName(String name) {
19269
        return byName.get(name);
19270
      }
19271
 
19272
      private final short _thriftId;
19273
      private final String _fieldName;
19274
 
19275
      _Fields(short thriftId, String fieldName) {
19276
        _thriftId = thriftId;
19277
        _fieldName = fieldName;
19278
      }
19279
 
19280
      public short getThriftFieldId() {
19281
        return _thriftId;
19282
      }
19283
 
19284
      public String getFieldName() {
19285
        return _fieldName;
19286
      }
19287
    }
19288
 
19289
    // isset id assignments
19290
    private static final int __POID_ISSET_ID = 0;
19291
    private BitSet __isset_bit_vector = new BitSet(1);
19292
 
19293
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19294
    static {
19295
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19296
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19297
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19298
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19299
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19300
    }
19301
 
19302
    public closePO_args() {
19303
    }
19304
 
19305
    public closePO_args(
19306
      long poId)
19307
    {
19308
      this();
19309
      this.poId = poId;
19310
      setPoIdIsSet(true);
19311
    }
19312
 
19313
    /**
19314
     * Performs a deep copy on <i>other</i>.
19315
     */
19316
    public closePO_args(closePO_args other) {
19317
      __isset_bit_vector.clear();
19318
      __isset_bit_vector.or(other.__isset_bit_vector);
19319
      this.poId = other.poId;
19320
    }
19321
 
19322
    public closePO_args deepCopy() {
19323
      return new closePO_args(this);
19324
    }
19325
 
19326
    @Override
19327
    public void clear() {
19328
      setPoIdIsSet(false);
19329
      this.poId = 0;
19330
    }
19331
 
19332
    public long getPoId() {
19333
      return this.poId;
19334
    }
19335
 
19336
    public void setPoId(long poId) {
19337
      this.poId = poId;
19338
      setPoIdIsSet(true);
19339
    }
19340
 
19341
    public void unsetPoId() {
19342
      __isset_bit_vector.clear(__POID_ISSET_ID);
19343
    }
19344
 
19345
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19346
    public boolean isSetPoId() {
19347
      return __isset_bit_vector.get(__POID_ISSET_ID);
19348
    }
19349
 
19350
    public void setPoIdIsSet(boolean value) {
19351
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19352
    }
19353
 
19354
    public void setFieldValue(_Fields field, Object value) {
19355
      switch (field) {
19356
      case PO_ID:
19357
        if (value == null) {
19358
          unsetPoId();
19359
        } else {
19360
          setPoId((Long)value);
19361
        }
19362
        break;
19363
 
19364
      }
19365
    }
19366
 
19367
    public Object getFieldValue(_Fields field) {
19368
      switch (field) {
19369
      case PO_ID:
19370
        return Long.valueOf(getPoId());
19371
 
19372
      }
19373
      throw new IllegalStateException();
19374
    }
19375
 
19376
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19377
    public boolean isSet(_Fields field) {
19378
      if (field == null) {
19379
        throw new IllegalArgumentException();
19380
      }
19381
 
19382
      switch (field) {
19383
      case PO_ID:
19384
        return isSetPoId();
19385
      }
19386
      throw new IllegalStateException();
19387
    }
19388
 
19389
    @Override
19390
    public boolean equals(Object that) {
19391
      if (that == null)
19392
        return false;
19393
      if (that instanceof closePO_args)
19394
        return this.equals((closePO_args)that);
19395
      return false;
19396
    }
19397
 
19398
    public boolean equals(closePO_args that) {
19399
      if (that == null)
19400
        return false;
19401
 
19402
      boolean this_present_poId = true;
19403
      boolean that_present_poId = true;
19404
      if (this_present_poId || that_present_poId) {
19405
        if (!(this_present_poId && that_present_poId))
19406
          return false;
19407
        if (this.poId != that.poId)
19408
          return false;
19409
      }
19410
 
19411
      return true;
19412
    }
19413
 
19414
    @Override
19415
    public int hashCode() {
19416
      return 0;
19417
    }
19418
 
19419
    public int compareTo(closePO_args other) {
19420
      if (!getClass().equals(other.getClass())) {
19421
        return getClass().getName().compareTo(other.getClass().getName());
19422
      }
19423
 
19424
      int lastComparison = 0;
19425
      closePO_args typedOther = (closePO_args)other;
19426
 
19427
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19428
      if (lastComparison != 0) {
19429
        return lastComparison;
19430
      }
19431
      if (isSetPoId()) {
19432
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19433
        if (lastComparison != 0) {
19434
          return lastComparison;
19435
        }
19436
      }
19437
      return 0;
19438
    }
19439
 
19440
    public _Fields fieldForId(int fieldId) {
19441
      return _Fields.findByThriftId(fieldId);
19442
    }
19443
 
19444
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19445
      org.apache.thrift.protocol.TField field;
19446
      iprot.readStructBegin();
19447
      while (true)
19448
      {
19449
        field = iprot.readFieldBegin();
19450
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19451
          break;
19452
        }
19453
        switch (field.id) {
19454
          case 1: // PO_ID
19455
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19456
              this.poId = iprot.readI64();
19457
              setPoIdIsSet(true);
19458
            } else { 
19459
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19460
            }
19461
            break;
19462
          default:
19463
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19464
        }
19465
        iprot.readFieldEnd();
19466
      }
19467
      iprot.readStructEnd();
19468
      validate();
19469
    }
19470
 
19471
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19472
      validate();
19473
 
19474
      oprot.writeStructBegin(STRUCT_DESC);
19475
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19476
      oprot.writeI64(this.poId);
19477
      oprot.writeFieldEnd();
19478
      oprot.writeFieldStop();
19479
      oprot.writeStructEnd();
19480
    }
19481
 
19482
    @Override
19483
    public String toString() {
19484
      StringBuilder sb = new StringBuilder("closePO_args(");
19485
      boolean first = true;
19486
 
19487
      sb.append("poId:");
19488
      sb.append(this.poId);
19489
      first = false;
19490
      sb.append(")");
19491
      return sb.toString();
19492
    }
19493
 
19494
    public void validate() throws org.apache.thrift.TException {
19495
      // check for required fields
19496
    }
19497
 
19498
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19499
      try {
19500
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19501
      } catch (org.apache.thrift.TException te) {
19502
        throw new java.io.IOException(te);
19503
      }
19504
    }
19505
 
19506
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19507
      try {
19508
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19509
      } catch (org.apache.thrift.TException te) {
19510
        throw new java.io.IOException(te);
19511
      }
19512
    }
19513
 
19514
  }
19515
 
19516
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19517
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19518
 
19519
    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);
19520
 
19521
    private PurchaseServiceException e; // required
19522
 
19523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19524
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19525
      E((short)1, "e");
19526
 
19527
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19528
 
19529
      static {
19530
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19531
          byName.put(field.getFieldName(), field);
19532
        }
19533
      }
19534
 
19535
      /**
19536
       * Find the _Fields constant that matches fieldId, or null if its not found.
19537
       */
19538
      public static _Fields findByThriftId(int fieldId) {
19539
        switch(fieldId) {
19540
          case 1: // E
19541
            return E;
19542
          default:
19543
            return null;
19544
        }
19545
      }
19546
 
19547
      /**
19548
       * Find the _Fields constant that matches fieldId, throwing an exception
19549
       * if it is not found.
19550
       */
19551
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19552
        _Fields fields = findByThriftId(fieldId);
19553
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19554
        return fields;
19555
      }
19556
 
19557
      /**
19558
       * Find the _Fields constant that matches name, or null if its not found.
19559
       */
19560
      public static _Fields findByName(String name) {
19561
        return byName.get(name);
19562
      }
19563
 
19564
      private final short _thriftId;
19565
      private final String _fieldName;
19566
 
19567
      _Fields(short thriftId, String fieldName) {
19568
        _thriftId = thriftId;
19569
        _fieldName = fieldName;
19570
      }
19571
 
19572
      public short getThriftFieldId() {
19573
        return _thriftId;
19574
      }
19575
 
19576
      public String getFieldName() {
19577
        return _fieldName;
19578
      }
19579
    }
19580
 
19581
    // isset id assignments
19582
 
19583
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19584
    static {
19585
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19586
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19587
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19588
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19589
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
19590
    }
19591
 
19592
    public closePO_result() {
19593
    }
19594
 
19595
    public closePO_result(
19596
      PurchaseServiceException e)
19597
    {
19598
      this();
19599
      this.e = e;
19600
    }
19601
 
19602
    /**
19603
     * Performs a deep copy on <i>other</i>.
19604
     */
19605
    public closePO_result(closePO_result other) {
19606
      if (other.isSetE()) {
19607
        this.e = new PurchaseServiceException(other.e);
19608
      }
19609
    }
19610
 
19611
    public closePO_result deepCopy() {
19612
      return new closePO_result(this);
19613
    }
19614
 
19615
    @Override
19616
    public void clear() {
19617
      this.e = null;
19618
    }
19619
 
19620
    public PurchaseServiceException getE() {
19621
      return this.e;
19622
    }
19623
 
19624
    public void setE(PurchaseServiceException e) {
19625
      this.e = e;
19626
    }
19627
 
19628
    public void unsetE() {
19629
      this.e = null;
19630
    }
19631
 
19632
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
19633
    public boolean isSetE() {
19634
      return this.e != null;
19635
    }
19636
 
19637
    public void setEIsSet(boolean value) {
19638
      if (!value) {
19639
        this.e = null;
19640
      }
19641
    }
19642
 
19643
    public void setFieldValue(_Fields field, Object value) {
19644
      switch (field) {
19645
      case E:
19646
        if (value == null) {
19647
          unsetE();
19648
        } else {
19649
          setE((PurchaseServiceException)value);
19650
        }
19651
        break;
19652
 
19653
      }
19654
    }
19655
 
19656
    public Object getFieldValue(_Fields field) {
19657
      switch (field) {
19658
      case E:
19659
        return getE();
19660
 
19661
      }
19662
      throw new IllegalStateException();
19663
    }
19664
 
19665
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19666
    public boolean isSet(_Fields field) {
19667
      if (field == null) {
19668
        throw new IllegalArgumentException();
19669
      }
19670
 
19671
      switch (field) {
19672
      case E:
19673
        return isSetE();
19674
      }
19675
      throw new IllegalStateException();
19676
    }
19677
 
19678
    @Override
19679
    public boolean equals(Object that) {
19680
      if (that == null)
19681
        return false;
19682
      if (that instanceof closePO_result)
19683
        return this.equals((closePO_result)that);
19684
      return false;
19685
    }
19686
 
19687
    public boolean equals(closePO_result that) {
19688
      if (that == null)
19689
        return false;
19690
 
19691
      boolean this_present_e = true && this.isSetE();
19692
      boolean that_present_e = true && that.isSetE();
19693
      if (this_present_e || that_present_e) {
19694
        if (!(this_present_e && that_present_e))
19695
          return false;
19696
        if (!this.e.equals(that.e))
19697
          return false;
19698
      }
19699
 
19700
      return true;
19701
    }
19702
 
19703
    @Override
19704
    public int hashCode() {
19705
      return 0;
19706
    }
19707
 
19708
    public int compareTo(closePO_result other) {
19709
      if (!getClass().equals(other.getClass())) {
19710
        return getClass().getName().compareTo(other.getClass().getName());
19711
      }
19712
 
19713
      int lastComparison = 0;
19714
      closePO_result typedOther = (closePO_result)other;
19715
 
19716
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
19717
      if (lastComparison != 0) {
19718
        return lastComparison;
19719
      }
19720
      if (isSetE()) {
19721
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
19722
        if (lastComparison != 0) {
19723
          return lastComparison;
19724
        }
19725
      }
19726
      return 0;
19727
    }
19728
 
19729
    public _Fields fieldForId(int fieldId) {
19730
      return _Fields.findByThriftId(fieldId);
19731
    }
19732
 
19733
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19734
      org.apache.thrift.protocol.TField field;
19735
      iprot.readStructBegin();
19736
      while (true)
19737
      {
19738
        field = iprot.readFieldBegin();
19739
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19740
          break;
19741
        }
19742
        switch (field.id) {
19743
          case 1: // E
19744
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19745
              this.e = new PurchaseServiceException();
19746
              this.e.read(iprot);
19747
            } else { 
19748
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19749
            }
19750
            break;
19751
          default:
19752
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19753
        }
19754
        iprot.readFieldEnd();
19755
      }
19756
      iprot.readStructEnd();
19757
      validate();
19758
    }
19759
 
19760
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19761
      oprot.writeStructBegin(STRUCT_DESC);
19762
 
19763
      if (this.isSetE()) {
19764
        oprot.writeFieldBegin(E_FIELD_DESC);
19765
        this.e.write(oprot);
19766
        oprot.writeFieldEnd();
19767
      }
19768
      oprot.writeFieldStop();
19769
      oprot.writeStructEnd();
19770
    }
19771
 
19772
    @Override
19773
    public String toString() {
19774
      StringBuilder sb = new StringBuilder("closePO_result(");
19775
      boolean first = true;
19776
 
19777
      sb.append("e:");
19778
      if (this.e == null) {
19779
        sb.append("null");
19780
      } else {
19781
        sb.append(this.e);
19782
      }
19783
      first = false;
19784
      sb.append(")");
19785
      return sb.toString();
19786
    }
19787
 
19788
    public void validate() throws org.apache.thrift.TException {
19789
      // check for required fields
19790
    }
19791
 
19792
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19793
      try {
19794
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19795
      } catch (org.apache.thrift.TException te) {
19796
        throw new java.io.IOException(te);
19797
      }
19798
    }
19799
 
19800
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19801
      try {
19802
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19803
      } catch (org.apache.thrift.TException te) {
19804
        throw new java.io.IOException(te);
19805
      }
19806
    }
19807
 
19808
  }
19809
 
19810
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
19811
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
19812
 
19813
    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);
19814
    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);
19815
 
19816
    private String invoiceNumber; // required
19817
    private long supplierId; // required
19818
 
19819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19820
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19821
      INVOICE_NUMBER((short)1, "invoiceNumber"),
19822
      SUPPLIER_ID((short)2, "supplierId");
19823
 
19824
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19825
 
19826
      static {
19827
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19828
          byName.put(field.getFieldName(), field);
19829
        }
19830
      }
19831
 
19832
      /**
19833
       * Find the _Fields constant that matches fieldId, or null if its not found.
19834
       */
19835
      public static _Fields findByThriftId(int fieldId) {
19836
        switch(fieldId) {
19837
          case 1: // INVOICE_NUMBER
19838
            return INVOICE_NUMBER;
19839
          case 2: // SUPPLIER_ID
19840
            return SUPPLIER_ID;
19841
          default:
19842
            return null;
19843
        }
19844
      }
19845
 
19846
      /**
19847
       * Find the _Fields constant that matches fieldId, throwing an exception
19848
       * if it is not found.
19849
       */
19850
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19851
        _Fields fields = findByThriftId(fieldId);
19852
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19853
        return fields;
19854
      }
19855
 
19856
      /**
19857
       * Find the _Fields constant that matches name, or null if its not found.
19858
       */
19859
      public static _Fields findByName(String name) {
19860
        return byName.get(name);
19861
      }
19862
 
19863
      private final short _thriftId;
19864
      private final String _fieldName;
19865
 
19866
      _Fields(short thriftId, String fieldName) {
19867
        _thriftId = thriftId;
19868
        _fieldName = fieldName;
19869
      }
19870
 
19871
      public short getThriftFieldId() {
19872
        return _thriftId;
19873
      }
19874
 
19875
      public String getFieldName() {
19876
        return _fieldName;
19877
      }
19878
    }
19879
 
19880
    // isset id assignments
19881
    private static final int __SUPPLIERID_ISSET_ID = 0;
19882
    private BitSet __isset_bit_vector = new BitSet(1);
19883
 
19884
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19885
    static {
19886
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19887
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19888
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19889
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19890
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19891
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19892
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
19893
    }
19894
 
19895
    public isInvoiceReceived_args() {
19896
    }
19897
 
19898
    public isInvoiceReceived_args(
19899
      String invoiceNumber,
19900
      long supplierId)
19901
    {
19902
      this();
19903
      this.invoiceNumber = invoiceNumber;
19904
      this.supplierId = supplierId;
19905
      setSupplierIdIsSet(true);
19906
    }
19907
 
19908
    /**
19909
     * Performs a deep copy on <i>other</i>.
19910
     */
19911
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
19912
      __isset_bit_vector.clear();
19913
      __isset_bit_vector.or(other.__isset_bit_vector);
19914
      if (other.isSetInvoiceNumber()) {
19915
        this.invoiceNumber = other.invoiceNumber;
19916
      }
19917
      this.supplierId = other.supplierId;
19918
    }
19919
 
19920
    public isInvoiceReceived_args deepCopy() {
19921
      return new isInvoiceReceived_args(this);
19922
    }
19923
 
19924
    @Override
19925
    public void clear() {
19926
      this.invoiceNumber = null;
19927
      setSupplierIdIsSet(false);
19928
      this.supplierId = 0;
19929
    }
19930
 
19931
    public String getInvoiceNumber() {
19932
      return this.invoiceNumber;
19933
    }
19934
 
19935
    public void setInvoiceNumber(String invoiceNumber) {
19936
      this.invoiceNumber = invoiceNumber;
19937
    }
19938
 
19939
    public void unsetInvoiceNumber() {
19940
      this.invoiceNumber = null;
19941
    }
19942
 
19943
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19944
    public boolean isSetInvoiceNumber() {
19945
      return this.invoiceNumber != null;
19946
    }
19947
 
19948
    public void setInvoiceNumberIsSet(boolean value) {
19949
      if (!value) {
19950
        this.invoiceNumber = null;
19951
      }
19952
    }
19953
 
19954
    public long getSupplierId() {
19955
      return this.supplierId;
19956
    }
19957
 
19958
    public void setSupplierId(long supplierId) {
19959
      this.supplierId = supplierId;
19960
      setSupplierIdIsSet(true);
19961
    }
19962
 
19963
    public void unsetSupplierId() {
19964
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
19965
    }
19966
 
19967
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
19968
    public boolean isSetSupplierId() {
19969
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
19970
    }
19971
 
19972
    public void setSupplierIdIsSet(boolean value) {
19973
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
19974
    }
19975
 
19976
    public void setFieldValue(_Fields field, Object value) {
19977
      switch (field) {
19978
      case INVOICE_NUMBER:
19979
        if (value == null) {
19980
          unsetInvoiceNumber();
19981
        } else {
19982
          setInvoiceNumber((String)value);
19983
        }
19984
        break;
19985
 
19986
      case SUPPLIER_ID:
19987
        if (value == null) {
19988
          unsetSupplierId();
19989
        } else {
19990
          setSupplierId((Long)value);
19991
        }
19992
        break;
19993
 
19994
      }
19995
    }
19996
 
19997
    public Object getFieldValue(_Fields field) {
19998
      switch (field) {
19999
      case INVOICE_NUMBER:
20000
        return getInvoiceNumber();
20001
 
20002
      case SUPPLIER_ID:
20003
        return Long.valueOf(getSupplierId());
20004
 
20005
      }
20006
      throw new IllegalStateException();
20007
    }
20008
 
20009
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20010
    public boolean isSet(_Fields field) {
20011
      if (field == null) {
20012
        throw new IllegalArgumentException();
20013
      }
20014
 
20015
      switch (field) {
20016
      case INVOICE_NUMBER:
20017
        return isSetInvoiceNumber();
20018
      case SUPPLIER_ID:
20019
        return isSetSupplierId();
20020
      }
20021
      throw new IllegalStateException();
20022
    }
20023
 
20024
    @Override
20025
    public boolean equals(Object that) {
20026
      if (that == null)
20027
        return false;
20028
      if (that instanceof isInvoiceReceived_args)
20029
        return this.equals((isInvoiceReceived_args)that);
20030
      return false;
20031
    }
20032
 
20033
    public boolean equals(isInvoiceReceived_args that) {
20034
      if (that == null)
20035
        return false;
20036
 
20037
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
20038
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
20039
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
20040
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
20041
          return false;
20042
        if (!this.invoiceNumber.equals(that.invoiceNumber))
20043
          return false;
20044
      }
20045
 
20046
      boolean this_present_supplierId = true;
20047
      boolean that_present_supplierId = true;
20048
      if (this_present_supplierId || that_present_supplierId) {
20049
        if (!(this_present_supplierId && that_present_supplierId))
20050
          return false;
20051
        if (this.supplierId != that.supplierId)
20052
          return false;
20053
      }
20054
 
20055
      return true;
20056
    }
20057
 
20058
    @Override
20059
    public int hashCode() {
20060
      return 0;
20061
    }
20062
 
20063
    public int compareTo(isInvoiceReceived_args other) {
20064
      if (!getClass().equals(other.getClass())) {
20065
        return getClass().getName().compareTo(other.getClass().getName());
20066
      }
20067
 
20068
      int lastComparison = 0;
20069
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
20070
 
20071
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
20072
      if (lastComparison != 0) {
20073
        return lastComparison;
20074
      }
20075
      if (isSetInvoiceNumber()) {
20076
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
20077
        if (lastComparison != 0) {
20078
          return lastComparison;
20079
        }
20080
      }
20081
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
20082
      if (lastComparison != 0) {
20083
        return lastComparison;
20084
      }
20085
      if (isSetSupplierId()) {
20086
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
20087
        if (lastComparison != 0) {
20088
          return lastComparison;
20089
        }
20090
      }
20091
      return 0;
20092
    }
20093
 
20094
    public _Fields fieldForId(int fieldId) {
20095
      return _Fields.findByThriftId(fieldId);
20096
    }
20097
 
20098
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20099
      org.apache.thrift.protocol.TField field;
20100
      iprot.readStructBegin();
20101
      while (true)
20102
      {
20103
        field = iprot.readFieldBegin();
20104
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20105
          break;
20106
        }
20107
        switch (field.id) {
20108
          case 1: // INVOICE_NUMBER
20109
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
20110
              this.invoiceNumber = iprot.readString();
20111
            } else { 
20112
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20113
            }
20114
            break;
20115
          case 2: // SUPPLIER_ID
20116
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20117
              this.supplierId = iprot.readI64();
20118
              setSupplierIdIsSet(true);
20119
            } else { 
20120
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20121
            }
20122
            break;
20123
          default:
20124
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20125
        }
20126
        iprot.readFieldEnd();
20127
      }
20128
      iprot.readStructEnd();
20129
      validate();
20130
    }
20131
 
20132
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20133
      validate();
20134
 
20135
      oprot.writeStructBegin(STRUCT_DESC);
20136
      if (this.invoiceNumber != null) {
20137
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
20138
        oprot.writeString(this.invoiceNumber);
20139
        oprot.writeFieldEnd();
20140
      }
20141
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
20142
      oprot.writeI64(this.supplierId);
20143
      oprot.writeFieldEnd();
20144
      oprot.writeFieldStop();
20145
      oprot.writeStructEnd();
20146
    }
20147
 
20148
    @Override
20149
    public String toString() {
20150
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
20151
      boolean first = true;
20152
 
20153
      sb.append("invoiceNumber:");
20154
      if (this.invoiceNumber == null) {
20155
        sb.append("null");
20156
      } else {
20157
        sb.append(this.invoiceNumber);
20158
      }
20159
      first = false;
20160
      if (!first) sb.append(", ");
20161
      sb.append("supplierId:");
20162
      sb.append(this.supplierId);
20163
      first = false;
20164
      sb.append(")");
20165
      return sb.toString();
20166
    }
20167
 
20168
    public void validate() throws org.apache.thrift.TException {
20169
      // check for required fields
20170
    }
20171
 
20172
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20173
      try {
20174
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20175
      } catch (org.apache.thrift.TException te) {
20176
        throw new java.io.IOException(te);
20177
      }
20178
    }
20179
 
20180
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20181
      try {
20182
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20183
      } catch (org.apache.thrift.TException te) {
20184
        throw new java.io.IOException(te);
20185
      }
20186
    }
20187
 
20188
  }
20189
 
20190
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20191
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20192
 
20193
    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);
20194
 
20195
    private boolean success; // required
20196
 
20197
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20198
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20199
      SUCCESS((short)0, "success");
20200
 
20201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20202
 
20203
      static {
20204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20205
          byName.put(field.getFieldName(), field);
20206
        }
20207
      }
20208
 
20209
      /**
20210
       * Find the _Fields constant that matches fieldId, or null if its not found.
20211
       */
20212
      public static _Fields findByThriftId(int fieldId) {
20213
        switch(fieldId) {
20214
          case 0: // SUCCESS
20215
            return SUCCESS;
20216
          default:
20217
            return null;
20218
        }
20219
      }
20220
 
20221
      /**
20222
       * Find the _Fields constant that matches fieldId, throwing an exception
20223
       * if it is not found.
20224
       */
20225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20226
        _Fields fields = findByThriftId(fieldId);
20227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20228
        return fields;
20229
      }
20230
 
20231
      /**
20232
       * Find the _Fields constant that matches name, or null if its not found.
20233
       */
20234
      public static _Fields findByName(String name) {
20235
        return byName.get(name);
20236
      }
20237
 
20238
      private final short _thriftId;
20239
      private final String _fieldName;
20240
 
20241
      _Fields(short thriftId, String fieldName) {
20242
        _thriftId = thriftId;
20243
        _fieldName = fieldName;
20244
      }
20245
 
20246
      public short getThriftFieldId() {
20247
        return _thriftId;
20248
      }
20249
 
20250
      public String getFieldName() {
20251
        return _fieldName;
20252
      }
20253
    }
20254
 
20255
    // isset id assignments
20256
    private static final int __SUCCESS_ISSET_ID = 0;
20257
    private BitSet __isset_bit_vector = new BitSet(1);
20258
 
20259
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20260
    static {
20261
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20262
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20263
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20264
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20265
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20266
    }
20267
 
20268
    public isInvoiceReceived_result() {
20269
    }
20270
 
20271
    public isInvoiceReceived_result(
20272
      boolean success)
20273
    {
20274
      this();
20275
      this.success = success;
20276
      setSuccessIsSet(true);
20277
    }
20278
 
20279
    /**
20280
     * Performs a deep copy on <i>other</i>.
20281
     */
20282
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20283
      __isset_bit_vector.clear();
20284
      __isset_bit_vector.or(other.__isset_bit_vector);
20285
      this.success = other.success;
20286
    }
20287
 
20288
    public isInvoiceReceived_result deepCopy() {
20289
      return new isInvoiceReceived_result(this);
20290
    }
20291
 
20292
    @Override
20293
    public void clear() {
20294
      setSuccessIsSet(false);
20295
      this.success = false;
20296
    }
20297
 
20298
    public boolean isSuccess() {
20299
      return this.success;
20300
    }
20301
 
20302
    public void setSuccess(boolean success) {
20303
      this.success = success;
20304
      setSuccessIsSet(true);
20305
    }
20306
 
20307
    public void unsetSuccess() {
20308
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20309
    }
20310
 
20311
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20312
    public boolean isSetSuccess() {
20313
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20314
    }
20315
 
20316
    public void setSuccessIsSet(boolean value) {
20317
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20318
    }
20319
 
20320
    public void setFieldValue(_Fields field, Object value) {
20321
      switch (field) {
20322
      case SUCCESS:
20323
        if (value == null) {
20324
          unsetSuccess();
20325
        } else {
20326
          setSuccess((Boolean)value);
20327
        }
20328
        break;
20329
 
20330
      }
20331
    }
20332
 
20333
    public Object getFieldValue(_Fields field) {
20334
      switch (field) {
20335
      case SUCCESS:
20336
        return Boolean.valueOf(isSuccess());
20337
 
20338
      }
20339
      throw new IllegalStateException();
20340
    }
20341
 
20342
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20343
    public boolean isSet(_Fields field) {
20344
      if (field == null) {
20345
        throw new IllegalArgumentException();
20346
      }
20347
 
20348
      switch (field) {
20349
      case SUCCESS:
20350
        return isSetSuccess();
20351
      }
20352
      throw new IllegalStateException();
20353
    }
20354
 
20355
    @Override
20356
    public boolean equals(Object that) {
20357
      if (that == null)
20358
        return false;
20359
      if (that instanceof isInvoiceReceived_result)
20360
        return this.equals((isInvoiceReceived_result)that);
20361
      return false;
20362
    }
20363
 
20364
    public boolean equals(isInvoiceReceived_result that) {
20365
      if (that == null)
20366
        return false;
20367
 
20368
      boolean this_present_success = true;
20369
      boolean that_present_success = true;
20370
      if (this_present_success || that_present_success) {
20371
        if (!(this_present_success && that_present_success))
20372
          return false;
20373
        if (this.success != that.success)
20374
          return false;
20375
      }
20376
 
20377
      return true;
20378
    }
20379
 
20380
    @Override
20381
    public int hashCode() {
20382
      return 0;
20383
    }
20384
 
20385
    public int compareTo(isInvoiceReceived_result other) {
20386
      if (!getClass().equals(other.getClass())) {
20387
        return getClass().getName().compareTo(other.getClass().getName());
20388
      }
20389
 
20390
      int lastComparison = 0;
20391
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20392
 
20393
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20394
      if (lastComparison != 0) {
20395
        return lastComparison;
20396
      }
20397
      if (isSetSuccess()) {
20398
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20399
        if (lastComparison != 0) {
20400
          return lastComparison;
20401
        }
20402
      }
20403
      return 0;
20404
    }
20405
 
20406
    public _Fields fieldForId(int fieldId) {
20407
      return _Fields.findByThriftId(fieldId);
20408
    }
20409
 
20410
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20411
      org.apache.thrift.protocol.TField field;
20412
      iprot.readStructBegin();
20413
      while (true)
20414
      {
20415
        field = iprot.readFieldBegin();
20416
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20417
          break;
20418
        }
20419
        switch (field.id) {
20420
          case 0: // SUCCESS
20421
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20422
              this.success = iprot.readBool();
20423
              setSuccessIsSet(true);
20424
            } else { 
20425
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20426
            }
20427
            break;
20428
          default:
20429
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20430
        }
20431
        iprot.readFieldEnd();
20432
      }
20433
      iprot.readStructEnd();
20434
      validate();
20435
    }
20436
 
20437
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20438
      oprot.writeStructBegin(STRUCT_DESC);
20439
 
20440
      if (this.isSetSuccess()) {
20441
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20442
        oprot.writeBool(this.success);
20443
        oprot.writeFieldEnd();
20444
      }
20445
      oprot.writeFieldStop();
20446
      oprot.writeStructEnd();
20447
    }
20448
 
20449
    @Override
20450
    public String toString() {
20451
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20452
      boolean first = true;
20453
 
20454
      sb.append("success:");
20455
      sb.append(this.success);
20456
      first = false;
20457
      sb.append(")");
20458
      return sb.toString();
20459
    }
20460
 
20461
    public void validate() throws org.apache.thrift.TException {
20462
      // check for required fields
20463
    }
20464
 
20465
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20466
      try {
20467
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20468
      } catch (org.apache.thrift.TException te) {
20469
        throw new java.io.IOException(te);
20470
      }
20471
    }
20472
 
20473
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20474
      try {
20475
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20476
      } catch (org.apache.thrift.TException te) {
20477
        throw new java.io.IOException(te);
20478
      }
20479
    }
20480
 
20481
  }
20482
 
9829 amar.kumar 20483
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
20484
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
20485
 
20486
    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);
20487
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
20488
 
20489
    private long id; // required
20490
    private long warehouseId; // required
20491
 
20492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20493
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20494
      ID((short)1, "id"),
20495
      WAREHOUSE_ID((short)2, "warehouseId");
20496
 
20497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20498
 
20499
      static {
20500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20501
          byName.put(field.getFieldName(), field);
20502
        }
20503
      }
20504
 
20505
      /**
20506
       * Find the _Fields constant that matches fieldId, or null if its not found.
20507
       */
20508
      public static _Fields findByThriftId(int fieldId) {
20509
        switch(fieldId) {
20510
          case 1: // ID
20511
            return ID;
20512
          case 2: // WAREHOUSE_ID
20513
            return WAREHOUSE_ID;
20514
          default:
20515
            return null;
20516
        }
20517
      }
20518
 
20519
      /**
20520
       * Find the _Fields constant that matches fieldId, throwing an exception
20521
       * if it is not found.
20522
       */
20523
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20524
        _Fields fields = findByThriftId(fieldId);
20525
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20526
        return fields;
20527
      }
20528
 
20529
      /**
20530
       * Find the _Fields constant that matches name, or null if its not found.
20531
       */
20532
      public static _Fields findByName(String name) {
20533
        return byName.get(name);
20534
      }
20535
 
20536
      private final short _thriftId;
20537
      private final String _fieldName;
20538
 
20539
      _Fields(short thriftId, String fieldName) {
20540
        _thriftId = thriftId;
20541
        _fieldName = fieldName;
20542
      }
20543
 
20544
      public short getThriftFieldId() {
20545
        return _thriftId;
20546
      }
20547
 
20548
      public String getFieldName() {
20549
        return _fieldName;
20550
      }
20551
    }
20552
 
20553
    // isset id assignments
20554
    private static final int __ID_ISSET_ID = 0;
20555
    private static final int __WAREHOUSEID_ISSET_ID = 1;
20556
    private BitSet __isset_bit_vector = new BitSet(2);
20557
 
20558
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20559
    static {
20560
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20561
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20562
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20563
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20564
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20565
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20566
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
20567
    }
20568
 
20569
    public changeWarehouseForPO_args() {
20570
    }
20571
 
20572
    public changeWarehouseForPO_args(
20573
      long id,
20574
      long warehouseId)
20575
    {
20576
      this();
20577
      this.id = id;
20578
      setIdIsSet(true);
20579
      this.warehouseId = warehouseId;
20580
      setWarehouseIdIsSet(true);
20581
    }
20582
 
20583
    /**
20584
     * Performs a deep copy on <i>other</i>.
20585
     */
20586
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
20587
      __isset_bit_vector.clear();
20588
      __isset_bit_vector.or(other.__isset_bit_vector);
20589
      this.id = other.id;
20590
      this.warehouseId = other.warehouseId;
20591
    }
20592
 
20593
    public changeWarehouseForPO_args deepCopy() {
20594
      return new changeWarehouseForPO_args(this);
20595
    }
20596
 
20597
    @Override
20598
    public void clear() {
20599
      setIdIsSet(false);
20600
      this.id = 0;
20601
      setWarehouseIdIsSet(false);
20602
      this.warehouseId = 0;
20603
    }
20604
 
20605
    public long getId() {
20606
      return this.id;
20607
    }
20608
 
20609
    public void setId(long id) {
20610
      this.id = id;
20611
      setIdIsSet(true);
20612
    }
20613
 
20614
    public void unsetId() {
20615
      __isset_bit_vector.clear(__ID_ISSET_ID);
20616
    }
20617
 
20618
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
20619
    public boolean isSetId() {
20620
      return __isset_bit_vector.get(__ID_ISSET_ID);
20621
    }
20622
 
20623
    public void setIdIsSet(boolean value) {
20624
      __isset_bit_vector.set(__ID_ISSET_ID, value);
20625
    }
20626
 
20627
    public long getWarehouseId() {
20628
      return this.warehouseId;
20629
    }
20630
 
20631
    public void setWarehouseId(long warehouseId) {
20632
      this.warehouseId = warehouseId;
20633
      setWarehouseIdIsSet(true);
20634
    }
20635
 
20636
    public void unsetWarehouseId() {
20637
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20638
    }
20639
 
20640
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
20641
    public boolean isSetWarehouseId() {
20642
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20643
    }
20644
 
20645
    public void setWarehouseIdIsSet(boolean value) {
20646
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20647
    }
20648
 
20649
    public void setFieldValue(_Fields field, Object value) {
20650
      switch (field) {
20651
      case ID:
20652
        if (value == null) {
20653
          unsetId();
20654
        } else {
20655
          setId((Long)value);
20656
        }
20657
        break;
20658
 
20659
      case WAREHOUSE_ID:
20660
        if (value == null) {
20661
          unsetWarehouseId();
20662
        } else {
20663
          setWarehouseId((Long)value);
20664
        }
20665
        break;
20666
 
20667
      }
20668
    }
20669
 
20670
    public Object getFieldValue(_Fields field) {
20671
      switch (field) {
20672
      case ID:
20673
        return Long.valueOf(getId());
20674
 
20675
      case WAREHOUSE_ID:
20676
        return Long.valueOf(getWarehouseId());
20677
 
20678
      }
20679
      throw new IllegalStateException();
20680
    }
20681
 
20682
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20683
    public boolean isSet(_Fields field) {
20684
      if (field == null) {
20685
        throw new IllegalArgumentException();
20686
      }
20687
 
20688
      switch (field) {
20689
      case ID:
20690
        return isSetId();
20691
      case WAREHOUSE_ID:
20692
        return isSetWarehouseId();
20693
      }
20694
      throw new IllegalStateException();
20695
    }
20696
 
20697
    @Override
20698
    public boolean equals(Object that) {
20699
      if (that == null)
20700
        return false;
20701
      if (that instanceof changeWarehouseForPO_args)
20702
        return this.equals((changeWarehouseForPO_args)that);
20703
      return false;
20704
    }
20705
 
20706
    public boolean equals(changeWarehouseForPO_args that) {
20707
      if (that == null)
20708
        return false;
20709
 
20710
      boolean this_present_id = true;
20711
      boolean that_present_id = true;
20712
      if (this_present_id || that_present_id) {
20713
        if (!(this_present_id && that_present_id))
20714
          return false;
20715
        if (this.id != that.id)
20716
          return false;
20717
      }
20718
 
20719
      boolean this_present_warehouseId = true;
20720
      boolean that_present_warehouseId = true;
20721
      if (this_present_warehouseId || that_present_warehouseId) {
20722
        if (!(this_present_warehouseId && that_present_warehouseId))
20723
          return false;
20724
        if (this.warehouseId != that.warehouseId)
20725
          return false;
20726
      }
20727
 
20728
      return true;
20729
    }
20730
 
20731
    @Override
20732
    public int hashCode() {
20733
      return 0;
20734
    }
20735
 
20736
    public int compareTo(changeWarehouseForPO_args other) {
20737
      if (!getClass().equals(other.getClass())) {
20738
        return getClass().getName().compareTo(other.getClass().getName());
20739
      }
20740
 
20741
      int lastComparison = 0;
20742
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
20743
 
20744
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
20745
      if (lastComparison != 0) {
20746
        return lastComparison;
20747
      }
20748
      if (isSetId()) {
20749
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
20750
        if (lastComparison != 0) {
20751
          return lastComparison;
20752
        }
20753
      }
20754
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
20755
      if (lastComparison != 0) {
20756
        return lastComparison;
20757
      }
20758
      if (isSetWarehouseId()) {
20759
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
20760
        if (lastComparison != 0) {
20761
          return lastComparison;
20762
        }
20763
      }
20764
      return 0;
20765
    }
20766
 
20767
    public _Fields fieldForId(int fieldId) {
20768
      return _Fields.findByThriftId(fieldId);
20769
    }
20770
 
20771
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20772
      org.apache.thrift.protocol.TField field;
20773
      iprot.readStructBegin();
20774
      while (true)
20775
      {
20776
        field = iprot.readFieldBegin();
20777
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20778
          break;
20779
        }
20780
        switch (field.id) {
20781
          case 1: // ID
20782
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20783
              this.id = iprot.readI64();
20784
              setIdIsSet(true);
20785
            } else { 
20786
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20787
            }
20788
            break;
20789
          case 2: // WAREHOUSE_ID
20790
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20791
              this.warehouseId = iprot.readI64();
20792
              setWarehouseIdIsSet(true);
20793
            } else { 
20794
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20795
            }
20796
            break;
20797
          default:
20798
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20799
        }
20800
        iprot.readFieldEnd();
20801
      }
20802
      iprot.readStructEnd();
20803
      validate();
20804
    }
20805
 
20806
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20807
      validate();
20808
 
20809
      oprot.writeStructBegin(STRUCT_DESC);
20810
      oprot.writeFieldBegin(ID_FIELD_DESC);
20811
      oprot.writeI64(this.id);
20812
      oprot.writeFieldEnd();
20813
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20814
      oprot.writeI64(this.warehouseId);
20815
      oprot.writeFieldEnd();
20816
      oprot.writeFieldStop();
20817
      oprot.writeStructEnd();
20818
    }
20819
 
20820
    @Override
20821
    public String toString() {
20822
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
20823
      boolean first = true;
20824
 
20825
      sb.append("id:");
20826
      sb.append(this.id);
20827
      first = false;
20828
      if (!first) sb.append(", ");
20829
      sb.append("warehouseId:");
20830
      sb.append(this.warehouseId);
20831
      first = false;
20832
      sb.append(")");
20833
      return sb.toString();
20834
    }
20835
 
20836
    public void validate() throws org.apache.thrift.TException {
20837
      // check for required fields
20838
    }
20839
 
20840
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20841
      try {
20842
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20843
      } catch (org.apache.thrift.TException te) {
20844
        throw new java.io.IOException(te);
20845
      }
20846
    }
20847
 
20848
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20849
      try {
20850
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20851
      } catch (org.apache.thrift.TException te) {
20852
        throw new java.io.IOException(te);
20853
      }
20854
    }
20855
 
20856
  }
20857
 
20858
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
20859
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
20860
 
20861
    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);
20862
 
20863
    private PurchaseServiceException e; // required
20864
 
20865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20866
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20867
      E((short)1, "e");
20868
 
20869
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20870
 
20871
      static {
20872
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20873
          byName.put(field.getFieldName(), field);
20874
        }
20875
      }
20876
 
20877
      /**
20878
       * Find the _Fields constant that matches fieldId, or null if its not found.
20879
       */
20880
      public static _Fields findByThriftId(int fieldId) {
20881
        switch(fieldId) {
20882
          case 1: // E
20883
            return E;
20884
          default:
20885
            return null;
20886
        }
20887
      }
20888
 
20889
      /**
20890
       * Find the _Fields constant that matches fieldId, throwing an exception
20891
       * if it is not found.
20892
       */
20893
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20894
        _Fields fields = findByThriftId(fieldId);
20895
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20896
        return fields;
20897
      }
20898
 
20899
      /**
20900
       * Find the _Fields constant that matches name, or null if its not found.
20901
       */
20902
      public static _Fields findByName(String name) {
20903
        return byName.get(name);
20904
      }
20905
 
20906
      private final short _thriftId;
20907
      private final String _fieldName;
20908
 
20909
      _Fields(short thriftId, String fieldName) {
20910
        _thriftId = thriftId;
20911
        _fieldName = fieldName;
20912
      }
20913
 
20914
      public short getThriftFieldId() {
20915
        return _thriftId;
20916
      }
20917
 
20918
      public String getFieldName() {
20919
        return _fieldName;
20920
      }
20921
    }
20922
 
20923
    // isset id assignments
20924
 
20925
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20926
    static {
20927
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20928
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20929
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
20930
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20931
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
20932
    }
20933
 
20934
    public changeWarehouseForPO_result() {
20935
    }
20936
 
20937
    public changeWarehouseForPO_result(
20938
      PurchaseServiceException e)
20939
    {
20940
      this();
20941
      this.e = e;
20942
    }
20943
 
20944
    /**
20945
     * Performs a deep copy on <i>other</i>.
20946
     */
20947
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
20948
      if (other.isSetE()) {
20949
        this.e = new PurchaseServiceException(other.e);
20950
      }
20951
    }
20952
 
20953
    public changeWarehouseForPO_result deepCopy() {
20954
      return new changeWarehouseForPO_result(this);
20955
    }
20956
 
20957
    @Override
20958
    public void clear() {
20959
      this.e = null;
20960
    }
20961
 
20962
    public PurchaseServiceException getE() {
20963
      return this.e;
20964
    }
20965
 
20966
    public void setE(PurchaseServiceException e) {
20967
      this.e = e;
20968
    }
20969
 
20970
    public void unsetE() {
20971
      this.e = null;
20972
    }
20973
 
20974
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
20975
    public boolean isSetE() {
20976
      return this.e != null;
20977
    }
20978
 
20979
    public void setEIsSet(boolean value) {
20980
      if (!value) {
20981
        this.e = null;
20982
      }
20983
    }
20984
 
20985
    public void setFieldValue(_Fields field, Object value) {
20986
      switch (field) {
20987
      case E:
20988
        if (value == null) {
20989
          unsetE();
20990
        } else {
20991
          setE((PurchaseServiceException)value);
20992
        }
20993
        break;
20994
 
20995
      }
20996
    }
20997
 
20998
    public Object getFieldValue(_Fields field) {
20999
      switch (field) {
21000
      case E:
21001
        return getE();
21002
 
21003
      }
21004
      throw new IllegalStateException();
21005
    }
21006
 
21007
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21008
    public boolean isSet(_Fields field) {
21009
      if (field == null) {
21010
        throw new IllegalArgumentException();
21011
      }
21012
 
21013
      switch (field) {
21014
      case E:
21015
        return isSetE();
21016
      }
21017
      throw new IllegalStateException();
21018
    }
21019
 
21020
    @Override
21021
    public boolean equals(Object that) {
21022
      if (that == null)
21023
        return false;
21024
      if (that instanceof changeWarehouseForPO_result)
21025
        return this.equals((changeWarehouseForPO_result)that);
21026
      return false;
21027
    }
21028
 
21029
    public boolean equals(changeWarehouseForPO_result that) {
21030
      if (that == null)
21031
        return false;
21032
 
21033
      boolean this_present_e = true && this.isSetE();
21034
      boolean that_present_e = true && that.isSetE();
21035
      if (this_present_e || that_present_e) {
21036
        if (!(this_present_e && that_present_e))
21037
          return false;
21038
        if (!this.e.equals(that.e))
21039
          return false;
21040
      }
21041
 
21042
      return true;
21043
    }
21044
 
21045
    @Override
21046
    public int hashCode() {
21047
      return 0;
21048
    }
21049
 
21050
    public int compareTo(changeWarehouseForPO_result other) {
21051
      if (!getClass().equals(other.getClass())) {
21052
        return getClass().getName().compareTo(other.getClass().getName());
21053
      }
21054
 
21055
      int lastComparison = 0;
21056
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
21057
 
21058
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21059
      if (lastComparison != 0) {
21060
        return lastComparison;
21061
      }
21062
      if (isSetE()) {
21063
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21064
        if (lastComparison != 0) {
21065
          return lastComparison;
21066
        }
21067
      }
21068
      return 0;
21069
    }
21070
 
21071
    public _Fields fieldForId(int fieldId) {
21072
      return _Fields.findByThriftId(fieldId);
21073
    }
21074
 
21075
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21076
      org.apache.thrift.protocol.TField field;
21077
      iprot.readStructBegin();
21078
      while (true)
21079
      {
21080
        field = iprot.readFieldBegin();
21081
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21082
          break;
21083
        }
21084
        switch (field.id) {
21085
          case 1: // E
21086
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21087
              this.e = new PurchaseServiceException();
21088
              this.e.read(iprot);
21089
            } else { 
21090
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21091
            }
21092
            break;
21093
          default:
21094
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21095
        }
21096
        iprot.readFieldEnd();
21097
      }
21098
      iprot.readStructEnd();
21099
      validate();
21100
    }
21101
 
21102
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21103
      oprot.writeStructBegin(STRUCT_DESC);
21104
 
21105
      if (this.isSetE()) {
21106
        oprot.writeFieldBegin(E_FIELD_DESC);
21107
        this.e.write(oprot);
21108
        oprot.writeFieldEnd();
21109
      }
21110
      oprot.writeFieldStop();
21111
      oprot.writeStructEnd();
21112
    }
21113
 
21114
    @Override
21115
    public String toString() {
21116
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
21117
      boolean first = true;
21118
 
21119
      sb.append("e:");
21120
      if (this.e == null) {
21121
        sb.append("null");
21122
      } else {
21123
        sb.append(this.e);
21124
      }
21125
      first = false;
21126
      sb.append(")");
21127
      return sb.toString();
21128
    }
21129
 
21130
    public void validate() throws org.apache.thrift.TException {
21131
      // check for required fields
21132
    }
21133
 
21134
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21135
      try {
21136
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21137
      } catch (org.apache.thrift.TException te) {
21138
        throw new java.io.IOException(te);
21139
      }
21140
    }
21141
 
21142
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21143
      try {
21144
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21145
      } catch (org.apache.thrift.TException te) {
21146
        throw new java.io.IOException(te);
21147
      }
21148
    }
21149
 
21150
  }
21151
 
9925 amar.kumar 21152
  public static class changePOStatus_args implements org.apache.thrift.TBase<changePOStatus_args, changePOStatus_args._Fields>, java.io.Serializable, Cloneable   {
21153
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_args");
21154
 
21155
    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);
21156
    private static final org.apache.thrift.protocol.TField PO_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("poStatus", org.apache.thrift.protocol.TType.I32, (short)2);
21157
 
21158
    private long id; // required
21159
    private POStatus poStatus; // required
21160
 
21161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21162
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21163
      ID((short)1, "id"),
21164
      /**
21165
       * 
21166
       * @see POStatus
21167
       */
21168
      PO_STATUS((short)2, "poStatus");
21169
 
21170
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21171
 
21172
      static {
21173
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21174
          byName.put(field.getFieldName(), field);
21175
        }
21176
      }
21177
 
21178
      /**
21179
       * Find the _Fields constant that matches fieldId, or null if its not found.
21180
       */
21181
      public static _Fields findByThriftId(int fieldId) {
21182
        switch(fieldId) {
21183
          case 1: // ID
21184
            return ID;
21185
          case 2: // PO_STATUS
21186
            return PO_STATUS;
21187
          default:
21188
            return null;
21189
        }
21190
      }
21191
 
21192
      /**
21193
       * Find the _Fields constant that matches fieldId, throwing an exception
21194
       * if it is not found.
21195
       */
21196
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21197
        _Fields fields = findByThriftId(fieldId);
21198
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21199
        return fields;
21200
      }
21201
 
21202
      /**
21203
       * Find the _Fields constant that matches name, or null if its not found.
21204
       */
21205
      public static _Fields findByName(String name) {
21206
        return byName.get(name);
21207
      }
21208
 
21209
      private final short _thriftId;
21210
      private final String _fieldName;
21211
 
21212
      _Fields(short thriftId, String fieldName) {
21213
        _thriftId = thriftId;
21214
        _fieldName = fieldName;
21215
      }
21216
 
21217
      public short getThriftFieldId() {
21218
        return _thriftId;
21219
      }
21220
 
21221
      public String getFieldName() {
21222
        return _fieldName;
21223
      }
21224
    }
21225
 
21226
    // isset id assignments
21227
    private static final int __ID_ISSET_ID = 0;
21228
    private BitSet __isset_bit_vector = new BitSet(1);
21229
 
21230
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21231
    static {
21232
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21233
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21234
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21235
      tmpMap.put(_Fields.PO_STATUS, new org.apache.thrift.meta_data.FieldMetaData("poStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21236
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
21237
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21238
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_args.class, metaDataMap);
21239
    }
21240
 
21241
    public changePOStatus_args() {
21242
    }
21243
 
21244
    public changePOStatus_args(
21245
      long id,
21246
      POStatus poStatus)
21247
    {
21248
      this();
21249
      this.id = id;
21250
      setIdIsSet(true);
21251
      this.poStatus = poStatus;
21252
    }
21253
 
21254
    /**
21255
     * Performs a deep copy on <i>other</i>.
21256
     */
21257
    public changePOStatus_args(changePOStatus_args other) {
21258
      __isset_bit_vector.clear();
21259
      __isset_bit_vector.or(other.__isset_bit_vector);
21260
      this.id = other.id;
21261
      if (other.isSetPoStatus()) {
21262
        this.poStatus = other.poStatus;
21263
      }
21264
    }
21265
 
21266
    public changePOStatus_args deepCopy() {
21267
      return new changePOStatus_args(this);
21268
    }
21269
 
21270
    @Override
21271
    public void clear() {
21272
      setIdIsSet(false);
21273
      this.id = 0;
21274
      this.poStatus = null;
21275
    }
21276
 
21277
    public long getId() {
21278
      return this.id;
21279
    }
21280
 
21281
    public void setId(long id) {
21282
      this.id = id;
21283
      setIdIsSet(true);
21284
    }
21285
 
21286
    public void unsetId() {
21287
      __isset_bit_vector.clear(__ID_ISSET_ID);
21288
    }
21289
 
21290
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
21291
    public boolean isSetId() {
21292
      return __isset_bit_vector.get(__ID_ISSET_ID);
21293
    }
21294
 
21295
    public void setIdIsSet(boolean value) {
21296
      __isset_bit_vector.set(__ID_ISSET_ID, value);
21297
    }
21298
 
21299
    /**
21300
     * 
21301
     * @see POStatus
21302
     */
21303
    public POStatus getPoStatus() {
21304
      return this.poStatus;
21305
    }
21306
 
21307
    /**
21308
     * 
21309
     * @see POStatus
21310
     */
21311
    public void setPoStatus(POStatus poStatus) {
21312
      this.poStatus = poStatus;
21313
    }
21314
 
21315
    public void unsetPoStatus() {
21316
      this.poStatus = null;
21317
    }
21318
 
21319
    /** Returns true if field poStatus is set (has been assigned a value) and false otherwise */
21320
    public boolean isSetPoStatus() {
21321
      return this.poStatus != null;
21322
    }
21323
 
21324
    public void setPoStatusIsSet(boolean value) {
21325
      if (!value) {
21326
        this.poStatus = null;
21327
      }
21328
    }
21329
 
21330
    public void setFieldValue(_Fields field, Object value) {
21331
      switch (field) {
21332
      case ID:
21333
        if (value == null) {
21334
          unsetId();
21335
        } else {
21336
          setId((Long)value);
21337
        }
21338
        break;
21339
 
21340
      case PO_STATUS:
21341
        if (value == null) {
21342
          unsetPoStatus();
21343
        } else {
21344
          setPoStatus((POStatus)value);
21345
        }
21346
        break;
21347
 
21348
      }
21349
    }
21350
 
21351
    public Object getFieldValue(_Fields field) {
21352
      switch (field) {
21353
      case ID:
21354
        return Long.valueOf(getId());
21355
 
21356
      case PO_STATUS:
21357
        return getPoStatus();
21358
 
21359
      }
21360
      throw new IllegalStateException();
21361
    }
21362
 
21363
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21364
    public boolean isSet(_Fields field) {
21365
      if (field == null) {
21366
        throw new IllegalArgumentException();
21367
      }
21368
 
21369
      switch (field) {
21370
      case ID:
21371
        return isSetId();
21372
      case PO_STATUS:
21373
        return isSetPoStatus();
21374
      }
21375
      throw new IllegalStateException();
21376
    }
21377
 
21378
    @Override
21379
    public boolean equals(Object that) {
21380
      if (that == null)
21381
        return false;
21382
      if (that instanceof changePOStatus_args)
21383
        return this.equals((changePOStatus_args)that);
21384
      return false;
21385
    }
21386
 
21387
    public boolean equals(changePOStatus_args that) {
21388
      if (that == null)
21389
        return false;
21390
 
21391
      boolean this_present_id = true;
21392
      boolean that_present_id = true;
21393
      if (this_present_id || that_present_id) {
21394
        if (!(this_present_id && that_present_id))
21395
          return false;
21396
        if (this.id != that.id)
21397
          return false;
21398
      }
21399
 
21400
      boolean this_present_poStatus = true && this.isSetPoStatus();
21401
      boolean that_present_poStatus = true && that.isSetPoStatus();
21402
      if (this_present_poStatus || that_present_poStatus) {
21403
        if (!(this_present_poStatus && that_present_poStatus))
21404
          return false;
21405
        if (!this.poStatus.equals(that.poStatus))
21406
          return false;
21407
      }
21408
 
21409
      return true;
21410
    }
21411
 
21412
    @Override
21413
    public int hashCode() {
21414
      return 0;
21415
    }
21416
 
21417
    public int compareTo(changePOStatus_args other) {
21418
      if (!getClass().equals(other.getClass())) {
21419
        return getClass().getName().compareTo(other.getClass().getName());
21420
      }
21421
 
21422
      int lastComparison = 0;
21423
      changePOStatus_args typedOther = (changePOStatus_args)other;
21424
 
21425
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
21426
      if (lastComparison != 0) {
21427
        return lastComparison;
21428
      }
21429
      if (isSetId()) {
21430
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
21431
        if (lastComparison != 0) {
21432
          return lastComparison;
21433
        }
21434
      }
21435
      lastComparison = Boolean.valueOf(isSetPoStatus()).compareTo(typedOther.isSetPoStatus());
21436
      if (lastComparison != 0) {
21437
        return lastComparison;
21438
      }
21439
      if (isSetPoStatus()) {
21440
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poStatus, typedOther.poStatus);
21441
        if (lastComparison != 0) {
21442
          return lastComparison;
21443
        }
21444
      }
21445
      return 0;
21446
    }
21447
 
21448
    public _Fields fieldForId(int fieldId) {
21449
      return _Fields.findByThriftId(fieldId);
21450
    }
21451
 
21452
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21453
      org.apache.thrift.protocol.TField field;
21454
      iprot.readStructBegin();
21455
      while (true)
21456
      {
21457
        field = iprot.readFieldBegin();
21458
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21459
          break;
21460
        }
21461
        switch (field.id) {
21462
          case 1: // ID
21463
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21464
              this.id = iprot.readI64();
21465
              setIdIsSet(true);
21466
            } else { 
21467
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21468
            }
21469
            break;
21470
          case 2: // PO_STATUS
21471
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21472
              this.poStatus = POStatus.findByValue(iprot.readI32());
21473
            } else { 
21474
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21475
            }
21476
            break;
21477
          default:
21478
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21479
        }
21480
        iprot.readFieldEnd();
21481
      }
21482
      iprot.readStructEnd();
21483
      validate();
21484
    }
21485
 
21486
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21487
      validate();
21488
 
21489
      oprot.writeStructBegin(STRUCT_DESC);
21490
      oprot.writeFieldBegin(ID_FIELD_DESC);
21491
      oprot.writeI64(this.id);
21492
      oprot.writeFieldEnd();
21493
      if (this.poStatus != null) {
21494
        oprot.writeFieldBegin(PO_STATUS_FIELD_DESC);
21495
        oprot.writeI32(this.poStatus.getValue());
21496
        oprot.writeFieldEnd();
21497
      }
21498
      oprot.writeFieldStop();
21499
      oprot.writeStructEnd();
21500
    }
21501
 
21502
    @Override
21503
    public String toString() {
21504
      StringBuilder sb = new StringBuilder("changePOStatus_args(");
21505
      boolean first = true;
21506
 
21507
      sb.append("id:");
21508
      sb.append(this.id);
21509
      first = false;
21510
      if (!first) sb.append(", ");
21511
      sb.append("poStatus:");
21512
      if (this.poStatus == null) {
21513
        sb.append("null");
21514
      } else {
21515
        sb.append(this.poStatus);
21516
      }
21517
      first = false;
21518
      sb.append(")");
21519
      return sb.toString();
21520
    }
21521
 
21522
    public void validate() throws org.apache.thrift.TException {
21523
      // check for required fields
21524
    }
21525
 
21526
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21527
      try {
21528
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21529
      } catch (org.apache.thrift.TException te) {
21530
        throw new java.io.IOException(te);
21531
      }
21532
    }
21533
 
21534
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21535
      try {
21536
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21537
        __isset_bit_vector = new BitSet(1);
21538
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21539
      } catch (org.apache.thrift.TException te) {
21540
        throw new java.io.IOException(te);
21541
      }
21542
    }
21543
 
21544
  }
21545
 
21546
  public static class changePOStatus_result implements org.apache.thrift.TBase<changePOStatus_result, changePOStatus_result._Fields>, java.io.Serializable, Cloneable   {
21547
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePOStatus_result");
21548
 
21549
    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);
21550
 
21551
    private PurchaseServiceException e; // required
21552
 
21553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21554
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21555
      E((short)1, "e");
21556
 
21557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21558
 
21559
      static {
21560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21561
          byName.put(field.getFieldName(), field);
21562
        }
21563
      }
21564
 
21565
      /**
21566
       * Find the _Fields constant that matches fieldId, or null if its not found.
21567
       */
21568
      public static _Fields findByThriftId(int fieldId) {
21569
        switch(fieldId) {
21570
          case 1: // E
21571
            return E;
21572
          default:
21573
            return null;
21574
        }
21575
      }
21576
 
21577
      /**
21578
       * Find the _Fields constant that matches fieldId, throwing an exception
21579
       * if it is not found.
21580
       */
21581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21582
        _Fields fields = findByThriftId(fieldId);
21583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21584
        return fields;
21585
      }
21586
 
21587
      /**
21588
       * Find the _Fields constant that matches name, or null if its not found.
21589
       */
21590
      public static _Fields findByName(String name) {
21591
        return byName.get(name);
21592
      }
21593
 
21594
      private final short _thriftId;
21595
      private final String _fieldName;
21596
 
21597
      _Fields(short thriftId, String fieldName) {
21598
        _thriftId = thriftId;
21599
        _fieldName = fieldName;
21600
      }
21601
 
21602
      public short getThriftFieldId() {
21603
        return _thriftId;
21604
      }
21605
 
21606
      public String getFieldName() {
21607
        return _fieldName;
21608
      }
21609
    }
21610
 
21611
    // isset id assignments
21612
 
21613
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21614
    static {
21615
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21616
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21617
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21618
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21619
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePOStatus_result.class, metaDataMap);
21620
    }
21621
 
21622
    public changePOStatus_result() {
21623
    }
21624
 
21625
    public changePOStatus_result(
21626
      PurchaseServiceException e)
21627
    {
21628
      this();
21629
      this.e = e;
21630
    }
21631
 
21632
    /**
21633
     * Performs a deep copy on <i>other</i>.
21634
     */
21635
    public changePOStatus_result(changePOStatus_result other) {
21636
      if (other.isSetE()) {
21637
        this.e = new PurchaseServiceException(other.e);
21638
      }
21639
    }
21640
 
21641
    public changePOStatus_result deepCopy() {
21642
      return new changePOStatus_result(this);
21643
    }
21644
 
21645
    @Override
21646
    public void clear() {
21647
      this.e = null;
21648
    }
21649
 
21650
    public PurchaseServiceException getE() {
21651
      return this.e;
21652
    }
21653
 
21654
    public void setE(PurchaseServiceException e) {
21655
      this.e = e;
21656
    }
21657
 
21658
    public void unsetE() {
21659
      this.e = null;
21660
    }
21661
 
21662
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
21663
    public boolean isSetE() {
21664
      return this.e != null;
21665
    }
21666
 
21667
    public void setEIsSet(boolean value) {
21668
      if (!value) {
21669
        this.e = null;
21670
      }
21671
    }
21672
 
21673
    public void setFieldValue(_Fields field, Object value) {
21674
      switch (field) {
21675
      case E:
21676
        if (value == null) {
21677
          unsetE();
21678
        } else {
21679
          setE((PurchaseServiceException)value);
21680
        }
21681
        break;
21682
 
21683
      }
21684
    }
21685
 
21686
    public Object getFieldValue(_Fields field) {
21687
      switch (field) {
21688
      case E:
21689
        return getE();
21690
 
21691
      }
21692
      throw new IllegalStateException();
21693
    }
21694
 
21695
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21696
    public boolean isSet(_Fields field) {
21697
      if (field == null) {
21698
        throw new IllegalArgumentException();
21699
      }
21700
 
21701
      switch (field) {
21702
      case E:
21703
        return isSetE();
21704
      }
21705
      throw new IllegalStateException();
21706
    }
21707
 
21708
    @Override
21709
    public boolean equals(Object that) {
21710
      if (that == null)
21711
        return false;
21712
      if (that instanceof changePOStatus_result)
21713
        return this.equals((changePOStatus_result)that);
21714
      return false;
21715
    }
21716
 
21717
    public boolean equals(changePOStatus_result that) {
21718
      if (that == null)
21719
        return false;
21720
 
21721
      boolean this_present_e = true && this.isSetE();
21722
      boolean that_present_e = true && that.isSetE();
21723
      if (this_present_e || that_present_e) {
21724
        if (!(this_present_e && that_present_e))
21725
          return false;
21726
        if (!this.e.equals(that.e))
21727
          return false;
21728
      }
21729
 
21730
      return true;
21731
    }
21732
 
21733
    @Override
21734
    public int hashCode() {
21735
      return 0;
21736
    }
21737
 
21738
    public int compareTo(changePOStatus_result other) {
21739
      if (!getClass().equals(other.getClass())) {
21740
        return getClass().getName().compareTo(other.getClass().getName());
21741
      }
21742
 
21743
      int lastComparison = 0;
21744
      changePOStatus_result typedOther = (changePOStatus_result)other;
21745
 
21746
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
21747
      if (lastComparison != 0) {
21748
        return lastComparison;
21749
      }
21750
      if (isSetE()) {
21751
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
21752
        if (lastComparison != 0) {
21753
          return lastComparison;
21754
        }
21755
      }
21756
      return 0;
21757
    }
21758
 
21759
    public _Fields fieldForId(int fieldId) {
21760
      return _Fields.findByThriftId(fieldId);
21761
    }
21762
 
21763
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21764
      org.apache.thrift.protocol.TField field;
21765
      iprot.readStructBegin();
21766
      while (true)
21767
      {
21768
        field = iprot.readFieldBegin();
21769
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21770
          break;
21771
        }
21772
        switch (field.id) {
21773
          case 1: // E
21774
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
21775
              this.e = new PurchaseServiceException();
21776
              this.e.read(iprot);
21777
            } else { 
21778
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21779
            }
21780
            break;
21781
          default:
21782
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21783
        }
21784
        iprot.readFieldEnd();
21785
      }
21786
      iprot.readStructEnd();
21787
      validate();
21788
    }
21789
 
21790
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21791
      oprot.writeStructBegin(STRUCT_DESC);
21792
 
21793
      if (this.isSetE()) {
21794
        oprot.writeFieldBegin(E_FIELD_DESC);
21795
        this.e.write(oprot);
21796
        oprot.writeFieldEnd();
21797
      }
21798
      oprot.writeFieldStop();
21799
      oprot.writeStructEnd();
21800
    }
21801
 
21802
    @Override
21803
    public String toString() {
21804
      StringBuilder sb = new StringBuilder("changePOStatus_result(");
21805
      boolean first = true;
21806
 
21807
      sb.append("e:");
21808
      if (this.e == null) {
21809
        sb.append("null");
21810
      } else {
21811
        sb.append(this.e);
21812
      }
21813
      first = false;
21814
      sb.append(")");
21815
      return sb.toString();
21816
    }
21817
 
21818
    public void validate() throws org.apache.thrift.TException {
21819
      // check for required fields
21820
    }
21821
 
21822
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21823
      try {
21824
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21825
      } catch (org.apache.thrift.TException te) {
21826
        throw new java.io.IOException(te);
21827
      }
21828
    }
21829
 
21830
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21831
      try {
21832
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21833
      } catch (org.apache.thrift.TException te) {
21834
        throw new java.io.IOException(te);
21835
      }
21836
    }
21837
 
21838
  }
21839
 
4496 mandeep.dh 21840
}