Subversion Repositories SmartDukaan

Rev

Rev 7672 | Rev 9925 | 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
 
4496 mandeep.dh 233
  }
234
 
235
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
236
 
237
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
238
 
239
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
240
 
241
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
242
 
243
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
244
 
245
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
246
 
247
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
248
 
249
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
250
 
6385 amar.kumar 251
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
252
 
4555 mandeep.dh 253
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 254
 
4754 mandeep.dh 255
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
256
 
257
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
258
 
259
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
260
 
261
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
262
 
5185 mandeep.dh 263
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
264
 
5443 mandeep.dh 265
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
266
 
7410 amar.kumar 267
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException;
268
 
5443 mandeep.dh 269
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
270
 
5591 mandeep.dh 271
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
272
 
273
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
274
 
6467 amar.kumar 275
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
276
 
277
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
278
 
279
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
280
 
6630 amar.kumar 281
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
282
 
7672 rajveer 283
    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 284
 
285
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
286
 
7410 amar.kumar 287
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
288
 
289
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
290
 
9829 amar.kumar 291
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
292
 
4496 mandeep.dh 293
  }
294
 
295
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
296
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
297
      public Factory() {}
298
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
299
        return new Client(prot);
300
      }
301
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
302
        return new Client(iprot, oprot);
303
      }
304
    }
305
 
306
    public Client(org.apache.thrift.protocol.TProtocol prot)
307
    {
308
      super(prot, prot);
309
    }
310
 
311
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
312
      super(iprot, oprot);
313
    }
314
 
315
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
316
    {
317
      send_createPurchaseOrder(purchaseOrder);
318
      return recv_createPurchaseOrder();
319
    }
320
 
321
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
322
    {
323
      createPurchaseOrder_args args = new createPurchaseOrder_args();
324
      args.setPurchaseOrder(purchaseOrder);
325
      sendBase("createPurchaseOrder", args);
326
    }
327
 
328
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
329
    {
330
      createPurchaseOrder_result result = new createPurchaseOrder_result();
331
      receiveBase(result, "createPurchaseOrder");
332
      if (result.isSetSuccess()) {
333
        return result.success;
334
      }
335
      if (result.e != null) {
336
        throw result.e;
337
      }
338
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
339
    }
340
 
341
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
342
    {
343
      send_getPurchaseOrder(id);
344
      return recv_getPurchaseOrder();
345
    }
346
 
347
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
348
    {
349
      getPurchaseOrder_args args = new getPurchaseOrder_args();
350
      args.setId(id);
351
      sendBase("getPurchaseOrder", args);
352
    }
353
 
354
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
355
    {
356
      getPurchaseOrder_result result = new getPurchaseOrder_result();
357
      receiveBase(result, "getPurchaseOrder");
358
      if (result.isSetSuccess()) {
359
        return result.success;
360
      }
361
      if (result.e != null) {
362
        throw result.e;
363
      }
364
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
365
    }
366
 
367
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
368
    {
369
      send_getAllPurchaseOrders(status);
370
      return recv_getAllPurchaseOrders();
371
    }
372
 
373
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
374
    {
375
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
376
      args.setStatus(status);
377
      sendBase("getAllPurchaseOrders", args);
378
    }
379
 
380
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
381
    {
382
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
383
      receiveBase(result, "getAllPurchaseOrders");
384
      if (result.isSetSuccess()) {
385
        return result.success;
386
      }
387
      if (result.e != null) {
388
        throw result.e;
389
      }
390
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
391
    }
392
 
393
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
394
    {
395
      send_getSupplier(id);
396
      return recv_getSupplier();
397
    }
398
 
399
    public void send_getSupplier(long id) throws org.apache.thrift.TException
400
    {
401
      getSupplier_args args = new getSupplier_args();
402
      args.setId(id);
403
      sendBase("getSupplier", args);
404
    }
405
 
406
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
407
    {
408
      getSupplier_result result = new getSupplier_result();
409
      receiveBase(result, "getSupplier");
410
      if (result.isSetSuccess()) {
411
        return result.success;
412
      }
413
      if (result.e != null) {
414
        throw result.e;
415
      }
416
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
417
    }
418
 
419
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
420
    {
421
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
422
      return recv_startPurchase();
423
    }
424
 
425
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
426
    {
427
      startPurchase_args args = new startPurchase_args();
428
      args.setPurchaseOrderId(purchaseOrderId);
429
      args.setInvoiceNumber(invoiceNumber);
430
      args.setFreightCharges(freightCharges);
431
      sendBase("startPurchase", args);
432
    }
433
 
434
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
435
    {
436
      startPurchase_result result = new startPurchase_result();
437
      receiveBase(result, "startPurchase");
438
      if (result.isSetSuccess()) {
439
        return result.success;
440
      }
441
      if (result.e != null) {
442
        throw result.e;
443
      }
444
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
445
    }
446
 
447
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
448
    {
449
      send_closePurchase(purchaseId);
450
      return recv_closePurchase();
451
    }
452
 
453
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
454
    {
455
      closePurchase_args args = new closePurchase_args();
456
      args.setPurchaseId(purchaseId);
457
      sendBase("closePurchase", args);
458
    }
459
 
460
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
461
    {
462
      closePurchase_result result = new closePurchase_result();
463
      receiveBase(result, "closePurchase");
464
      if (result.isSetSuccess()) {
465
        return result.success;
466
      }
467
      if (result.e != null) {
468
        throw result.e;
469
      }
470
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
471
    }
472
 
473
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
474
    {
475
      send_getAllPurchases(purchaseOrderId, open);
476
      return recv_getAllPurchases();
477
    }
478
 
479
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
480
    {
481
      getAllPurchases_args args = new getAllPurchases_args();
482
      args.setPurchaseOrderId(purchaseOrderId);
483
      args.setOpen(open);
484
      sendBase("getAllPurchases", args);
485
    }
486
 
487
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
488
    {
489
      getAllPurchases_result result = new getAllPurchases_result();
490
      receiveBase(result, "getAllPurchases");
491
      if (result.isSetSuccess()) {
492
        return result.success;
493
      }
494
      if (result.e != null) {
495
        throw result.e;
496
      }
497
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
498
    }
499
 
6385 amar.kumar 500
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
501
    {
502
      send_getPurchasesForPO(purchaseOrderId);
503
      return recv_getPurchasesForPO();
504
    }
505
 
506
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
507
    {
508
      getPurchasesForPO_args args = new getPurchasesForPO_args();
509
      args.setPurchaseOrderId(purchaseOrderId);
510
      sendBase("getPurchasesForPO", args);
511
    }
512
 
513
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
514
    {
515
      getPurchasesForPO_result result = new getPurchasesForPO_result();
516
      receiveBase(result, "getPurchasesForPO");
517
      if (result.isSetSuccess()) {
518
        return result.success;
519
      }
520
      if (result.e != null) {
521
        throw result.e;
522
      }
523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
524
    }
525
 
4555 mandeep.dh 526
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 527
    {
4555 mandeep.dh 528
      send_getPurchaseOrderForPurchase(purchaseId);
529
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 530
    }
531
 
4555 mandeep.dh 532
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 533
    {
4555 mandeep.dh 534
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 535
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 536
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 537
    }
538
 
4555 mandeep.dh 539
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 540
    {
4555 mandeep.dh 541
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
542
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
4555 mandeep.dh 546
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 547
    }
548
 
4754 mandeep.dh 549
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
550
    {
551
      send_getPendingPurchaseOrders(warehouseId);
552
      return recv_getPendingPurchaseOrders();
553
    }
554
 
555
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
556
    {
557
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
558
      args.setWarehouseId(warehouseId);
559
      sendBase("getPendingPurchaseOrders", args);
560
    }
561
 
562
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
563
    {
564
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
565
      receiveBase(result, "getPendingPurchaseOrders");
566
      if (result.isSetSuccess()) {
567
        return result.success;
568
      }
569
      if (result.e != null) {
570
        throw result.e;
571
      }
572
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
573
    }
574
 
575
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
576
    {
577
      send_getSuppliers();
578
      return recv_getSuppliers();
579
    }
580
 
581
    public void send_getSuppliers() throws org.apache.thrift.TException
582
    {
583
      getSuppliers_args args = new getSuppliers_args();
584
      sendBase("getSuppliers", args);
585
    }
586
 
587
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
588
    {
589
      getSuppliers_result result = new getSuppliers_result();
590
      receiveBase(result, "getSuppliers");
591
      if (result.isSetSuccess()) {
592
        return result.success;
593
      }
594
      if (result.e != null) {
595
        throw result.e;
596
      }
597
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
598
    }
599
 
600
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
601
    {
602
      send_fulfillPO(purchaseOrderId, itemId, quantity);
603
      recv_fulfillPO();
604
    }
605
 
606
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
607
    {
608
      fulfillPO_args args = new fulfillPO_args();
609
      args.setPurchaseOrderId(purchaseOrderId);
610
      args.setItemId(itemId);
611
      args.setQuantity(quantity);
612
      sendBase("fulfillPO", args);
613
    }
614
 
615
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
616
    {
617
      fulfillPO_result result = new fulfillPO_result();
618
      receiveBase(result, "fulfillPO");
619
      if (result.e != null) {
620
        throw result.e;
621
      }
622
      return;
623
    }
624
 
625
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
626
    {
627
      send_updatePurchaseOrder(purchaseOrder);
628
      recv_updatePurchaseOrder();
629
    }
630
 
631
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
632
    {
633
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
634
      args.setPurchaseOrder(purchaseOrder);
635
      sendBase("updatePurchaseOrder", args);
636
    }
637
 
638
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
639
    {
640
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
641
      receiveBase(result, "updatePurchaseOrder");
642
      if (result.e != null) {
643
        throw result.e;
644
      }
645
      return;
646
    }
647
 
5185 mandeep.dh 648
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
649
    {
650
      send_unFulfillPO(purchaseId, itemId, quantity);
651
      recv_unFulfillPO();
652
    }
653
 
654
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
655
    {
656
      unFulfillPO_args args = new unFulfillPO_args();
657
      args.setPurchaseId(purchaseId);
658
      args.setItemId(itemId);
659
      args.setQuantity(quantity);
660
      sendBase("unFulfillPO", args);
661
    }
662
 
663
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
664
    {
665
      unFulfillPO_result result = new unFulfillPO_result();
666
      receiveBase(result, "unFulfillPO");
667
      if (result.e != null) {
668
        throw result.e;
669
      }
670
      return;
671
    }
672
 
5443 mandeep.dh 673
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
674
    {
675
      send_getInvoices(date);
676
      return recv_getInvoices();
677
    }
678
 
679
    public void send_getInvoices(long date) throws org.apache.thrift.TException
680
    {
681
      getInvoices_args args = new getInvoices_args();
682
      args.setDate(date);
683
      sendBase("getInvoices", args);
684
    }
685
 
686
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
687
    {
688
      getInvoices_result result = new getInvoices_result();
689
      receiveBase(result, "getInvoices");
690
      if (result.isSetSuccess()) {
691
        return result.success;
692
      }
693
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
694
    }
695
 
7410 amar.kumar 696
    public List<Invoice> getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
697
    {
698
      send_getInvoicesForWarehouse(warehouseId, supplierId, date);
699
      return recv_getInvoicesForWarehouse();
700
    }
701
 
702
    public void send_getInvoicesForWarehouse(long warehouseId, long supplierId, long date) throws org.apache.thrift.TException
703
    {
704
      getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
705
      args.setWarehouseId(warehouseId);
706
      args.setSupplierId(supplierId);
707
      args.setDate(date);
708
      sendBase("getInvoicesForWarehouse", args);
709
    }
710
 
711
    public List<Invoice> recv_getInvoicesForWarehouse() throws org.apache.thrift.TException
712
    {
713
      getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
714
      receiveBase(result, "getInvoicesForWarehouse");
715
      if (result.isSetSuccess()) {
716
        return result.success;
717
      }
718
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
719
    }
720
 
5443 mandeep.dh 721
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
722
    {
723
      send_createInvoice(invoice);
724
      recv_createInvoice();
725
    }
726
 
727
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
728
    {
729
      createInvoice_args args = new createInvoice_args();
730
      args.setInvoice(invoice);
731
      sendBase("createInvoice", args);
732
    }
733
 
734
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
735
    {
736
      createInvoice_result result = new createInvoice_result();
737
      receiveBase(result, "createInvoice");
738
      if (result.e != null) {
739
        throw result.e;
740
      }
741
      return;
742
    }
743
 
5591 mandeep.dh 744
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
745
    {
746
      send_addSupplier(supplier);
747
      return recv_addSupplier();
748
    }
749
 
750
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
751
    {
752
      addSupplier_args args = new addSupplier_args();
753
      args.setSupplier(supplier);
754
      sendBase("addSupplier", args);
755
    }
756
 
757
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
758
    {
759
      addSupplier_result result = new addSupplier_result();
760
      receiveBase(result, "addSupplier");
761
      if (result.isSetSuccess()) {
762
        return result.success;
763
      }
764
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
765
    }
766
 
767
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
768
    {
769
      send_updateSupplier(supplier);
770
      recv_updateSupplier();
771
    }
772
 
773
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
774
    {
775
      updateSupplier_args args = new updateSupplier_args();
776
      args.setSupplier(supplier);
777
      sendBase("updateSupplier", args);
778
    }
779
 
780
    public void recv_updateSupplier() throws org.apache.thrift.TException
781
    {
782
      updateSupplier_result result = new updateSupplier_result();
783
      receiveBase(result, "updateSupplier");
784
      return;
785
    }
786
 
6467 amar.kumar 787
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
788
    {
789
      send_createPurchaseReturn(purchaseReturn);
790
      return recv_createPurchaseReturn();
791
    }
792
 
793
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
794
    {
795
      createPurchaseReturn_args args = new createPurchaseReturn_args();
796
      args.setPurchaseReturn(purchaseReturn);
797
      sendBase("createPurchaseReturn", args);
798
    }
799
 
800
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
801
    {
802
      createPurchaseReturn_result result = new createPurchaseReturn_result();
803
      receiveBase(result, "createPurchaseReturn");
804
      if (result.isSetSuccess()) {
805
        return result.success;
806
      }
807
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
808
    }
809
 
810
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
811
    {
812
      send_settlePurchaseReturn(id);
813
      recv_settlePurchaseReturn();
814
    }
815
 
816
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
817
    {
818
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
819
      args.setId(id);
820
      sendBase("settlePurchaseReturn", args);
821
    }
822
 
823
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
824
    {
825
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
826
      receiveBase(result, "settlePurchaseReturn");
827
      return;
828
    }
829
 
830
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
831
    {
832
      send_getUnsettledPurchaseReturns();
833
      return recv_getUnsettledPurchaseReturns();
834
    }
835
 
836
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
837
    {
838
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
839
      sendBase("getUnsettledPurchaseReturns", args);
840
    }
841
 
842
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
843
    {
844
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
845
      receiveBase(result, "getUnsettledPurchaseReturns");
846
      if (result.isSetSuccess()) {
847
        return result.success;
848
      }
849
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
850
    }
851
 
6630 amar.kumar 852
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
853
    {
854
      send_getInvoice(invoiceNumber, supplierId);
855
      return recv_getInvoice();
856
    }
857
 
858
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
859
    {
860
      getInvoice_args args = new getInvoice_args();
861
      args.setInvoiceNumber(invoiceNumber);
862
      args.setSupplierId(supplierId);
863
      sendBase("getInvoice", args);
864
    }
865
 
866
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
867
    {
868
      getInvoice_result result = new getInvoice_result();
869
      receiveBase(result, "getInvoice");
870
      if (result.isSetSuccess()) {
871
        return result.success;
872
      }
873
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
874
    }
875
 
7672 rajveer 876
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 877
    {
7672 rajveer 878
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId);
6762 amar.kumar 879
      return recv_createPurchaseForOurExtBilling();
880
    }
881
 
7672 rajveer 882
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, double nlc, long itemId) throws org.apache.thrift.TException
6762 amar.kumar 883
    {
884
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
885
      args.setInvoiceNumber(invoiceNumber);
886
      args.setUnitPrice(unitPrice);
7672 rajveer 887
      args.setNlc(nlc);
6762 amar.kumar 888
      args.setItemId(itemId);
889
      sendBase("createPurchaseForOurExtBilling", args);
890
    }
891
 
892
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
893
    {
894
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
895
      receiveBase(result, "createPurchaseForOurExtBilling");
896
      if (result.isSetSuccess()) {
897
        return result.success;
898
      }
899
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
900
    }
901
 
902
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
903
    {
904
      send_fulfillPOForExtBilling(itemId, quantity);
905
      recv_fulfillPOForExtBilling();
906
    }
907
 
908
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
909
    {
910
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
911
      args.setItemId(itemId);
912
      args.setQuantity(quantity);
913
      sendBase("fulfillPOForExtBilling", args);
914
    }
915
 
916
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
917
    {
918
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
919
      receiveBase(result, "fulfillPOForExtBilling");
920
      return;
921
    }
922
 
7410 amar.kumar 923
    public void closePO(long poId) throws PurchaseServiceException, org.apache.thrift.TException
924
    {
925
      send_closePO(poId);
926
      recv_closePO();
927
    }
928
 
929
    public void send_closePO(long poId) throws org.apache.thrift.TException
930
    {
931
      closePO_args args = new closePO_args();
932
      args.setPoId(poId);
933
      sendBase("closePO", args);
934
    }
935
 
936
    public void recv_closePO() throws PurchaseServiceException, org.apache.thrift.TException
937
    {
938
      closePO_result result = new closePO_result();
939
      receiveBase(result, "closePO");
940
      if (result.e != null) {
941
        throw result.e;
942
      }
943
      return;
944
    }
945
 
946
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
947
    {
948
      send_isInvoiceReceived(invoiceNumber, supplierId);
949
      return recv_isInvoiceReceived();
950
    }
951
 
952
    public void send_isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
953
    {
954
      isInvoiceReceived_args args = new isInvoiceReceived_args();
955
      args.setInvoiceNumber(invoiceNumber);
956
      args.setSupplierId(supplierId);
957
      sendBase("isInvoiceReceived", args);
958
    }
959
 
960
    public boolean recv_isInvoiceReceived() throws org.apache.thrift.TException
961
    {
962
      isInvoiceReceived_result result = new isInvoiceReceived_result();
963
      receiveBase(result, "isInvoiceReceived");
964
      if (result.isSetSuccess()) {
965
        return result.success;
966
      }
967
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
968
    }
969
 
9829 amar.kumar 970
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
971
    {
972
      send_changeWarehouseForPO(id, warehouseId);
973
      recv_changeWarehouseForPO();
974
    }
975
 
976
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
977
    {
978
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
979
      args.setId(id);
980
      args.setWarehouseId(warehouseId);
981
      sendBase("changeWarehouseForPO", args);
982
    }
983
 
984
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
985
    {
986
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
987
      receiveBase(result, "changeWarehouseForPO");
988
      if (result.e != null) {
989
        throw result.e;
990
      }
991
      return;
992
    }
993
 
4496 mandeep.dh 994
  }
995
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
996
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
997
      private org.apache.thrift.async.TAsyncClientManager clientManager;
998
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
999
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
1000
        this.clientManager = clientManager;
1001
        this.protocolFactory = protocolFactory;
1002
      }
1003
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
1004
        return new AsyncClient(protocolFactory, clientManager, transport);
1005
      }
1006
    }
1007
 
1008
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
1009
      super(protocolFactory, clientManager, transport);
1010
    }
1011
 
1012
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1013
      checkReady();
1014
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1015
      this.___currentMethod = method_call;
1016
      ___manager.call(method_call);
1017
    }
1018
 
1019
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1020
      private PurchaseOrder purchaseOrder;
1021
      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 {
1022
        super(client, protocolFactory, transport, resultHandler, false);
1023
        this.purchaseOrder = purchaseOrder;
1024
      }
1025
 
1026
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1027
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1028
        createPurchaseOrder_args args = new createPurchaseOrder_args();
1029
        args.setPurchaseOrder(purchaseOrder);
1030
        args.write(prot);
1031
        prot.writeMessageEnd();
1032
      }
1033
 
1034
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1035
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1036
          throw new IllegalStateException("Method call not finished!");
1037
        }
1038
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1039
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1040
        return (new Client(prot)).recv_createPurchaseOrder();
1041
      }
1042
    }
1043
 
1044
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1045
      checkReady();
1046
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
1047
      this.___currentMethod = method_call;
1048
      ___manager.call(method_call);
1049
    }
1050
 
1051
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1052
      private long id;
1053
      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 {
1054
        super(client, protocolFactory, transport, resultHandler, false);
1055
        this.id = id;
1056
      }
1057
 
1058
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1059
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1060
        getPurchaseOrder_args args = new getPurchaseOrder_args();
1061
        args.setId(id);
1062
        args.write(prot);
1063
        prot.writeMessageEnd();
1064
      }
1065
 
1066
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1067
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1068
          throw new IllegalStateException("Method call not finished!");
1069
        }
1070
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1071
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1072
        return (new Client(prot)).recv_getPurchaseOrder();
1073
      }
1074
    }
1075
 
1076
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1077
      checkReady();
1078
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
1079
      this.___currentMethod = method_call;
1080
      ___manager.call(method_call);
1081
    }
1082
 
1083
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1084
      private POStatus status;
1085
      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 {
1086
        super(client, protocolFactory, transport, resultHandler, false);
1087
        this.status = status;
1088
      }
1089
 
1090
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1091
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1092
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
1093
        args.setStatus(status);
1094
        args.write(prot);
1095
        prot.writeMessageEnd();
1096
      }
1097
 
1098
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1099
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1100
          throw new IllegalStateException("Method call not finished!");
1101
        }
1102
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1103
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1104
        return (new Client(prot)).recv_getAllPurchaseOrders();
1105
      }
1106
    }
1107
 
1108
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
1109
      checkReady();
1110
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
1111
      this.___currentMethod = method_call;
1112
      ___manager.call(method_call);
1113
    }
1114
 
1115
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1116
      private long id;
1117
      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 {
1118
        super(client, protocolFactory, transport, resultHandler, false);
1119
        this.id = id;
1120
      }
1121
 
1122
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1123
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1124
        getSupplier_args args = new getSupplier_args();
1125
        args.setId(id);
1126
        args.write(prot);
1127
        prot.writeMessageEnd();
1128
      }
1129
 
1130
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1131
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1132
          throw new IllegalStateException("Method call not finished!");
1133
        }
1134
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1135
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1136
        return (new Client(prot)).recv_getSupplier();
1137
      }
1138
    }
1139
 
1140
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1141
      checkReady();
1142
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1143
      this.___currentMethod = method_call;
1144
      ___manager.call(method_call);
1145
    }
1146
 
1147
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1148
      private long purchaseOrderId;
1149
      private String invoiceNumber;
1150
      private double freightCharges;
1151
      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 {
1152
        super(client, protocolFactory, transport, resultHandler, false);
1153
        this.purchaseOrderId = purchaseOrderId;
1154
        this.invoiceNumber = invoiceNumber;
1155
        this.freightCharges = freightCharges;
1156
      }
1157
 
1158
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1159
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1160
        startPurchase_args args = new startPurchase_args();
1161
        args.setPurchaseOrderId(purchaseOrderId);
1162
        args.setInvoiceNumber(invoiceNumber);
1163
        args.setFreightCharges(freightCharges);
1164
        args.write(prot);
1165
        prot.writeMessageEnd();
1166
      }
1167
 
1168
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1169
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1170
          throw new IllegalStateException("Method call not finished!");
1171
        }
1172
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1173
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1174
        return (new Client(prot)).recv_startPurchase();
1175
      }
1176
    }
1177
 
1178
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1179
      checkReady();
1180
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1181
      this.___currentMethod = method_call;
1182
      ___manager.call(method_call);
1183
    }
1184
 
1185
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1186
      private long purchaseId;
1187
      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 {
1188
        super(client, protocolFactory, transport, resultHandler, false);
1189
        this.purchaseId = purchaseId;
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("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1194
        closePurchase_args args = new closePurchase_args();
1195
        args.setPurchaseId(purchaseId);
1196
        args.write(prot);
1197
        prot.writeMessageEnd();
1198
      }
1199
 
1200
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1201
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1202
          throw new IllegalStateException("Method call not finished!");
1203
        }
1204
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1205
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1206
        return (new Client(prot)).recv_closePurchase();
1207
      }
1208
    }
1209
 
1210
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1211
      checkReady();
1212
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1213
      this.___currentMethod = method_call;
1214
      ___manager.call(method_call);
1215
    }
1216
 
1217
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1218
      private long purchaseOrderId;
1219
      private boolean open;
1220
      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 {
1221
        super(client, protocolFactory, transport, resultHandler, false);
1222
        this.purchaseOrderId = purchaseOrderId;
1223
        this.open = open;
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("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1228
        getAllPurchases_args args = new getAllPurchases_args();
1229
        args.setPurchaseOrderId(purchaseOrderId);
1230
        args.setOpen(open);
1231
        args.write(prot);
1232
        prot.writeMessageEnd();
1233
      }
1234
 
1235
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1236
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1237
          throw new IllegalStateException("Method call not finished!");
1238
        }
1239
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1240
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1241
        return (new Client(prot)).recv_getAllPurchases();
1242
      }
1243
    }
1244
 
6385 amar.kumar 1245
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1246
      checkReady();
1247
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1248
      this.___currentMethod = method_call;
1249
      ___manager.call(method_call);
1250
    }
1251
 
1252
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1253
      private long purchaseOrderId;
1254
      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 {
1255
        super(client, protocolFactory, transport, resultHandler, false);
1256
        this.purchaseOrderId = purchaseOrderId;
1257
      }
1258
 
1259
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1260
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1261
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1262
        args.setPurchaseOrderId(purchaseOrderId);
1263
        args.write(prot);
1264
        prot.writeMessageEnd();
1265
      }
1266
 
1267
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1268
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1269
          throw new IllegalStateException("Method call not finished!");
1270
        }
1271
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1272
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1273
        return (new Client(prot)).recv_getPurchasesForPO();
1274
      }
1275
    }
1276
 
4555 mandeep.dh 1277
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1278
      checkReady();
4555 mandeep.dh 1279
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1280
      this.___currentMethod = method_call;
1281
      ___manager.call(method_call);
1282
    }
1283
 
4555 mandeep.dh 1284
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1285
      private long purchaseId;
4555 mandeep.dh 1286
      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 1287
        super(client, protocolFactory, transport, resultHandler, false);
1288
        this.purchaseId = purchaseId;
1289
      }
1290
 
1291
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1292
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1293
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1294
        args.setPurchaseId(purchaseId);
1295
        args.write(prot);
1296
        prot.writeMessageEnd();
1297
      }
1298
 
4555 mandeep.dh 1299
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1300
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1301
          throw new IllegalStateException("Method call not finished!");
1302
        }
1303
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1304
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1305
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1306
      }
1307
    }
1308
 
4754 mandeep.dh 1309
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1310
      checkReady();
1311
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1312
      this.___currentMethod = method_call;
1313
      ___manager.call(method_call);
1314
    }
1315
 
1316
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1317
      private long warehouseId;
1318
      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 {
1319
        super(client, protocolFactory, transport, resultHandler, false);
1320
        this.warehouseId = warehouseId;
1321
      }
1322
 
1323
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1324
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1325
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1326
        args.setWarehouseId(warehouseId);
1327
        args.write(prot);
1328
        prot.writeMessageEnd();
1329
      }
1330
 
1331
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1332
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1333
          throw new IllegalStateException("Method call not finished!");
1334
        }
1335
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1336
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1337
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1338
      }
1339
    }
1340
 
1341
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1342
      checkReady();
1343
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1344
      this.___currentMethod = method_call;
1345
      ___manager.call(method_call);
1346
    }
1347
 
1348
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1349
      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 {
1350
        super(client, protocolFactory, transport, resultHandler, false);
1351
      }
1352
 
1353
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1354
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1355
        getSuppliers_args args = new getSuppliers_args();
1356
        args.write(prot);
1357
        prot.writeMessageEnd();
1358
      }
1359
 
1360
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1361
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1362
          throw new IllegalStateException("Method call not finished!");
1363
        }
1364
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1365
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1366
        return (new Client(prot)).recv_getSuppliers();
1367
      }
1368
    }
1369
 
1370
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1371
      checkReady();
1372
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1373
      this.___currentMethod = method_call;
1374
      ___manager.call(method_call);
1375
    }
1376
 
1377
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1378
      private long purchaseOrderId;
1379
      private long itemId;
1380
      private long quantity;
1381
      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 {
1382
        super(client, protocolFactory, transport, resultHandler, false);
1383
        this.purchaseOrderId = purchaseOrderId;
1384
        this.itemId = itemId;
1385
        this.quantity = quantity;
1386
      }
1387
 
1388
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1389
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1390
        fulfillPO_args args = new fulfillPO_args();
1391
        args.setPurchaseOrderId(purchaseOrderId);
1392
        args.setItemId(itemId);
1393
        args.setQuantity(quantity);
1394
        args.write(prot);
1395
        prot.writeMessageEnd();
1396
      }
1397
 
1398
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1399
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1400
          throw new IllegalStateException("Method call not finished!");
1401
        }
1402
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1403
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1404
        (new Client(prot)).recv_fulfillPO();
1405
      }
1406
    }
1407
 
1408
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1409
      checkReady();
1410
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1411
      this.___currentMethod = method_call;
1412
      ___manager.call(method_call);
1413
    }
1414
 
1415
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1416
      private PurchaseOrder purchaseOrder;
1417
      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 {
1418
        super(client, protocolFactory, transport, resultHandler, false);
1419
        this.purchaseOrder = purchaseOrder;
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("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1424
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1425
        args.setPurchaseOrder(purchaseOrder);
1426
        args.write(prot);
1427
        prot.writeMessageEnd();
1428
      }
1429
 
1430
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1431
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1432
          throw new IllegalStateException("Method call not finished!");
1433
        }
1434
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1435
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1436
        (new Client(prot)).recv_updatePurchaseOrder();
1437
      }
1438
    }
1439
 
5185 mandeep.dh 1440
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1441
      checkReady();
1442
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1443
      this.___currentMethod = method_call;
1444
      ___manager.call(method_call);
1445
    }
1446
 
1447
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1448
      private long purchaseId;
1449
      private long itemId;
1450
      private long quantity;
1451
      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 {
1452
        super(client, protocolFactory, transport, resultHandler, false);
1453
        this.purchaseId = purchaseId;
1454
        this.itemId = itemId;
1455
        this.quantity = quantity;
1456
      }
1457
 
1458
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1459
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1460
        unFulfillPO_args args = new unFulfillPO_args();
1461
        args.setPurchaseId(purchaseId);
1462
        args.setItemId(itemId);
1463
        args.setQuantity(quantity);
1464
        args.write(prot);
1465
        prot.writeMessageEnd();
1466
      }
1467
 
1468
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1469
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1470
          throw new IllegalStateException("Method call not finished!");
1471
        }
1472
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1473
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1474
        (new Client(prot)).recv_unFulfillPO();
1475
      }
1476
    }
1477
 
5443 mandeep.dh 1478
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1479
      checkReady();
1480
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1481
      this.___currentMethod = method_call;
1482
      ___manager.call(method_call);
1483
    }
1484
 
1485
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1486
      private long date;
1487
      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 {
1488
        super(client, protocolFactory, transport, resultHandler, false);
1489
        this.date = date;
1490
      }
1491
 
1492
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1493
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1494
        getInvoices_args args = new getInvoices_args();
1495
        args.setDate(date);
1496
        args.write(prot);
1497
        prot.writeMessageEnd();
1498
      }
1499
 
1500
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1501
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1502
          throw new IllegalStateException("Method call not finished!");
1503
        }
1504
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1505
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1506
        return (new Client(prot)).recv_getInvoices();
1507
      }
1508
    }
1509
 
7410 amar.kumar 1510
    public void getInvoicesForWarehouse(long warehouseId, long supplierId, long date, org.apache.thrift.async.AsyncMethodCallback<getInvoicesForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
1511
      checkReady();
1512
      getInvoicesForWarehouse_call method_call = new getInvoicesForWarehouse_call(warehouseId, supplierId, date, resultHandler, this, ___protocolFactory, ___transport);
1513
      this.___currentMethod = method_call;
1514
      ___manager.call(method_call);
1515
    }
1516
 
1517
    public static class getInvoicesForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
1518
      private long warehouseId;
1519
      private long supplierId;
1520
      private long date;
1521
      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 {
1522
        super(client, protocolFactory, transport, resultHandler, false);
1523
        this.warehouseId = warehouseId;
1524
        this.supplierId = supplierId;
1525
        this.date = date;
1526
      }
1527
 
1528
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1529
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoicesForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
1530
        getInvoicesForWarehouse_args args = new getInvoicesForWarehouse_args();
1531
        args.setWarehouseId(warehouseId);
1532
        args.setSupplierId(supplierId);
1533
        args.setDate(date);
1534
        args.write(prot);
1535
        prot.writeMessageEnd();
1536
      }
1537
 
1538
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1539
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1540
          throw new IllegalStateException("Method call not finished!");
1541
        }
1542
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1543
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1544
        return (new Client(prot)).recv_getInvoicesForWarehouse();
1545
      }
1546
    }
1547
 
5443 mandeep.dh 1548
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1549
      checkReady();
1550
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1551
      this.___currentMethod = method_call;
1552
      ___manager.call(method_call);
1553
    }
1554
 
1555
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1556
      private Invoice invoice;
1557
      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 {
1558
        super(client, protocolFactory, transport, resultHandler, false);
1559
        this.invoice = invoice;
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("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1564
        createInvoice_args args = new createInvoice_args();
1565
        args.setInvoice(invoice);
1566
        args.write(prot);
1567
        prot.writeMessageEnd();
1568
      }
1569
 
1570
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1571
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1572
          throw new IllegalStateException("Method call not finished!");
1573
        }
1574
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1575
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1576
        (new Client(prot)).recv_createInvoice();
1577
      }
1578
    }
1579
 
5591 mandeep.dh 1580
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1581
      checkReady();
1582
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1583
      this.___currentMethod = method_call;
1584
      ___manager.call(method_call);
1585
    }
1586
 
1587
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1588
      private Supplier supplier;
1589
      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 {
1590
        super(client, protocolFactory, transport, resultHandler, false);
1591
        this.supplier = supplier;
1592
      }
1593
 
1594
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1595
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1596
        addSupplier_args args = new addSupplier_args();
1597
        args.setSupplier(supplier);
1598
        args.write(prot);
1599
        prot.writeMessageEnd();
1600
      }
1601
 
1602
      public Supplier getResult() throws org.apache.thrift.TException {
1603
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1604
          throw new IllegalStateException("Method call not finished!");
1605
        }
1606
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1607
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1608
        return (new Client(prot)).recv_addSupplier();
1609
      }
1610
    }
1611
 
1612
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1613
      checkReady();
1614
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1615
      this.___currentMethod = method_call;
1616
      ___manager.call(method_call);
1617
    }
1618
 
1619
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1620
      private Supplier supplier;
1621
      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 {
1622
        super(client, protocolFactory, transport, resultHandler, false);
1623
        this.supplier = supplier;
1624
      }
1625
 
1626
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1627
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1628
        updateSupplier_args args = new updateSupplier_args();
1629
        args.setSupplier(supplier);
1630
        args.write(prot);
1631
        prot.writeMessageEnd();
1632
      }
1633
 
1634
      public void getResult() throws org.apache.thrift.TException {
1635
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1636
          throw new IllegalStateException("Method call not finished!");
1637
        }
1638
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1639
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1640
        (new Client(prot)).recv_updateSupplier();
1641
      }
1642
    }
1643
 
6467 amar.kumar 1644
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1645
      checkReady();
1646
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1647
      this.___currentMethod = method_call;
1648
      ___manager.call(method_call);
1649
    }
1650
 
1651
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1652
      private PurchaseReturn purchaseReturn;
1653
      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 {
1654
        super(client, protocolFactory, transport, resultHandler, false);
1655
        this.purchaseReturn = purchaseReturn;
1656
      }
1657
 
1658
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1659
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1660
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1661
        args.setPurchaseReturn(purchaseReturn);
1662
        args.write(prot);
1663
        prot.writeMessageEnd();
1664
      }
1665
 
1666
      public long getResult() throws org.apache.thrift.TException {
1667
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1668
          throw new IllegalStateException("Method call not finished!");
1669
        }
1670
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1671
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1672
        return (new Client(prot)).recv_createPurchaseReturn();
1673
      }
1674
    }
1675
 
1676
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1677
      checkReady();
1678
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1679
      this.___currentMethod = method_call;
1680
      ___manager.call(method_call);
1681
    }
1682
 
1683
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1684
      private long id;
1685
      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 {
1686
        super(client, protocolFactory, transport, resultHandler, false);
1687
        this.id = id;
1688
      }
1689
 
1690
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1691
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1692
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1693
        args.setId(id);
1694
        args.write(prot);
1695
        prot.writeMessageEnd();
1696
      }
1697
 
1698
      public void getResult() throws org.apache.thrift.TException {
1699
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1700
          throw new IllegalStateException("Method call not finished!");
1701
        }
1702
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1703
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1704
        (new Client(prot)).recv_settlePurchaseReturn();
1705
      }
1706
    }
1707
 
1708
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1709
      checkReady();
1710
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1711
      this.___currentMethod = method_call;
1712
      ___manager.call(method_call);
1713
    }
1714
 
1715
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1716
      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 {
1717
        super(client, protocolFactory, transport, resultHandler, false);
1718
      }
1719
 
1720
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1721
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1722
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1723
        args.write(prot);
1724
        prot.writeMessageEnd();
1725
      }
1726
 
1727
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1728
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1729
          throw new IllegalStateException("Method call not finished!");
1730
        }
1731
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1732
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1733
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1734
      }
1735
    }
1736
 
6630 amar.kumar 1737
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1738
      checkReady();
1739
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1740
      this.___currentMethod = method_call;
1741
      ___manager.call(method_call);
1742
    }
1743
 
1744
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1745
      private String invoiceNumber;
1746
      private long supplierId;
1747
      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 {
1748
        super(client, protocolFactory, transport, resultHandler, false);
1749
        this.invoiceNumber = invoiceNumber;
1750
        this.supplierId = supplierId;
1751
      }
1752
 
1753
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1754
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1755
        getInvoice_args args = new getInvoice_args();
1756
        args.setInvoiceNumber(invoiceNumber);
1757
        args.setSupplierId(supplierId);
1758
        args.write(prot);
1759
        prot.writeMessageEnd();
1760
      }
1761
 
1762
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1763
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1764
          throw new IllegalStateException("Method call not finished!");
1765
        }
1766
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1767
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1768
        return (new Client(prot)).recv_getInvoice();
1769
      }
1770
    }
1771
 
7672 rajveer 1772
    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 1773
      checkReady();
7672 rajveer 1774
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, nlc, itemId, resultHandler, this, ___protocolFactory, ___transport);
6762 amar.kumar 1775
      this.___currentMethod = method_call;
1776
      ___manager.call(method_call);
1777
    }
1778
 
1779
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1780
      private String invoiceNumber;
1781
      private double unitPrice;
7672 rajveer 1782
      private double nlc;
6762 amar.kumar 1783
      private long itemId;
7672 rajveer 1784
      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 1785
        super(client, protocolFactory, transport, resultHandler, false);
1786
        this.invoiceNumber = invoiceNumber;
1787
        this.unitPrice = unitPrice;
7672 rajveer 1788
        this.nlc = nlc;
6762 amar.kumar 1789
        this.itemId = itemId;
1790
      }
1791
 
1792
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1793
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1794
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1795
        args.setInvoiceNumber(invoiceNumber);
1796
        args.setUnitPrice(unitPrice);
7672 rajveer 1797
        args.setNlc(nlc);
6762 amar.kumar 1798
        args.setItemId(itemId);
1799
        args.write(prot);
1800
        prot.writeMessageEnd();
1801
      }
1802
 
1803
      public long getResult() throws org.apache.thrift.TException {
1804
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1805
          throw new IllegalStateException("Method call not finished!");
1806
        }
1807
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1808
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1809
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1810
      }
1811
    }
1812
 
1813
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1814
      checkReady();
1815
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1816
      this.___currentMethod = method_call;
1817
      ___manager.call(method_call);
1818
    }
1819
 
1820
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1821
      private long itemId;
1822
      private long quantity;
1823
      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 {
1824
        super(client, protocolFactory, transport, resultHandler, false);
1825
        this.itemId = itemId;
1826
        this.quantity = quantity;
1827
      }
1828
 
1829
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1830
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1831
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1832
        args.setItemId(itemId);
1833
        args.setQuantity(quantity);
1834
        args.write(prot);
1835
        prot.writeMessageEnd();
1836
      }
1837
 
1838
      public void getResult() throws org.apache.thrift.TException {
1839
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1840
          throw new IllegalStateException("Method call not finished!");
1841
        }
1842
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1843
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1844
        (new Client(prot)).recv_fulfillPOForExtBilling();
1845
      }
1846
    }
1847
 
7410 amar.kumar 1848
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<closePO_call> resultHandler) throws org.apache.thrift.TException {
1849
      checkReady();
1850
      closePO_call method_call = new closePO_call(poId, resultHandler, this, ___protocolFactory, ___transport);
1851
      this.___currentMethod = method_call;
1852
      ___manager.call(method_call);
1853
    }
1854
 
1855
    public static class closePO_call extends org.apache.thrift.async.TAsyncMethodCall {
1856
      private long poId;
1857
      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 {
1858
        super(client, protocolFactory, transport, resultHandler, false);
1859
        this.poId = poId;
1860
      }
1861
 
1862
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1863
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1864
        closePO_args args = new closePO_args();
1865
        args.setPoId(poId);
1866
        args.write(prot);
1867
        prot.writeMessageEnd();
1868
      }
1869
 
1870
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1871
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1872
          throw new IllegalStateException("Method call not finished!");
1873
        }
1874
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1875
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1876
        (new Client(prot)).recv_closePO();
1877
      }
1878
    }
1879
 
1880
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException {
1881
      checkReady();
1882
      isInvoiceReceived_call method_call = new isInvoiceReceived_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1883
      this.___currentMethod = method_call;
1884
      ___manager.call(method_call);
1885
    }
1886
 
1887
    public static class isInvoiceReceived_call extends org.apache.thrift.async.TAsyncMethodCall {
1888
      private String invoiceNumber;
1889
      private long supplierId;
1890
      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 {
1891
        super(client, protocolFactory, transport, resultHandler, false);
1892
        this.invoiceNumber = invoiceNumber;
1893
        this.supplierId = supplierId;
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("isInvoiceReceived", org.apache.thrift.protocol.TMessageType.CALL, 0));
1898
        isInvoiceReceived_args args = new isInvoiceReceived_args();
1899
        args.setInvoiceNumber(invoiceNumber);
1900
        args.setSupplierId(supplierId);
1901
        args.write(prot);
1902
        prot.writeMessageEnd();
1903
      }
1904
 
1905
      public boolean getResult() throws org.apache.thrift.TException {
1906
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1907
          throw new IllegalStateException("Method call not finished!");
1908
        }
1909
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1910
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1911
        return (new Client(prot)).recv_isInvoiceReceived();
1912
      }
1913
    }
1914
 
9829 amar.kumar 1915
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
1916
      checkReady();
1917
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1918
      this.___currentMethod = method_call;
1919
      ___manager.call(method_call);
1920
    }
1921
 
1922
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1923
      private long id;
1924
      private long warehouseId;
1925
      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 {
1926
        super(client, protocolFactory, transport, resultHandler, false);
1927
        this.id = id;
1928
        this.warehouseId = warehouseId;
1929
      }
1930
 
1931
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1932
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1933
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
1934
        args.setId(id);
1935
        args.setWarehouseId(warehouseId);
1936
        args.write(prot);
1937
        prot.writeMessageEnd();
1938
      }
1939
 
1940
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1941
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1942
          throw new IllegalStateException("Method call not finished!");
1943
        }
1944
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1945
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1946
        (new Client(prot)).recv_changeWarehouseForPO();
1947
      }
1948
    }
1949
 
4496 mandeep.dh 1950
  }
1951
 
1952
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1953
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1954
    public Processor(I iface) {
1955
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1956
    }
1957
 
1958
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1959
      super(iface, getProcessMap(processMap));
1960
    }
1961
 
1962
    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) {
1963
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1964
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1965
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1966
      processMap.put("getSupplier", new getSupplier());
1967
      processMap.put("startPurchase", new startPurchase());
1968
      processMap.put("closePurchase", new closePurchase());
1969
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 1970
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 1971
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1972
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1973
      processMap.put("getSuppliers", new getSuppliers());
1974
      processMap.put("fulfillPO", new fulfillPO());
1975
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1976
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1977
      processMap.put("getInvoices", new getInvoices());
7410 amar.kumar 1978
      processMap.put("getInvoicesForWarehouse", new getInvoicesForWarehouse());
5443 mandeep.dh 1979
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1980
      processMap.put("addSupplier", new addSupplier());
1981
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 1982
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1983
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1984
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 1985
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 1986
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
1987
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
7410 amar.kumar 1988
      processMap.put("closePO", new closePO());
1989
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
9829 amar.kumar 1990
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
4496 mandeep.dh 1991
      return processMap;
1992
    }
1993
 
1994
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1995
      public createPurchaseOrder() {
1996
        super("createPurchaseOrder");
1997
      }
1998
 
1999
      protected createPurchaseOrder_args getEmptyArgsInstance() {
2000
        return new createPurchaseOrder_args();
2001
      }
2002
 
2003
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
2004
        createPurchaseOrder_result result = new createPurchaseOrder_result();
2005
        try {
2006
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
2007
          result.setSuccessIsSet(true);
2008
        } catch (PurchaseServiceException e) {
2009
          result.e = e;
2010
        }
2011
        return result;
2012
      }
2013
    }
2014
 
2015
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
2016
      public getPurchaseOrder() {
2017
        super("getPurchaseOrder");
2018
      }
2019
 
2020
      protected getPurchaseOrder_args getEmptyArgsInstance() {
2021
        return new getPurchaseOrder_args();
2022
      }
2023
 
2024
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
2025
        getPurchaseOrder_result result = new getPurchaseOrder_result();
2026
        try {
2027
          result.success = iface.getPurchaseOrder(args.id);
2028
        } catch (PurchaseServiceException e) {
2029
          result.e = e;
2030
        }
2031
        return result;
2032
      }
2033
    }
2034
 
2035
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
2036
      public getAllPurchaseOrders() {
2037
        super("getAllPurchaseOrders");
2038
      }
2039
 
2040
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
2041
        return new getAllPurchaseOrders_args();
2042
      }
2043
 
2044
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
2045
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
2046
        try {
2047
          result.success = iface.getAllPurchaseOrders(args.status);
2048
        } catch (PurchaseServiceException e) {
2049
          result.e = e;
2050
        }
2051
        return result;
2052
      }
2053
    }
2054
 
2055
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
2056
      public getSupplier() {
2057
        super("getSupplier");
2058
      }
2059
 
2060
      protected getSupplier_args getEmptyArgsInstance() {
2061
        return new getSupplier_args();
2062
      }
2063
 
2064
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
2065
        getSupplier_result result = new getSupplier_result();
2066
        try {
2067
          result.success = iface.getSupplier(args.id);
2068
        } catch (PurchaseServiceException e) {
2069
          result.e = e;
2070
        }
2071
        return result;
2072
      }
2073
    }
2074
 
2075
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
2076
      public startPurchase() {
2077
        super("startPurchase");
2078
      }
2079
 
2080
      protected startPurchase_args getEmptyArgsInstance() {
2081
        return new startPurchase_args();
2082
      }
2083
 
2084
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2085
        startPurchase_result result = new startPurchase_result();
2086
        try {
2087
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
2088
          result.setSuccessIsSet(true);
2089
        } catch (PurchaseServiceException e) {
2090
          result.e = e;
2091
        }
2092
        return result;
2093
      }
2094
    }
2095
 
2096
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
2097
      public closePurchase() {
2098
        super("closePurchase");
2099
      }
2100
 
2101
      protected closePurchase_args getEmptyArgsInstance() {
2102
        return new closePurchase_args();
2103
      }
2104
 
2105
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
2106
        closePurchase_result result = new closePurchase_result();
2107
        try {
2108
          result.success = iface.closePurchase(args.purchaseId);
2109
          result.setSuccessIsSet(true);
2110
        } catch (PurchaseServiceException e) {
2111
          result.e = e;
2112
        }
2113
        return result;
2114
      }
2115
    }
2116
 
2117
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
2118
      public getAllPurchases() {
2119
        super("getAllPurchases");
2120
      }
2121
 
2122
      protected getAllPurchases_args getEmptyArgsInstance() {
2123
        return new getAllPurchases_args();
2124
      }
2125
 
2126
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
2127
        getAllPurchases_result result = new getAllPurchases_result();
2128
        try {
2129
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
2130
        } catch (PurchaseServiceException e) {
2131
          result.e = e;
2132
        }
2133
        return result;
2134
      }
2135
    }
2136
 
6385 amar.kumar 2137
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
2138
      public getPurchasesForPO() {
2139
        super("getPurchasesForPO");
2140
      }
2141
 
2142
      protected getPurchasesForPO_args getEmptyArgsInstance() {
2143
        return new getPurchasesForPO_args();
2144
      }
2145
 
2146
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
2147
        getPurchasesForPO_result result = new getPurchasesForPO_result();
2148
        try {
2149
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
2150
        } catch (PurchaseServiceException e) {
2151
          result.e = e;
2152
        }
2153
        return result;
2154
      }
2155
    }
2156
 
4555 mandeep.dh 2157
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
2158
      public getPurchaseOrderForPurchase() {
2159
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 2160
      }
2161
 
4555 mandeep.dh 2162
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
2163
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 2164
      }
2165
 
4555 mandeep.dh 2166
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
2167
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
2168
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 2169
        return result;
2170
      }
2171
    }
2172
 
4754 mandeep.dh 2173
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
2174
      public getPendingPurchaseOrders() {
2175
        super("getPendingPurchaseOrders");
2176
      }
2177
 
2178
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
2179
        return new getPendingPurchaseOrders_args();
2180
      }
2181
 
2182
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
2183
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
2184
        try {
2185
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
2186
        } catch (PurchaseServiceException e) {
2187
          result.e = e;
2188
        }
2189
        return result;
2190
      }
2191
    }
2192
 
2193
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
2194
      public getSuppliers() {
2195
        super("getSuppliers");
2196
      }
2197
 
2198
      protected getSuppliers_args getEmptyArgsInstance() {
2199
        return new getSuppliers_args();
2200
      }
2201
 
2202
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
2203
        getSuppliers_result result = new getSuppliers_result();
2204
        try {
2205
          result.success = iface.getSuppliers();
2206
        } catch (PurchaseServiceException e) {
2207
          result.e = e;
2208
        }
2209
        return result;
2210
      }
2211
    }
2212
 
2213
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
2214
      public fulfillPO() {
2215
        super("fulfillPO");
2216
      }
2217
 
2218
      protected fulfillPO_args getEmptyArgsInstance() {
2219
        return new fulfillPO_args();
2220
      }
2221
 
2222
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
2223
        fulfillPO_result result = new fulfillPO_result();
2224
        try {
2225
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
2226
        } catch (PurchaseServiceException e) {
2227
          result.e = e;
2228
        }
2229
        return result;
2230
      }
2231
    }
2232
 
2233
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
2234
      public updatePurchaseOrder() {
2235
        super("updatePurchaseOrder");
2236
      }
2237
 
2238
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
2239
        return new updatePurchaseOrder_args();
2240
      }
2241
 
2242
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
2243
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
2244
        try {
2245
          iface.updatePurchaseOrder(args.purchaseOrder);
2246
        } catch (PurchaseServiceException e) {
2247
          result.e = e;
2248
        }
2249
        return result;
2250
      }
2251
    }
2252
 
5185 mandeep.dh 2253
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
2254
      public unFulfillPO() {
2255
        super("unFulfillPO");
2256
      }
2257
 
2258
      protected unFulfillPO_args getEmptyArgsInstance() {
2259
        return new unFulfillPO_args();
2260
      }
2261
 
2262
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
2263
        unFulfillPO_result result = new unFulfillPO_result();
2264
        try {
2265
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
2266
        } catch (PurchaseServiceException e) {
2267
          result.e = e;
2268
        }
2269
        return result;
2270
      }
2271
    }
2272
 
5443 mandeep.dh 2273
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
2274
      public getInvoices() {
2275
        super("getInvoices");
2276
      }
2277
 
2278
      protected getInvoices_args getEmptyArgsInstance() {
2279
        return new getInvoices_args();
2280
      }
2281
 
2282
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
2283
        getInvoices_result result = new getInvoices_result();
2284
        result.success = iface.getInvoices(args.date);
2285
        return result;
2286
      }
2287
    }
2288
 
7410 amar.kumar 2289
    private static class getInvoicesForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoicesForWarehouse_args> {
2290
      public getInvoicesForWarehouse() {
2291
        super("getInvoicesForWarehouse");
2292
      }
2293
 
2294
      protected getInvoicesForWarehouse_args getEmptyArgsInstance() {
2295
        return new getInvoicesForWarehouse_args();
2296
      }
2297
 
2298
      protected getInvoicesForWarehouse_result getResult(I iface, getInvoicesForWarehouse_args args) throws org.apache.thrift.TException {
2299
        getInvoicesForWarehouse_result result = new getInvoicesForWarehouse_result();
2300
        result.success = iface.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date);
2301
        return result;
2302
      }
2303
    }
2304
 
5443 mandeep.dh 2305
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2306
      public createInvoice() {
2307
        super("createInvoice");
2308
      }
2309
 
2310
      protected createInvoice_args getEmptyArgsInstance() {
2311
        return new createInvoice_args();
2312
      }
2313
 
2314
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2315
        createInvoice_result result = new createInvoice_result();
2316
        try {
2317
          iface.createInvoice(args.invoice);
2318
        } catch (PurchaseServiceException e) {
2319
          result.e = e;
2320
        }
2321
        return result;
2322
      }
2323
    }
2324
 
5591 mandeep.dh 2325
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2326
      public addSupplier() {
2327
        super("addSupplier");
2328
      }
2329
 
2330
      protected addSupplier_args getEmptyArgsInstance() {
2331
        return new addSupplier_args();
2332
      }
2333
 
2334
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2335
        addSupplier_result result = new addSupplier_result();
2336
        result.success = iface.addSupplier(args.supplier);
2337
        return result;
2338
      }
2339
    }
2340
 
2341
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2342
      public updateSupplier() {
2343
        super("updateSupplier");
2344
      }
2345
 
2346
      protected updateSupplier_args getEmptyArgsInstance() {
2347
        return new updateSupplier_args();
2348
      }
2349
 
2350
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2351
        updateSupplier_result result = new updateSupplier_result();
2352
        iface.updateSupplier(args.supplier);
2353
        return result;
2354
      }
2355
    }
2356
 
6467 amar.kumar 2357
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2358
      public createPurchaseReturn() {
2359
        super("createPurchaseReturn");
2360
      }
2361
 
2362
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2363
        return new createPurchaseReturn_args();
2364
      }
2365
 
2366
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2367
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2368
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2369
        result.setSuccessIsSet(true);
2370
        return result;
2371
      }
2372
    }
2373
 
2374
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2375
      public settlePurchaseReturn() {
2376
        super("settlePurchaseReturn");
2377
      }
2378
 
2379
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2380
        return new settlePurchaseReturn_args();
2381
      }
2382
 
2383
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2384
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2385
        iface.settlePurchaseReturn(args.id);
2386
        return result;
2387
      }
2388
    }
2389
 
2390
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2391
      public getUnsettledPurchaseReturns() {
2392
        super("getUnsettledPurchaseReturns");
2393
      }
2394
 
2395
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2396
        return new getUnsettledPurchaseReturns_args();
2397
      }
2398
 
2399
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2400
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2401
        result.success = iface.getUnsettledPurchaseReturns();
2402
        return result;
2403
      }
2404
    }
2405
 
6630 amar.kumar 2406
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2407
      public getInvoice() {
2408
        super("getInvoice");
2409
      }
2410
 
2411
      protected getInvoice_args getEmptyArgsInstance() {
2412
        return new getInvoice_args();
2413
      }
2414
 
2415
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2416
        getInvoice_result result = new getInvoice_result();
2417
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2418
        return result;
2419
      }
2420
    }
2421
 
6762 amar.kumar 2422
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2423
      public createPurchaseForOurExtBilling() {
2424
        super("createPurchaseForOurExtBilling");
2425
      }
2426
 
2427
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2428
        return new createPurchaseForOurExtBilling_args();
2429
      }
2430
 
2431
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2432
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
7672 rajveer 2433
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId);
6762 amar.kumar 2434
        result.setSuccessIsSet(true);
2435
        return result;
2436
      }
2437
    }
2438
 
2439
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2440
      public fulfillPOForExtBilling() {
2441
        super("fulfillPOForExtBilling");
2442
      }
2443
 
2444
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2445
        return new fulfillPOForExtBilling_args();
2446
      }
2447
 
2448
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2449
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2450
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2451
        return result;
2452
      }
2453
    }
2454
 
7410 amar.kumar 2455
    private static class closePO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePO_args> {
2456
      public closePO() {
2457
        super("closePO");
2458
      }
2459
 
2460
      protected closePO_args getEmptyArgsInstance() {
2461
        return new closePO_args();
2462
      }
2463
 
2464
      protected closePO_result getResult(I iface, closePO_args args) throws org.apache.thrift.TException {
2465
        closePO_result result = new closePO_result();
2466
        try {
2467
          iface.closePO(args.poId);
2468
        } catch (PurchaseServiceException e) {
2469
          result.e = e;
2470
        }
2471
        return result;
2472
      }
2473
    }
2474
 
2475
    private static class isInvoiceReceived<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInvoiceReceived_args> {
2476
      public isInvoiceReceived() {
2477
        super("isInvoiceReceived");
2478
      }
2479
 
2480
      protected isInvoiceReceived_args getEmptyArgsInstance() {
2481
        return new isInvoiceReceived_args();
2482
      }
2483
 
2484
      protected isInvoiceReceived_result getResult(I iface, isInvoiceReceived_args args) throws org.apache.thrift.TException {
2485
        isInvoiceReceived_result result = new isInvoiceReceived_result();
2486
        result.success = iface.isInvoiceReceived(args.invoiceNumber, args.supplierId);
2487
        result.setSuccessIsSet(true);
2488
        return result;
2489
      }
2490
    }
2491
 
9829 amar.kumar 2492
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
2493
      public changeWarehouseForPO() {
2494
        super("changeWarehouseForPO");
2495
      }
2496
 
2497
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
2498
        return new changeWarehouseForPO_args();
2499
      }
2500
 
2501
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
2502
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
2503
        try {
2504
          iface.changeWarehouseForPO(args.id, args.warehouseId);
2505
        } catch (PurchaseServiceException e) {
2506
          result.e = e;
2507
        }
2508
        return result;
2509
      }
2510
    }
2511
 
4496 mandeep.dh 2512
  }
2513
 
2514
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2515
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2516
 
2517
    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);
2518
 
2519
    private PurchaseOrder purchaseOrder; // required
2520
 
2521
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2522
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2523
      PURCHASE_ORDER((short)1, "purchaseOrder");
2524
 
2525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2526
 
2527
      static {
2528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2529
          byName.put(field.getFieldName(), field);
2530
        }
2531
      }
2532
 
2533
      /**
2534
       * Find the _Fields constant that matches fieldId, or null if its not found.
2535
       */
2536
      public static _Fields findByThriftId(int fieldId) {
2537
        switch(fieldId) {
2538
          case 1: // PURCHASE_ORDER
2539
            return PURCHASE_ORDER;
2540
          default:
2541
            return null;
2542
        }
2543
      }
2544
 
2545
      /**
2546
       * Find the _Fields constant that matches fieldId, throwing an exception
2547
       * if it is not found.
2548
       */
2549
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2550
        _Fields fields = findByThriftId(fieldId);
2551
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2552
        return fields;
2553
      }
2554
 
2555
      /**
2556
       * Find the _Fields constant that matches name, or null if its not found.
2557
       */
2558
      public static _Fields findByName(String name) {
2559
        return byName.get(name);
2560
      }
2561
 
2562
      private final short _thriftId;
2563
      private final String _fieldName;
2564
 
2565
      _Fields(short thriftId, String fieldName) {
2566
        _thriftId = thriftId;
2567
        _fieldName = fieldName;
2568
      }
2569
 
2570
      public short getThriftFieldId() {
2571
        return _thriftId;
2572
      }
2573
 
2574
      public String getFieldName() {
2575
        return _fieldName;
2576
      }
2577
    }
2578
 
2579
    // isset id assignments
2580
 
2581
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2582
    static {
2583
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2584
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2585
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2586
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2587
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2588
    }
2589
 
2590
    public createPurchaseOrder_args() {
2591
    }
2592
 
2593
    public createPurchaseOrder_args(
2594
      PurchaseOrder purchaseOrder)
2595
    {
2596
      this();
2597
      this.purchaseOrder = purchaseOrder;
2598
    }
2599
 
2600
    /**
2601
     * Performs a deep copy on <i>other</i>.
2602
     */
2603
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2604
      if (other.isSetPurchaseOrder()) {
2605
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2606
      }
2607
    }
2608
 
2609
    public createPurchaseOrder_args deepCopy() {
2610
      return new createPurchaseOrder_args(this);
2611
    }
2612
 
2613
    @Override
2614
    public void clear() {
2615
      this.purchaseOrder = null;
2616
    }
2617
 
2618
    public PurchaseOrder getPurchaseOrder() {
2619
      return this.purchaseOrder;
2620
    }
2621
 
2622
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2623
      this.purchaseOrder = purchaseOrder;
2624
    }
2625
 
2626
    public void unsetPurchaseOrder() {
2627
      this.purchaseOrder = null;
2628
    }
2629
 
2630
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2631
    public boolean isSetPurchaseOrder() {
2632
      return this.purchaseOrder != null;
2633
    }
2634
 
2635
    public void setPurchaseOrderIsSet(boolean value) {
2636
      if (!value) {
2637
        this.purchaseOrder = null;
2638
      }
2639
    }
2640
 
2641
    public void setFieldValue(_Fields field, Object value) {
2642
      switch (field) {
2643
      case PURCHASE_ORDER:
2644
        if (value == null) {
2645
          unsetPurchaseOrder();
2646
        } else {
2647
          setPurchaseOrder((PurchaseOrder)value);
2648
        }
2649
        break;
2650
 
2651
      }
2652
    }
2653
 
2654
    public Object getFieldValue(_Fields field) {
2655
      switch (field) {
2656
      case PURCHASE_ORDER:
2657
        return getPurchaseOrder();
2658
 
2659
      }
2660
      throw new IllegalStateException();
2661
    }
2662
 
2663
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2664
    public boolean isSet(_Fields field) {
2665
      if (field == null) {
2666
        throw new IllegalArgumentException();
2667
      }
2668
 
2669
      switch (field) {
2670
      case PURCHASE_ORDER:
2671
        return isSetPurchaseOrder();
2672
      }
2673
      throw new IllegalStateException();
2674
    }
2675
 
2676
    @Override
2677
    public boolean equals(Object that) {
2678
      if (that == null)
2679
        return false;
2680
      if (that instanceof createPurchaseOrder_args)
2681
        return this.equals((createPurchaseOrder_args)that);
2682
      return false;
2683
    }
2684
 
2685
    public boolean equals(createPurchaseOrder_args that) {
2686
      if (that == null)
2687
        return false;
2688
 
2689
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2690
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2691
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2692
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2693
          return false;
2694
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2695
          return false;
2696
      }
2697
 
2698
      return true;
2699
    }
2700
 
2701
    @Override
2702
    public int hashCode() {
2703
      return 0;
2704
    }
2705
 
2706
    public int compareTo(createPurchaseOrder_args other) {
2707
      if (!getClass().equals(other.getClass())) {
2708
        return getClass().getName().compareTo(other.getClass().getName());
2709
      }
2710
 
2711
      int lastComparison = 0;
2712
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2713
 
2714
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2715
      if (lastComparison != 0) {
2716
        return lastComparison;
2717
      }
2718
      if (isSetPurchaseOrder()) {
2719
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2720
        if (lastComparison != 0) {
2721
          return lastComparison;
2722
        }
2723
      }
2724
      return 0;
2725
    }
2726
 
2727
    public _Fields fieldForId(int fieldId) {
2728
      return _Fields.findByThriftId(fieldId);
2729
    }
2730
 
2731
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2732
      org.apache.thrift.protocol.TField field;
2733
      iprot.readStructBegin();
2734
      while (true)
2735
      {
2736
        field = iprot.readFieldBegin();
2737
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2738
          break;
2739
        }
2740
        switch (field.id) {
2741
          case 1: // PURCHASE_ORDER
2742
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2743
              this.purchaseOrder = new PurchaseOrder();
2744
              this.purchaseOrder.read(iprot);
2745
            } else { 
2746
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2747
            }
2748
            break;
2749
          default:
2750
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2751
        }
2752
        iprot.readFieldEnd();
2753
      }
2754
      iprot.readStructEnd();
2755
      validate();
2756
    }
2757
 
2758
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2759
      validate();
2760
 
2761
      oprot.writeStructBegin(STRUCT_DESC);
2762
      if (this.purchaseOrder != null) {
2763
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2764
        this.purchaseOrder.write(oprot);
2765
        oprot.writeFieldEnd();
2766
      }
2767
      oprot.writeFieldStop();
2768
      oprot.writeStructEnd();
2769
    }
2770
 
2771
    @Override
2772
    public String toString() {
2773
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2774
      boolean first = true;
2775
 
2776
      sb.append("purchaseOrder:");
2777
      if (this.purchaseOrder == null) {
2778
        sb.append("null");
2779
      } else {
2780
        sb.append(this.purchaseOrder);
2781
      }
2782
      first = false;
2783
      sb.append(")");
2784
      return sb.toString();
2785
    }
2786
 
2787
    public void validate() throws org.apache.thrift.TException {
2788
      // check for required fields
2789
    }
2790
 
2791
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2792
      try {
2793
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2794
      } catch (org.apache.thrift.TException te) {
2795
        throw new java.io.IOException(te);
2796
      }
2797
    }
2798
 
2799
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2800
      try {
2801
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2802
      } catch (org.apache.thrift.TException te) {
2803
        throw new java.io.IOException(te);
2804
      }
2805
    }
2806
 
2807
  }
2808
 
2809
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2810
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2811
 
2812
    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);
2813
    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);
2814
 
2815
    private long success; // required
2816
    private PurchaseServiceException e; // required
2817
 
2818
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2819
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820
      SUCCESS((short)0, "success"),
2821
      E((short)1, "e");
2822
 
2823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2824
 
2825
      static {
2826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2827
          byName.put(field.getFieldName(), field);
2828
        }
2829
      }
2830
 
2831
      /**
2832
       * Find the _Fields constant that matches fieldId, or null if its not found.
2833
       */
2834
      public static _Fields findByThriftId(int fieldId) {
2835
        switch(fieldId) {
2836
          case 0: // SUCCESS
2837
            return SUCCESS;
2838
          case 1: // E
2839
            return E;
2840
          default:
2841
            return null;
2842
        }
2843
      }
2844
 
2845
      /**
2846
       * Find the _Fields constant that matches fieldId, throwing an exception
2847
       * if it is not found.
2848
       */
2849
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2850
        _Fields fields = findByThriftId(fieldId);
2851
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2852
        return fields;
2853
      }
2854
 
2855
      /**
2856
       * Find the _Fields constant that matches name, or null if its not found.
2857
       */
2858
      public static _Fields findByName(String name) {
2859
        return byName.get(name);
2860
      }
2861
 
2862
      private final short _thriftId;
2863
      private final String _fieldName;
2864
 
2865
      _Fields(short thriftId, String fieldName) {
2866
        _thriftId = thriftId;
2867
        _fieldName = fieldName;
2868
      }
2869
 
2870
      public short getThriftFieldId() {
2871
        return _thriftId;
2872
      }
2873
 
2874
      public String getFieldName() {
2875
        return _fieldName;
2876
      }
2877
    }
2878
 
2879
    // isset id assignments
2880
    private static final int __SUCCESS_ISSET_ID = 0;
2881
    private BitSet __isset_bit_vector = new BitSet(1);
2882
 
2883
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2884
    static {
2885
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2886
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2887
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2888
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2889
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2890
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2891
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2892
    }
2893
 
2894
    public createPurchaseOrder_result() {
2895
    }
2896
 
2897
    public createPurchaseOrder_result(
2898
      long success,
2899
      PurchaseServiceException e)
2900
    {
2901
      this();
2902
      this.success = success;
2903
      setSuccessIsSet(true);
2904
      this.e = e;
2905
    }
2906
 
2907
    /**
2908
     * Performs a deep copy on <i>other</i>.
2909
     */
2910
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
2911
      __isset_bit_vector.clear();
2912
      __isset_bit_vector.or(other.__isset_bit_vector);
2913
      this.success = other.success;
2914
      if (other.isSetE()) {
2915
        this.e = new PurchaseServiceException(other.e);
2916
      }
2917
    }
2918
 
2919
    public createPurchaseOrder_result deepCopy() {
2920
      return new createPurchaseOrder_result(this);
2921
    }
2922
 
2923
    @Override
2924
    public void clear() {
2925
      setSuccessIsSet(false);
2926
      this.success = 0;
2927
      this.e = null;
2928
    }
2929
 
2930
    public long getSuccess() {
2931
      return this.success;
2932
    }
2933
 
2934
    public void setSuccess(long success) {
2935
      this.success = success;
2936
      setSuccessIsSet(true);
2937
    }
2938
 
2939
    public void unsetSuccess() {
2940
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2941
    }
2942
 
2943
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2944
    public boolean isSetSuccess() {
2945
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2946
    }
2947
 
2948
    public void setSuccessIsSet(boolean value) {
2949
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2950
    }
2951
 
2952
    public PurchaseServiceException getE() {
2953
      return this.e;
2954
    }
2955
 
2956
    public void setE(PurchaseServiceException e) {
2957
      this.e = e;
2958
    }
2959
 
2960
    public void unsetE() {
2961
      this.e = null;
2962
    }
2963
 
2964
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2965
    public boolean isSetE() {
2966
      return this.e != null;
2967
    }
2968
 
2969
    public void setEIsSet(boolean value) {
2970
      if (!value) {
2971
        this.e = null;
2972
      }
2973
    }
2974
 
2975
    public void setFieldValue(_Fields field, Object value) {
2976
      switch (field) {
2977
      case SUCCESS:
2978
        if (value == null) {
2979
          unsetSuccess();
2980
        } else {
2981
          setSuccess((Long)value);
2982
        }
2983
        break;
2984
 
2985
      case E:
2986
        if (value == null) {
2987
          unsetE();
2988
        } else {
2989
          setE((PurchaseServiceException)value);
2990
        }
2991
        break;
2992
 
2993
      }
2994
    }
2995
 
2996
    public Object getFieldValue(_Fields field) {
2997
      switch (field) {
2998
      case SUCCESS:
2999
        return Long.valueOf(getSuccess());
3000
 
3001
      case E:
3002
        return getE();
3003
 
3004
      }
3005
      throw new IllegalStateException();
3006
    }
3007
 
3008
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3009
    public boolean isSet(_Fields field) {
3010
      if (field == null) {
3011
        throw new IllegalArgumentException();
3012
      }
3013
 
3014
      switch (field) {
3015
      case SUCCESS:
3016
        return isSetSuccess();
3017
      case E:
3018
        return isSetE();
3019
      }
3020
      throw new IllegalStateException();
3021
    }
3022
 
3023
    @Override
3024
    public boolean equals(Object that) {
3025
      if (that == null)
3026
        return false;
3027
      if (that instanceof createPurchaseOrder_result)
3028
        return this.equals((createPurchaseOrder_result)that);
3029
      return false;
3030
    }
3031
 
3032
    public boolean equals(createPurchaseOrder_result that) {
3033
      if (that == null)
3034
        return false;
3035
 
3036
      boolean this_present_success = true;
3037
      boolean that_present_success = true;
3038
      if (this_present_success || that_present_success) {
3039
        if (!(this_present_success && that_present_success))
3040
          return false;
3041
        if (this.success != that.success)
3042
          return false;
3043
      }
3044
 
3045
      boolean this_present_e = true && this.isSetE();
3046
      boolean that_present_e = true && that.isSetE();
3047
      if (this_present_e || that_present_e) {
3048
        if (!(this_present_e && that_present_e))
3049
          return false;
3050
        if (!this.e.equals(that.e))
3051
          return false;
3052
      }
3053
 
3054
      return true;
3055
    }
3056
 
3057
    @Override
3058
    public int hashCode() {
3059
      return 0;
3060
    }
3061
 
3062
    public int compareTo(createPurchaseOrder_result other) {
3063
      if (!getClass().equals(other.getClass())) {
3064
        return getClass().getName().compareTo(other.getClass().getName());
3065
      }
3066
 
3067
      int lastComparison = 0;
3068
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
3069
 
3070
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3071
      if (lastComparison != 0) {
3072
        return lastComparison;
3073
      }
3074
      if (isSetSuccess()) {
3075
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3076
        if (lastComparison != 0) {
3077
          return lastComparison;
3078
        }
3079
      }
3080
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3081
      if (lastComparison != 0) {
3082
        return lastComparison;
3083
      }
3084
      if (isSetE()) {
3085
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3086
        if (lastComparison != 0) {
3087
          return lastComparison;
3088
        }
3089
      }
3090
      return 0;
3091
    }
3092
 
3093
    public _Fields fieldForId(int fieldId) {
3094
      return _Fields.findByThriftId(fieldId);
3095
    }
3096
 
3097
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3098
      org.apache.thrift.protocol.TField field;
3099
      iprot.readStructBegin();
3100
      while (true)
3101
      {
3102
        field = iprot.readFieldBegin();
3103
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3104
          break;
3105
        }
3106
        switch (field.id) {
3107
          case 0: // SUCCESS
3108
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3109
              this.success = iprot.readI64();
3110
              setSuccessIsSet(true);
3111
            } else { 
3112
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3113
            }
3114
            break;
3115
          case 1: // E
3116
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3117
              this.e = new PurchaseServiceException();
3118
              this.e.read(iprot);
3119
            } else { 
3120
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3121
            }
3122
            break;
3123
          default:
3124
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3125
        }
3126
        iprot.readFieldEnd();
3127
      }
3128
      iprot.readStructEnd();
3129
      validate();
3130
    }
3131
 
3132
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3133
      oprot.writeStructBegin(STRUCT_DESC);
3134
 
3135
      if (this.isSetSuccess()) {
3136
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3137
        oprot.writeI64(this.success);
3138
        oprot.writeFieldEnd();
3139
      } else if (this.isSetE()) {
3140
        oprot.writeFieldBegin(E_FIELD_DESC);
3141
        this.e.write(oprot);
3142
        oprot.writeFieldEnd();
3143
      }
3144
      oprot.writeFieldStop();
3145
      oprot.writeStructEnd();
3146
    }
3147
 
3148
    @Override
3149
    public String toString() {
3150
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
3151
      boolean first = true;
3152
 
3153
      sb.append("success:");
3154
      sb.append(this.success);
3155
      first = false;
3156
      if (!first) sb.append(", ");
3157
      sb.append("e:");
3158
      if (this.e == null) {
3159
        sb.append("null");
3160
      } else {
3161
        sb.append(this.e);
3162
      }
3163
      first = false;
3164
      sb.append(")");
3165
      return sb.toString();
3166
    }
3167
 
3168
    public void validate() throws org.apache.thrift.TException {
3169
      // check for required fields
3170
    }
3171
 
3172
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3173
      try {
3174
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3175
      } catch (org.apache.thrift.TException te) {
3176
        throw new java.io.IOException(te);
3177
      }
3178
    }
3179
 
3180
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3181
      try {
3182
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3183
      } catch (org.apache.thrift.TException te) {
3184
        throw new java.io.IOException(te);
3185
      }
3186
    }
3187
 
3188
  }
3189
 
3190
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
3191
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
3192
 
3193
    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);
3194
 
3195
    private long id; // required
3196
 
3197
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3198
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3199
      ID((short)1, "id");
3200
 
3201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3202
 
3203
      static {
3204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3205
          byName.put(field.getFieldName(), field);
3206
        }
3207
      }
3208
 
3209
      /**
3210
       * Find the _Fields constant that matches fieldId, or null if its not found.
3211
       */
3212
      public static _Fields findByThriftId(int fieldId) {
3213
        switch(fieldId) {
3214
          case 1: // ID
3215
            return ID;
3216
          default:
3217
            return null;
3218
        }
3219
      }
3220
 
3221
      /**
3222
       * Find the _Fields constant that matches fieldId, throwing an exception
3223
       * if it is not found.
3224
       */
3225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3226
        _Fields fields = findByThriftId(fieldId);
3227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3228
        return fields;
3229
      }
3230
 
3231
      /**
3232
       * Find the _Fields constant that matches name, or null if its not found.
3233
       */
3234
      public static _Fields findByName(String name) {
3235
        return byName.get(name);
3236
      }
3237
 
3238
      private final short _thriftId;
3239
      private final String _fieldName;
3240
 
3241
      _Fields(short thriftId, String fieldName) {
3242
        _thriftId = thriftId;
3243
        _fieldName = fieldName;
3244
      }
3245
 
3246
      public short getThriftFieldId() {
3247
        return _thriftId;
3248
      }
3249
 
3250
      public String getFieldName() {
3251
        return _fieldName;
3252
      }
3253
    }
3254
 
3255
    // isset id assignments
3256
    private static final int __ID_ISSET_ID = 0;
3257
    private BitSet __isset_bit_vector = new BitSet(1);
3258
 
3259
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3260
    static {
3261
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3262
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3263
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3264
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3265
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
3266
    }
3267
 
3268
    public getPurchaseOrder_args() {
3269
    }
3270
 
3271
    public getPurchaseOrder_args(
3272
      long id)
3273
    {
3274
      this();
3275
      this.id = id;
3276
      setIdIsSet(true);
3277
    }
3278
 
3279
    /**
3280
     * Performs a deep copy on <i>other</i>.
3281
     */
3282
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
3283
      __isset_bit_vector.clear();
3284
      __isset_bit_vector.or(other.__isset_bit_vector);
3285
      this.id = other.id;
3286
    }
3287
 
3288
    public getPurchaseOrder_args deepCopy() {
3289
      return new getPurchaseOrder_args(this);
3290
    }
3291
 
3292
    @Override
3293
    public void clear() {
3294
      setIdIsSet(false);
3295
      this.id = 0;
3296
    }
3297
 
3298
    public long getId() {
3299
      return this.id;
3300
    }
3301
 
3302
    public void setId(long id) {
3303
      this.id = id;
3304
      setIdIsSet(true);
3305
    }
3306
 
3307
    public void unsetId() {
3308
      __isset_bit_vector.clear(__ID_ISSET_ID);
3309
    }
3310
 
3311
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3312
    public boolean isSetId() {
3313
      return __isset_bit_vector.get(__ID_ISSET_ID);
3314
    }
3315
 
3316
    public void setIdIsSet(boolean value) {
3317
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3318
    }
3319
 
3320
    public void setFieldValue(_Fields field, Object value) {
3321
      switch (field) {
3322
      case ID:
3323
        if (value == null) {
3324
          unsetId();
3325
        } else {
3326
          setId((Long)value);
3327
        }
3328
        break;
3329
 
3330
      }
3331
    }
3332
 
3333
    public Object getFieldValue(_Fields field) {
3334
      switch (field) {
3335
      case ID:
3336
        return Long.valueOf(getId());
3337
 
3338
      }
3339
      throw new IllegalStateException();
3340
    }
3341
 
3342
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3343
    public boolean isSet(_Fields field) {
3344
      if (field == null) {
3345
        throw new IllegalArgumentException();
3346
      }
3347
 
3348
      switch (field) {
3349
      case ID:
3350
        return isSetId();
3351
      }
3352
      throw new IllegalStateException();
3353
    }
3354
 
3355
    @Override
3356
    public boolean equals(Object that) {
3357
      if (that == null)
3358
        return false;
3359
      if (that instanceof getPurchaseOrder_args)
3360
        return this.equals((getPurchaseOrder_args)that);
3361
      return false;
3362
    }
3363
 
3364
    public boolean equals(getPurchaseOrder_args that) {
3365
      if (that == null)
3366
        return false;
3367
 
3368
      boolean this_present_id = true;
3369
      boolean that_present_id = true;
3370
      if (this_present_id || that_present_id) {
3371
        if (!(this_present_id && that_present_id))
3372
          return false;
3373
        if (this.id != that.id)
3374
          return false;
3375
      }
3376
 
3377
      return true;
3378
    }
3379
 
3380
    @Override
3381
    public int hashCode() {
3382
      return 0;
3383
    }
3384
 
3385
    public int compareTo(getPurchaseOrder_args other) {
3386
      if (!getClass().equals(other.getClass())) {
3387
        return getClass().getName().compareTo(other.getClass().getName());
3388
      }
3389
 
3390
      int lastComparison = 0;
3391
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3392
 
3393
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3394
      if (lastComparison != 0) {
3395
        return lastComparison;
3396
      }
3397
      if (isSetId()) {
3398
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3399
        if (lastComparison != 0) {
3400
          return lastComparison;
3401
        }
3402
      }
3403
      return 0;
3404
    }
3405
 
3406
    public _Fields fieldForId(int fieldId) {
3407
      return _Fields.findByThriftId(fieldId);
3408
    }
3409
 
3410
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3411
      org.apache.thrift.protocol.TField field;
3412
      iprot.readStructBegin();
3413
      while (true)
3414
      {
3415
        field = iprot.readFieldBegin();
3416
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3417
          break;
3418
        }
3419
        switch (field.id) {
3420
          case 1: // ID
3421
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3422
              this.id = iprot.readI64();
3423
              setIdIsSet(true);
3424
            } else { 
3425
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3426
            }
3427
            break;
3428
          default:
3429
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3430
        }
3431
        iprot.readFieldEnd();
3432
      }
3433
      iprot.readStructEnd();
3434
      validate();
3435
    }
3436
 
3437
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3438
      validate();
3439
 
3440
      oprot.writeStructBegin(STRUCT_DESC);
3441
      oprot.writeFieldBegin(ID_FIELD_DESC);
3442
      oprot.writeI64(this.id);
3443
      oprot.writeFieldEnd();
3444
      oprot.writeFieldStop();
3445
      oprot.writeStructEnd();
3446
    }
3447
 
3448
    @Override
3449
    public String toString() {
3450
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3451
      boolean first = true;
3452
 
3453
      sb.append("id:");
3454
      sb.append(this.id);
3455
      first = false;
3456
      sb.append(")");
3457
      return sb.toString();
3458
    }
3459
 
3460
    public void validate() throws org.apache.thrift.TException {
3461
      // check for required fields
3462
    }
3463
 
3464
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3465
      try {
3466
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3467
      } catch (org.apache.thrift.TException te) {
3468
        throw new java.io.IOException(te);
3469
      }
3470
    }
3471
 
3472
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3473
      try {
3474
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3475
      } catch (org.apache.thrift.TException te) {
3476
        throw new java.io.IOException(te);
3477
      }
3478
    }
3479
 
3480
  }
3481
 
3482
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3483
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3484
 
3485
    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);
3486
    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);
3487
 
3488
    private PurchaseOrder success; // required
3489
    private PurchaseServiceException e; // required
3490
 
3491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3492
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3493
      SUCCESS((short)0, "success"),
3494
      E((short)1, "e");
3495
 
3496
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3497
 
3498
      static {
3499
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3500
          byName.put(field.getFieldName(), field);
3501
        }
3502
      }
3503
 
3504
      /**
3505
       * Find the _Fields constant that matches fieldId, or null if its not found.
3506
       */
3507
      public static _Fields findByThriftId(int fieldId) {
3508
        switch(fieldId) {
3509
          case 0: // SUCCESS
3510
            return SUCCESS;
3511
          case 1: // E
3512
            return E;
3513
          default:
3514
            return null;
3515
        }
3516
      }
3517
 
3518
      /**
3519
       * Find the _Fields constant that matches fieldId, throwing an exception
3520
       * if it is not found.
3521
       */
3522
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3523
        _Fields fields = findByThriftId(fieldId);
3524
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3525
        return fields;
3526
      }
3527
 
3528
      /**
3529
       * Find the _Fields constant that matches name, or null if its not found.
3530
       */
3531
      public static _Fields findByName(String name) {
3532
        return byName.get(name);
3533
      }
3534
 
3535
      private final short _thriftId;
3536
      private final String _fieldName;
3537
 
3538
      _Fields(short thriftId, String fieldName) {
3539
        _thriftId = thriftId;
3540
        _fieldName = fieldName;
3541
      }
3542
 
3543
      public short getThriftFieldId() {
3544
        return _thriftId;
3545
      }
3546
 
3547
      public String getFieldName() {
3548
        return _fieldName;
3549
      }
3550
    }
3551
 
3552
    // isset id assignments
3553
 
3554
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3555
    static {
3556
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3557
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3558
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3559
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3560
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3561
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3562
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3563
    }
3564
 
3565
    public getPurchaseOrder_result() {
3566
    }
3567
 
3568
    public getPurchaseOrder_result(
3569
      PurchaseOrder success,
3570
      PurchaseServiceException e)
3571
    {
3572
      this();
3573
      this.success = success;
3574
      this.e = e;
3575
    }
3576
 
3577
    /**
3578
     * Performs a deep copy on <i>other</i>.
3579
     */
3580
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3581
      if (other.isSetSuccess()) {
3582
        this.success = new PurchaseOrder(other.success);
3583
      }
3584
      if (other.isSetE()) {
3585
        this.e = new PurchaseServiceException(other.e);
3586
      }
3587
    }
3588
 
3589
    public getPurchaseOrder_result deepCopy() {
3590
      return new getPurchaseOrder_result(this);
3591
    }
3592
 
3593
    @Override
3594
    public void clear() {
3595
      this.success = null;
3596
      this.e = null;
3597
    }
3598
 
3599
    public PurchaseOrder getSuccess() {
3600
      return this.success;
3601
    }
3602
 
3603
    public void setSuccess(PurchaseOrder success) {
3604
      this.success = success;
3605
    }
3606
 
3607
    public void unsetSuccess() {
3608
      this.success = null;
3609
    }
3610
 
3611
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3612
    public boolean isSetSuccess() {
3613
      return this.success != null;
3614
    }
3615
 
3616
    public void setSuccessIsSet(boolean value) {
3617
      if (!value) {
3618
        this.success = null;
3619
      }
3620
    }
3621
 
3622
    public PurchaseServiceException getE() {
3623
      return this.e;
3624
    }
3625
 
3626
    public void setE(PurchaseServiceException e) {
3627
      this.e = e;
3628
    }
3629
 
3630
    public void unsetE() {
3631
      this.e = null;
3632
    }
3633
 
3634
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3635
    public boolean isSetE() {
3636
      return this.e != null;
3637
    }
3638
 
3639
    public void setEIsSet(boolean value) {
3640
      if (!value) {
3641
        this.e = null;
3642
      }
3643
    }
3644
 
3645
    public void setFieldValue(_Fields field, Object value) {
3646
      switch (field) {
3647
      case SUCCESS:
3648
        if (value == null) {
3649
          unsetSuccess();
3650
        } else {
3651
          setSuccess((PurchaseOrder)value);
3652
        }
3653
        break;
3654
 
3655
      case E:
3656
        if (value == null) {
3657
          unsetE();
3658
        } else {
3659
          setE((PurchaseServiceException)value);
3660
        }
3661
        break;
3662
 
3663
      }
3664
    }
3665
 
3666
    public Object getFieldValue(_Fields field) {
3667
      switch (field) {
3668
      case SUCCESS:
3669
        return getSuccess();
3670
 
3671
      case E:
3672
        return getE();
3673
 
3674
      }
3675
      throw new IllegalStateException();
3676
    }
3677
 
3678
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3679
    public boolean isSet(_Fields field) {
3680
      if (field == null) {
3681
        throw new IllegalArgumentException();
3682
      }
3683
 
3684
      switch (field) {
3685
      case SUCCESS:
3686
        return isSetSuccess();
3687
      case E:
3688
        return isSetE();
3689
      }
3690
      throw new IllegalStateException();
3691
    }
3692
 
3693
    @Override
3694
    public boolean equals(Object that) {
3695
      if (that == null)
3696
        return false;
3697
      if (that instanceof getPurchaseOrder_result)
3698
        return this.equals((getPurchaseOrder_result)that);
3699
      return false;
3700
    }
3701
 
3702
    public boolean equals(getPurchaseOrder_result that) {
3703
      if (that == null)
3704
        return false;
3705
 
3706
      boolean this_present_success = true && this.isSetSuccess();
3707
      boolean that_present_success = true && that.isSetSuccess();
3708
      if (this_present_success || that_present_success) {
3709
        if (!(this_present_success && that_present_success))
3710
          return false;
3711
        if (!this.success.equals(that.success))
3712
          return false;
3713
      }
3714
 
3715
      boolean this_present_e = true && this.isSetE();
3716
      boolean that_present_e = true && that.isSetE();
3717
      if (this_present_e || that_present_e) {
3718
        if (!(this_present_e && that_present_e))
3719
          return false;
3720
        if (!this.e.equals(that.e))
3721
          return false;
3722
      }
3723
 
3724
      return true;
3725
    }
3726
 
3727
    @Override
3728
    public int hashCode() {
3729
      return 0;
3730
    }
3731
 
3732
    public int compareTo(getPurchaseOrder_result other) {
3733
      if (!getClass().equals(other.getClass())) {
3734
        return getClass().getName().compareTo(other.getClass().getName());
3735
      }
3736
 
3737
      int lastComparison = 0;
3738
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3739
 
3740
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3741
      if (lastComparison != 0) {
3742
        return lastComparison;
3743
      }
3744
      if (isSetSuccess()) {
3745
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3746
        if (lastComparison != 0) {
3747
          return lastComparison;
3748
        }
3749
      }
3750
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3751
      if (lastComparison != 0) {
3752
        return lastComparison;
3753
      }
3754
      if (isSetE()) {
3755
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3756
        if (lastComparison != 0) {
3757
          return lastComparison;
3758
        }
3759
      }
3760
      return 0;
3761
    }
3762
 
3763
    public _Fields fieldForId(int fieldId) {
3764
      return _Fields.findByThriftId(fieldId);
3765
    }
3766
 
3767
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3768
      org.apache.thrift.protocol.TField field;
3769
      iprot.readStructBegin();
3770
      while (true)
3771
      {
3772
        field = iprot.readFieldBegin();
3773
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3774
          break;
3775
        }
3776
        switch (field.id) {
3777
          case 0: // SUCCESS
3778
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3779
              this.success = new PurchaseOrder();
3780
              this.success.read(iprot);
3781
            } else { 
3782
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3783
            }
3784
            break;
3785
          case 1: // E
3786
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3787
              this.e = new PurchaseServiceException();
3788
              this.e.read(iprot);
3789
            } else { 
3790
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3791
            }
3792
            break;
3793
          default:
3794
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3795
        }
3796
        iprot.readFieldEnd();
3797
      }
3798
      iprot.readStructEnd();
3799
      validate();
3800
    }
3801
 
3802
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3803
      oprot.writeStructBegin(STRUCT_DESC);
3804
 
3805
      if (this.isSetSuccess()) {
3806
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3807
        this.success.write(oprot);
3808
        oprot.writeFieldEnd();
3809
      } else if (this.isSetE()) {
3810
        oprot.writeFieldBegin(E_FIELD_DESC);
3811
        this.e.write(oprot);
3812
        oprot.writeFieldEnd();
3813
      }
3814
      oprot.writeFieldStop();
3815
      oprot.writeStructEnd();
3816
    }
3817
 
3818
    @Override
3819
    public String toString() {
3820
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3821
      boolean first = true;
3822
 
3823
      sb.append("success:");
3824
      if (this.success == null) {
3825
        sb.append("null");
3826
      } else {
3827
        sb.append(this.success);
3828
      }
3829
      first = false;
3830
      if (!first) sb.append(", ");
3831
      sb.append("e:");
3832
      if (this.e == null) {
3833
        sb.append("null");
3834
      } else {
3835
        sb.append(this.e);
3836
      }
3837
      first = false;
3838
      sb.append(")");
3839
      return sb.toString();
3840
    }
3841
 
3842
    public void validate() throws org.apache.thrift.TException {
3843
      // check for required fields
3844
    }
3845
 
3846
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3847
      try {
3848
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3849
      } catch (org.apache.thrift.TException te) {
3850
        throw new java.io.IOException(te);
3851
      }
3852
    }
3853
 
3854
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3855
      try {
3856
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3857
      } catch (org.apache.thrift.TException te) {
3858
        throw new java.io.IOException(te);
3859
      }
3860
    }
3861
 
3862
  }
3863
 
3864
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3865
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3866
 
3867
    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);
3868
 
3869
    private POStatus status; // required
3870
 
3871
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3872
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3873
      /**
3874
       * 
3875
       * @see POStatus
3876
       */
3877
      STATUS((short)1, "status");
3878
 
3879
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3880
 
3881
      static {
3882
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3883
          byName.put(field.getFieldName(), field);
3884
        }
3885
      }
3886
 
3887
      /**
3888
       * Find the _Fields constant that matches fieldId, or null if its not found.
3889
       */
3890
      public static _Fields findByThriftId(int fieldId) {
3891
        switch(fieldId) {
3892
          case 1: // STATUS
3893
            return STATUS;
3894
          default:
3895
            return null;
3896
        }
3897
      }
3898
 
3899
      /**
3900
       * Find the _Fields constant that matches fieldId, throwing an exception
3901
       * if it is not found.
3902
       */
3903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3904
        _Fields fields = findByThriftId(fieldId);
3905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3906
        return fields;
3907
      }
3908
 
3909
      /**
3910
       * Find the _Fields constant that matches name, or null if its not found.
3911
       */
3912
      public static _Fields findByName(String name) {
3913
        return byName.get(name);
3914
      }
3915
 
3916
      private final short _thriftId;
3917
      private final String _fieldName;
3918
 
3919
      _Fields(short thriftId, String fieldName) {
3920
        _thriftId = thriftId;
3921
        _fieldName = fieldName;
3922
      }
3923
 
3924
      public short getThriftFieldId() {
3925
        return _thriftId;
3926
      }
3927
 
3928
      public String getFieldName() {
3929
        return _fieldName;
3930
      }
3931
    }
3932
 
3933
    // isset id assignments
3934
 
3935
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3936
    static {
3937
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3938
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3939
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3940
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3941
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3942
    }
3943
 
3944
    public getAllPurchaseOrders_args() {
3945
    }
3946
 
3947
    public getAllPurchaseOrders_args(
3948
      POStatus status)
3949
    {
3950
      this();
3951
      this.status = status;
3952
    }
3953
 
3954
    /**
3955
     * Performs a deep copy on <i>other</i>.
3956
     */
3957
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3958
      if (other.isSetStatus()) {
3959
        this.status = other.status;
3960
      }
3961
    }
3962
 
3963
    public getAllPurchaseOrders_args deepCopy() {
3964
      return new getAllPurchaseOrders_args(this);
3965
    }
3966
 
3967
    @Override
3968
    public void clear() {
3969
      this.status = null;
3970
    }
3971
 
3972
    /**
3973
     * 
3974
     * @see POStatus
3975
     */
3976
    public POStatus getStatus() {
3977
      return this.status;
3978
    }
3979
 
3980
    /**
3981
     * 
3982
     * @see POStatus
3983
     */
3984
    public void setStatus(POStatus status) {
3985
      this.status = status;
3986
    }
3987
 
3988
    public void unsetStatus() {
3989
      this.status = null;
3990
    }
3991
 
3992
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3993
    public boolean isSetStatus() {
3994
      return this.status != null;
3995
    }
3996
 
3997
    public void setStatusIsSet(boolean value) {
3998
      if (!value) {
3999
        this.status = null;
4000
      }
4001
    }
4002
 
4003
    public void setFieldValue(_Fields field, Object value) {
4004
      switch (field) {
4005
      case STATUS:
4006
        if (value == null) {
4007
          unsetStatus();
4008
        } else {
4009
          setStatus((POStatus)value);
4010
        }
4011
        break;
4012
 
4013
      }
4014
    }
4015
 
4016
    public Object getFieldValue(_Fields field) {
4017
      switch (field) {
4018
      case STATUS:
4019
        return getStatus();
4020
 
4021
      }
4022
      throw new IllegalStateException();
4023
    }
4024
 
4025
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4026
    public boolean isSet(_Fields field) {
4027
      if (field == null) {
4028
        throw new IllegalArgumentException();
4029
      }
4030
 
4031
      switch (field) {
4032
      case STATUS:
4033
        return isSetStatus();
4034
      }
4035
      throw new IllegalStateException();
4036
    }
4037
 
4038
    @Override
4039
    public boolean equals(Object that) {
4040
      if (that == null)
4041
        return false;
4042
      if (that instanceof getAllPurchaseOrders_args)
4043
        return this.equals((getAllPurchaseOrders_args)that);
4044
      return false;
4045
    }
4046
 
4047
    public boolean equals(getAllPurchaseOrders_args that) {
4048
      if (that == null)
4049
        return false;
4050
 
4051
      boolean this_present_status = true && this.isSetStatus();
4052
      boolean that_present_status = true && that.isSetStatus();
4053
      if (this_present_status || that_present_status) {
4054
        if (!(this_present_status && that_present_status))
4055
          return false;
4056
        if (!this.status.equals(that.status))
4057
          return false;
4058
      }
4059
 
4060
      return true;
4061
    }
4062
 
4063
    @Override
4064
    public int hashCode() {
4065
      return 0;
4066
    }
4067
 
4068
    public int compareTo(getAllPurchaseOrders_args other) {
4069
      if (!getClass().equals(other.getClass())) {
4070
        return getClass().getName().compareTo(other.getClass().getName());
4071
      }
4072
 
4073
      int lastComparison = 0;
4074
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
4075
 
4076
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
4077
      if (lastComparison != 0) {
4078
        return lastComparison;
4079
      }
4080
      if (isSetStatus()) {
4081
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4082
        if (lastComparison != 0) {
4083
          return lastComparison;
4084
        }
4085
      }
4086
      return 0;
4087
    }
4088
 
4089
    public _Fields fieldForId(int fieldId) {
4090
      return _Fields.findByThriftId(fieldId);
4091
    }
4092
 
4093
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4094
      org.apache.thrift.protocol.TField field;
4095
      iprot.readStructBegin();
4096
      while (true)
4097
      {
4098
        field = iprot.readFieldBegin();
4099
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4100
          break;
4101
        }
4102
        switch (field.id) {
4103
          case 1: // STATUS
4104
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4105
              this.status = POStatus.findByValue(iprot.readI32());
4106
            } else { 
4107
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4108
            }
4109
            break;
4110
          default:
4111
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4112
        }
4113
        iprot.readFieldEnd();
4114
      }
4115
      iprot.readStructEnd();
4116
      validate();
4117
    }
4118
 
4119
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4120
      validate();
4121
 
4122
      oprot.writeStructBegin(STRUCT_DESC);
4123
      if (this.status != null) {
4124
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4125
        oprot.writeI32(this.status.getValue());
4126
        oprot.writeFieldEnd();
4127
      }
4128
      oprot.writeFieldStop();
4129
      oprot.writeStructEnd();
4130
    }
4131
 
4132
    @Override
4133
    public String toString() {
4134
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
4135
      boolean first = true;
4136
 
4137
      sb.append("status:");
4138
      if (this.status == null) {
4139
        sb.append("null");
4140
      } else {
4141
        sb.append(this.status);
4142
      }
4143
      first = false;
4144
      sb.append(")");
4145
      return sb.toString();
4146
    }
4147
 
4148
    public void validate() throws org.apache.thrift.TException {
4149
      // check for required fields
4150
    }
4151
 
4152
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4153
      try {
4154
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4155
      } catch (org.apache.thrift.TException te) {
4156
        throw new java.io.IOException(te);
4157
      }
4158
    }
4159
 
4160
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4161
      try {
4162
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4163
      } catch (org.apache.thrift.TException te) {
4164
        throw new java.io.IOException(te);
4165
      }
4166
    }
4167
 
4168
  }
4169
 
4170
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
4171
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
4172
 
4173
    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);
4174
    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);
4175
 
4176
    private List<PurchaseOrder> success; // required
4177
    private PurchaseServiceException e; // required
4178
 
4179
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4180
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4181
      SUCCESS((short)0, "success"),
4182
      E((short)1, "e");
4183
 
4184
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4185
 
4186
      static {
4187
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4188
          byName.put(field.getFieldName(), field);
4189
        }
4190
      }
4191
 
4192
      /**
4193
       * Find the _Fields constant that matches fieldId, or null if its not found.
4194
       */
4195
      public static _Fields findByThriftId(int fieldId) {
4196
        switch(fieldId) {
4197
          case 0: // SUCCESS
4198
            return SUCCESS;
4199
          case 1: // E
4200
            return E;
4201
          default:
4202
            return null;
4203
        }
4204
      }
4205
 
4206
      /**
4207
       * Find the _Fields constant that matches fieldId, throwing an exception
4208
       * if it is not found.
4209
       */
4210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4211
        _Fields fields = findByThriftId(fieldId);
4212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4213
        return fields;
4214
      }
4215
 
4216
      /**
4217
       * Find the _Fields constant that matches name, or null if its not found.
4218
       */
4219
      public static _Fields findByName(String name) {
4220
        return byName.get(name);
4221
      }
4222
 
4223
      private final short _thriftId;
4224
      private final String _fieldName;
4225
 
4226
      _Fields(short thriftId, String fieldName) {
4227
        _thriftId = thriftId;
4228
        _fieldName = fieldName;
4229
      }
4230
 
4231
      public short getThriftFieldId() {
4232
        return _thriftId;
4233
      }
4234
 
4235
      public String getFieldName() {
4236
        return _fieldName;
4237
      }
4238
    }
4239
 
4240
    // isset id assignments
4241
 
4242
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4243
    static {
4244
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4245
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4246
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4247
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
4248
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4249
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4250
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4251
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
4252
    }
4253
 
4254
    public getAllPurchaseOrders_result() {
4255
    }
4256
 
4257
    public getAllPurchaseOrders_result(
4258
      List<PurchaseOrder> success,
4259
      PurchaseServiceException e)
4260
    {
4261
      this();
4262
      this.success = success;
4263
      this.e = e;
4264
    }
4265
 
4266
    /**
4267
     * Performs a deep copy on <i>other</i>.
4268
     */
4269
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
4270
      if (other.isSetSuccess()) {
4271
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
4272
        for (PurchaseOrder other_element : other.success) {
4273
          __this__success.add(new PurchaseOrder(other_element));
4274
        }
4275
        this.success = __this__success;
4276
      }
4277
      if (other.isSetE()) {
4278
        this.e = new PurchaseServiceException(other.e);
4279
      }
4280
    }
4281
 
4282
    public getAllPurchaseOrders_result deepCopy() {
4283
      return new getAllPurchaseOrders_result(this);
4284
    }
4285
 
4286
    @Override
4287
    public void clear() {
4288
      this.success = null;
4289
      this.e = null;
4290
    }
4291
 
4292
    public int getSuccessSize() {
4293
      return (this.success == null) ? 0 : this.success.size();
4294
    }
4295
 
4296
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
4297
      return (this.success == null) ? null : this.success.iterator();
4298
    }
4299
 
4300
    public void addToSuccess(PurchaseOrder elem) {
4301
      if (this.success == null) {
4302
        this.success = new ArrayList<PurchaseOrder>();
4303
      }
4304
      this.success.add(elem);
4305
    }
4306
 
4307
    public List<PurchaseOrder> getSuccess() {
4308
      return this.success;
4309
    }
4310
 
4311
    public void setSuccess(List<PurchaseOrder> success) {
4312
      this.success = success;
4313
    }
4314
 
4315
    public void unsetSuccess() {
4316
      this.success = null;
4317
    }
4318
 
4319
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4320
    public boolean isSetSuccess() {
4321
      return this.success != null;
4322
    }
4323
 
4324
    public void setSuccessIsSet(boolean value) {
4325
      if (!value) {
4326
        this.success = null;
4327
      }
4328
    }
4329
 
4330
    public PurchaseServiceException getE() {
4331
      return this.e;
4332
    }
4333
 
4334
    public void setE(PurchaseServiceException e) {
4335
      this.e = e;
4336
    }
4337
 
4338
    public void unsetE() {
4339
      this.e = null;
4340
    }
4341
 
4342
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4343
    public boolean isSetE() {
4344
      return this.e != null;
4345
    }
4346
 
4347
    public void setEIsSet(boolean value) {
4348
      if (!value) {
4349
        this.e = null;
4350
      }
4351
    }
4352
 
4353
    public void setFieldValue(_Fields field, Object value) {
4354
      switch (field) {
4355
      case SUCCESS:
4356
        if (value == null) {
4357
          unsetSuccess();
4358
        } else {
4359
          setSuccess((List<PurchaseOrder>)value);
4360
        }
4361
        break;
4362
 
4363
      case E:
4364
        if (value == null) {
4365
          unsetE();
4366
        } else {
4367
          setE((PurchaseServiceException)value);
4368
        }
4369
        break;
4370
 
4371
      }
4372
    }
4373
 
4374
    public Object getFieldValue(_Fields field) {
4375
      switch (field) {
4376
      case SUCCESS:
4377
        return getSuccess();
4378
 
4379
      case E:
4380
        return getE();
4381
 
4382
      }
4383
      throw new IllegalStateException();
4384
    }
4385
 
4386
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4387
    public boolean isSet(_Fields field) {
4388
      if (field == null) {
4389
        throw new IllegalArgumentException();
4390
      }
4391
 
4392
      switch (field) {
4393
      case SUCCESS:
4394
        return isSetSuccess();
4395
      case E:
4396
        return isSetE();
4397
      }
4398
      throw new IllegalStateException();
4399
    }
4400
 
4401
    @Override
4402
    public boolean equals(Object that) {
4403
      if (that == null)
4404
        return false;
4405
      if (that instanceof getAllPurchaseOrders_result)
4406
        return this.equals((getAllPurchaseOrders_result)that);
4407
      return false;
4408
    }
4409
 
4410
    public boolean equals(getAllPurchaseOrders_result that) {
4411
      if (that == null)
4412
        return false;
4413
 
4414
      boolean this_present_success = true && this.isSetSuccess();
4415
      boolean that_present_success = true && that.isSetSuccess();
4416
      if (this_present_success || that_present_success) {
4417
        if (!(this_present_success && that_present_success))
4418
          return false;
4419
        if (!this.success.equals(that.success))
4420
          return false;
4421
      }
4422
 
4423
      boolean this_present_e = true && this.isSetE();
4424
      boolean that_present_e = true && that.isSetE();
4425
      if (this_present_e || that_present_e) {
4426
        if (!(this_present_e && that_present_e))
4427
          return false;
4428
        if (!this.e.equals(that.e))
4429
          return false;
4430
      }
4431
 
4432
      return true;
4433
    }
4434
 
4435
    @Override
4436
    public int hashCode() {
4437
      return 0;
4438
    }
4439
 
4440
    public int compareTo(getAllPurchaseOrders_result other) {
4441
      if (!getClass().equals(other.getClass())) {
4442
        return getClass().getName().compareTo(other.getClass().getName());
4443
      }
4444
 
4445
      int lastComparison = 0;
4446
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4447
 
4448
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4449
      if (lastComparison != 0) {
4450
        return lastComparison;
4451
      }
4452
      if (isSetSuccess()) {
4453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4454
        if (lastComparison != 0) {
4455
          return lastComparison;
4456
        }
4457
      }
4458
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4459
      if (lastComparison != 0) {
4460
        return lastComparison;
4461
      }
4462
      if (isSetE()) {
4463
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4464
        if (lastComparison != 0) {
4465
          return lastComparison;
4466
        }
4467
      }
4468
      return 0;
4469
    }
4470
 
4471
    public _Fields fieldForId(int fieldId) {
4472
      return _Fields.findByThriftId(fieldId);
4473
    }
4474
 
4475
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4476
      org.apache.thrift.protocol.TField field;
4477
      iprot.readStructBegin();
4478
      while (true)
4479
      {
4480
        field = iprot.readFieldBegin();
4481
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4482
          break;
4483
        }
4484
        switch (field.id) {
4485
          case 0: // SUCCESS
4486
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4487
              {
4488
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4489
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4490
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4491
                {
4492
                  PurchaseOrder _elem6; // required
4493
                  _elem6 = new PurchaseOrder();
4494
                  _elem6.read(iprot);
4495
                  this.success.add(_elem6);
4496
                }
4497
                iprot.readListEnd();
4498
              }
4499
            } else { 
4500
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4501
            }
4502
            break;
4503
          case 1: // E
4504
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4505
              this.e = new PurchaseServiceException();
4506
              this.e.read(iprot);
4507
            } else { 
4508
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4509
            }
4510
            break;
4511
          default:
4512
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4513
        }
4514
        iprot.readFieldEnd();
4515
      }
4516
      iprot.readStructEnd();
4517
      validate();
4518
    }
4519
 
4520
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4521
      oprot.writeStructBegin(STRUCT_DESC);
4522
 
4523
      if (this.isSetSuccess()) {
4524
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4525
        {
4526
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4527
          for (PurchaseOrder _iter7 : this.success)
4528
          {
4529
            _iter7.write(oprot);
4530
          }
4531
          oprot.writeListEnd();
4532
        }
4533
        oprot.writeFieldEnd();
4534
      } else if (this.isSetE()) {
4535
        oprot.writeFieldBegin(E_FIELD_DESC);
4536
        this.e.write(oprot);
4537
        oprot.writeFieldEnd();
4538
      }
4539
      oprot.writeFieldStop();
4540
      oprot.writeStructEnd();
4541
    }
4542
 
4543
    @Override
4544
    public String toString() {
4545
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4546
      boolean first = true;
4547
 
4548
      sb.append("success:");
4549
      if (this.success == null) {
4550
        sb.append("null");
4551
      } else {
4552
        sb.append(this.success);
4553
      }
4554
      first = false;
4555
      if (!first) sb.append(", ");
4556
      sb.append("e:");
4557
      if (this.e == null) {
4558
        sb.append("null");
4559
      } else {
4560
        sb.append(this.e);
4561
      }
4562
      first = false;
4563
      sb.append(")");
4564
      return sb.toString();
4565
    }
4566
 
4567
    public void validate() throws org.apache.thrift.TException {
4568
      // check for required fields
4569
    }
4570
 
4571
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4572
      try {
4573
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4574
      } catch (org.apache.thrift.TException te) {
4575
        throw new java.io.IOException(te);
4576
      }
4577
    }
4578
 
4579
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4580
      try {
4581
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4582
      } catch (org.apache.thrift.TException te) {
4583
        throw new java.io.IOException(te);
4584
      }
4585
    }
4586
 
4587
  }
4588
 
4589
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4590
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4591
 
4592
    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);
4593
 
4594
    private long id; // required
4595
 
4596
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4597
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4598
      ID((short)1, "id");
4599
 
4600
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4601
 
4602
      static {
4603
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4604
          byName.put(field.getFieldName(), field);
4605
        }
4606
      }
4607
 
4608
      /**
4609
       * Find the _Fields constant that matches fieldId, or null if its not found.
4610
       */
4611
      public static _Fields findByThriftId(int fieldId) {
4612
        switch(fieldId) {
4613
          case 1: // ID
4614
            return ID;
4615
          default:
4616
            return null;
4617
        }
4618
      }
4619
 
4620
      /**
4621
       * Find the _Fields constant that matches fieldId, throwing an exception
4622
       * if it is not found.
4623
       */
4624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4625
        _Fields fields = findByThriftId(fieldId);
4626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4627
        return fields;
4628
      }
4629
 
4630
      /**
4631
       * Find the _Fields constant that matches name, or null if its not found.
4632
       */
4633
      public static _Fields findByName(String name) {
4634
        return byName.get(name);
4635
      }
4636
 
4637
      private final short _thriftId;
4638
      private final String _fieldName;
4639
 
4640
      _Fields(short thriftId, String fieldName) {
4641
        _thriftId = thriftId;
4642
        _fieldName = fieldName;
4643
      }
4644
 
4645
      public short getThriftFieldId() {
4646
        return _thriftId;
4647
      }
4648
 
4649
      public String getFieldName() {
4650
        return _fieldName;
4651
      }
4652
    }
4653
 
4654
    // isset id assignments
4655
    private static final int __ID_ISSET_ID = 0;
4656
    private BitSet __isset_bit_vector = new BitSet(1);
4657
 
4658
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4659
    static {
4660
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4661
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4662
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4663
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4664
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4665
    }
4666
 
4667
    public getSupplier_args() {
4668
    }
4669
 
4670
    public getSupplier_args(
4671
      long id)
4672
    {
4673
      this();
4674
      this.id = id;
4675
      setIdIsSet(true);
4676
    }
4677
 
4678
    /**
4679
     * Performs a deep copy on <i>other</i>.
4680
     */
4681
    public getSupplier_args(getSupplier_args other) {
4682
      __isset_bit_vector.clear();
4683
      __isset_bit_vector.or(other.__isset_bit_vector);
4684
      this.id = other.id;
4685
    }
4686
 
4687
    public getSupplier_args deepCopy() {
4688
      return new getSupplier_args(this);
4689
    }
4690
 
4691
    @Override
4692
    public void clear() {
4693
      setIdIsSet(false);
4694
      this.id = 0;
4695
    }
4696
 
4697
    public long getId() {
4698
      return this.id;
4699
    }
4700
 
4701
    public void setId(long id) {
4702
      this.id = id;
4703
      setIdIsSet(true);
4704
    }
4705
 
4706
    public void unsetId() {
4707
      __isset_bit_vector.clear(__ID_ISSET_ID);
4708
    }
4709
 
4710
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4711
    public boolean isSetId() {
4712
      return __isset_bit_vector.get(__ID_ISSET_ID);
4713
    }
4714
 
4715
    public void setIdIsSet(boolean value) {
4716
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4717
    }
4718
 
4719
    public void setFieldValue(_Fields field, Object value) {
4720
      switch (field) {
4721
      case ID:
4722
        if (value == null) {
4723
          unsetId();
4724
        } else {
4725
          setId((Long)value);
4726
        }
4727
        break;
4728
 
4729
      }
4730
    }
4731
 
4732
    public Object getFieldValue(_Fields field) {
4733
      switch (field) {
4734
      case ID:
4735
        return Long.valueOf(getId());
4736
 
4737
      }
4738
      throw new IllegalStateException();
4739
    }
4740
 
4741
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4742
    public boolean isSet(_Fields field) {
4743
      if (field == null) {
4744
        throw new IllegalArgumentException();
4745
      }
4746
 
4747
      switch (field) {
4748
      case ID:
4749
        return isSetId();
4750
      }
4751
      throw new IllegalStateException();
4752
    }
4753
 
4754
    @Override
4755
    public boolean equals(Object that) {
4756
      if (that == null)
4757
        return false;
4758
      if (that instanceof getSupplier_args)
4759
        return this.equals((getSupplier_args)that);
4760
      return false;
4761
    }
4762
 
4763
    public boolean equals(getSupplier_args that) {
4764
      if (that == null)
4765
        return false;
4766
 
4767
      boolean this_present_id = true;
4768
      boolean that_present_id = true;
4769
      if (this_present_id || that_present_id) {
4770
        if (!(this_present_id && that_present_id))
4771
          return false;
4772
        if (this.id != that.id)
4773
          return false;
4774
      }
4775
 
4776
      return true;
4777
    }
4778
 
4779
    @Override
4780
    public int hashCode() {
4781
      return 0;
4782
    }
4783
 
4784
    public int compareTo(getSupplier_args other) {
4785
      if (!getClass().equals(other.getClass())) {
4786
        return getClass().getName().compareTo(other.getClass().getName());
4787
      }
4788
 
4789
      int lastComparison = 0;
4790
      getSupplier_args typedOther = (getSupplier_args)other;
4791
 
4792
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4793
      if (lastComparison != 0) {
4794
        return lastComparison;
4795
      }
4796
      if (isSetId()) {
4797
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4798
        if (lastComparison != 0) {
4799
          return lastComparison;
4800
        }
4801
      }
4802
      return 0;
4803
    }
4804
 
4805
    public _Fields fieldForId(int fieldId) {
4806
      return _Fields.findByThriftId(fieldId);
4807
    }
4808
 
4809
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4810
      org.apache.thrift.protocol.TField field;
4811
      iprot.readStructBegin();
4812
      while (true)
4813
      {
4814
        field = iprot.readFieldBegin();
4815
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4816
          break;
4817
        }
4818
        switch (field.id) {
4819
          case 1: // ID
4820
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4821
              this.id = iprot.readI64();
4822
              setIdIsSet(true);
4823
            } else { 
4824
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4825
            }
4826
            break;
4827
          default:
4828
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4829
        }
4830
        iprot.readFieldEnd();
4831
      }
4832
      iprot.readStructEnd();
4833
      validate();
4834
    }
4835
 
4836
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4837
      validate();
4838
 
4839
      oprot.writeStructBegin(STRUCT_DESC);
4840
      oprot.writeFieldBegin(ID_FIELD_DESC);
4841
      oprot.writeI64(this.id);
4842
      oprot.writeFieldEnd();
4843
      oprot.writeFieldStop();
4844
      oprot.writeStructEnd();
4845
    }
4846
 
4847
    @Override
4848
    public String toString() {
4849
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4850
      boolean first = true;
4851
 
4852
      sb.append("id:");
4853
      sb.append(this.id);
4854
      first = false;
4855
      sb.append(")");
4856
      return sb.toString();
4857
    }
4858
 
4859
    public void validate() throws org.apache.thrift.TException {
4860
      // check for required fields
4861
    }
4862
 
4863
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4864
      try {
4865
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4866
      } catch (org.apache.thrift.TException te) {
4867
        throw new java.io.IOException(te);
4868
      }
4869
    }
4870
 
4871
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4872
      try {
4873
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4874
        __isset_bit_vector = new BitSet(1);
4875
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4876
      } catch (org.apache.thrift.TException te) {
4877
        throw new java.io.IOException(te);
4878
      }
4879
    }
4880
 
4881
  }
4882
 
4883
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4884
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4885
 
4886
    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);
4887
    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);
4888
 
4889
    private Supplier success; // required
4890
    private PurchaseServiceException e; // required
4891
 
4892
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4893
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4894
      SUCCESS((short)0, "success"),
4895
      E((short)1, "e");
4896
 
4897
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4898
 
4899
      static {
4900
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4901
          byName.put(field.getFieldName(), field);
4902
        }
4903
      }
4904
 
4905
      /**
4906
       * Find the _Fields constant that matches fieldId, or null if its not found.
4907
       */
4908
      public static _Fields findByThriftId(int fieldId) {
4909
        switch(fieldId) {
4910
          case 0: // SUCCESS
4911
            return SUCCESS;
4912
          case 1: // E
4913
            return E;
4914
          default:
4915
            return null;
4916
        }
4917
      }
4918
 
4919
      /**
4920
       * Find the _Fields constant that matches fieldId, throwing an exception
4921
       * if it is not found.
4922
       */
4923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4924
        _Fields fields = findByThriftId(fieldId);
4925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4926
        return fields;
4927
      }
4928
 
4929
      /**
4930
       * Find the _Fields constant that matches name, or null if its not found.
4931
       */
4932
      public static _Fields findByName(String name) {
4933
        return byName.get(name);
4934
      }
4935
 
4936
      private final short _thriftId;
4937
      private final String _fieldName;
4938
 
4939
      _Fields(short thriftId, String fieldName) {
4940
        _thriftId = thriftId;
4941
        _fieldName = fieldName;
4942
      }
4943
 
4944
      public short getThriftFieldId() {
4945
        return _thriftId;
4946
      }
4947
 
4948
      public String getFieldName() {
4949
        return _fieldName;
4950
      }
4951
    }
4952
 
4953
    // isset id assignments
4954
 
4955
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4956
    static {
4957
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4958
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4959
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4960
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4961
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4962
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4963
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4964
    }
4965
 
4966
    public getSupplier_result() {
4967
    }
4968
 
4969
    public getSupplier_result(
4970
      Supplier success,
4971
      PurchaseServiceException e)
4972
    {
4973
      this();
4974
      this.success = success;
4975
      this.e = e;
4976
    }
4977
 
4978
    /**
4979
     * Performs a deep copy on <i>other</i>.
4980
     */
4981
    public getSupplier_result(getSupplier_result other) {
4982
      if (other.isSetSuccess()) {
4983
        this.success = new Supplier(other.success);
4984
      }
4985
      if (other.isSetE()) {
4986
        this.e = new PurchaseServiceException(other.e);
4987
      }
4988
    }
4989
 
4990
    public getSupplier_result deepCopy() {
4991
      return new getSupplier_result(this);
4992
    }
4993
 
4994
    @Override
4995
    public void clear() {
4996
      this.success = null;
4997
      this.e = null;
4998
    }
4999
 
5000
    public Supplier getSuccess() {
5001
      return this.success;
5002
    }
5003
 
5004
    public void setSuccess(Supplier success) {
5005
      this.success = success;
5006
    }
5007
 
5008
    public void unsetSuccess() {
5009
      this.success = null;
5010
    }
5011
 
5012
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5013
    public boolean isSetSuccess() {
5014
      return this.success != null;
5015
    }
5016
 
5017
    public void setSuccessIsSet(boolean value) {
5018
      if (!value) {
5019
        this.success = null;
5020
      }
5021
    }
5022
 
5023
    public PurchaseServiceException getE() {
5024
      return this.e;
5025
    }
5026
 
5027
    public void setE(PurchaseServiceException e) {
5028
      this.e = e;
5029
    }
5030
 
5031
    public void unsetE() {
5032
      this.e = null;
5033
    }
5034
 
5035
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5036
    public boolean isSetE() {
5037
      return this.e != null;
5038
    }
5039
 
5040
    public void setEIsSet(boolean value) {
5041
      if (!value) {
5042
        this.e = null;
5043
      }
5044
    }
5045
 
5046
    public void setFieldValue(_Fields field, Object value) {
5047
      switch (field) {
5048
      case SUCCESS:
5049
        if (value == null) {
5050
          unsetSuccess();
5051
        } else {
5052
          setSuccess((Supplier)value);
5053
        }
5054
        break;
5055
 
5056
      case E:
5057
        if (value == null) {
5058
          unsetE();
5059
        } else {
5060
          setE((PurchaseServiceException)value);
5061
        }
5062
        break;
5063
 
5064
      }
5065
    }
5066
 
5067
    public Object getFieldValue(_Fields field) {
5068
      switch (field) {
5069
      case SUCCESS:
5070
        return getSuccess();
5071
 
5072
      case E:
5073
        return getE();
5074
 
5075
      }
5076
      throw new IllegalStateException();
5077
    }
5078
 
5079
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5080
    public boolean isSet(_Fields field) {
5081
      if (field == null) {
5082
        throw new IllegalArgumentException();
5083
      }
5084
 
5085
      switch (field) {
5086
      case SUCCESS:
5087
        return isSetSuccess();
5088
      case E:
5089
        return isSetE();
5090
      }
5091
      throw new IllegalStateException();
5092
    }
5093
 
5094
    @Override
5095
    public boolean equals(Object that) {
5096
      if (that == null)
5097
        return false;
5098
      if (that instanceof getSupplier_result)
5099
        return this.equals((getSupplier_result)that);
5100
      return false;
5101
    }
5102
 
5103
    public boolean equals(getSupplier_result that) {
5104
      if (that == null)
5105
        return false;
5106
 
5107
      boolean this_present_success = true && this.isSetSuccess();
5108
      boolean that_present_success = true && that.isSetSuccess();
5109
      if (this_present_success || that_present_success) {
5110
        if (!(this_present_success && that_present_success))
5111
          return false;
5112
        if (!this.success.equals(that.success))
5113
          return false;
5114
      }
5115
 
5116
      boolean this_present_e = true && this.isSetE();
5117
      boolean that_present_e = true && that.isSetE();
5118
      if (this_present_e || that_present_e) {
5119
        if (!(this_present_e && that_present_e))
5120
          return false;
5121
        if (!this.e.equals(that.e))
5122
          return false;
5123
      }
5124
 
5125
      return true;
5126
    }
5127
 
5128
    @Override
5129
    public int hashCode() {
5130
      return 0;
5131
    }
5132
 
5133
    public int compareTo(getSupplier_result other) {
5134
      if (!getClass().equals(other.getClass())) {
5135
        return getClass().getName().compareTo(other.getClass().getName());
5136
      }
5137
 
5138
      int lastComparison = 0;
5139
      getSupplier_result typedOther = (getSupplier_result)other;
5140
 
5141
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5142
      if (lastComparison != 0) {
5143
        return lastComparison;
5144
      }
5145
      if (isSetSuccess()) {
5146
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5147
        if (lastComparison != 0) {
5148
          return lastComparison;
5149
        }
5150
      }
5151
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5152
      if (lastComparison != 0) {
5153
        return lastComparison;
5154
      }
5155
      if (isSetE()) {
5156
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5157
        if (lastComparison != 0) {
5158
          return lastComparison;
5159
        }
5160
      }
5161
      return 0;
5162
    }
5163
 
5164
    public _Fields fieldForId(int fieldId) {
5165
      return _Fields.findByThriftId(fieldId);
5166
    }
5167
 
5168
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5169
      org.apache.thrift.protocol.TField field;
5170
      iprot.readStructBegin();
5171
      while (true)
5172
      {
5173
        field = iprot.readFieldBegin();
5174
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5175
          break;
5176
        }
5177
        switch (field.id) {
5178
          case 0: // SUCCESS
5179
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5180
              this.success = new Supplier();
5181
              this.success.read(iprot);
5182
            } else { 
5183
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5184
            }
5185
            break;
5186
          case 1: // E
5187
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5188
              this.e = new PurchaseServiceException();
5189
              this.e.read(iprot);
5190
            } else { 
5191
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5192
            }
5193
            break;
5194
          default:
5195
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5196
        }
5197
        iprot.readFieldEnd();
5198
      }
5199
      iprot.readStructEnd();
5200
      validate();
5201
    }
5202
 
5203
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5204
      oprot.writeStructBegin(STRUCT_DESC);
5205
 
5206
      if (this.isSetSuccess()) {
5207
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5208
        this.success.write(oprot);
5209
        oprot.writeFieldEnd();
5210
      } else if (this.isSetE()) {
5211
        oprot.writeFieldBegin(E_FIELD_DESC);
5212
        this.e.write(oprot);
5213
        oprot.writeFieldEnd();
5214
      }
5215
      oprot.writeFieldStop();
5216
      oprot.writeStructEnd();
5217
    }
5218
 
5219
    @Override
5220
    public String toString() {
5221
      StringBuilder sb = new StringBuilder("getSupplier_result(");
5222
      boolean first = true;
5223
 
5224
      sb.append("success:");
5225
      if (this.success == null) {
5226
        sb.append("null");
5227
      } else {
5228
        sb.append(this.success);
5229
      }
5230
      first = false;
5231
      if (!first) sb.append(", ");
5232
      sb.append("e:");
5233
      if (this.e == null) {
5234
        sb.append("null");
5235
      } else {
5236
        sb.append(this.e);
5237
      }
5238
      first = false;
5239
      sb.append(")");
5240
      return sb.toString();
5241
    }
5242
 
5243
    public void validate() throws org.apache.thrift.TException {
5244
      // check for required fields
5245
    }
5246
 
5247
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5248
      try {
5249
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5250
      } catch (org.apache.thrift.TException te) {
5251
        throw new java.io.IOException(te);
5252
      }
5253
    }
5254
 
5255
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5256
      try {
5257
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5258
      } catch (org.apache.thrift.TException te) {
5259
        throw new java.io.IOException(te);
5260
      }
5261
    }
5262
 
5263
  }
5264
 
5265
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
5266
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5267
 
5268
    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);
5269
    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);
5270
    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);
5271
 
5272
    private long purchaseOrderId; // required
5273
    private String invoiceNumber; // required
5274
    private double freightCharges; // required
5275
 
5276
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5277
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5278
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5279
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5280
      FREIGHT_CHARGES((short)3, "freightCharges");
5281
 
5282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5283
 
5284
      static {
5285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5286
          byName.put(field.getFieldName(), field);
5287
        }
5288
      }
5289
 
5290
      /**
5291
       * Find the _Fields constant that matches fieldId, or null if its not found.
5292
       */
5293
      public static _Fields findByThriftId(int fieldId) {
5294
        switch(fieldId) {
5295
          case 1: // PURCHASE_ORDER_ID
5296
            return PURCHASE_ORDER_ID;
5297
          case 2: // INVOICE_NUMBER
5298
            return INVOICE_NUMBER;
5299
          case 3: // FREIGHT_CHARGES
5300
            return FREIGHT_CHARGES;
5301
          default:
5302
            return null;
5303
        }
5304
      }
5305
 
5306
      /**
5307
       * Find the _Fields constant that matches fieldId, throwing an exception
5308
       * if it is not found.
5309
       */
5310
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5311
        _Fields fields = findByThriftId(fieldId);
5312
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5313
        return fields;
5314
      }
5315
 
5316
      /**
5317
       * Find the _Fields constant that matches name, or null if its not found.
5318
       */
5319
      public static _Fields findByName(String name) {
5320
        return byName.get(name);
5321
      }
5322
 
5323
      private final short _thriftId;
5324
      private final String _fieldName;
5325
 
5326
      _Fields(short thriftId, String fieldName) {
5327
        _thriftId = thriftId;
5328
        _fieldName = fieldName;
5329
      }
5330
 
5331
      public short getThriftFieldId() {
5332
        return _thriftId;
5333
      }
5334
 
5335
      public String getFieldName() {
5336
        return _fieldName;
5337
      }
5338
    }
5339
 
5340
    // isset id assignments
5341
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5342
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
5343
    private BitSet __isset_bit_vector = new BitSet(2);
5344
 
5345
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5346
    static {
5347
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5348
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5349
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5350
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5351
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5352
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5353
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5354
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5355
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5356
    }
5357
 
5358
    public startPurchase_args() {
5359
    }
5360
 
5361
    public startPurchase_args(
5362
      long purchaseOrderId,
5363
      String invoiceNumber,
5364
      double freightCharges)
5365
    {
5366
      this();
5367
      this.purchaseOrderId = purchaseOrderId;
5368
      setPurchaseOrderIdIsSet(true);
5369
      this.invoiceNumber = invoiceNumber;
5370
      this.freightCharges = freightCharges;
5371
      setFreightChargesIsSet(true);
5372
    }
5373
 
5374
    /**
5375
     * Performs a deep copy on <i>other</i>.
5376
     */
5377
    public startPurchase_args(startPurchase_args other) {
5378
      __isset_bit_vector.clear();
5379
      __isset_bit_vector.or(other.__isset_bit_vector);
5380
      this.purchaseOrderId = other.purchaseOrderId;
5381
      if (other.isSetInvoiceNumber()) {
5382
        this.invoiceNumber = other.invoiceNumber;
5383
      }
5384
      this.freightCharges = other.freightCharges;
5385
    }
5386
 
5387
    public startPurchase_args deepCopy() {
5388
      return new startPurchase_args(this);
5389
    }
5390
 
5391
    @Override
5392
    public void clear() {
5393
      setPurchaseOrderIdIsSet(false);
5394
      this.purchaseOrderId = 0;
5395
      this.invoiceNumber = null;
5396
      setFreightChargesIsSet(false);
5397
      this.freightCharges = 0.0;
5398
    }
5399
 
5400
    public long getPurchaseOrderId() {
5401
      return this.purchaseOrderId;
5402
    }
5403
 
5404
    public void setPurchaseOrderId(long purchaseOrderId) {
5405
      this.purchaseOrderId = purchaseOrderId;
5406
      setPurchaseOrderIdIsSet(true);
5407
    }
5408
 
5409
    public void unsetPurchaseOrderId() {
5410
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5411
    }
5412
 
5413
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5414
    public boolean isSetPurchaseOrderId() {
5415
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5416
    }
5417
 
5418
    public void setPurchaseOrderIdIsSet(boolean value) {
5419
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5420
    }
5421
 
5422
    public String getInvoiceNumber() {
5423
      return this.invoiceNumber;
5424
    }
5425
 
5426
    public void setInvoiceNumber(String invoiceNumber) {
5427
      this.invoiceNumber = invoiceNumber;
5428
    }
5429
 
5430
    public void unsetInvoiceNumber() {
5431
      this.invoiceNumber = null;
5432
    }
5433
 
5434
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5435
    public boolean isSetInvoiceNumber() {
5436
      return this.invoiceNumber != null;
5437
    }
5438
 
5439
    public void setInvoiceNumberIsSet(boolean value) {
5440
      if (!value) {
5441
        this.invoiceNumber = null;
5442
      }
5443
    }
5444
 
5445
    public double getFreightCharges() {
5446
      return this.freightCharges;
5447
    }
5448
 
5449
    public void setFreightCharges(double freightCharges) {
5450
      this.freightCharges = freightCharges;
5451
      setFreightChargesIsSet(true);
5452
    }
5453
 
5454
    public void unsetFreightCharges() {
5455
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5456
    }
5457
 
5458
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5459
    public boolean isSetFreightCharges() {
5460
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5461
    }
5462
 
5463
    public void setFreightChargesIsSet(boolean value) {
5464
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5465
    }
5466
 
5467
    public void setFieldValue(_Fields field, Object value) {
5468
      switch (field) {
5469
      case PURCHASE_ORDER_ID:
5470
        if (value == null) {
5471
          unsetPurchaseOrderId();
5472
        } else {
5473
          setPurchaseOrderId((Long)value);
5474
        }
5475
        break;
5476
 
5477
      case INVOICE_NUMBER:
5478
        if (value == null) {
5479
          unsetInvoiceNumber();
5480
        } else {
5481
          setInvoiceNumber((String)value);
5482
        }
5483
        break;
5484
 
5485
      case FREIGHT_CHARGES:
5486
        if (value == null) {
5487
          unsetFreightCharges();
5488
        } else {
5489
          setFreightCharges((Double)value);
5490
        }
5491
        break;
5492
 
5493
      }
5494
    }
5495
 
5496
    public Object getFieldValue(_Fields field) {
5497
      switch (field) {
5498
      case PURCHASE_ORDER_ID:
5499
        return Long.valueOf(getPurchaseOrderId());
5500
 
5501
      case INVOICE_NUMBER:
5502
        return getInvoiceNumber();
5503
 
5504
      case FREIGHT_CHARGES:
5505
        return Double.valueOf(getFreightCharges());
5506
 
5507
      }
5508
      throw new IllegalStateException();
5509
    }
5510
 
5511
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5512
    public boolean isSet(_Fields field) {
5513
      if (field == null) {
5514
        throw new IllegalArgumentException();
5515
      }
5516
 
5517
      switch (field) {
5518
      case PURCHASE_ORDER_ID:
5519
        return isSetPurchaseOrderId();
5520
      case INVOICE_NUMBER:
5521
        return isSetInvoiceNumber();
5522
      case FREIGHT_CHARGES:
5523
        return isSetFreightCharges();
5524
      }
5525
      throw new IllegalStateException();
5526
    }
5527
 
5528
    @Override
5529
    public boolean equals(Object that) {
5530
      if (that == null)
5531
        return false;
5532
      if (that instanceof startPurchase_args)
5533
        return this.equals((startPurchase_args)that);
5534
      return false;
5535
    }
5536
 
5537
    public boolean equals(startPurchase_args that) {
5538
      if (that == null)
5539
        return false;
5540
 
5541
      boolean this_present_purchaseOrderId = true;
5542
      boolean that_present_purchaseOrderId = true;
5543
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5544
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5545
          return false;
5546
        if (this.purchaseOrderId != that.purchaseOrderId)
5547
          return false;
5548
      }
5549
 
5550
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5551
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5552
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5553
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5554
          return false;
5555
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5556
          return false;
5557
      }
5558
 
5559
      boolean this_present_freightCharges = true;
5560
      boolean that_present_freightCharges = true;
5561
      if (this_present_freightCharges || that_present_freightCharges) {
5562
        if (!(this_present_freightCharges && that_present_freightCharges))
5563
          return false;
5564
        if (this.freightCharges != that.freightCharges)
5565
          return false;
5566
      }
5567
 
5568
      return true;
5569
    }
5570
 
5571
    @Override
5572
    public int hashCode() {
5573
      return 0;
5574
    }
5575
 
5576
    public int compareTo(startPurchase_args other) {
5577
      if (!getClass().equals(other.getClass())) {
5578
        return getClass().getName().compareTo(other.getClass().getName());
5579
      }
5580
 
5581
      int lastComparison = 0;
5582
      startPurchase_args typedOther = (startPurchase_args)other;
5583
 
5584
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5585
      if (lastComparison != 0) {
5586
        return lastComparison;
5587
      }
5588
      if (isSetPurchaseOrderId()) {
5589
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5590
        if (lastComparison != 0) {
5591
          return lastComparison;
5592
        }
5593
      }
5594
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5595
      if (lastComparison != 0) {
5596
        return lastComparison;
5597
      }
5598
      if (isSetInvoiceNumber()) {
5599
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5600
        if (lastComparison != 0) {
5601
          return lastComparison;
5602
        }
5603
      }
5604
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5605
      if (lastComparison != 0) {
5606
        return lastComparison;
5607
      }
5608
      if (isSetFreightCharges()) {
5609
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5610
        if (lastComparison != 0) {
5611
          return lastComparison;
5612
        }
5613
      }
5614
      return 0;
5615
    }
5616
 
5617
    public _Fields fieldForId(int fieldId) {
5618
      return _Fields.findByThriftId(fieldId);
5619
    }
5620
 
5621
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5622
      org.apache.thrift.protocol.TField field;
5623
      iprot.readStructBegin();
5624
      while (true)
5625
      {
5626
        field = iprot.readFieldBegin();
5627
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5628
          break;
5629
        }
5630
        switch (field.id) {
5631
          case 1: // PURCHASE_ORDER_ID
5632
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5633
              this.purchaseOrderId = iprot.readI64();
5634
              setPurchaseOrderIdIsSet(true);
5635
            } else { 
5636
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5637
            }
5638
            break;
5639
          case 2: // INVOICE_NUMBER
5640
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5641
              this.invoiceNumber = iprot.readString();
5642
            } else { 
5643
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5644
            }
5645
            break;
5646
          case 3: // FREIGHT_CHARGES
5647
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5648
              this.freightCharges = iprot.readDouble();
5649
              setFreightChargesIsSet(true);
5650
            } else { 
5651
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5652
            }
5653
            break;
5654
          default:
5655
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5656
        }
5657
        iprot.readFieldEnd();
5658
      }
5659
      iprot.readStructEnd();
5660
      validate();
5661
    }
5662
 
5663
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5664
      validate();
5665
 
5666
      oprot.writeStructBegin(STRUCT_DESC);
5667
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5668
      oprot.writeI64(this.purchaseOrderId);
5669
      oprot.writeFieldEnd();
5670
      if (this.invoiceNumber != null) {
5671
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5672
        oprot.writeString(this.invoiceNumber);
5673
        oprot.writeFieldEnd();
5674
      }
5675
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5676
      oprot.writeDouble(this.freightCharges);
5677
      oprot.writeFieldEnd();
5678
      oprot.writeFieldStop();
5679
      oprot.writeStructEnd();
5680
    }
5681
 
5682
    @Override
5683
    public String toString() {
5684
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5685
      boolean first = true;
5686
 
5687
      sb.append("purchaseOrderId:");
5688
      sb.append(this.purchaseOrderId);
5689
      first = false;
5690
      if (!first) sb.append(", ");
5691
      sb.append("invoiceNumber:");
5692
      if (this.invoiceNumber == null) {
5693
        sb.append("null");
5694
      } else {
5695
        sb.append(this.invoiceNumber);
5696
      }
5697
      first = false;
5698
      if (!first) sb.append(", ");
5699
      sb.append("freightCharges:");
5700
      sb.append(this.freightCharges);
5701
      first = false;
5702
      sb.append(")");
5703
      return sb.toString();
5704
    }
5705
 
5706
    public void validate() throws org.apache.thrift.TException {
5707
      // check for required fields
5708
    }
5709
 
5710
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5711
      try {
5712
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5713
      } catch (org.apache.thrift.TException te) {
5714
        throw new java.io.IOException(te);
5715
      }
5716
    }
5717
 
5718
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5719
      try {
5720
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5721
      } catch (org.apache.thrift.TException te) {
5722
        throw new java.io.IOException(te);
5723
      }
5724
    }
5725
 
5726
  }
5727
 
5728
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5729
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5730
 
5731
    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);
5732
    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);
5733
 
5734
    private long success; // required
5735
    private PurchaseServiceException e; // required
5736
 
5737
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5738
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5739
      SUCCESS((short)0, "success"),
5740
      E((short)1, "e");
5741
 
5742
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5743
 
5744
      static {
5745
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5746
          byName.put(field.getFieldName(), field);
5747
        }
5748
      }
5749
 
5750
      /**
5751
       * Find the _Fields constant that matches fieldId, or null if its not found.
5752
       */
5753
      public static _Fields findByThriftId(int fieldId) {
5754
        switch(fieldId) {
5755
          case 0: // SUCCESS
5756
            return SUCCESS;
5757
          case 1: // E
5758
            return E;
5759
          default:
5760
            return null;
5761
        }
5762
      }
5763
 
5764
      /**
5765
       * Find the _Fields constant that matches fieldId, throwing an exception
5766
       * if it is not found.
5767
       */
5768
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5769
        _Fields fields = findByThriftId(fieldId);
5770
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5771
        return fields;
5772
      }
5773
 
5774
      /**
5775
       * Find the _Fields constant that matches name, or null if its not found.
5776
       */
5777
      public static _Fields findByName(String name) {
5778
        return byName.get(name);
5779
      }
5780
 
5781
      private final short _thriftId;
5782
      private final String _fieldName;
5783
 
5784
      _Fields(short thriftId, String fieldName) {
5785
        _thriftId = thriftId;
5786
        _fieldName = fieldName;
5787
      }
5788
 
5789
      public short getThriftFieldId() {
5790
        return _thriftId;
5791
      }
5792
 
5793
      public String getFieldName() {
5794
        return _fieldName;
5795
      }
5796
    }
5797
 
5798
    // isset id assignments
5799
    private static final int __SUCCESS_ISSET_ID = 0;
5800
    private BitSet __isset_bit_vector = new BitSet(1);
5801
 
5802
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5803
    static {
5804
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5805
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5806
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5807
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5808
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5809
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5810
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5811
    }
5812
 
5813
    public startPurchase_result() {
5814
    }
5815
 
5816
    public startPurchase_result(
5817
      long success,
5818
      PurchaseServiceException e)
5819
    {
5820
      this();
5821
      this.success = success;
5822
      setSuccessIsSet(true);
5823
      this.e = e;
5824
    }
5825
 
5826
    /**
5827
     * Performs a deep copy on <i>other</i>.
5828
     */
5829
    public startPurchase_result(startPurchase_result other) {
5830
      __isset_bit_vector.clear();
5831
      __isset_bit_vector.or(other.__isset_bit_vector);
5832
      this.success = other.success;
5833
      if (other.isSetE()) {
5834
        this.e = new PurchaseServiceException(other.e);
5835
      }
5836
    }
5837
 
5838
    public startPurchase_result deepCopy() {
5839
      return new startPurchase_result(this);
5840
    }
5841
 
5842
    @Override
5843
    public void clear() {
5844
      setSuccessIsSet(false);
5845
      this.success = 0;
5846
      this.e = null;
5847
    }
5848
 
5849
    public long getSuccess() {
5850
      return this.success;
5851
    }
5852
 
5853
    public void setSuccess(long success) {
5854
      this.success = success;
5855
      setSuccessIsSet(true);
5856
    }
5857
 
5858
    public void unsetSuccess() {
5859
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5860
    }
5861
 
5862
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5863
    public boolean isSetSuccess() {
5864
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5865
    }
5866
 
5867
    public void setSuccessIsSet(boolean value) {
5868
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5869
    }
5870
 
5871
    public PurchaseServiceException getE() {
5872
      return this.e;
5873
    }
5874
 
5875
    public void setE(PurchaseServiceException e) {
5876
      this.e = e;
5877
    }
5878
 
5879
    public void unsetE() {
5880
      this.e = null;
5881
    }
5882
 
5883
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5884
    public boolean isSetE() {
5885
      return this.e != null;
5886
    }
5887
 
5888
    public void setEIsSet(boolean value) {
5889
      if (!value) {
5890
        this.e = null;
5891
      }
5892
    }
5893
 
5894
    public void setFieldValue(_Fields field, Object value) {
5895
      switch (field) {
5896
      case SUCCESS:
5897
        if (value == null) {
5898
          unsetSuccess();
5899
        } else {
5900
          setSuccess((Long)value);
5901
        }
5902
        break;
5903
 
5904
      case E:
5905
        if (value == null) {
5906
          unsetE();
5907
        } else {
5908
          setE((PurchaseServiceException)value);
5909
        }
5910
        break;
5911
 
5912
      }
5913
    }
5914
 
5915
    public Object getFieldValue(_Fields field) {
5916
      switch (field) {
5917
      case SUCCESS:
5918
        return Long.valueOf(getSuccess());
5919
 
5920
      case E:
5921
        return getE();
5922
 
5923
      }
5924
      throw new IllegalStateException();
5925
    }
5926
 
5927
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5928
    public boolean isSet(_Fields field) {
5929
      if (field == null) {
5930
        throw new IllegalArgumentException();
5931
      }
5932
 
5933
      switch (field) {
5934
      case SUCCESS:
5935
        return isSetSuccess();
5936
      case E:
5937
        return isSetE();
5938
      }
5939
      throw new IllegalStateException();
5940
    }
5941
 
5942
    @Override
5943
    public boolean equals(Object that) {
5944
      if (that == null)
5945
        return false;
5946
      if (that instanceof startPurchase_result)
5947
        return this.equals((startPurchase_result)that);
5948
      return false;
5949
    }
5950
 
5951
    public boolean equals(startPurchase_result that) {
5952
      if (that == null)
5953
        return false;
5954
 
5955
      boolean this_present_success = true;
5956
      boolean that_present_success = true;
5957
      if (this_present_success || that_present_success) {
5958
        if (!(this_present_success && that_present_success))
5959
          return false;
5960
        if (this.success != that.success)
5961
          return false;
5962
      }
5963
 
5964
      boolean this_present_e = true && this.isSetE();
5965
      boolean that_present_e = true && that.isSetE();
5966
      if (this_present_e || that_present_e) {
5967
        if (!(this_present_e && that_present_e))
5968
          return false;
5969
        if (!this.e.equals(that.e))
5970
          return false;
5971
      }
5972
 
5973
      return true;
5974
    }
5975
 
5976
    @Override
5977
    public int hashCode() {
5978
      return 0;
5979
    }
5980
 
5981
    public int compareTo(startPurchase_result other) {
5982
      if (!getClass().equals(other.getClass())) {
5983
        return getClass().getName().compareTo(other.getClass().getName());
5984
      }
5985
 
5986
      int lastComparison = 0;
5987
      startPurchase_result typedOther = (startPurchase_result)other;
5988
 
5989
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5990
      if (lastComparison != 0) {
5991
        return lastComparison;
5992
      }
5993
      if (isSetSuccess()) {
5994
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5995
        if (lastComparison != 0) {
5996
          return lastComparison;
5997
        }
5998
      }
5999
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6000
      if (lastComparison != 0) {
6001
        return lastComparison;
6002
      }
6003
      if (isSetE()) {
6004
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6005
        if (lastComparison != 0) {
6006
          return lastComparison;
6007
        }
6008
      }
6009
      return 0;
6010
    }
6011
 
6012
    public _Fields fieldForId(int fieldId) {
6013
      return _Fields.findByThriftId(fieldId);
6014
    }
6015
 
6016
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6017
      org.apache.thrift.protocol.TField field;
6018
      iprot.readStructBegin();
6019
      while (true)
6020
      {
6021
        field = iprot.readFieldBegin();
6022
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6023
          break;
6024
        }
6025
        switch (field.id) {
6026
          case 0: // SUCCESS
6027
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6028
              this.success = iprot.readI64();
6029
              setSuccessIsSet(true);
6030
            } else { 
6031
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6032
            }
6033
            break;
6034
          case 1: // E
6035
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6036
              this.e = new PurchaseServiceException();
6037
              this.e.read(iprot);
6038
            } else { 
6039
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6040
            }
6041
            break;
6042
          default:
6043
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6044
        }
6045
        iprot.readFieldEnd();
6046
      }
6047
      iprot.readStructEnd();
6048
      validate();
6049
    }
6050
 
6051
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6052
      oprot.writeStructBegin(STRUCT_DESC);
6053
 
6054
      if (this.isSetSuccess()) {
6055
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6056
        oprot.writeI64(this.success);
6057
        oprot.writeFieldEnd();
6058
      } else if (this.isSetE()) {
6059
        oprot.writeFieldBegin(E_FIELD_DESC);
6060
        this.e.write(oprot);
6061
        oprot.writeFieldEnd();
6062
      }
6063
      oprot.writeFieldStop();
6064
      oprot.writeStructEnd();
6065
    }
6066
 
6067
    @Override
6068
    public String toString() {
6069
      StringBuilder sb = new StringBuilder("startPurchase_result(");
6070
      boolean first = true;
6071
 
6072
      sb.append("success:");
6073
      sb.append(this.success);
6074
      first = false;
6075
      if (!first) sb.append(", ");
6076
      sb.append("e:");
6077
      if (this.e == null) {
6078
        sb.append("null");
6079
      } else {
6080
        sb.append(this.e);
6081
      }
6082
      first = false;
6083
      sb.append(")");
6084
      return sb.toString();
6085
    }
6086
 
6087
    public void validate() throws org.apache.thrift.TException {
6088
      // check for required fields
6089
    }
6090
 
6091
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6092
      try {
6093
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6094
      } catch (org.apache.thrift.TException te) {
6095
        throw new java.io.IOException(te);
6096
      }
6097
    }
6098
 
6099
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6100
      try {
6101
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6102
      } catch (org.apache.thrift.TException te) {
6103
        throw new java.io.IOException(te);
6104
      }
6105
    }
6106
 
6107
  }
6108
 
6109
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
6110
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
6111
 
6112
    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);
6113
 
6114
    private long purchaseId; // required
6115
 
6116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6117
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6118
      PURCHASE_ID((short)1, "purchaseId");
6119
 
6120
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6121
 
6122
      static {
6123
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6124
          byName.put(field.getFieldName(), field);
6125
        }
6126
      }
6127
 
6128
      /**
6129
       * Find the _Fields constant that matches fieldId, or null if its not found.
6130
       */
6131
      public static _Fields findByThriftId(int fieldId) {
6132
        switch(fieldId) {
6133
          case 1: // PURCHASE_ID
6134
            return PURCHASE_ID;
6135
          default:
6136
            return null;
6137
        }
6138
      }
6139
 
6140
      /**
6141
       * Find the _Fields constant that matches fieldId, throwing an exception
6142
       * if it is not found.
6143
       */
6144
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6145
        _Fields fields = findByThriftId(fieldId);
6146
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6147
        return fields;
6148
      }
6149
 
6150
      /**
6151
       * Find the _Fields constant that matches name, or null if its not found.
6152
       */
6153
      public static _Fields findByName(String name) {
6154
        return byName.get(name);
6155
      }
6156
 
6157
      private final short _thriftId;
6158
      private final String _fieldName;
6159
 
6160
      _Fields(short thriftId, String fieldName) {
6161
        _thriftId = thriftId;
6162
        _fieldName = fieldName;
6163
      }
6164
 
6165
      public short getThriftFieldId() {
6166
        return _thriftId;
6167
      }
6168
 
6169
      public String getFieldName() {
6170
        return _fieldName;
6171
      }
6172
    }
6173
 
6174
    // isset id assignments
6175
    private static final int __PURCHASEID_ISSET_ID = 0;
6176
    private BitSet __isset_bit_vector = new BitSet(1);
6177
 
6178
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6179
    static {
6180
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6181
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6182
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6183
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6184
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
6185
    }
6186
 
6187
    public closePurchase_args() {
6188
    }
6189
 
6190
    public closePurchase_args(
6191
      long purchaseId)
6192
    {
6193
      this();
6194
      this.purchaseId = purchaseId;
6195
      setPurchaseIdIsSet(true);
6196
    }
6197
 
6198
    /**
6199
     * Performs a deep copy on <i>other</i>.
6200
     */
6201
    public closePurchase_args(closePurchase_args other) {
6202
      __isset_bit_vector.clear();
6203
      __isset_bit_vector.or(other.__isset_bit_vector);
6204
      this.purchaseId = other.purchaseId;
6205
    }
6206
 
6207
    public closePurchase_args deepCopy() {
6208
      return new closePurchase_args(this);
6209
    }
6210
 
6211
    @Override
6212
    public void clear() {
6213
      setPurchaseIdIsSet(false);
6214
      this.purchaseId = 0;
6215
    }
6216
 
6217
    public long getPurchaseId() {
6218
      return this.purchaseId;
6219
    }
6220
 
6221
    public void setPurchaseId(long purchaseId) {
6222
      this.purchaseId = purchaseId;
6223
      setPurchaseIdIsSet(true);
6224
    }
6225
 
6226
    public void unsetPurchaseId() {
6227
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6228
    }
6229
 
6230
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6231
    public boolean isSetPurchaseId() {
6232
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6233
    }
6234
 
6235
    public void setPurchaseIdIsSet(boolean value) {
6236
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6237
    }
6238
 
6239
    public void setFieldValue(_Fields field, Object value) {
6240
      switch (field) {
6241
      case PURCHASE_ID:
6242
        if (value == null) {
6243
          unsetPurchaseId();
6244
        } else {
6245
          setPurchaseId((Long)value);
6246
        }
6247
        break;
6248
 
6249
      }
6250
    }
6251
 
6252
    public Object getFieldValue(_Fields field) {
6253
      switch (field) {
6254
      case PURCHASE_ID:
6255
        return Long.valueOf(getPurchaseId());
6256
 
6257
      }
6258
      throw new IllegalStateException();
6259
    }
6260
 
6261
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6262
    public boolean isSet(_Fields field) {
6263
      if (field == null) {
6264
        throw new IllegalArgumentException();
6265
      }
6266
 
6267
      switch (field) {
6268
      case PURCHASE_ID:
6269
        return isSetPurchaseId();
6270
      }
6271
      throw new IllegalStateException();
6272
    }
6273
 
6274
    @Override
6275
    public boolean equals(Object that) {
6276
      if (that == null)
6277
        return false;
6278
      if (that instanceof closePurchase_args)
6279
        return this.equals((closePurchase_args)that);
6280
      return false;
6281
    }
6282
 
6283
    public boolean equals(closePurchase_args that) {
6284
      if (that == null)
6285
        return false;
6286
 
6287
      boolean this_present_purchaseId = true;
6288
      boolean that_present_purchaseId = true;
6289
      if (this_present_purchaseId || that_present_purchaseId) {
6290
        if (!(this_present_purchaseId && that_present_purchaseId))
6291
          return false;
6292
        if (this.purchaseId != that.purchaseId)
6293
          return false;
6294
      }
6295
 
6296
      return true;
6297
    }
6298
 
6299
    @Override
6300
    public int hashCode() {
6301
      return 0;
6302
    }
6303
 
6304
    public int compareTo(closePurchase_args other) {
6305
      if (!getClass().equals(other.getClass())) {
6306
        return getClass().getName().compareTo(other.getClass().getName());
6307
      }
6308
 
6309
      int lastComparison = 0;
6310
      closePurchase_args typedOther = (closePurchase_args)other;
6311
 
6312
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6313
      if (lastComparison != 0) {
6314
        return lastComparison;
6315
      }
6316
      if (isSetPurchaseId()) {
6317
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6318
        if (lastComparison != 0) {
6319
          return lastComparison;
6320
        }
6321
      }
6322
      return 0;
6323
    }
6324
 
6325
    public _Fields fieldForId(int fieldId) {
6326
      return _Fields.findByThriftId(fieldId);
6327
    }
6328
 
6329
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6330
      org.apache.thrift.protocol.TField field;
6331
      iprot.readStructBegin();
6332
      while (true)
6333
      {
6334
        field = iprot.readFieldBegin();
6335
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6336
          break;
6337
        }
6338
        switch (field.id) {
6339
          case 1: // PURCHASE_ID
6340
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6341
              this.purchaseId = iprot.readI64();
6342
              setPurchaseIdIsSet(true);
6343
            } else { 
6344
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6345
            }
6346
            break;
6347
          default:
6348
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6349
        }
6350
        iprot.readFieldEnd();
6351
      }
6352
      iprot.readStructEnd();
6353
      validate();
6354
    }
6355
 
6356
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6357
      validate();
6358
 
6359
      oprot.writeStructBegin(STRUCT_DESC);
6360
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6361
      oprot.writeI64(this.purchaseId);
6362
      oprot.writeFieldEnd();
6363
      oprot.writeFieldStop();
6364
      oprot.writeStructEnd();
6365
    }
6366
 
6367
    @Override
6368
    public String toString() {
6369
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6370
      boolean first = true;
6371
 
6372
      sb.append("purchaseId:");
6373
      sb.append(this.purchaseId);
6374
      first = false;
6375
      sb.append(")");
6376
      return sb.toString();
6377
    }
6378
 
6379
    public void validate() throws org.apache.thrift.TException {
6380
      // check for required fields
6381
    }
6382
 
6383
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6384
      try {
6385
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6386
      } catch (org.apache.thrift.TException te) {
6387
        throw new java.io.IOException(te);
6388
      }
6389
    }
6390
 
6391
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6392
      try {
6393
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6394
      } catch (org.apache.thrift.TException te) {
6395
        throw new java.io.IOException(te);
6396
      }
6397
    }
6398
 
6399
  }
6400
 
6401
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6402
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6403
 
6404
    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);
6405
    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);
6406
 
6407
    private long success; // required
6408
    private PurchaseServiceException e; // required
6409
 
6410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6411
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6412
      SUCCESS((short)0, "success"),
6413
      E((short)1, "e");
6414
 
6415
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6416
 
6417
      static {
6418
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6419
          byName.put(field.getFieldName(), field);
6420
        }
6421
      }
6422
 
6423
      /**
6424
       * Find the _Fields constant that matches fieldId, or null if its not found.
6425
       */
6426
      public static _Fields findByThriftId(int fieldId) {
6427
        switch(fieldId) {
6428
          case 0: // SUCCESS
6429
            return SUCCESS;
6430
          case 1: // E
6431
            return E;
6432
          default:
6433
            return null;
6434
        }
6435
      }
6436
 
6437
      /**
6438
       * Find the _Fields constant that matches fieldId, throwing an exception
6439
       * if it is not found.
6440
       */
6441
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6442
        _Fields fields = findByThriftId(fieldId);
6443
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6444
        return fields;
6445
      }
6446
 
6447
      /**
6448
       * Find the _Fields constant that matches name, or null if its not found.
6449
       */
6450
      public static _Fields findByName(String name) {
6451
        return byName.get(name);
6452
      }
6453
 
6454
      private final short _thriftId;
6455
      private final String _fieldName;
6456
 
6457
      _Fields(short thriftId, String fieldName) {
6458
        _thriftId = thriftId;
6459
        _fieldName = fieldName;
6460
      }
6461
 
6462
      public short getThriftFieldId() {
6463
        return _thriftId;
6464
      }
6465
 
6466
      public String getFieldName() {
6467
        return _fieldName;
6468
      }
6469
    }
6470
 
6471
    // isset id assignments
6472
    private static final int __SUCCESS_ISSET_ID = 0;
6473
    private BitSet __isset_bit_vector = new BitSet(1);
6474
 
6475
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6476
    static {
6477
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6478
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6479
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6480
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6481
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6482
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6483
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6484
    }
6485
 
6486
    public closePurchase_result() {
6487
    }
6488
 
6489
    public closePurchase_result(
6490
      long success,
6491
      PurchaseServiceException e)
6492
    {
6493
      this();
6494
      this.success = success;
6495
      setSuccessIsSet(true);
6496
      this.e = e;
6497
    }
6498
 
6499
    /**
6500
     * Performs a deep copy on <i>other</i>.
6501
     */
6502
    public closePurchase_result(closePurchase_result other) {
6503
      __isset_bit_vector.clear();
6504
      __isset_bit_vector.or(other.__isset_bit_vector);
6505
      this.success = other.success;
6506
      if (other.isSetE()) {
6507
        this.e = new PurchaseServiceException(other.e);
6508
      }
6509
    }
6510
 
6511
    public closePurchase_result deepCopy() {
6512
      return new closePurchase_result(this);
6513
    }
6514
 
6515
    @Override
6516
    public void clear() {
6517
      setSuccessIsSet(false);
6518
      this.success = 0;
6519
      this.e = null;
6520
    }
6521
 
6522
    public long getSuccess() {
6523
      return this.success;
6524
    }
6525
 
6526
    public void setSuccess(long success) {
6527
      this.success = success;
6528
      setSuccessIsSet(true);
6529
    }
6530
 
6531
    public void unsetSuccess() {
6532
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6533
    }
6534
 
6535
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6536
    public boolean isSetSuccess() {
6537
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6538
    }
6539
 
6540
    public void setSuccessIsSet(boolean value) {
6541
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6542
    }
6543
 
6544
    public PurchaseServiceException getE() {
6545
      return this.e;
6546
    }
6547
 
6548
    public void setE(PurchaseServiceException e) {
6549
      this.e = e;
6550
    }
6551
 
6552
    public void unsetE() {
6553
      this.e = null;
6554
    }
6555
 
6556
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6557
    public boolean isSetE() {
6558
      return this.e != null;
6559
    }
6560
 
6561
    public void setEIsSet(boolean value) {
6562
      if (!value) {
6563
        this.e = null;
6564
      }
6565
    }
6566
 
6567
    public void setFieldValue(_Fields field, Object value) {
6568
      switch (field) {
6569
      case SUCCESS:
6570
        if (value == null) {
6571
          unsetSuccess();
6572
        } else {
6573
          setSuccess((Long)value);
6574
        }
6575
        break;
6576
 
6577
      case E:
6578
        if (value == null) {
6579
          unsetE();
6580
        } else {
6581
          setE((PurchaseServiceException)value);
6582
        }
6583
        break;
6584
 
6585
      }
6586
    }
6587
 
6588
    public Object getFieldValue(_Fields field) {
6589
      switch (field) {
6590
      case SUCCESS:
6591
        return Long.valueOf(getSuccess());
6592
 
6593
      case E:
6594
        return getE();
6595
 
6596
      }
6597
      throw new IllegalStateException();
6598
    }
6599
 
6600
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6601
    public boolean isSet(_Fields field) {
6602
      if (field == null) {
6603
        throw new IllegalArgumentException();
6604
      }
6605
 
6606
      switch (field) {
6607
      case SUCCESS:
6608
        return isSetSuccess();
6609
      case E:
6610
        return isSetE();
6611
      }
6612
      throw new IllegalStateException();
6613
    }
6614
 
6615
    @Override
6616
    public boolean equals(Object that) {
6617
      if (that == null)
6618
        return false;
6619
      if (that instanceof closePurchase_result)
6620
        return this.equals((closePurchase_result)that);
6621
      return false;
6622
    }
6623
 
6624
    public boolean equals(closePurchase_result that) {
6625
      if (that == null)
6626
        return false;
6627
 
6628
      boolean this_present_success = true;
6629
      boolean that_present_success = true;
6630
      if (this_present_success || that_present_success) {
6631
        if (!(this_present_success && that_present_success))
6632
          return false;
6633
        if (this.success != that.success)
6634
          return false;
6635
      }
6636
 
6637
      boolean this_present_e = true && this.isSetE();
6638
      boolean that_present_e = true && that.isSetE();
6639
      if (this_present_e || that_present_e) {
6640
        if (!(this_present_e && that_present_e))
6641
          return false;
6642
        if (!this.e.equals(that.e))
6643
          return false;
6644
      }
6645
 
6646
      return true;
6647
    }
6648
 
6649
    @Override
6650
    public int hashCode() {
6651
      return 0;
6652
    }
6653
 
6654
    public int compareTo(closePurchase_result other) {
6655
      if (!getClass().equals(other.getClass())) {
6656
        return getClass().getName().compareTo(other.getClass().getName());
6657
      }
6658
 
6659
      int lastComparison = 0;
6660
      closePurchase_result typedOther = (closePurchase_result)other;
6661
 
6662
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6663
      if (lastComparison != 0) {
6664
        return lastComparison;
6665
      }
6666
      if (isSetSuccess()) {
6667
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6668
        if (lastComparison != 0) {
6669
          return lastComparison;
6670
        }
6671
      }
6672
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6673
      if (lastComparison != 0) {
6674
        return lastComparison;
6675
      }
6676
      if (isSetE()) {
6677
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6678
        if (lastComparison != 0) {
6679
          return lastComparison;
6680
        }
6681
      }
6682
      return 0;
6683
    }
6684
 
6685
    public _Fields fieldForId(int fieldId) {
6686
      return _Fields.findByThriftId(fieldId);
6687
    }
6688
 
6689
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6690
      org.apache.thrift.protocol.TField field;
6691
      iprot.readStructBegin();
6692
      while (true)
6693
      {
6694
        field = iprot.readFieldBegin();
6695
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6696
          break;
6697
        }
6698
        switch (field.id) {
6699
          case 0: // SUCCESS
6700
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6701
              this.success = iprot.readI64();
6702
              setSuccessIsSet(true);
6703
            } else { 
6704
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6705
            }
6706
            break;
6707
          case 1: // E
6708
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6709
              this.e = new PurchaseServiceException();
6710
              this.e.read(iprot);
6711
            } else { 
6712
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6713
            }
6714
            break;
6715
          default:
6716
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6717
        }
6718
        iprot.readFieldEnd();
6719
      }
6720
      iprot.readStructEnd();
6721
      validate();
6722
    }
6723
 
6724
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6725
      oprot.writeStructBegin(STRUCT_DESC);
6726
 
6727
      if (this.isSetSuccess()) {
6728
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6729
        oprot.writeI64(this.success);
6730
        oprot.writeFieldEnd();
6731
      } else if (this.isSetE()) {
6732
        oprot.writeFieldBegin(E_FIELD_DESC);
6733
        this.e.write(oprot);
6734
        oprot.writeFieldEnd();
6735
      }
6736
      oprot.writeFieldStop();
6737
      oprot.writeStructEnd();
6738
    }
6739
 
6740
    @Override
6741
    public String toString() {
6742
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6743
      boolean first = true;
6744
 
6745
      sb.append("success:");
6746
      sb.append(this.success);
6747
      first = false;
6748
      if (!first) sb.append(", ");
6749
      sb.append("e:");
6750
      if (this.e == null) {
6751
        sb.append("null");
6752
      } else {
6753
        sb.append(this.e);
6754
      }
6755
      first = false;
6756
      sb.append(")");
6757
      return sb.toString();
6758
    }
6759
 
6760
    public void validate() throws org.apache.thrift.TException {
6761
      // check for required fields
6762
    }
6763
 
6764
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6765
      try {
6766
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6767
      } catch (org.apache.thrift.TException te) {
6768
        throw new java.io.IOException(te);
6769
      }
6770
    }
6771
 
6772
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6773
      try {
6774
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6775
      } catch (org.apache.thrift.TException te) {
6776
        throw new java.io.IOException(te);
6777
      }
6778
    }
6779
 
6780
  }
6781
 
6782
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6783
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6784
 
6785
    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);
6786
    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);
6787
 
6788
    private long purchaseOrderId; // required
6789
    private boolean open; // required
6790
 
6791
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6792
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6793
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6794
      OPEN((short)2, "open");
6795
 
6796
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6797
 
6798
      static {
6799
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6800
          byName.put(field.getFieldName(), field);
6801
        }
6802
      }
6803
 
6804
      /**
6805
       * Find the _Fields constant that matches fieldId, or null if its not found.
6806
       */
6807
      public static _Fields findByThriftId(int fieldId) {
6808
        switch(fieldId) {
6809
          case 1: // PURCHASE_ORDER_ID
6810
            return PURCHASE_ORDER_ID;
6811
          case 2: // OPEN
6812
            return OPEN;
6813
          default:
6814
            return null;
6815
        }
6816
      }
6817
 
6818
      /**
6819
       * Find the _Fields constant that matches fieldId, throwing an exception
6820
       * if it is not found.
6821
       */
6822
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6823
        _Fields fields = findByThriftId(fieldId);
6824
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6825
        return fields;
6826
      }
6827
 
6828
      /**
6829
       * Find the _Fields constant that matches name, or null if its not found.
6830
       */
6831
      public static _Fields findByName(String name) {
6832
        return byName.get(name);
6833
      }
6834
 
6835
      private final short _thriftId;
6836
      private final String _fieldName;
6837
 
6838
      _Fields(short thriftId, String fieldName) {
6839
        _thriftId = thriftId;
6840
        _fieldName = fieldName;
6841
      }
6842
 
6843
      public short getThriftFieldId() {
6844
        return _thriftId;
6845
      }
6846
 
6847
      public String getFieldName() {
6848
        return _fieldName;
6849
      }
6850
    }
6851
 
6852
    // isset id assignments
6853
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6854
    private static final int __OPEN_ISSET_ID = 1;
6855
    private BitSet __isset_bit_vector = new BitSet(2);
6856
 
6857
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6858
    static {
6859
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6860
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6861
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6862
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6863
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6864
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6865
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6866
    }
6867
 
6868
    public getAllPurchases_args() {
6869
    }
6870
 
6871
    public getAllPurchases_args(
6872
      long purchaseOrderId,
6873
      boolean open)
6874
    {
6875
      this();
6876
      this.purchaseOrderId = purchaseOrderId;
6877
      setPurchaseOrderIdIsSet(true);
6878
      this.open = open;
6879
      setOpenIsSet(true);
6880
    }
6881
 
6882
    /**
6883
     * Performs a deep copy on <i>other</i>.
6884
     */
6885
    public getAllPurchases_args(getAllPurchases_args other) {
6886
      __isset_bit_vector.clear();
6887
      __isset_bit_vector.or(other.__isset_bit_vector);
6888
      this.purchaseOrderId = other.purchaseOrderId;
6889
      this.open = other.open;
6890
    }
6891
 
6892
    public getAllPurchases_args deepCopy() {
6893
      return new getAllPurchases_args(this);
6894
    }
6895
 
6896
    @Override
6897
    public void clear() {
6898
      setPurchaseOrderIdIsSet(false);
6899
      this.purchaseOrderId = 0;
6900
      setOpenIsSet(false);
6901
      this.open = false;
6902
    }
6903
 
6904
    public long getPurchaseOrderId() {
6905
      return this.purchaseOrderId;
6906
    }
6907
 
6908
    public void setPurchaseOrderId(long purchaseOrderId) {
6909
      this.purchaseOrderId = purchaseOrderId;
6910
      setPurchaseOrderIdIsSet(true);
6911
    }
6912
 
6913
    public void unsetPurchaseOrderId() {
6914
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
6915
    }
6916
 
6917
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
6918
    public boolean isSetPurchaseOrderId() {
6919
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
6920
    }
6921
 
6922
    public void setPurchaseOrderIdIsSet(boolean value) {
6923
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
6924
    }
6925
 
6926
    public boolean isOpen() {
6927
      return this.open;
6928
    }
6929
 
6930
    public void setOpen(boolean open) {
6931
      this.open = open;
6932
      setOpenIsSet(true);
6933
    }
6934
 
6935
    public void unsetOpen() {
6936
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6937
    }
6938
 
6939
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6940
    public boolean isSetOpen() {
6941
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6942
    }
6943
 
6944
    public void setOpenIsSet(boolean value) {
6945
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6946
    }
6947
 
6948
    public void setFieldValue(_Fields field, Object value) {
6949
      switch (field) {
6950
      case PURCHASE_ORDER_ID:
6951
        if (value == null) {
6952
          unsetPurchaseOrderId();
6953
        } else {
6954
          setPurchaseOrderId((Long)value);
6955
        }
6956
        break;
6957
 
6958
      case OPEN:
6959
        if (value == null) {
6960
          unsetOpen();
6961
        } else {
6962
          setOpen((Boolean)value);
6963
        }
6964
        break;
6965
 
6966
      }
6967
    }
6968
 
6969
    public Object getFieldValue(_Fields field) {
6970
      switch (field) {
6971
      case PURCHASE_ORDER_ID:
6972
        return Long.valueOf(getPurchaseOrderId());
6973
 
6974
      case OPEN:
6975
        return Boolean.valueOf(isOpen());
6976
 
6977
      }
6978
      throw new IllegalStateException();
6979
    }
6980
 
6981
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6982
    public boolean isSet(_Fields field) {
6983
      if (field == null) {
6984
        throw new IllegalArgumentException();
6985
      }
6986
 
6987
      switch (field) {
6988
      case PURCHASE_ORDER_ID:
6989
        return isSetPurchaseOrderId();
6990
      case OPEN:
6991
        return isSetOpen();
6992
      }
6993
      throw new IllegalStateException();
6994
    }
6995
 
6996
    @Override
6997
    public boolean equals(Object that) {
6998
      if (that == null)
6999
        return false;
7000
      if (that instanceof getAllPurchases_args)
7001
        return this.equals((getAllPurchases_args)that);
7002
      return false;
7003
    }
7004
 
7005
    public boolean equals(getAllPurchases_args that) {
7006
      if (that == null)
7007
        return false;
7008
 
7009
      boolean this_present_purchaseOrderId = true;
7010
      boolean that_present_purchaseOrderId = true;
7011
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7012
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7013
          return false;
7014
        if (this.purchaseOrderId != that.purchaseOrderId)
7015
          return false;
7016
      }
7017
 
7018
      boolean this_present_open = true;
7019
      boolean that_present_open = true;
7020
      if (this_present_open || that_present_open) {
7021
        if (!(this_present_open && that_present_open))
7022
          return false;
7023
        if (this.open != that.open)
7024
          return false;
7025
      }
7026
 
7027
      return true;
7028
    }
7029
 
7030
    @Override
7031
    public int hashCode() {
7032
      return 0;
7033
    }
7034
 
7035
    public int compareTo(getAllPurchases_args other) {
7036
      if (!getClass().equals(other.getClass())) {
7037
        return getClass().getName().compareTo(other.getClass().getName());
7038
      }
7039
 
7040
      int lastComparison = 0;
7041
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
7042
 
7043
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7044
      if (lastComparison != 0) {
7045
        return lastComparison;
7046
      }
7047
      if (isSetPurchaseOrderId()) {
7048
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7049
        if (lastComparison != 0) {
7050
          return lastComparison;
7051
        }
7052
      }
7053
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
7054
      if (lastComparison != 0) {
7055
        return lastComparison;
7056
      }
7057
      if (isSetOpen()) {
7058
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
7059
        if (lastComparison != 0) {
7060
          return lastComparison;
7061
        }
7062
      }
7063
      return 0;
7064
    }
7065
 
7066
    public _Fields fieldForId(int fieldId) {
7067
      return _Fields.findByThriftId(fieldId);
7068
    }
7069
 
7070
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7071
      org.apache.thrift.protocol.TField field;
7072
      iprot.readStructBegin();
7073
      while (true)
7074
      {
7075
        field = iprot.readFieldBegin();
7076
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7077
          break;
7078
        }
7079
        switch (field.id) {
7080
          case 1: // PURCHASE_ORDER_ID
7081
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7082
              this.purchaseOrderId = iprot.readI64();
7083
              setPurchaseOrderIdIsSet(true);
7084
            } else { 
7085
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7086
            }
7087
            break;
7088
          case 2: // OPEN
7089
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
7090
              this.open = iprot.readBool();
7091
              setOpenIsSet(true);
7092
            } else { 
7093
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7094
            }
7095
            break;
7096
          default:
7097
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7098
        }
7099
        iprot.readFieldEnd();
7100
      }
7101
      iprot.readStructEnd();
7102
      validate();
7103
    }
7104
 
7105
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7106
      validate();
7107
 
7108
      oprot.writeStructBegin(STRUCT_DESC);
7109
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7110
      oprot.writeI64(this.purchaseOrderId);
7111
      oprot.writeFieldEnd();
7112
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
7113
      oprot.writeBool(this.open);
7114
      oprot.writeFieldEnd();
7115
      oprot.writeFieldStop();
7116
      oprot.writeStructEnd();
7117
    }
7118
 
7119
    @Override
7120
    public String toString() {
7121
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
7122
      boolean first = true;
7123
 
7124
      sb.append("purchaseOrderId:");
7125
      sb.append(this.purchaseOrderId);
7126
      first = false;
7127
      if (!first) sb.append(", ");
7128
      sb.append("open:");
7129
      sb.append(this.open);
7130
      first = false;
7131
      sb.append(")");
7132
      return sb.toString();
7133
    }
7134
 
7135
    public void validate() throws org.apache.thrift.TException {
7136
      // check for required fields
7137
    }
7138
 
7139
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7140
      try {
7141
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7142
      } catch (org.apache.thrift.TException te) {
7143
        throw new java.io.IOException(te);
7144
      }
7145
    }
7146
 
7147
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7148
      try {
7149
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7150
      } catch (org.apache.thrift.TException te) {
7151
        throw new java.io.IOException(te);
7152
      }
7153
    }
7154
 
7155
  }
7156
 
7157
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
7158
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
7159
 
7160
    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);
7161
    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);
7162
 
7163
    private List<Purchase> success; // required
7164
    private PurchaseServiceException e; // required
7165
 
7166
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7167
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7168
      SUCCESS((short)0, "success"),
7169
      E((short)1, "e");
7170
 
7171
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7172
 
7173
      static {
7174
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7175
          byName.put(field.getFieldName(), field);
7176
        }
7177
      }
7178
 
7179
      /**
7180
       * Find the _Fields constant that matches fieldId, or null if its not found.
7181
       */
7182
      public static _Fields findByThriftId(int fieldId) {
7183
        switch(fieldId) {
7184
          case 0: // SUCCESS
7185
            return SUCCESS;
7186
          case 1: // E
7187
            return E;
7188
          default:
7189
            return null;
7190
        }
7191
      }
7192
 
7193
      /**
7194
       * Find the _Fields constant that matches fieldId, throwing an exception
7195
       * if it is not found.
7196
       */
7197
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7198
        _Fields fields = findByThriftId(fieldId);
7199
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7200
        return fields;
7201
      }
7202
 
7203
      /**
7204
       * Find the _Fields constant that matches name, or null if its not found.
7205
       */
7206
      public static _Fields findByName(String name) {
7207
        return byName.get(name);
7208
      }
7209
 
7210
      private final short _thriftId;
7211
      private final String _fieldName;
7212
 
7213
      _Fields(short thriftId, String fieldName) {
7214
        _thriftId = thriftId;
7215
        _fieldName = fieldName;
7216
      }
7217
 
7218
      public short getThriftFieldId() {
7219
        return _thriftId;
7220
      }
7221
 
7222
      public String getFieldName() {
7223
        return _fieldName;
7224
      }
7225
    }
7226
 
7227
    // isset id assignments
7228
 
7229
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7230
    static {
7231
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7232
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7233
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7234
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7235
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7236
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7237
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7238
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
7239
    }
7240
 
7241
    public getAllPurchases_result() {
7242
    }
7243
 
7244
    public getAllPurchases_result(
7245
      List<Purchase> success,
7246
      PurchaseServiceException e)
7247
    {
7248
      this();
7249
      this.success = success;
7250
      this.e = e;
7251
    }
7252
 
7253
    /**
7254
     * Performs a deep copy on <i>other</i>.
7255
     */
7256
    public getAllPurchases_result(getAllPurchases_result other) {
7257
      if (other.isSetSuccess()) {
7258
        List<Purchase> __this__success = new ArrayList<Purchase>();
7259
        for (Purchase other_element : other.success) {
7260
          __this__success.add(new Purchase(other_element));
7261
        }
7262
        this.success = __this__success;
7263
      }
7264
      if (other.isSetE()) {
7265
        this.e = new PurchaseServiceException(other.e);
7266
      }
7267
    }
7268
 
7269
    public getAllPurchases_result deepCopy() {
7270
      return new getAllPurchases_result(this);
7271
    }
7272
 
7273
    @Override
7274
    public void clear() {
7275
      this.success = null;
7276
      this.e = null;
7277
    }
7278
 
7279
    public int getSuccessSize() {
7280
      return (this.success == null) ? 0 : this.success.size();
7281
    }
7282
 
7283
    public java.util.Iterator<Purchase> getSuccessIterator() {
7284
      return (this.success == null) ? null : this.success.iterator();
7285
    }
7286
 
7287
    public void addToSuccess(Purchase elem) {
7288
      if (this.success == null) {
7289
        this.success = new ArrayList<Purchase>();
7290
      }
7291
      this.success.add(elem);
7292
    }
7293
 
7294
    public List<Purchase> getSuccess() {
7295
      return this.success;
7296
    }
7297
 
7298
    public void setSuccess(List<Purchase> success) {
7299
      this.success = success;
7300
    }
7301
 
7302
    public void unsetSuccess() {
7303
      this.success = null;
7304
    }
7305
 
7306
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7307
    public boolean isSetSuccess() {
7308
      return this.success != null;
7309
    }
7310
 
7311
    public void setSuccessIsSet(boolean value) {
7312
      if (!value) {
7313
        this.success = null;
7314
      }
7315
    }
7316
 
7317
    public PurchaseServiceException getE() {
7318
      return this.e;
7319
    }
7320
 
7321
    public void setE(PurchaseServiceException e) {
7322
      this.e = e;
7323
    }
7324
 
7325
    public void unsetE() {
7326
      this.e = null;
7327
    }
7328
 
7329
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7330
    public boolean isSetE() {
7331
      return this.e != null;
7332
    }
7333
 
7334
    public void setEIsSet(boolean value) {
7335
      if (!value) {
7336
        this.e = null;
7337
      }
7338
    }
7339
 
7340
    public void setFieldValue(_Fields field, Object value) {
7341
      switch (field) {
7342
      case SUCCESS:
7343
        if (value == null) {
7344
          unsetSuccess();
7345
        } else {
7346
          setSuccess((List<Purchase>)value);
7347
        }
7348
        break;
7349
 
7350
      case E:
7351
        if (value == null) {
7352
          unsetE();
7353
        } else {
7354
          setE((PurchaseServiceException)value);
7355
        }
7356
        break;
7357
 
7358
      }
7359
    }
7360
 
7361
    public Object getFieldValue(_Fields field) {
7362
      switch (field) {
7363
      case SUCCESS:
7364
        return getSuccess();
7365
 
7366
      case E:
7367
        return getE();
7368
 
7369
      }
7370
      throw new IllegalStateException();
7371
    }
7372
 
7373
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7374
    public boolean isSet(_Fields field) {
7375
      if (field == null) {
7376
        throw new IllegalArgumentException();
7377
      }
7378
 
7379
      switch (field) {
7380
      case SUCCESS:
7381
        return isSetSuccess();
7382
      case E:
7383
        return isSetE();
7384
      }
7385
      throw new IllegalStateException();
7386
    }
7387
 
7388
    @Override
7389
    public boolean equals(Object that) {
7390
      if (that == null)
7391
        return false;
7392
      if (that instanceof getAllPurchases_result)
7393
        return this.equals((getAllPurchases_result)that);
7394
      return false;
7395
    }
7396
 
7397
    public boolean equals(getAllPurchases_result that) {
7398
      if (that == null)
7399
        return false;
7400
 
7401
      boolean this_present_success = true && this.isSetSuccess();
7402
      boolean that_present_success = true && that.isSetSuccess();
7403
      if (this_present_success || that_present_success) {
7404
        if (!(this_present_success && that_present_success))
7405
          return false;
7406
        if (!this.success.equals(that.success))
7407
          return false;
7408
      }
7409
 
7410
      boolean this_present_e = true && this.isSetE();
7411
      boolean that_present_e = true && that.isSetE();
7412
      if (this_present_e || that_present_e) {
7413
        if (!(this_present_e && that_present_e))
7414
          return false;
7415
        if (!this.e.equals(that.e))
7416
          return false;
7417
      }
7418
 
7419
      return true;
7420
    }
7421
 
7422
    @Override
7423
    public int hashCode() {
7424
      return 0;
7425
    }
7426
 
7427
    public int compareTo(getAllPurchases_result other) {
7428
      if (!getClass().equals(other.getClass())) {
7429
        return getClass().getName().compareTo(other.getClass().getName());
7430
      }
7431
 
7432
      int lastComparison = 0;
7433
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7434
 
7435
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7436
      if (lastComparison != 0) {
7437
        return lastComparison;
7438
      }
7439
      if (isSetSuccess()) {
7440
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7441
        if (lastComparison != 0) {
7442
          return lastComparison;
7443
        }
7444
      }
7445
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7446
      if (lastComparison != 0) {
7447
        return lastComparison;
7448
      }
7449
      if (isSetE()) {
7450
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7451
        if (lastComparison != 0) {
7452
          return lastComparison;
7453
        }
7454
      }
7455
      return 0;
7456
    }
7457
 
7458
    public _Fields fieldForId(int fieldId) {
7459
      return _Fields.findByThriftId(fieldId);
7460
    }
7461
 
7462
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7463
      org.apache.thrift.protocol.TField field;
7464
      iprot.readStructBegin();
7465
      while (true)
7466
      {
7467
        field = iprot.readFieldBegin();
7468
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7469
          break;
7470
        }
7471
        switch (field.id) {
7472
          case 0: // SUCCESS
7473
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7474
              {
7475
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7476
                this.success = new ArrayList<Purchase>(_list8.size);
7477
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7478
                {
7479
                  Purchase _elem10; // required
7480
                  _elem10 = new Purchase();
7481
                  _elem10.read(iprot);
7482
                  this.success.add(_elem10);
7483
                }
7484
                iprot.readListEnd();
7485
              }
7486
            } else { 
7487
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7488
            }
7489
            break;
7490
          case 1: // E
7491
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7492
              this.e = new PurchaseServiceException();
7493
              this.e.read(iprot);
7494
            } else { 
7495
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7496
            }
7497
            break;
7498
          default:
7499
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7500
        }
7501
        iprot.readFieldEnd();
7502
      }
7503
      iprot.readStructEnd();
7504
      validate();
7505
    }
7506
 
7507
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7508
      oprot.writeStructBegin(STRUCT_DESC);
7509
 
7510
      if (this.isSetSuccess()) {
7511
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7512
        {
7513
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7514
          for (Purchase _iter11 : this.success)
7515
          {
7516
            _iter11.write(oprot);
7517
          }
7518
          oprot.writeListEnd();
7519
        }
7520
        oprot.writeFieldEnd();
7521
      } else if (this.isSetE()) {
7522
        oprot.writeFieldBegin(E_FIELD_DESC);
7523
        this.e.write(oprot);
7524
        oprot.writeFieldEnd();
7525
      }
7526
      oprot.writeFieldStop();
7527
      oprot.writeStructEnd();
7528
    }
7529
 
7530
    @Override
7531
    public String toString() {
7532
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7533
      boolean first = true;
7534
 
7535
      sb.append("success:");
7536
      if (this.success == null) {
7537
        sb.append("null");
7538
      } else {
7539
        sb.append(this.success);
7540
      }
7541
      first = false;
7542
      if (!first) sb.append(", ");
7543
      sb.append("e:");
7544
      if (this.e == null) {
7545
        sb.append("null");
7546
      } else {
7547
        sb.append(this.e);
7548
      }
7549
      first = false;
7550
      sb.append(")");
7551
      return sb.toString();
7552
    }
7553
 
7554
    public void validate() throws org.apache.thrift.TException {
7555
      // check for required fields
7556
    }
7557
 
7558
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7559
      try {
7560
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7561
      } catch (org.apache.thrift.TException te) {
7562
        throw new java.io.IOException(te);
7563
      }
7564
    }
7565
 
7566
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7567
      try {
7568
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7569
      } catch (org.apache.thrift.TException te) {
7570
        throw new java.io.IOException(te);
7571
      }
7572
    }
7573
 
7574
  }
7575
 
6385 amar.kumar 7576
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7577
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7578
 
7579
    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);
7580
 
7581
    private long purchaseOrderId; // required
7582
 
7583
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7584
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7585
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7586
 
7587
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7588
 
7589
      static {
7590
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7591
          byName.put(field.getFieldName(), field);
7592
        }
7593
      }
7594
 
7595
      /**
7596
       * Find the _Fields constant that matches fieldId, or null if its not found.
7597
       */
7598
      public static _Fields findByThriftId(int fieldId) {
7599
        switch(fieldId) {
7600
          case 1: // PURCHASE_ORDER_ID
7601
            return PURCHASE_ORDER_ID;
7602
          default:
7603
            return null;
7604
        }
7605
      }
7606
 
7607
      /**
7608
       * Find the _Fields constant that matches fieldId, throwing an exception
7609
       * if it is not found.
7610
       */
7611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7612
        _Fields fields = findByThriftId(fieldId);
7613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7614
        return fields;
7615
      }
7616
 
7617
      /**
7618
       * Find the _Fields constant that matches name, or null if its not found.
7619
       */
7620
      public static _Fields findByName(String name) {
7621
        return byName.get(name);
7622
      }
7623
 
7624
      private final short _thriftId;
7625
      private final String _fieldName;
7626
 
7627
      _Fields(short thriftId, String fieldName) {
7628
        _thriftId = thriftId;
7629
        _fieldName = fieldName;
7630
      }
7631
 
7632
      public short getThriftFieldId() {
7633
        return _thriftId;
7634
      }
7635
 
7636
      public String getFieldName() {
7637
        return _fieldName;
7638
      }
7639
    }
7640
 
7641
    // isset id assignments
7642
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7643
    private BitSet __isset_bit_vector = new BitSet(1);
7644
 
7645
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7646
    static {
7647
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7648
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7649
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7650
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7651
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7652
    }
7653
 
7654
    public getPurchasesForPO_args() {
7655
    }
7656
 
7657
    public getPurchasesForPO_args(
7658
      long purchaseOrderId)
7659
    {
7660
      this();
7661
      this.purchaseOrderId = purchaseOrderId;
7662
      setPurchaseOrderIdIsSet(true);
7663
    }
7664
 
7665
    /**
7666
     * Performs a deep copy on <i>other</i>.
7667
     */
7668
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7669
      __isset_bit_vector.clear();
7670
      __isset_bit_vector.or(other.__isset_bit_vector);
7671
      this.purchaseOrderId = other.purchaseOrderId;
7672
    }
7673
 
7674
    public getPurchasesForPO_args deepCopy() {
7675
      return new getPurchasesForPO_args(this);
7676
    }
7677
 
7678
    @Override
7679
    public void clear() {
7680
      setPurchaseOrderIdIsSet(false);
7681
      this.purchaseOrderId = 0;
7682
    }
7683
 
7684
    public long getPurchaseOrderId() {
7685
      return this.purchaseOrderId;
7686
    }
7687
 
7688
    public void setPurchaseOrderId(long purchaseOrderId) {
7689
      this.purchaseOrderId = purchaseOrderId;
7690
      setPurchaseOrderIdIsSet(true);
7691
    }
7692
 
7693
    public void unsetPurchaseOrderId() {
7694
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7695
    }
7696
 
7697
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7698
    public boolean isSetPurchaseOrderId() {
7699
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7700
    }
7701
 
7702
    public void setPurchaseOrderIdIsSet(boolean value) {
7703
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7704
    }
7705
 
7706
    public void setFieldValue(_Fields field, Object value) {
7707
      switch (field) {
7708
      case PURCHASE_ORDER_ID:
7709
        if (value == null) {
7710
          unsetPurchaseOrderId();
7711
        } else {
7712
          setPurchaseOrderId((Long)value);
7713
        }
7714
        break;
7715
 
7716
      }
7717
    }
7718
 
7719
    public Object getFieldValue(_Fields field) {
7720
      switch (field) {
7721
      case PURCHASE_ORDER_ID:
7722
        return Long.valueOf(getPurchaseOrderId());
7723
 
7724
      }
7725
      throw new IllegalStateException();
7726
    }
7727
 
7728
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7729
    public boolean isSet(_Fields field) {
7730
      if (field == null) {
7731
        throw new IllegalArgumentException();
7732
      }
7733
 
7734
      switch (field) {
7735
      case PURCHASE_ORDER_ID:
7736
        return isSetPurchaseOrderId();
7737
      }
7738
      throw new IllegalStateException();
7739
    }
7740
 
7741
    @Override
7742
    public boolean equals(Object that) {
7743
      if (that == null)
7744
        return false;
7745
      if (that instanceof getPurchasesForPO_args)
7746
        return this.equals((getPurchasesForPO_args)that);
7747
      return false;
7748
    }
7749
 
7750
    public boolean equals(getPurchasesForPO_args that) {
7751
      if (that == null)
7752
        return false;
7753
 
7754
      boolean this_present_purchaseOrderId = true;
7755
      boolean that_present_purchaseOrderId = true;
7756
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7757
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7758
          return false;
7759
        if (this.purchaseOrderId != that.purchaseOrderId)
7760
          return false;
7761
      }
7762
 
7763
      return true;
7764
    }
7765
 
7766
    @Override
7767
    public int hashCode() {
7768
      return 0;
7769
    }
7770
 
7771
    public int compareTo(getPurchasesForPO_args other) {
7772
      if (!getClass().equals(other.getClass())) {
7773
        return getClass().getName().compareTo(other.getClass().getName());
7774
      }
7775
 
7776
      int lastComparison = 0;
7777
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7778
 
7779
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7780
      if (lastComparison != 0) {
7781
        return lastComparison;
7782
      }
7783
      if (isSetPurchaseOrderId()) {
7784
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7785
        if (lastComparison != 0) {
7786
          return lastComparison;
7787
        }
7788
      }
7789
      return 0;
7790
    }
7791
 
7792
    public _Fields fieldForId(int fieldId) {
7793
      return _Fields.findByThriftId(fieldId);
7794
    }
7795
 
7796
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7797
      org.apache.thrift.protocol.TField field;
7798
      iprot.readStructBegin();
7799
      while (true)
7800
      {
7801
        field = iprot.readFieldBegin();
7802
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7803
          break;
7804
        }
7805
        switch (field.id) {
7806
          case 1: // PURCHASE_ORDER_ID
7807
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7808
              this.purchaseOrderId = iprot.readI64();
7809
              setPurchaseOrderIdIsSet(true);
7810
            } else { 
7811
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7812
            }
7813
            break;
7814
          default:
7815
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7816
        }
7817
        iprot.readFieldEnd();
7818
      }
7819
      iprot.readStructEnd();
7820
      validate();
7821
    }
7822
 
7823
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7824
      validate();
7825
 
7826
      oprot.writeStructBegin(STRUCT_DESC);
7827
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7828
      oprot.writeI64(this.purchaseOrderId);
7829
      oprot.writeFieldEnd();
7830
      oprot.writeFieldStop();
7831
      oprot.writeStructEnd();
7832
    }
7833
 
7834
    @Override
7835
    public String toString() {
7836
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7837
      boolean first = true;
7838
 
7839
      sb.append("purchaseOrderId:");
7840
      sb.append(this.purchaseOrderId);
7841
      first = false;
7842
      sb.append(")");
7843
      return sb.toString();
7844
    }
7845
 
7846
    public void validate() throws org.apache.thrift.TException {
7847
      // check for required fields
7848
    }
7849
 
7850
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7851
      try {
7852
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7853
      } catch (org.apache.thrift.TException te) {
7854
        throw new java.io.IOException(te);
7855
      }
7856
    }
7857
 
7858
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7859
      try {
7860
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7861
        __isset_bit_vector = new BitSet(1);
7862
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7863
      } catch (org.apache.thrift.TException te) {
7864
        throw new java.io.IOException(te);
7865
      }
7866
    }
7867
 
7868
  }
7869
 
7870
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7871
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7872
 
7873
    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);
7874
    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);
7875
 
7876
    private List<Purchase> success; // required
7877
    private PurchaseServiceException e; // required
7878
 
7879
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7880
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7881
      SUCCESS((short)0, "success"),
7882
      E((short)1, "e");
7883
 
7884
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7885
 
7886
      static {
7887
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7888
          byName.put(field.getFieldName(), field);
7889
        }
7890
      }
7891
 
7892
      /**
7893
       * Find the _Fields constant that matches fieldId, or null if its not found.
7894
       */
7895
      public static _Fields findByThriftId(int fieldId) {
7896
        switch(fieldId) {
7897
          case 0: // SUCCESS
7898
            return SUCCESS;
7899
          case 1: // E
7900
            return E;
7901
          default:
7902
            return null;
7903
        }
7904
      }
7905
 
7906
      /**
7907
       * Find the _Fields constant that matches fieldId, throwing an exception
7908
       * if it is not found.
7909
       */
7910
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7911
        _Fields fields = findByThriftId(fieldId);
7912
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7913
        return fields;
7914
      }
7915
 
7916
      /**
7917
       * Find the _Fields constant that matches name, or null if its not found.
7918
       */
7919
      public static _Fields findByName(String name) {
7920
        return byName.get(name);
7921
      }
7922
 
7923
      private final short _thriftId;
7924
      private final String _fieldName;
7925
 
7926
      _Fields(short thriftId, String fieldName) {
7927
        _thriftId = thriftId;
7928
        _fieldName = fieldName;
7929
      }
7930
 
7931
      public short getThriftFieldId() {
7932
        return _thriftId;
7933
      }
7934
 
7935
      public String getFieldName() {
7936
        return _fieldName;
7937
      }
7938
    }
7939
 
7940
    // isset id assignments
7941
 
7942
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7943
    static {
7944
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7945
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7946
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7947
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7948
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7949
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7950
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7951
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
7952
    }
7953
 
7954
    public getPurchasesForPO_result() {
7955
    }
7956
 
7957
    public getPurchasesForPO_result(
7958
      List<Purchase> success,
7959
      PurchaseServiceException e)
7960
    {
7961
      this();
7962
      this.success = success;
7963
      this.e = e;
7964
    }
7965
 
7966
    /**
7967
     * Performs a deep copy on <i>other</i>.
7968
     */
7969
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
7970
      if (other.isSetSuccess()) {
7971
        List<Purchase> __this__success = new ArrayList<Purchase>();
7972
        for (Purchase other_element : other.success) {
7973
          __this__success.add(new Purchase(other_element));
7974
        }
7975
        this.success = __this__success;
7976
      }
7977
      if (other.isSetE()) {
7978
        this.e = new PurchaseServiceException(other.e);
7979
      }
7980
    }
7981
 
7982
    public getPurchasesForPO_result deepCopy() {
7983
      return new getPurchasesForPO_result(this);
7984
    }
7985
 
7986
    @Override
7987
    public void clear() {
7988
      this.success = null;
7989
      this.e = null;
7990
    }
7991
 
7992
    public int getSuccessSize() {
7993
      return (this.success == null) ? 0 : this.success.size();
7994
    }
7995
 
7996
    public java.util.Iterator<Purchase> getSuccessIterator() {
7997
      return (this.success == null) ? null : this.success.iterator();
7998
    }
7999
 
8000
    public void addToSuccess(Purchase elem) {
8001
      if (this.success == null) {
8002
        this.success = new ArrayList<Purchase>();
8003
      }
8004
      this.success.add(elem);
8005
    }
8006
 
8007
    public List<Purchase> getSuccess() {
8008
      return this.success;
8009
    }
8010
 
8011
    public void setSuccess(List<Purchase> success) {
8012
      this.success = success;
8013
    }
8014
 
8015
    public void unsetSuccess() {
8016
      this.success = null;
8017
    }
8018
 
8019
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8020
    public boolean isSetSuccess() {
8021
      return this.success != null;
8022
    }
8023
 
8024
    public void setSuccessIsSet(boolean value) {
8025
      if (!value) {
8026
        this.success = null;
8027
      }
8028
    }
8029
 
8030
    public PurchaseServiceException getE() {
8031
      return this.e;
8032
    }
8033
 
8034
    public void setE(PurchaseServiceException e) {
8035
      this.e = e;
8036
    }
8037
 
8038
    public void unsetE() {
8039
      this.e = null;
8040
    }
8041
 
8042
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8043
    public boolean isSetE() {
8044
      return this.e != null;
8045
    }
8046
 
8047
    public void setEIsSet(boolean value) {
8048
      if (!value) {
8049
        this.e = null;
8050
      }
8051
    }
8052
 
8053
    public void setFieldValue(_Fields field, Object value) {
8054
      switch (field) {
8055
      case SUCCESS:
8056
        if (value == null) {
8057
          unsetSuccess();
8058
        } else {
8059
          setSuccess((List<Purchase>)value);
8060
        }
8061
        break;
8062
 
8063
      case E:
8064
        if (value == null) {
8065
          unsetE();
8066
        } else {
8067
          setE((PurchaseServiceException)value);
8068
        }
8069
        break;
8070
 
8071
      }
8072
    }
8073
 
8074
    public Object getFieldValue(_Fields field) {
8075
      switch (field) {
8076
      case SUCCESS:
8077
        return getSuccess();
8078
 
8079
      case E:
8080
        return getE();
8081
 
8082
      }
8083
      throw new IllegalStateException();
8084
    }
8085
 
8086
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8087
    public boolean isSet(_Fields field) {
8088
      if (field == null) {
8089
        throw new IllegalArgumentException();
8090
      }
8091
 
8092
      switch (field) {
8093
      case SUCCESS:
8094
        return isSetSuccess();
8095
      case E:
8096
        return isSetE();
8097
      }
8098
      throw new IllegalStateException();
8099
    }
8100
 
8101
    @Override
8102
    public boolean equals(Object that) {
8103
      if (that == null)
8104
        return false;
8105
      if (that instanceof getPurchasesForPO_result)
8106
        return this.equals((getPurchasesForPO_result)that);
8107
      return false;
8108
    }
8109
 
8110
    public boolean equals(getPurchasesForPO_result that) {
8111
      if (that == null)
8112
        return false;
8113
 
8114
      boolean this_present_success = true && this.isSetSuccess();
8115
      boolean that_present_success = true && that.isSetSuccess();
8116
      if (this_present_success || that_present_success) {
8117
        if (!(this_present_success && that_present_success))
8118
          return false;
8119
        if (!this.success.equals(that.success))
8120
          return false;
8121
      }
8122
 
8123
      boolean this_present_e = true && this.isSetE();
8124
      boolean that_present_e = true && that.isSetE();
8125
      if (this_present_e || that_present_e) {
8126
        if (!(this_present_e && that_present_e))
8127
          return false;
8128
        if (!this.e.equals(that.e))
8129
          return false;
8130
      }
8131
 
8132
      return true;
8133
    }
8134
 
8135
    @Override
8136
    public int hashCode() {
8137
      return 0;
8138
    }
8139
 
8140
    public int compareTo(getPurchasesForPO_result other) {
8141
      if (!getClass().equals(other.getClass())) {
8142
        return getClass().getName().compareTo(other.getClass().getName());
8143
      }
8144
 
8145
      int lastComparison = 0;
8146
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
8147
 
8148
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8149
      if (lastComparison != 0) {
8150
        return lastComparison;
8151
      }
8152
      if (isSetSuccess()) {
8153
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8154
        if (lastComparison != 0) {
8155
          return lastComparison;
8156
        }
8157
      }
8158
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8159
      if (lastComparison != 0) {
8160
        return lastComparison;
8161
      }
8162
      if (isSetE()) {
8163
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8164
        if (lastComparison != 0) {
8165
          return lastComparison;
8166
        }
8167
      }
8168
      return 0;
8169
    }
8170
 
8171
    public _Fields fieldForId(int fieldId) {
8172
      return _Fields.findByThriftId(fieldId);
8173
    }
8174
 
8175
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8176
      org.apache.thrift.protocol.TField field;
8177
      iprot.readStructBegin();
8178
      while (true)
8179
      {
8180
        field = iprot.readFieldBegin();
8181
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8182
          break;
8183
        }
8184
        switch (field.id) {
8185
          case 0: // SUCCESS
8186
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8187
              {
8188
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
8189
                this.success = new ArrayList<Purchase>(_list12.size);
8190
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
8191
                {
8192
                  Purchase _elem14; // required
8193
                  _elem14 = new Purchase();
8194
                  _elem14.read(iprot);
8195
                  this.success.add(_elem14);
8196
                }
8197
                iprot.readListEnd();
8198
              }
8199
            } else { 
8200
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8201
            }
8202
            break;
8203
          case 1: // E
8204
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8205
              this.e = new PurchaseServiceException();
8206
              this.e.read(iprot);
8207
            } else { 
8208
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8209
            }
8210
            break;
8211
          default:
8212
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8213
        }
8214
        iprot.readFieldEnd();
8215
      }
8216
      iprot.readStructEnd();
8217
      validate();
8218
    }
8219
 
8220
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8221
      oprot.writeStructBegin(STRUCT_DESC);
8222
 
8223
      if (this.isSetSuccess()) {
8224
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8225
        {
8226
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8227
          for (Purchase _iter15 : this.success)
8228
          {
8229
            _iter15.write(oprot);
8230
          }
8231
          oprot.writeListEnd();
8232
        }
8233
        oprot.writeFieldEnd();
8234
      } else if (this.isSetE()) {
8235
        oprot.writeFieldBegin(E_FIELD_DESC);
8236
        this.e.write(oprot);
8237
        oprot.writeFieldEnd();
8238
      }
8239
      oprot.writeFieldStop();
8240
      oprot.writeStructEnd();
8241
    }
8242
 
8243
    @Override
8244
    public String toString() {
8245
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
8246
      boolean first = true;
8247
 
8248
      sb.append("success:");
8249
      if (this.success == null) {
8250
        sb.append("null");
8251
      } else {
8252
        sb.append(this.success);
8253
      }
8254
      first = false;
8255
      if (!first) sb.append(", ");
8256
      sb.append("e:");
8257
      if (this.e == null) {
8258
        sb.append("null");
8259
      } else {
8260
        sb.append(this.e);
8261
      }
8262
      first = false;
8263
      sb.append(")");
8264
      return sb.toString();
8265
    }
8266
 
8267
    public void validate() throws org.apache.thrift.TException {
8268
      // check for required fields
8269
    }
8270
 
8271
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8272
      try {
8273
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8274
      } catch (org.apache.thrift.TException te) {
8275
        throw new java.io.IOException(te);
8276
      }
8277
    }
8278
 
8279
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8280
      try {
8281
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8282
      } catch (org.apache.thrift.TException te) {
8283
        throw new java.io.IOException(te);
8284
      }
8285
    }
8286
 
8287
  }
8288
 
4555 mandeep.dh 8289
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
8290
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 8291
 
8292
    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);
8293
 
8294
    private long purchaseId; // required
8295
 
8296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8297
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 8298
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 8299
 
8300
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8301
 
8302
      static {
8303
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8304
          byName.put(field.getFieldName(), field);
8305
        }
8306
      }
8307
 
8308
      /**
8309
       * Find the _Fields constant that matches fieldId, or null if its not found.
8310
       */
8311
      public static _Fields findByThriftId(int fieldId) {
8312
        switch(fieldId) {
8313
          case 1: // PURCHASE_ID
8314
            return PURCHASE_ID;
8315
          default:
8316
            return null;
8317
        }
8318
      }
8319
 
8320
      /**
8321
       * Find the _Fields constant that matches fieldId, throwing an exception
8322
       * if it is not found.
8323
       */
8324
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8325
        _Fields fields = findByThriftId(fieldId);
8326
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8327
        return fields;
8328
      }
8329
 
8330
      /**
8331
       * Find the _Fields constant that matches name, or null if its not found.
8332
       */
8333
      public static _Fields findByName(String name) {
8334
        return byName.get(name);
8335
      }
8336
 
8337
      private final short _thriftId;
8338
      private final String _fieldName;
8339
 
8340
      _Fields(short thriftId, String fieldName) {
8341
        _thriftId = thriftId;
8342
        _fieldName = fieldName;
8343
      }
8344
 
8345
      public short getThriftFieldId() {
8346
        return _thriftId;
8347
      }
8348
 
8349
      public String getFieldName() {
8350
        return _fieldName;
8351
      }
8352
    }
8353
 
8354
    // isset id assignments
8355
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 8356
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8357
 
8358
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8359
    static {
8360
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8361
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8362
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8363
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8364
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8365
    }
8366
 
4555 mandeep.dh 8367
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8368
    }
8369
 
4555 mandeep.dh 8370
    public getPurchaseOrderForPurchase_args(
8371
      long purchaseId)
4496 mandeep.dh 8372
    {
8373
      this();
8374
      this.purchaseId = purchaseId;
8375
      setPurchaseIdIsSet(true);
8376
    }
8377
 
8378
    /**
8379
     * Performs a deep copy on <i>other</i>.
8380
     */
4555 mandeep.dh 8381
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8382
      __isset_bit_vector.clear();
8383
      __isset_bit_vector.or(other.__isset_bit_vector);
8384
      this.purchaseId = other.purchaseId;
8385
    }
8386
 
4555 mandeep.dh 8387
    public getPurchaseOrderForPurchase_args deepCopy() {
8388
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8389
    }
8390
 
8391
    @Override
8392
    public void clear() {
8393
      setPurchaseIdIsSet(false);
8394
      this.purchaseId = 0;
8395
    }
8396
 
8397
    public long getPurchaseId() {
8398
      return this.purchaseId;
8399
    }
8400
 
8401
    public void setPurchaseId(long purchaseId) {
8402
      this.purchaseId = purchaseId;
8403
      setPurchaseIdIsSet(true);
8404
    }
8405
 
8406
    public void unsetPurchaseId() {
8407
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8408
    }
8409
 
8410
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8411
    public boolean isSetPurchaseId() {
8412
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8413
    }
8414
 
8415
    public void setPurchaseIdIsSet(boolean value) {
8416
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8417
    }
8418
 
8419
    public void setFieldValue(_Fields field, Object value) {
8420
      switch (field) {
8421
      case PURCHASE_ID:
8422
        if (value == null) {
8423
          unsetPurchaseId();
8424
        } else {
8425
          setPurchaseId((Long)value);
8426
        }
8427
        break;
8428
 
8429
      }
8430
    }
8431
 
8432
    public Object getFieldValue(_Fields field) {
8433
      switch (field) {
8434
      case PURCHASE_ID:
8435
        return Long.valueOf(getPurchaseId());
8436
 
8437
      }
8438
      throw new IllegalStateException();
8439
    }
8440
 
8441
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8442
    public boolean isSet(_Fields field) {
8443
      if (field == null) {
8444
        throw new IllegalArgumentException();
8445
      }
8446
 
8447
      switch (field) {
8448
      case PURCHASE_ID:
8449
        return isSetPurchaseId();
8450
      }
8451
      throw new IllegalStateException();
8452
    }
8453
 
8454
    @Override
8455
    public boolean equals(Object that) {
8456
      if (that == null)
8457
        return false;
4555 mandeep.dh 8458
      if (that instanceof getPurchaseOrderForPurchase_args)
8459
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8460
      return false;
8461
    }
8462
 
4555 mandeep.dh 8463
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8464
      if (that == null)
8465
        return false;
8466
 
8467
      boolean this_present_purchaseId = true;
8468
      boolean that_present_purchaseId = true;
8469
      if (this_present_purchaseId || that_present_purchaseId) {
8470
        if (!(this_present_purchaseId && that_present_purchaseId))
8471
          return false;
8472
        if (this.purchaseId != that.purchaseId)
8473
          return false;
8474
      }
8475
 
8476
      return true;
8477
    }
8478
 
8479
    @Override
8480
    public int hashCode() {
8481
      return 0;
8482
    }
8483
 
4555 mandeep.dh 8484
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8485
      if (!getClass().equals(other.getClass())) {
8486
        return getClass().getName().compareTo(other.getClass().getName());
8487
      }
8488
 
8489
      int lastComparison = 0;
4555 mandeep.dh 8490
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8491
 
8492
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8493
      if (lastComparison != 0) {
8494
        return lastComparison;
8495
      }
8496
      if (isSetPurchaseId()) {
8497
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8498
        if (lastComparison != 0) {
8499
          return lastComparison;
8500
        }
8501
      }
8502
      return 0;
8503
    }
8504
 
8505
    public _Fields fieldForId(int fieldId) {
8506
      return _Fields.findByThriftId(fieldId);
8507
    }
8508
 
8509
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8510
      org.apache.thrift.protocol.TField field;
8511
      iprot.readStructBegin();
8512
      while (true)
8513
      {
8514
        field = iprot.readFieldBegin();
8515
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8516
          break;
8517
        }
8518
        switch (field.id) {
8519
          case 1: // PURCHASE_ID
8520
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8521
              this.purchaseId = iprot.readI64();
8522
              setPurchaseIdIsSet(true);
8523
            } else { 
8524
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8525
            }
8526
            break;
8527
          default:
8528
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8529
        }
8530
        iprot.readFieldEnd();
8531
      }
8532
      iprot.readStructEnd();
8533
      validate();
8534
    }
8535
 
8536
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8537
      validate();
8538
 
8539
      oprot.writeStructBegin(STRUCT_DESC);
8540
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8541
      oprot.writeI64(this.purchaseId);
8542
      oprot.writeFieldEnd();
8543
      oprot.writeFieldStop();
8544
      oprot.writeStructEnd();
8545
    }
8546
 
8547
    @Override
8548
    public String toString() {
4555 mandeep.dh 8549
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8550
      boolean first = true;
8551
 
8552
      sb.append("purchaseId:");
8553
      sb.append(this.purchaseId);
8554
      first = false;
8555
      sb.append(")");
8556
      return sb.toString();
8557
    }
8558
 
8559
    public void validate() throws org.apache.thrift.TException {
8560
      // check for required fields
8561
    }
8562
 
8563
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8564
      try {
8565
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8566
      } catch (org.apache.thrift.TException te) {
8567
        throw new java.io.IOException(te);
8568
      }
8569
    }
8570
 
8571
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8572
      try {
4555 mandeep.dh 8573
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8574
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8575
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8576
      } catch (org.apache.thrift.TException te) {
8577
        throw new java.io.IOException(te);
8578
      }
8579
    }
8580
 
8581
  }
8582
 
4555 mandeep.dh 8583
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8584
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8585
 
4555 mandeep.dh 8586
    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 8587
 
4555 mandeep.dh 8588
    private PurchaseOrder success; // required
4496 mandeep.dh 8589
 
8590
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8591
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8592
      SUCCESS((short)0, "success");
8593
 
8594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8595
 
8596
      static {
8597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8598
          byName.put(field.getFieldName(), field);
8599
        }
8600
      }
8601
 
8602
      /**
8603
       * Find the _Fields constant that matches fieldId, or null if its not found.
8604
       */
8605
      public static _Fields findByThriftId(int fieldId) {
8606
        switch(fieldId) {
8607
          case 0: // SUCCESS
8608
            return SUCCESS;
8609
          default:
8610
            return null;
8611
        }
8612
      }
8613
 
8614
      /**
8615
       * Find the _Fields constant that matches fieldId, throwing an exception
8616
       * if it is not found.
8617
       */
8618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8619
        _Fields fields = findByThriftId(fieldId);
8620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8621
        return fields;
8622
      }
8623
 
8624
      /**
8625
       * Find the _Fields constant that matches name, or null if its not found.
8626
       */
8627
      public static _Fields findByName(String name) {
8628
        return byName.get(name);
8629
      }
8630
 
8631
      private final short _thriftId;
8632
      private final String _fieldName;
8633
 
8634
      _Fields(short thriftId, String fieldName) {
8635
        _thriftId = thriftId;
8636
        _fieldName = fieldName;
8637
      }
8638
 
8639
      public short getThriftFieldId() {
8640
        return _thriftId;
8641
      }
8642
 
8643
      public String getFieldName() {
8644
        return _fieldName;
8645
      }
8646
    }
8647
 
8648
    // isset id assignments
8649
 
8650
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8651
    static {
8652
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8653
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8654
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8655
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8656
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8657
    }
8658
 
4555 mandeep.dh 8659
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8660
    }
8661
 
4555 mandeep.dh 8662
    public getPurchaseOrderForPurchase_result(
8663
      PurchaseOrder success)
4496 mandeep.dh 8664
    {
8665
      this();
8666
      this.success = success;
8667
    }
8668
 
8669
    /**
8670
     * Performs a deep copy on <i>other</i>.
8671
     */
4555 mandeep.dh 8672
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8673
      if (other.isSetSuccess()) {
8674
        this.success = new PurchaseOrder(other.success);
8675
      }
4496 mandeep.dh 8676
    }
8677
 
4555 mandeep.dh 8678
    public getPurchaseOrderForPurchase_result deepCopy() {
8679
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8680
    }
8681
 
8682
    @Override
8683
    public void clear() {
4555 mandeep.dh 8684
      this.success = null;
4496 mandeep.dh 8685
    }
8686
 
4555 mandeep.dh 8687
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8688
      return this.success;
8689
    }
8690
 
4555 mandeep.dh 8691
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8692
      this.success = success;
8693
    }
8694
 
8695
    public void unsetSuccess() {
4555 mandeep.dh 8696
      this.success = null;
4496 mandeep.dh 8697
    }
8698
 
8699
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8700
    public boolean isSetSuccess() {
4555 mandeep.dh 8701
      return this.success != null;
4496 mandeep.dh 8702
    }
8703
 
8704
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8705
      if (!value) {
8706
        this.success = null;
8707
      }
4496 mandeep.dh 8708
    }
8709
 
8710
    public void setFieldValue(_Fields field, Object value) {
8711
      switch (field) {
8712
      case SUCCESS:
8713
        if (value == null) {
8714
          unsetSuccess();
8715
        } else {
4555 mandeep.dh 8716
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8717
        }
8718
        break;
8719
 
8720
      }
8721
    }
8722
 
8723
    public Object getFieldValue(_Fields field) {
8724
      switch (field) {
8725
      case SUCCESS:
4555 mandeep.dh 8726
        return getSuccess();
4496 mandeep.dh 8727
 
8728
      }
8729
      throw new IllegalStateException();
8730
    }
8731
 
8732
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8733
    public boolean isSet(_Fields field) {
8734
      if (field == null) {
8735
        throw new IllegalArgumentException();
8736
      }
8737
 
8738
      switch (field) {
8739
      case SUCCESS:
8740
        return isSetSuccess();
8741
      }
8742
      throw new IllegalStateException();
8743
    }
8744
 
8745
    @Override
8746
    public boolean equals(Object that) {
8747
      if (that == null)
8748
        return false;
4555 mandeep.dh 8749
      if (that instanceof getPurchaseOrderForPurchase_result)
8750
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8751
      return false;
8752
    }
8753
 
4555 mandeep.dh 8754
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8755
      if (that == null)
8756
        return false;
8757
 
4555 mandeep.dh 8758
      boolean this_present_success = true && this.isSetSuccess();
8759
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8760
      if (this_present_success || that_present_success) {
8761
        if (!(this_present_success && that_present_success))
8762
          return false;
4555 mandeep.dh 8763
        if (!this.success.equals(that.success))
4496 mandeep.dh 8764
          return false;
8765
      }
8766
 
8767
      return true;
8768
    }
8769
 
8770
    @Override
8771
    public int hashCode() {
8772
      return 0;
8773
    }
8774
 
4555 mandeep.dh 8775
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8776
      if (!getClass().equals(other.getClass())) {
8777
        return getClass().getName().compareTo(other.getClass().getName());
8778
      }
8779
 
8780
      int lastComparison = 0;
4555 mandeep.dh 8781
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8782
 
8783
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8784
      if (lastComparison != 0) {
8785
        return lastComparison;
8786
      }
8787
      if (isSetSuccess()) {
8788
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8789
        if (lastComparison != 0) {
8790
          return lastComparison;
8791
        }
8792
      }
8793
      return 0;
8794
    }
8795
 
8796
    public _Fields fieldForId(int fieldId) {
8797
      return _Fields.findByThriftId(fieldId);
8798
    }
8799
 
8800
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8801
      org.apache.thrift.protocol.TField field;
8802
      iprot.readStructBegin();
8803
      while (true)
8804
      {
8805
        field = iprot.readFieldBegin();
8806
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8807
          break;
8808
        }
8809
        switch (field.id) {
8810
          case 0: // SUCCESS
4555 mandeep.dh 8811
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8812
              this.success = new PurchaseOrder();
8813
              this.success.read(iprot);
4496 mandeep.dh 8814
            } else { 
8815
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8816
            }
8817
            break;
8818
          default:
8819
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8820
        }
8821
        iprot.readFieldEnd();
8822
      }
8823
      iprot.readStructEnd();
8824
      validate();
8825
    }
8826
 
8827
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8828
      oprot.writeStructBegin(STRUCT_DESC);
8829
 
8830
      if (this.isSetSuccess()) {
8831
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8832
        this.success.write(oprot);
4496 mandeep.dh 8833
        oprot.writeFieldEnd();
8834
      }
8835
      oprot.writeFieldStop();
8836
      oprot.writeStructEnd();
8837
    }
8838
 
8839
    @Override
8840
    public String toString() {
4555 mandeep.dh 8841
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8842
      boolean first = true;
8843
 
8844
      sb.append("success:");
4555 mandeep.dh 8845
      if (this.success == null) {
8846
        sb.append("null");
8847
      } else {
8848
        sb.append(this.success);
8849
      }
4496 mandeep.dh 8850
      first = false;
8851
      sb.append(")");
8852
      return sb.toString();
8853
    }
8854
 
8855
    public void validate() throws org.apache.thrift.TException {
8856
      // check for required fields
8857
    }
8858
 
8859
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8860
      try {
8861
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8862
      } catch (org.apache.thrift.TException te) {
8863
        throw new java.io.IOException(te);
8864
      }
8865
    }
8866
 
8867
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8868
      try {
8869
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8870
      } catch (org.apache.thrift.TException te) {
8871
        throw new java.io.IOException(te);
8872
      }
8873
    }
8874
 
8875
  }
8876
 
4754 mandeep.dh 8877
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8878
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8879
 
8880
    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);
8881
 
8882
    private long warehouseId; // required
8883
 
8884
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8885
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8886
      WAREHOUSE_ID((short)1, "warehouseId");
8887
 
8888
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8889
 
8890
      static {
8891
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8892
          byName.put(field.getFieldName(), field);
8893
        }
8894
      }
8895
 
8896
      /**
8897
       * Find the _Fields constant that matches fieldId, or null if its not found.
8898
       */
8899
      public static _Fields findByThriftId(int fieldId) {
8900
        switch(fieldId) {
8901
          case 1: // WAREHOUSE_ID
8902
            return WAREHOUSE_ID;
8903
          default:
8904
            return null;
8905
        }
8906
      }
8907
 
8908
      /**
8909
       * Find the _Fields constant that matches fieldId, throwing an exception
8910
       * if it is not found.
8911
       */
8912
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8913
        _Fields fields = findByThriftId(fieldId);
8914
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8915
        return fields;
8916
      }
8917
 
8918
      /**
8919
       * Find the _Fields constant that matches name, or null if its not found.
8920
       */
8921
      public static _Fields findByName(String name) {
8922
        return byName.get(name);
8923
      }
8924
 
8925
      private final short _thriftId;
8926
      private final String _fieldName;
8927
 
8928
      _Fields(short thriftId, String fieldName) {
8929
        _thriftId = thriftId;
8930
        _fieldName = fieldName;
8931
      }
8932
 
8933
      public short getThriftFieldId() {
8934
        return _thriftId;
8935
      }
8936
 
8937
      public String getFieldName() {
8938
        return _fieldName;
8939
      }
8940
    }
8941
 
8942
    // isset id assignments
8943
    private static final int __WAREHOUSEID_ISSET_ID = 0;
8944
    private BitSet __isset_bit_vector = new BitSet(1);
8945
 
8946
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8947
    static {
8948
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8949
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8950
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8951
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8952
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
8953
    }
8954
 
8955
    public getPendingPurchaseOrders_args() {
8956
    }
8957
 
8958
    public getPendingPurchaseOrders_args(
8959
      long warehouseId)
8960
    {
8961
      this();
8962
      this.warehouseId = warehouseId;
8963
      setWarehouseIdIsSet(true);
8964
    }
8965
 
8966
    /**
8967
     * Performs a deep copy on <i>other</i>.
8968
     */
8969
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
8970
      __isset_bit_vector.clear();
8971
      __isset_bit_vector.or(other.__isset_bit_vector);
8972
      this.warehouseId = other.warehouseId;
8973
    }
8974
 
8975
    public getPendingPurchaseOrders_args deepCopy() {
8976
      return new getPendingPurchaseOrders_args(this);
8977
    }
8978
 
8979
    @Override
8980
    public void clear() {
8981
      setWarehouseIdIsSet(false);
8982
      this.warehouseId = 0;
8983
    }
8984
 
8985
    public long getWarehouseId() {
8986
      return this.warehouseId;
8987
    }
8988
 
8989
    public void setWarehouseId(long warehouseId) {
8990
      this.warehouseId = warehouseId;
8991
      setWarehouseIdIsSet(true);
8992
    }
8993
 
8994
    public void unsetWarehouseId() {
8995
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8996
    }
8997
 
8998
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8999
    public boolean isSetWarehouseId() {
9000
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
9001
    }
9002
 
9003
    public void setWarehouseIdIsSet(boolean value) {
9004
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
9005
    }
9006
 
9007
    public void setFieldValue(_Fields field, Object value) {
9008
      switch (field) {
9009
      case WAREHOUSE_ID:
9010
        if (value == null) {
9011
          unsetWarehouseId();
9012
        } else {
9013
          setWarehouseId((Long)value);
9014
        }
9015
        break;
9016
 
9017
      }
9018
    }
9019
 
9020
    public Object getFieldValue(_Fields field) {
9021
      switch (field) {
9022
      case WAREHOUSE_ID:
9023
        return Long.valueOf(getWarehouseId());
9024
 
9025
      }
9026
      throw new IllegalStateException();
9027
    }
9028
 
9029
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9030
    public boolean isSet(_Fields field) {
9031
      if (field == null) {
9032
        throw new IllegalArgumentException();
9033
      }
9034
 
9035
      switch (field) {
9036
      case WAREHOUSE_ID:
9037
        return isSetWarehouseId();
9038
      }
9039
      throw new IllegalStateException();
9040
    }
9041
 
9042
    @Override
9043
    public boolean equals(Object that) {
9044
      if (that == null)
9045
        return false;
9046
      if (that instanceof getPendingPurchaseOrders_args)
9047
        return this.equals((getPendingPurchaseOrders_args)that);
9048
      return false;
9049
    }
9050
 
9051
    public boolean equals(getPendingPurchaseOrders_args that) {
9052
      if (that == null)
9053
        return false;
9054
 
9055
      boolean this_present_warehouseId = true;
9056
      boolean that_present_warehouseId = true;
9057
      if (this_present_warehouseId || that_present_warehouseId) {
9058
        if (!(this_present_warehouseId && that_present_warehouseId))
9059
          return false;
9060
        if (this.warehouseId != that.warehouseId)
9061
          return false;
9062
      }
9063
 
9064
      return true;
9065
    }
9066
 
9067
    @Override
9068
    public int hashCode() {
9069
      return 0;
9070
    }
9071
 
9072
    public int compareTo(getPendingPurchaseOrders_args other) {
9073
      if (!getClass().equals(other.getClass())) {
9074
        return getClass().getName().compareTo(other.getClass().getName());
9075
      }
9076
 
9077
      int lastComparison = 0;
9078
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
9079
 
9080
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
9081
      if (lastComparison != 0) {
9082
        return lastComparison;
9083
      }
9084
      if (isSetWarehouseId()) {
9085
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
9086
        if (lastComparison != 0) {
9087
          return lastComparison;
9088
        }
9089
      }
9090
      return 0;
9091
    }
9092
 
9093
    public _Fields fieldForId(int fieldId) {
9094
      return _Fields.findByThriftId(fieldId);
9095
    }
9096
 
9097
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9098
      org.apache.thrift.protocol.TField field;
9099
      iprot.readStructBegin();
9100
      while (true)
9101
      {
9102
        field = iprot.readFieldBegin();
9103
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9104
          break;
9105
        }
9106
        switch (field.id) {
9107
          case 1: // WAREHOUSE_ID
9108
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9109
              this.warehouseId = iprot.readI64();
9110
              setWarehouseIdIsSet(true);
9111
            } else { 
9112
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9113
            }
9114
            break;
9115
          default:
9116
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9117
        }
9118
        iprot.readFieldEnd();
9119
      }
9120
      iprot.readStructEnd();
9121
      validate();
9122
    }
9123
 
9124
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9125
      validate();
9126
 
9127
      oprot.writeStructBegin(STRUCT_DESC);
9128
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9129
      oprot.writeI64(this.warehouseId);
9130
      oprot.writeFieldEnd();
9131
      oprot.writeFieldStop();
9132
      oprot.writeStructEnd();
9133
    }
9134
 
9135
    @Override
9136
    public String toString() {
9137
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
9138
      boolean first = true;
9139
 
9140
      sb.append("warehouseId:");
9141
      sb.append(this.warehouseId);
9142
      first = false;
9143
      sb.append(")");
9144
      return sb.toString();
9145
    }
9146
 
9147
    public void validate() throws org.apache.thrift.TException {
9148
      // check for required fields
9149
    }
9150
 
9151
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9152
      try {
9153
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9154
      } catch (org.apache.thrift.TException te) {
9155
        throw new java.io.IOException(te);
9156
      }
9157
    }
9158
 
9159
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9160
      try {
9161
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9162
        __isset_bit_vector = new BitSet(1);
9163
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9164
      } catch (org.apache.thrift.TException te) {
9165
        throw new java.io.IOException(te);
9166
      }
9167
    }
9168
 
9169
  }
9170
 
9171
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
9172
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
9173
 
9174
    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);
9175
    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);
9176
 
9177
    private List<PurchaseOrder> success; // required
9178
    private PurchaseServiceException e; // required
9179
 
9180
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9181
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9182
      SUCCESS((short)0, "success"),
9183
      E((short)1, "e");
9184
 
9185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9186
 
9187
      static {
9188
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9189
          byName.put(field.getFieldName(), field);
9190
        }
9191
      }
9192
 
9193
      /**
9194
       * Find the _Fields constant that matches fieldId, or null if its not found.
9195
       */
9196
      public static _Fields findByThriftId(int fieldId) {
9197
        switch(fieldId) {
9198
          case 0: // SUCCESS
9199
            return SUCCESS;
9200
          case 1: // E
9201
            return E;
9202
          default:
9203
            return null;
9204
        }
9205
      }
9206
 
9207
      /**
9208
       * Find the _Fields constant that matches fieldId, throwing an exception
9209
       * if it is not found.
9210
       */
9211
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9212
        _Fields fields = findByThriftId(fieldId);
9213
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9214
        return fields;
9215
      }
9216
 
9217
      /**
9218
       * Find the _Fields constant that matches name, or null if its not found.
9219
       */
9220
      public static _Fields findByName(String name) {
9221
        return byName.get(name);
9222
      }
9223
 
9224
      private final short _thriftId;
9225
      private final String _fieldName;
9226
 
9227
      _Fields(short thriftId, String fieldName) {
9228
        _thriftId = thriftId;
9229
        _fieldName = fieldName;
9230
      }
9231
 
9232
      public short getThriftFieldId() {
9233
        return _thriftId;
9234
      }
9235
 
9236
      public String getFieldName() {
9237
        return _fieldName;
9238
      }
9239
    }
9240
 
9241
    // isset id assignments
9242
 
9243
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9244
    static {
9245
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9246
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9247
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9248
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
9249
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9250
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9251
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9252
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
9253
    }
9254
 
9255
    public getPendingPurchaseOrders_result() {
9256
    }
9257
 
9258
    public getPendingPurchaseOrders_result(
9259
      List<PurchaseOrder> success,
9260
      PurchaseServiceException e)
9261
    {
9262
      this();
9263
      this.success = success;
9264
      this.e = e;
9265
    }
9266
 
9267
    /**
9268
     * Performs a deep copy on <i>other</i>.
9269
     */
9270
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
9271
      if (other.isSetSuccess()) {
9272
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
9273
        for (PurchaseOrder other_element : other.success) {
9274
          __this__success.add(new PurchaseOrder(other_element));
9275
        }
9276
        this.success = __this__success;
9277
      }
9278
      if (other.isSetE()) {
9279
        this.e = new PurchaseServiceException(other.e);
9280
      }
9281
    }
9282
 
9283
    public getPendingPurchaseOrders_result deepCopy() {
9284
      return new getPendingPurchaseOrders_result(this);
9285
    }
9286
 
9287
    @Override
9288
    public void clear() {
9289
      this.success = null;
9290
      this.e = null;
9291
    }
9292
 
9293
    public int getSuccessSize() {
9294
      return (this.success == null) ? 0 : this.success.size();
9295
    }
9296
 
9297
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
9298
      return (this.success == null) ? null : this.success.iterator();
9299
    }
9300
 
9301
    public void addToSuccess(PurchaseOrder elem) {
9302
      if (this.success == null) {
9303
        this.success = new ArrayList<PurchaseOrder>();
9304
      }
9305
      this.success.add(elem);
9306
    }
9307
 
9308
    public List<PurchaseOrder> getSuccess() {
9309
      return this.success;
9310
    }
9311
 
9312
    public void setSuccess(List<PurchaseOrder> success) {
9313
      this.success = success;
9314
    }
9315
 
9316
    public void unsetSuccess() {
9317
      this.success = null;
9318
    }
9319
 
9320
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9321
    public boolean isSetSuccess() {
9322
      return this.success != null;
9323
    }
9324
 
9325
    public void setSuccessIsSet(boolean value) {
9326
      if (!value) {
9327
        this.success = null;
9328
      }
9329
    }
9330
 
9331
    public PurchaseServiceException getE() {
9332
      return this.e;
9333
    }
9334
 
9335
    public void setE(PurchaseServiceException e) {
9336
      this.e = e;
9337
    }
9338
 
9339
    public void unsetE() {
9340
      this.e = null;
9341
    }
9342
 
9343
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9344
    public boolean isSetE() {
9345
      return this.e != null;
9346
    }
9347
 
9348
    public void setEIsSet(boolean value) {
9349
      if (!value) {
9350
        this.e = null;
9351
      }
9352
    }
9353
 
9354
    public void setFieldValue(_Fields field, Object value) {
9355
      switch (field) {
9356
      case SUCCESS:
9357
        if (value == null) {
9358
          unsetSuccess();
9359
        } else {
9360
          setSuccess((List<PurchaseOrder>)value);
9361
        }
9362
        break;
9363
 
9364
      case E:
9365
        if (value == null) {
9366
          unsetE();
9367
        } else {
9368
          setE((PurchaseServiceException)value);
9369
        }
9370
        break;
9371
 
9372
      }
9373
    }
9374
 
9375
    public Object getFieldValue(_Fields field) {
9376
      switch (field) {
9377
      case SUCCESS:
9378
        return getSuccess();
9379
 
9380
      case E:
9381
        return getE();
9382
 
9383
      }
9384
      throw new IllegalStateException();
9385
    }
9386
 
9387
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9388
    public boolean isSet(_Fields field) {
9389
      if (field == null) {
9390
        throw new IllegalArgumentException();
9391
      }
9392
 
9393
      switch (field) {
9394
      case SUCCESS:
9395
        return isSetSuccess();
9396
      case E:
9397
        return isSetE();
9398
      }
9399
      throw new IllegalStateException();
9400
    }
9401
 
9402
    @Override
9403
    public boolean equals(Object that) {
9404
      if (that == null)
9405
        return false;
9406
      if (that instanceof getPendingPurchaseOrders_result)
9407
        return this.equals((getPendingPurchaseOrders_result)that);
9408
      return false;
9409
    }
9410
 
9411
    public boolean equals(getPendingPurchaseOrders_result that) {
9412
      if (that == null)
9413
        return false;
9414
 
9415
      boolean this_present_success = true && this.isSetSuccess();
9416
      boolean that_present_success = true && that.isSetSuccess();
9417
      if (this_present_success || that_present_success) {
9418
        if (!(this_present_success && that_present_success))
9419
          return false;
9420
        if (!this.success.equals(that.success))
9421
          return false;
9422
      }
9423
 
9424
      boolean this_present_e = true && this.isSetE();
9425
      boolean that_present_e = true && that.isSetE();
9426
      if (this_present_e || that_present_e) {
9427
        if (!(this_present_e && that_present_e))
9428
          return false;
9429
        if (!this.e.equals(that.e))
9430
          return false;
9431
      }
9432
 
9433
      return true;
9434
    }
9435
 
9436
    @Override
9437
    public int hashCode() {
9438
      return 0;
9439
    }
9440
 
9441
    public int compareTo(getPendingPurchaseOrders_result other) {
9442
      if (!getClass().equals(other.getClass())) {
9443
        return getClass().getName().compareTo(other.getClass().getName());
9444
      }
9445
 
9446
      int lastComparison = 0;
9447
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9448
 
9449
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9450
      if (lastComparison != 0) {
9451
        return lastComparison;
9452
      }
9453
      if (isSetSuccess()) {
9454
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9455
        if (lastComparison != 0) {
9456
          return lastComparison;
9457
        }
9458
      }
9459
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9460
      if (lastComparison != 0) {
9461
        return lastComparison;
9462
      }
9463
      if (isSetE()) {
9464
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9465
        if (lastComparison != 0) {
9466
          return lastComparison;
9467
        }
9468
      }
9469
      return 0;
9470
    }
9471
 
9472
    public _Fields fieldForId(int fieldId) {
9473
      return _Fields.findByThriftId(fieldId);
9474
    }
9475
 
9476
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9477
      org.apache.thrift.protocol.TField field;
9478
      iprot.readStructBegin();
9479
      while (true)
9480
      {
9481
        field = iprot.readFieldBegin();
9482
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9483
          break;
9484
        }
9485
        switch (field.id) {
9486
          case 0: // SUCCESS
9487
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9488
              {
6385 amar.kumar 9489
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9490
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9491
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9492
                {
6385 amar.kumar 9493
                  PurchaseOrder _elem18; // required
9494
                  _elem18 = new PurchaseOrder();
9495
                  _elem18.read(iprot);
9496
                  this.success.add(_elem18);
4754 mandeep.dh 9497
                }
9498
                iprot.readListEnd();
9499
              }
9500
            } else { 
9501
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9502
            }
9503
            break;
9504
          case 1: // E
9505
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9506
              this.e = new PurchaseServiceException();
9507
              this.e.read(iprot);
9508
            } else { 
9509
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9510
            }
9511
            break;
9512
          default:
9513
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9514
        }
9515
        iprot.readFieldEnd();
9516
      }
9517
      iprot.readStructEnd();
9518
      validate();
9519
    }
9520
 
9521
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9522
      oprot.writeStructBegin(STRUCT_DESC);
9523
 
9524
      if (this.isSetSuccess()) {
9525
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9526
        {
9527
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9528
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9529
          {
6385 amar.kumar 9530
            _iter19.write(oprot);
4754 mandeep.dh 9531
          }
9532
          oprot.writeListEnd();
9533
        }
9534
        oprot.writeFieldEnd();
9535
      } else if (this.isSetE()) {
9536
        oprot.writeFieldBegin(E_FIELD_DESC);
9537
        this.e.write(oprot);
9538
        oprot.writeFieldEnd();
9539
      }
9540
      oprot.writeFieldStop();
9541
      oprot.writeStructEnd();
9542
    }
9543
 
9544
    @Override
9545
    public String toString() {
9546
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9547
      boolean first = true;
9548
 
9549
      sb.append("success:");
9550
      if (this.success == null) {
9551
        sb.append("null");
9552
      } else {
9553
        sb.append(this.success);
9554
      }
9555
      first = false;
9556
      if (!first) sb.append(", ");
9557
      sb.append("e:");
9558
      if (this.e == null) {
9559
        sb.append("null");
9560
      } else {
9561
        sb.append(this.e);
9562
      }
9563
      first = false;
9564
      sb.append(")");
9565
      return sb.toString();
9566
    }
9567
 
9568
    public void validate() throws org.apache.thrift.TException {
9569
      // check for required fields
9570
    }
9571
 
9572
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9573
      try {
9574
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9575
      } catch (org.apache.thrift.TException te) {
9576
        throw new java.io.IOException(te);
9577
      }
9578
    }
9579
 
9580
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9581
      try {
9582
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9583
      } catch (org.apache.thrift.TException te) {
9584
        throw new java.io.IOException(te);
9585
      }
9586
    }
9587
 
9588
  }
9589
 
9590
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9591
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9592
 
9593
 
9594
 
9595
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9596
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9597
;
9598
 
9599
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9600
 
9601
      static {
9602
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9603
          byName.put(field.getFieldName(), field);
9604
        }
9605
      }
9606
 
9607
      /**
9608
       * Find the _Fields constant that matches fieldId, or null if its not found.
9609
       */
9610
      public static _Fields findByThriftId(int fieldId) {
9611
        switch(fieldId) {
9612
          default:
9613
            return null;
9614
        }
9615
      }
9616
 
9617
      /**
9618
       * Find the _Fields constant that matches fieldId, throwing an exception
9619
       * if it is not found.
9620
       */
9621
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9622
        _Fields fields = findByThriftId(fieldId);
9623
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9624
        return fields;
9625
      }
9626
 
9627
      /**
9628
       * Find the _Fields constant that matches name, or null if its not found.
9629
       */
9630
      public static _Fields findByName(String name) {
9631
        return byName.get(name);
9632
      }
9633
 
9634
      private final short _thriftId;
9635
      private final String _fieldName;
9636
 
9637
      _Fields(short thriftId, String fieldName) {
9638
        _thriftId = thriftId;
9639
        _fieldName = fieldName;
9640
      }
9641
 
9642
      public short getThriftFieldId() {
9643
        return _thriftId;
9644
      }
9645
 
9646
      public String getFieldName() {
9647
        return _fieldName;
9648
      }
9649
    }
9650
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9651
    static {
9652
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9655
    }
9656
 
9657
    public getSuppliers_args() {
9658
    }
9659
 
9660
    /**
9661
     * Performs a deep copy on <i>other</i>.
9662
     */
9663
    public getSuppliers_args(getSuppliers_args other) {
9664
    }
9665
 
9666
    public getSuppliers_args deepCopy() {
9667
      return new getSuppliers_args(this);
9668
    }
9669
 
9670
    @Override
9671
    public void clear() {
9672
    }
9673
 
9674
    public void setFieldValue(_Fields field, Object value) {
9675
      switch (field) {
9676
      }
9677
    }
9678
 
9679
    public Object getFieldValue(_Fields field) {
9680
      switch (field) {
9681
      }
9682
      throw new IllegalStateException();
9683
    }
9684
 
9685
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9686
    public boolean isSet(_Fields field) {
9687
      if (field == null) {
9688
        throw new IllegalArgumentException();
9689
      }
9690
 
9691
      switch (field) {
9692
      }
9693
      throw new IllegalStateException();
9694
    }
9695
 
9696
    @Override
9697
    public boolean equals(Object that) {
9698
      if (that == null)
9699
        return false;
9700
      if (that instanceof getSuppliers_args)
9701
        return this.equals((getSuppliers_args)that);
9702
      return false;
9703
    }
9704
 
9705
    public boolean equals(getSuppliers_args that) {
9706
      if (that == null)
9707
        return false;
9708
 
9709
      return true;
9710
    }
9711
 
9712
    @Override
9713
    public int hashCode() {
9714
      return 0;
9715
    }
9716
 
9717
    public int compareTo(getSuppliers_args other) {
9718
      if (!getClass().equals(other.getClass())) {
9719
        return getClass().getName().compareTo(other.getClass().getName());
9720
      }
9721
 
9722
      int lastComparison = 0;
9723
      getSuppliers_args typedOther = (getSuppliers_args)other;
9724
 
9725
      return 0;
9726
    }
9727
 
9728
    public _Fields fieldForId(int fieldId) {
9729
      return _Fields.findByThriftId(fieldId);
9730
    }
9731
 
9732
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9733
      org.apache.thrift.protocol.TField field;
9734
      iprot.readStructBegin();
9735
      while (true)
9736
      {
9737
        field = iprot.readFieldBegin();
9738
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9739
          break;
9740
        }
9741
        switch (field.id) {
9742
          default:
9743
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9744
        }
9745
        iprot.readFieldEnd();
9746
      }
9747
      iprot.readStructEnd();
9748
      validate();
9749
    }
9750
 
9751
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9752
      validate();
9753
 
9754
      oprot.writeStructBegin(STRUCT_DESC);
9755
      oprot.writeFieldStop();
9756
      oprot.writeStructEnd();
9757
    }
9758
 
9759
    @Override
9760
    public String toString() {
9761
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9762
      boolean first = true;
9763
 
9764
      sb.append(")");
9765
      return sb.toString();
9766
    }
9767
 
9768
    public void validate() throws org.apache.thrift.TException {
9769
      // check for required fields
9770
    }
9771
 
9772
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9773
      try {
9774
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9775
      } catch (org.apache.thrift.TException te) {
9776
        throw new java.io.IOException(te);
9777
      }
9778
    }
9779
 
9780
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9781
      try {
9782
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9783
      } catch (org.apache.thrift.TException te) {
9784
        throw new java.io.IOException(te);
9785
      }
9786
    }
9787
 
9788
  }
9789
 
9790
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9791
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9792
 
9793
    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);
9794
    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);
9795
 
9796
    private List<Supplier> success; // required
9797
    private PurchaseServiceException e; // required
9798
 
9799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9800
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9801
      SUCCESS((short)0, "success"),
9802
      E((short)1, "e");
9803
 
9804
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9805
 
9806
      static {
9807
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9808
          byName.put(field.getFieldName(), field);
9809
        }
9810
      }
9811
 
9812
      /**
9813
       * Find the _Fields constant that matches fieldId, or null if its not found.
9814
       */
9815
      public static _Fields findByThriftId(int fieldId) {
9816
        switch(fieldId) {
9817
          case 0: // SUCCESS
9818
            return SUCCESS;
9819
          case 1: // E
9820
            return E;
9821
          default:
9822
            return null;
9823
        }
9824
      }
9825
 
9826
      /**
9827
       * Find the _Fields constant that matches fieldId, throwing an exception
9828
       * if it is not found.
9829
       */
9830
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9831
        _Fields fields = findByThriftId(fieldId);
9832
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9833
        return fields;
9834
      }
9835
 
9836
      /**
9837
       * Find the _Fields constant that matches name, or null if its not found.
9838
       */
9839
      public static _Fields findByName(String name) {
9840
        return byName.get(name);
9841
      }
9842
 
9843
      private final short _thriftId;
9844
      private final String _fieldName;
9845
 
9846
      _Fields(short thriftId, String fieldName) {
9847
        _thriftId = thriftId;
9848
        _fieldName = fieldName;
9849
      }
9850
 
9851
      public short getThriftFieldId() {
9852
        return _thriftId;
9853
      }
9854
 
9855
      public String getFieldName() {
9856
        return _fieldName;
9857
      }
9858
    }
9859
 
9860
    // isset id assignments
9861
 
9862
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9863
    static {
9864
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9865
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9866
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9867
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9868
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9869
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9870
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9871
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9872
    }
9873
 
9874
    public getSuppliers_result() {
9875
    }
9876
 
9877
    public getSuppliers_result(
9878
      List<Supplier> success,
9879
      PurchaseServiceException e)
9880
    {
9881
      this();
9882
      this.success = success;
9883
      this.e = e;
9884
    }
9885
 
9886
    /**
9887
     * Performs a deep copy on <i>other</i>.
9888
     */
9889
    public getSuppliers_result(getSuppliers_result other) {
9890
      if (other.isSetSuccess()) {
9891
        List<Supplier> __this__success = new ArrayList<Supplier>();
9892
        for (Supplier other_element : other.success) {
9893
          __this__success.add(new Supplier(other_element));
9894
        }
9895
        this.success = __this__success;
9896
      }
9897
      if (other.isSetE()) {
9898
        this.e = new PurchaseServiceException(other.e);
9899
      }
9900
    }
9901
 
9902
    public getSuppliers_result deepCopy() {
9903
      return new getSuppliers_result(this);
9904
    }
9905
 
9906
    @Override
9907
    public void clear() {
9908
      this.success = null;
9909
      this.e = null;
9910
    }
9911
 
9912
    public int getSuccessSize() {
9913
      return (this.success == null) ? 0 : this.success.size();
9914
    }
9915
 
9916
    public java.util.Iterator<Supplier> getSuccessIterator() {
9917
      return (this.success == null) ? null : this.success.iterator();
9918
    }
9919
 
9920
    public void addToSuccess(Supplier elem) {
9921
      if (this.success == null) {
9922
        this.success = new ArrayList<Supplier>();
9923
      }
9924
      this.success.add(elem);
9925
    }
9926
 
9927
    public List<Supplier> getSuccess() {
9928
      return this.success;
9929
    }
9930
 
9931
    public void setSuccess(List<Supplier> success) {
9932
      this.success = success;
9933
    }
9934
 
9935
    public void unsetSuccess() {
9936
      this.success = null;
9937
    }
9938
 
9939
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9940
    public boolean isSetSuccess() {
9941
      return this.success != null;
9942
    }
9943
 
9944
    public void setSuccessIsSet(boolean value) {
9945
      if (!value) {
9946
        this.success = null;
9947
      }
9948
    }
9949
 
9950
    public PurchaseServiceException getE() {
9951
      return this.e;
9952
    }
9953
 
9954
    public void setE(PurchaseServiceException e) {
9955
      this.e = e;
9956
    }
9957
 
9958
    public void unsetE() {
9959
      this.e = null;
9960
    }
9961
 
9962
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9963
    public boolean isSetE() {
9964
      return this.e != null;
9965
    }
9966
 
9967
    public void setEIsSet(boolean value) {
9968
      if (!value) {
9969
        this.e = null;
9970
      }
9971
    }
9972
 
9973
    public void setFieldValue(_Fields field, Object value) {
9974
      switch (field) {
9975
      case SUCCESS:
9976
        if (value == null) {
9977
          unsetSuccess();
9978
        } else {
9979
          setSuccess((List<Supplier>)value);
9980
        }
9981
        break;
9982
 
9983
      case E:
9984
        if (value == null) {
9985
          unsetE();
9986
        } else {
9987
          setE((PurchaseServiceException)value);
9988
        }
9989
        break;
9990
 
9991
      }
9992
    }
9993
 
9994
    public Object getFieldValue(_Fields field) {
9995
      switch (field) {
9996
      case SUCCESS:
9997
        return getSuccess();
9998
 
9999
      case E:
10000
        return getE();
10001
 
10002
      }
10003
      throw new IllegalStateException();
10004
    }
10005
 
10006
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10007
    public boolean isSet(_Fields field) {
10008
      if (field == null) {
10009
        throw new IllegalArgumentException();
10010
      }
10011
 
10012
      switch (field) {
10013
      case SUCCESS:
10014
        return isSetSuccess();
10015
      case E:
10016
        return isSetE();
10017
      }
10018
      throw new IllegalStateException();
10019
    }
10020
 
10021
    @Override
10022
    public boolean equals(Object that) {
10023
      if (that == null)
10024
        return false;
10025
      if (that instanceof getSuppliers_result)
10026
        return this.equals((getSuppliers_result)that);
10027
      return false;
10028
    }
10029
 
10030
    public boolean equals(getSuppliers_result that) {
10031
      if (that == null)
10032
        return false;
10033
 
10034
      boolean this_present_success = true && this.isSetSuccess();
10035
      boolean that_present_success = true && that.isSetSuccess();
10036
      if (this_present_success || that_present_success) {
10037
        if (!(this_present_success && that_present_success))
10038
          return false;
10039
        if (!this.success.equals(that.success))
10040
          return false;
10041
      }
10042
 
10043
      boolean this_present_e = true && this.isSetE();
10044
      boolean that_present_e = true && that.isSetE();
10045
      if (this_present_e || that_present_e) {
10046
        if (!(this_present_e && that_present_e))
10047
          return false;
10048
        if (!this.e.equals(that.e))
10049
          return false;
10050
      }
10051
 
10052
      return true;
10053
    }
10054
 
10055
    @Override
10056
    public int hashCode() {
10057
      return 0;
10058
    }
10059
 
10060
    public int compareTo(getSuppliers_result other) {
10061
      if (!getClass().equals(other.getClass())) {
10062
        return getClass().getName().compareTo(other.getClass().getName());
10063
      }
10064
 
10065
      int lastComparison = 0;
10066
      getSuppliers_result typedOther = (getSuppliers_result)other;
10067
 
10068
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10069
      if (lastComparison != 0) {
10070
        return lastComparison;
10071
      }
10072
      if (isSetSuccess()) {
10073
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10074
        if (lastComparison != 0) {
10075
          return lastComparison;
10076
        }
10077
      }
10078
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10079
      if (lastComparison != 0) {
10080
        return lastComparison;
10081
      }
10082
      if (isSetE()) {
10083
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10084
        if (lastComparison != 0) {
10085
          return lastComparison;
10086
        }
10087
      }
10088
      return 0;
10089
    }
10090
 
10091
    public _Fields fieldForId(int fieldId) {
10092
      return _Fields.findByThriftId(fieldId);
10093
    }
10094
 
10095
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10096
      org.apache.thrift.protocol.TField field;
10097
      iprot.readStructBegin();
10098
      while (true)
10099
      {
10100
        field = iprot.readFieldBegin();
10101
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10102
          break;
10103
        }
10104
        switch (field.id) {
10105
          case 0: // SUCCESS
10106
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10107
              {
6385 amar.kumar 10108
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
10109
                this.success = new ArrayList<Supplier>(_list20.size);
10110
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 10111
                {
6385 amar.kumar 10112
                  Supplier _elem22; // required
10113
                  _elem22 = new Supplier();
10114
                  _elem22.read(iprot);
10115
                  this.success.add(_elem22);
4754 mandeep.dh 10116
                }
10117
                iprot.readListEnd();
10118
              }
10119
            } else { 
10120
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10121
            }
10122
            break;
10123
          case 1: // E
10124
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10125
              this.e = new PurchaseServiceException();
10126
              this.e.read(iprot);
10127
            } else { 
10128
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10129
            }
10130
            break;
10131
          default:
10132
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10133
        }
10134
        iprot.readFieldEnd();
10135
      }
10136
      iprot.readStructEnd();
10137
      validate();
10138
    }
10139
 
10140
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10141
      oprot.writeStructBegin(STRUCT_DESC);
10142
 
10143
      if (this.isSetSuccess()) {
10144
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10145
        {
10146
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 10147
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 10148
          {
6385 amar.kumar 10149
            _iter23.write(oprot);
4754 mandeep.dh 10150
          }
10151
          oprot.writeListEnd();
10152
        }
10153
        oprot.writeFieldEnd();
10154
      } else if (this.isSetE()) {
10155
        oprot.writeFieldBegin(E_FIELD_DESC);
10156
        this.e.write(oprot);
10157
        oprot.writeFieldEnd();
10158
      }
10159
      oprot.writeFieldStop();
10160
      oprot.writeStructEnd();
10161
    }
10162
 
10163
    @Override
10164
    public String toString() {
10165
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
10166
      boolean first = true;
10167
 
10168
      sb.append("success:");
10169
      if (this.success == null) {
10170
        sb.append("null");
10171
      } else {
10172
        sb.append(this.success);
10173
      }
10174
      first = false;
10175
      if (!first) sb.append(", ");
10176
      sb.append("e:");
10177
      if (this.e == null) {
10178
        sb.append("null");
10179
      } else {
10180
        sb.append(this.e);
10181
      }
10182
      first = false;
10183
      sb.append(")");
10184
      return sb.toString();
10185
    }
10186
 
10187
    public void validate() throws org.apache.thrift.TException {
10188
      // check for required fields
10189
    }
10190
 
10191
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10192
      try {
10193
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10194
      } catch (org.apache.thrift.TException te) {
10195
        throw new java.io.IOException(te);
10196
      }
10197
    }
10198
 
10199
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10200
      try {
10201
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10202
      } catch (org.apache.thrift.TException te) {
10203
        throw new java.io.IOException(te);
10204
      }
10205
    }
10206
 
10207
  }
10208
 
10209
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10210
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
10211
 
10212
    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);
10213
    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);
10214
    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);
10215
 
10216
    private long purchaseOrderId; // required
10217
    private long itemId; // required
10218
    private long quantity; // required
10219
 
10220
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10221
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10222
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
10223
      ITEM_ID((short)2, "itemId"),
10224
      QUANTITY((short)3, "quantity");
10225
 
10226
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10227
 
10228
      static {
10229
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10230
          byName.put(field.getFieldName(), field);
10231
        }
10232
      }
10233
 
10234
      /**
10235
       * Find the _Fields constant that matches fieldId, or null if its not found.
10236
       */
10237
      public static _Fields findByThriftId(int fieldId) {
10238
        switch(fieldId) {
10239
          case 1: // PURCHASE_ORDER_ID
10240
            return PURCHASE_ORDER_ID;
10241
          case 2: // ITEM_ID
10242
            return ITEM_ID;
10243
          case 3: // QUANTITY
10244
            return QUANTITY;
10245
          default:
10246
            return null;
10247
        }
10248
      }
10249
 
10250
      /**
10251
       * Find the _Fields constant that matches fieldId, throwing an exception
10252
       * if it is not found.
10253
       */
10254
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10255
        _Fields fields = findByThriftId(fieldId);
10256
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10257
        return fields;
10258
      }
10259
 
10260
      /**
10261
       * Find the _Fields constant that matches name, or null if its not found.
10262
       */
10263
      public static _Fields findByName(String name) {
10264
        return byName.get(name);
10265
      }
10266
 
10267
      private final short _thriftId;
10268
      private final String _fieldName;
10269
 
10270
      _Fields(short thriftId, String fieldName) {
10271
        _thriftId = thriftId;
10272
        _fieldName = fieldName;
10273
      }
10274
 
10275
      public short getThriftFieldId() {
10276
        return _thriftId;
10277
      }
10278
 
10279
      public String getFieldName() {
10280
        return _fieldName;
10281
      }
10282
    }
10283
 
10284
    // isset id assignments
10285
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
10286
    private static final int __ITEMID_ISSET_ID = 1;
10287
    private static final int __QUANTITY_ISSET_ID = 2;
10288
    private BitSet __isset_bit_vector = new BitSet(3);
10289
 
10290
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10291
    static {
10292
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10293
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10294
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10295
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10296
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10297
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10298
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10299
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10300
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
10301
    }
10302
 
10303
    public fulfillPO_args() {
10304
    }
10305
 
10306
    public fulfillPO_args(
10307
      long purchaseOrderId,
10308
      long itemId,
10309
      long quantity)
10310
    {
10311
      this();
10312
      this.purchaseOrderId = purchaseOrderId;
10313
      setPurchaseOrderIdIsSet(true);
10314
      this.itemId = itemId;
10315
      setItemIdIsSet(true);
10316
      this.quantity = quantity;
10317
      setQuantityIsSet(true);
10318
    }
10319
 
10320
    /**
10321
     * Performs a deep copy on <i>other</i>.
10322
     */
10323
    public fulfillPO_args(fulfillPO_args other) {
10324
      __isset_bit_vector.clear();
10325
      __isset_bit_vector.or(other.__isset_bit_vector);
10326
      this.purchaseOrderId = other.purchaseOrderId;
10327
      this.itemId = other.itemId;
10328
      this.quantity = other.quantity;
10329
    }
10330
 
10331
    public fulfillPO_args deepCopy() {
10332
      return new fulfillPO_args(this);
10333
    }
10334
 
10335
    @Override
10336
    public void clear() {
10337
      setPurchaseOrderIdIsSet(false);
10338
      this.purchaseOrderId = 0;
10339
      setItemIdIsSet(false);
10340
      this.itemId = 0;
10341
      setQuantityIsSet(false);
10342
      this.quantity = 0;
10343
    }
10344
 
10345
    public long getPurchaseOrderId() {
10346
      return this.purchaseOrderId;
10347
    }
10348
 
10349
    public void setPurchaseOrderId(long purchaseOrderId) {
10350
      this.purchaseOrderId = purchaseOrderId;
10351
      setPurchaseOrderIdIsSet(true);
10352
    }
10353
 
10354
    public void unsetPurchaseOrderId() {
10355
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
10356
    }
10357
 
10358
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10359
    public boolean isSetPurchaseOrderId() {
10360
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10361
    }
10362
 
10363
    public void setPurchaseOrderIdIsSet(boolean value) {
10364
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10365
    }
10366
 
10367
    public long getItemId() {
10368
      return this.itemId;
10369
    }
10370
 
10371
    public void setItemId(long itemId) {
10372
      this.itemId = itemId;
10373
      setItemIdIsSet(true);
10374
    }
10375
 
10376
    public void unsetItemId() {
10377
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10378
    }
10379
 
10380
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10381
    public boolean isSetItemId() {
10382
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10383
    }
10384
 
10385
    public void setItemIdIsSet(boolean value) {
10386
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10387
    }
10388
 
10389
    public long getQuantity() {
10390
      return this.quantity;
10391
    }
10392
 
10393
    public void setQuantity(long quantity) {
10394
      this.quantity = quantity;
10395
      setQuantityIsSet(true);
10396
    }
10397
 
10398
    public void unsetQuantity() {
10399
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10400
    }
10401
 
10402
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10403
    public boolean isSetQuantity() {
10404
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10405
    }
10406
 
10407
    public void setQuantityIsSet(boolean value) {
10408
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10409
    }
10410
 
10411
    public void setFieldValue(_Fields field, Object value) {
10412
      switch (field) {
10413
      case PURCHASE_ORDER_ID:
10414
        if (value == null) {
10415
          unsetPurchaseOrderId();
10416
        } else {
10417
          setPurchaseOrderId((Long)value);
10418
        }
10419
        break;
10420
 
10421
      case ITEM_ID:
10422
        if (value == null) {
10423
          unsetItemId();
10424
        } else {
10425
          setItemId((Long)value);
10426
        }
10427
        break;
10428
 
10429
      case QUANTITY:
10430
        if (value == null) {
10431
          unsetQuantity();
10432
        } else {
10433
          setQuantity((Long)value);
10434
        }
10435
        break;
10436
 
10437
      }
10438
    }
10439
 
10440
    public Object getFieldValue(_Fields field) {
10441
      switch (field) {
10442
      case PURCHASE_ORDER_ID:
10443
        return Long.valueOf(getPurchaseOrderId());
10444
 
10445
      case ITEM_ID:
10446
        return Long.valueOf(getItemId());
10447
 
10448
      case QUANTITY:
10449
        return Long.valueOf(getQuantity());
10450
 
10451
      }
10452
      throw new IllegalStateException();
10453
    }
10454
 
10455
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10456
    public boolean isSet(_Fields field) {
10457
      if (field == null) {
10458
        throw new IllegalArgumentException();
10459
      }
10460
 
10461
      switch (field) {
10462
      case PURCHASE_ORDER_ID:
10463
        return isSetPurchaseOrderId();
10464
      case ITEM_ID:
10465
        return isSetItemId();
10466
      case QUANTITY:
10467
        return isSetQuantity();
10468
      }
10469
      throw new IllegalStateException();
10470
    }
10471
 
10472
    @Override
10473
    public boolean equals(Object that) {
10474
      if (that == null)
10475
        return false;
10476
      if (that instanceof fulfillPO_args)
10477
        return this.equals((fulfillPO_args)that);
10478
      return false;
10479
    }
10480
 
10481
    public boolean equals(fulfillPO_args that) {
10482
      if (that == null)
10483
        return false;
10484
 
10485
      boolean this_present_purchaseOrderId = true;
10486
      boolean that_present_purchaseOrderId = true;
10487
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10488
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10489
          return false;
10490
        if (this.purchaseOrderId != that.purchaseOrderId)
10491
          return false;
10492
      }
10493
 
10494
      boolean this_present_itemId = true;
10495
      boolean that_present_itemId = true;
10496
      if (this_present_itemId || that_present_itemId) {
10497
        if (!(this_present_itemId && that_present_itemId))
10498
          return false;
10499
        if (this.itemId != that.itemId)
10500
          return false;
10501
      }
10502
 
10503
      boolean this_present_quantity = true;
10504
      boolean that_present_quantity = true;
10505
      if (this_present_quantity || that_present_quantity) {
10506
        if (!(this_present_quantity && that_present_quantity))
10507
          return false;
10508
        if (this.quantity != that.quantity)
10509
          return false;
10510
      }
10511
 
10512
      return true;
10513
    }
10514
 
10515
    @Override
10516
    public int hashCode() {
10517
      return 0;
10518
    }
10519
 
10520
    public int compareTo(fulfillPO_args other) {
10521
      if (!getClass().equals(other.getClass())) {
10522
        return getClass().getName().compareTo(other.getClass().getName());
10523
      }
10524
 
10525
      int lastComparison = 0;
10526
      fulfillPO_args typedOther = (fulfillPO_args)other;
10527
 
10528
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10529
      if (lastComparison != 0) {
10530
        return lastComparison;
10531
      }
10532
      if (isSetPurchaseOrderId()) {
10533
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10534
        if (lastComparison != 0) {
10535
          return lastComparison;
10536
        }
10537
      }
10538
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10539
      if (lastComparison != 0) {
10540
        return lastComparison;
10541
      }
10542
      if (isSetItemId()) {
10543
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10544
        if (lastComparison != 0) {
10545
          return lastComparison;
10546
        }
10547
      }
10548
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10549
      if (lastComparison != 0) {
10550
        return lastComparison;
10551
      }
10552
      if (isSetQuantity()) {
10553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10554
        if (lastComparison != 0) {
10555
          return lastComparison;
10556
        }
10557
      }
10558
      return 0;
10559
    }
10560
 
10561
    public _Fields fieldForId(int fieldId) {
10562
      return _Fields.findByThriftId(fieldId);
10563
    }
10564
 
10565
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10566
      org.apache.thrift.protocol.TField field;
10567
      iprot.readStructBegin();
10568
      while (true)
10569
      {
10570
        field = iprot.readFieldBegin();
10571
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10572
          break;
10573
        }
10574
        switch (field.id) {
10575
          case 1: // PURCHASE_ORDER_ID
10576
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10577
              this.purchaseOrderId = iprot.readI64();
10578
              setPurchaseOrderIdIsSet(true);
10579
            } else { 
10580
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10581
            }
10582
            break;
10583
          case 2: // ITEM_ID
10584
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10585
              this.itemId = iprot.readI64();
10586
              setItemIdIsSet(true);
10587
            } else { 
10588
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10589
            }
10590
            break;
10591
          case 3: // QUANTITY
10592
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10593
              this.quantity = iprot.readI64();
10594
              setQuantityIsSet(true);
10595
            } else { 
10596
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10597
            }
10598
            break;
10599
          default:
10600
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10601
        }
10602
        iprot.readFieldEnd();
10603
      }
10604
      iprot.readStructEnd();
10605
      validate();
10606
    }
10607
 
10608
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10609
      validate();
10610
 
10611
      oprot.writeStructBegin(STRUCT_DESC);
10612
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10613
      oprot.writeI64(this.purchaseOrderId);
10614
      oprot.writeFieldEnd();
10615
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10616
      oprot.writeI64(this.itemId);
10617
      oprot.writeFieldEnd();
10618
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10619
      oprot.writeI64(this.quantity);
10620
      oprot.writeFieldEnd();
10621
      oprot.writeFieldStop();
10622
      oprot.writeStructEnd();
10623
    }
10624
 
10625
    @Override
10626
    public String toString() {
10627
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10628
      boolean first = true;
10629
 
10630
      sb.append("purchaseOrderId:");
10631
      sb.append(this.purchaseOrderId);
10632
      first = false;
10633
      if (!first) sb.append(", ");
10634
      sb.append("itemId:");
10635
      sb.append(this.itemId);
10636
      first = false;
10637
      if (!first) sb.append(", ");
10638
      sb.append("quantity:");
10639
      sb.append(this.quantity);
10640
      first = false;
10641
      sb.append(")");
10642
      return sb.toString();
10643
    }
10644
 
10645
    public void validate() throws org.apache.thrift.TException {
10646
      // check for required fields
10647
    }
10648
 
10649
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10650
      try {
10651
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10652
      } catch (org.apache.thrift.TException te) {
10653
        throw new java.io.IOException(te);
10654
      }
10655
    }
10656
 
10657
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10658
      try {
10659
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10660
        __isset_bit_vector = new BitSet(1);
10661
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10662
      } catch (org.apache.thrift.TException te) {
10663
        throw new java.io.IOException(te);
10664
      }
10665
    }
10666
 
10667
  }
10668
 
10669
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10670
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10671
 
10672
    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);
10673
 
10674
    private PurchaseServiceException e; // required
10675
 
10676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10677
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10678
      E((short)1, "e");
10679
 
10680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10681
 
10682
      static {
10683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10684
          byName.put(field.getFieldName(), field);
10685
        }
10686
      }
10687
 
10688
      /**
10689
       * Find the _Fields constant that matches fieldId, or null if its not found.
10690
       */
10691
      public static _Fields findByThriftId(int fieldId) {
10692
        switch(fieldId) {
10693
          case 1: // E
10694
            return E;
10695
          default:
10696
            return null;
10697
        }
10698
      }
10699
 
10700
      /**
10701
       * Find the _Fields constant that matches fieldId, throwing an exception
10702
       * if it is not found.
10703
       */
10704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10705
        _Fields fields = findByThriftId(fieldId);
10706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10707
        return fields;
10708
      }
10709
 
10710
      /**
10711
       * Find the _Fields constant that matches name, or null if its not found.
10712
       */
10713
      public static _Fields findByName(String name) {
10714
        return byName.get(name);
10715
      }
10716
 
10717
      private final short _thriftId;
10718
      private final String _fieldName;
10719
 
10720
      _Fields(short thriftId, String fieldName) {
10721
        _thriftId = thriftId;
10722
        _fieldName = fieldName;
10723
      }
10724
 
10725
      public short getThriftFieldId() {
10726
        return _thriftId;
10727
      }
10728
 
10729
      public String getFieldName() {
10730
        return _fieldName;
10731
      }
10732
    }
10733
 
10734
    // isset id assignments
10735
 
10736
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10737
    static {
10738
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10739
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10740
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10741
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10742
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10743
    }
10744
 
10745
    public fulfillPO_result() {
10746
    }
10747
 
10748
    public fulfillPO_result(
10749
      PurchaseServiceException e)
10750
    {
10751
      this();
10752
      this.e = e;
10753
    }
10754
 
10755
    /**
10756
     * Performs a deep copy on <i>other</i>.
10757
     */
10758
    public fulfillPO_result(fulfillPO_result other) {
10759
      if (other.isSetE()) {
10760
        this.e = new PurchaseServiceException(other.e);
10761
      }
10762
    }
10763
 
10764
    public fulfillPO_result deepCopy() {
10765
      return new fulfillPO_result(this);
10766
    }
10767
 
10768
    @Override
10769
    public void clear() {
10770
      this.e = null;
10771
    }
10772
 
10773
    public PurchaseServiceException getE() {
10774
      return this.e;
10775
    }
10776
 
10777
    public void setE(PurchaseServiceException e) {
10778
      this.e = e;
10779
    }
10780
 
10781
    public void unsetE() {
10782
      this.e = null;
10783
    }
10784
 
10785
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10786
    public boolean isSetE() {
10787
      return this.e != null;
10788
    }
10789
 
10790
    public void setEIsSet(boolean value) {
10791
      if (!value) {
10792
        this.e = null;
10793
      }
10794
    }
10795
 
10796
    public void setFieldValue(_Fields field, Object value) {
10797
      switch (field) {
10798
      case E:
10799
        if (value == null) {
10800
          unsetE();
10801
        } else {
10802
          setE((PurchaseServiceException)value);
10803
        }
10804
        break;
10805
 
10806
      }
10807
    }
10808
 
10809
    public Object getFieldValue(_Fields field) {
10810
      switch (field) {
10811
      case E:
10812
        return getE();
10813
 
10814
      }
10815
      throw new IllegalStateException();
10816
    }
10817
 
10818
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10819
    public boolean isSet(_Fields field) {
10820
      if (field == null) {
10821
        throw new IllegalArgumentException();
10822
      }
10823
 
10824
      switch (field) {
10825
      case E:
10826
        return isSetE();
10827
      }
10828
      throw new IllegalStateException();
10829
    }
10830
 
10831
    @Override
10832
    public boolean equals(Object that) {
10833
      if (that == null)
10834
        return false;
10835
      if (that instanceof fulfillPO_result)
10836
        return this.equals((fulfillPO_result)that);
10837
      return false;
10838
    }
10839
 
10840
    public boolean equals(fulfillPO_result that) {
10841
      if (that == null)
10842
        return false;
10843
 
10844
      boolean this_present_e = true && this.isSetE();
10845
      boolean that_present_e = true && that.isSetE();
10846
      if (this_present_e || that_present_e) {
10847
        if (!(this_present_e && that_present_e))
10848
          return false;
10849
        if (!this.e.equals(that.e))
10850
          return false;
10851
      }
10852
 
10853
      return true;
10854
    }
10855
 
10856
    @Override
10857
    public int hashCode() {
10858
      return 0;
10859
    }
10860
 
10861
    public int compareTo(fulfillPO_result other) {
10862
      if (!getClass().equals(other.getClass())) {
10863
        return getClass().getName().compareTo(other.getClass().getName());
10864
      }
10865
 
10866
      int lastComparison = 0;
10867
      fulfillPO_result typedOther = (fulfillPO_result)other;
10868
 
10869
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10870
      if (lastComparison != 0) {
10871
        return lastComparison;
10872
      }
10873
      if (isSetE()) {
10874
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10875
        if (lastComparison != 0) {
10876
          return lastComparison;
10877
        }
10878
      }
10879
      return 0;
10880
    }
10881
 
10882
    public _Fields fieldForId(int fieldId) {
10883
      return _Fields.findByThriftId(fieldId);
10884
    }
10885
 
10886
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10887
      org.apache.thrift.protocol.TField field;
10888
      iprot.readStructBegin();
10889
      while (true)
10890
      {
10891
        field = iprot.readFieldBegin();
10892
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10893
          break;
10894
        }
10895
        switch (field.id) {
10896
          case 1: // E
10897
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10898
              this.e = new PurchaseServiceException();
10899
              this.e.read(iprot);
10900
            } else { 
10901
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10902
            }
10903
            break;
10904
          default:
10905
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10906
        }
10907
        iprot.readFieldEnd();
10908
      }
10909
      iprot.readStructEnd();
10910
      validate();
10911
    }
10912
 
10913
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10914
      oprot.writeStructBegin(STRUCT_DESC);
10915
 
10916
      if (this.isSetE()) {
10917
        oprot.writeFieldBegin(E_FIELD_DESC);
10918
        this.e.write(oprot);
10919
        oprot.writeFieldEnd();
10920
      }
10921
      oprot.writeFieldStop();
10922
      oprot.writeStructEnd();
10923
    }
10924
 
10925
    @Override
10926
    public String toString() {
10927
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
10928
      boolean first = true;
10929
 
10930
      sb.append("e:");
10931
      if (this.e == null) {
10932
        sb.append("null");
10933
      } else {
10934
        sb.append(this.e);
10935
      }
10936
      first = false;
10937
      sb.append(")");
10938
      return sb.toString();
10939
    }
10940
 
10941
    public void validate() throws org.apache.thrift.TException {
10942
      // check for required fields
10943
    }
10944
 
10945
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10946
      try {
10947
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10948
      } catch (org.apache.thrift.TException te) {
10949
        throw new java.io.IOException(te);
10950
      }
10951
    }
10952
 
10953
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10954
      try {
10955
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10956
      } catch (org.apache.thrift.TException te) {
10957
        throw new java.io.IOException(te);
10958
      }
10959
    }
10960
 
10961
  }
10962
 
10963
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
10964
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
10965
 
10966
    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);
10967
 
10968
    private PurchaseOrder purchaseOrder; // required
10969
 
10970
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10971
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10972
      PURCHASE_ORDER((short)1, "purchaseOrder");
10973
 
10974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10975
 
10976
      static {
10977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10978
          byName.put(field.getFieldName(), field);
10979
        }
10980
      }
10981
 
10982
      /**
10983
       * Find the _Fields constant that matches fieldId, or null if its not found.
10984
       */
10985
      public static _Fields findByThriftId(int fieldId) {
10986
        switch(fieldId) {
10987
          case 1: // PURCHASE_ORDER
10988
            return PURCHASE_ORDER;
10989
          default:
10990
            return null;
10991
        }
10992
      }
10993
 
10994
      /**
10995
       * Find the _Fields constant that matches fieldId, throwing an exception
10996
       * if it is not found.
10997
       */
10998
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10999
        _Fields fields = findByThriftId(fieldId);
11000
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11001
        return fields;
11002
      }
11003
 
11004
      /**
11005
       * Find the _Fields constant that matches name, or null if its not found.
11006
       */
11007
      public static _Fields findByName(String name) {
11008
        return byName.get(name);
11009
      }
11010
 
11011
      private final short _thriftId;
11012
      private final String _fieldName;
11013
 
11014
      _Fields(short thriftId, String fieldName) {
11015
        _thriftId = thriftId;
11016
        _fieldName = fieldName;
11017
      }
11018
 
11019
      public short getThriftFieldId() {
11020
        return _thriftId;
11021
      }
11022
 
11023
      public String getFieldName() {
11024
        return _fieldName;
11025
      }
11026
    }
11027
 
11028
    // isset id assignments
11029
 
11030
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11031
    static {
11032
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11033
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11034
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
11035
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11036
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
11037
    }
11038
 
11039
    public updatePurchaseOrder_args() {
11040
    }
11041
 
11042
    public updatePurchaseOrder_args(
11043
      PurchaseOrder purchaseOrder)
11044
    {
11045
      this();
11046
      this.purchaseOrder = purchaseOrder;
11047
    }
11048
 
11049
    /**
11050
     * Performs a deep copy on <i>other</i>.
11051
     */
11052
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
11053
      if (other.isSetPurchaseOrder()) {
11054
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
11055
      }
11056
    }
11057
 
11058
    public updatePurchaseOrder_args deepCopy() {
11059
      return new updatePurchaseOrder_args(this);
11060
    }
11061
 
11062
    @Override
11063
    public void clear() {
11064
      this.purchaseOrder = null;
11065
    }
11066
 
11067
    public PurchaseOrder getPurchaseOrder() {
11068
      return this.purchaseOrder;
11069
    }
11070
 
11071
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
11072
      this.purchaseOrder = purchaseOrder;
11073
    }
11074
 
11075
    public void unsetPurchaseOrder() {
11076
      this.purchaseOrder = null;
11077
    }
11078
 
11079
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
11080
    public boolean isSetPurchaseOrder() {
11081
      return this.purchaseOrder != null;
11082
    }
11083
 
11084
    public void setPurchaseOrderIsSet(boolean value) {
11085
      if (!value) {
11086
        this.purchaseOrder = null;
11087
      }
11088
    }
11089
 
11090
    public void setFieldValue(_Fields field, Object value) {
11091
      switch (field) {
11092
      case PURCHASE_ORDER:
11093
        if (value == null) {
11094
          unsetPurchaseOrder();
11095
        } else {
11096
          setPurchaseOrder((PurchaseOrder)value);
11097
        }
11098
        break;
11099
 
11100
      }
11101
    }
11102
 
11103
    public Object getFieldValue(_Fields field) {
11104
      switch (field) {
11105
      case PURCHASE_ORDER:
11106
        return getPurchaseOrder();
11107
 
11108
      }
11109
      throw new IllegalStateException();
11110
    }
11111
 
11112
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11113
    public boolean isSet(_Fields field) {
11114
      if (field == null) {
11115
        throw new IllegalArgumentException();
11116
      }
11117
 
11118
      switch (field) {
11119
      case PURCHASE_ORDER:
11120
        return isSetPurchaseOrder();
11121
      }
11122
      throw new IllegalStateException();
11123
    }
11124
 
11125
    @Override
11126
    public boolean equals(Object that) {
11127
      if (that == null)
11128
        return false;
11129
      if (that instanceof updatePurchaseOrder_args)
11130
        return this.equals((updatePurchaseOrder_args)that);
11131
      return false;
11132
    }
11133
 
11134
    public boolean equals(updatePurchaseOrder_args that) {
11135
      if (that == null)
11136
        return false;
11137
 
11138
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
11139
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
11140
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
11141
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
11142
          return false;
11143
        if (!this.purchaseOrder.equals(that.purchaseOrder))
11144
          return false;
11145
      }
11146
 
11147
      return true;
11148
    }
11149
 
11150
    @Override
11151
    public int hashCode() {
11152
      return 0;
11153
    }
11154
 
11155
    public int compareTo(updatePurchaseOrder_args other) {
11156
      if (!getClass().equals(other.getClass())) {
11157
        return getClass().getName().compareTo(other.getClass().getName());
11158
      }
11159
 
11160
      int lastComparison = 0;
11161
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
11162
 
11163
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
11164
      if (lastComparison != 0) {
11165
        return lastComparison;
11166
      }
11167
      if (isSetPurchaseOrder()) {
11168
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
11169
        if (lastComparison != 0) {
11170
          return lastComparison;
11171
        }
11172
      }
11173
      return 0;
11174
    }
11175
 
11176
    public _Fields fieldForId(int fieldId) {
11177
      return _Fields.findByThriftId(fieldId);
11178
    }
11179
 
11180
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11181
      org.apache.thrift.protocol.TField field;
11182
      iprot.readStructBegin();
11183
      while (true)
11184
      {
11185
        field = iprot.readFieldBegin();
11186
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11187
          break;
11188
        }
11189
        switch (field.id) {
11190
          case 1: // PURCHASE_ORDER
11191
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11192
              this.purchaseOrder = new PurchaseOrder();
11193
              this.purchaseOrder.read(iprot);
11194
            } else { 
11195
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11196
            }
11197
            break;
11198
          default:
11199
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11200
        }
11201
        iprot.readFieldEnd();
11202
      }
11203
      iprot.readStructEnd();
11204
      validate();
11205
    }
11206
 
11207
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11208
      validate();
11209
 
11210
      oprot.writeStructBegin(STRUCT_DESC);
11211
      if (this.purchaseOrder != null) {
11212
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
11213
        this.purchaseOrder.write(oprot);
11214
        oprot.writeFieldEnd();
11215
      }
11216
      oprot.writeFieldStop();
11217
      oprot.writeStructEnd();
11218
    }
11219
 
11220
    @Override
11221
    public String toString() {
11222
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
11223
      boolean first = true;
11224
 
11225
      sb.append("purchaseOrder:");
11226
      if (this.purchaseOrder == null) {
11227
        sb.append("null");
11228
      } else {
11229
        sb.append(this.purchaseOrder);
11230
      }
11231
      first = false;
11232
      sb.append(")");
11233
      return sb.toString();
11234
    }
11235
 
11236
    public void validate() throws org.apache.thrift.TException {
11237
      // check for required fields
11238
    }
11239
 
11240
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11241
      try {
11242
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11243
      } catch (org.apache.thrift.TException te) {
11244
        throw new java.io.IOException(te);
11245
      }
11246
    }
11247
 
11248
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11249
      try {
11250
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11251
      } catch (org.apache.thrift.TException te) {
11252
        throw new java.io.IOException(te);
11253
      }
11254
    }
11255
 
11256
  }
11257
 
11258
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
11259
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
11260
 
11261
    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);
11262
 
11263
    private PurchaseServiceException e; // required
11264
 
11265
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11266
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11267
      E((short)1, "e");
11268
 
11269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11270
 
11271
      static {
11272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11273
          byName.put(field.getFieldName(), field);
11274
        }
11275
      }
11276
 
11277
      /**
11278
       * Find the _Fields constant that matches fieldId, or null if its not found.
11279
       */
11280
      public static _Fields findByThriftId(int fieldId) {
11281
        switch(fieldId) {
11282
          case 1: // E
11283
            return E;
11284
          default:
11285
            return null;
11286
        }
11287
      }
11288
 
11289
      /**
11290
       * Find the _Fields constant that matches fieldId, throwing an exception
11291
       * if it is not found.
11292
       */
11293
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11294
        _Fields fields = findByThriftId(fieldId);
11295
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11296
        return fields;
11297
      }
11298
 
11299
      /**
11300
       * Find the _Fields constant that matches name, or null if its not found.
11301
       */
11302
      public static _Fields findByName(String name) {
11303
        return byName.get(name);
11304
      }
11305
 
11306
      private final short _thriftId;
11307
      private final String _fieldName;
11308
 
11309
      _Fields(short thriftId, String fieldName) {
11310
        _thriftId = thriftId;
11311
        _fieldName = fieldName;
11312
      }
11313
 
11314
      public short getThriftFieldId() {
11315
        return _thriftId;
11316
      }
11317
 
11318
      public String getFieldName() {
11319
        return _fieldName;
11320
      }
11321
    }
11322
 
11323
    // isset id assignments
11324
 
11325
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11326
    static {
11327
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11328
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11329
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11330
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11331
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
11332
    }
11333
 
11334
    public updatePurchaseOrder_result() {
11335
    }
11336
 
11337
    public updatePurchaseOrder_result(
11338
      PurchaseServiceException e)
11339
    {
11340
      this();
11341
      this.e = e;
11342
    }
11343
 
11344
    /**
11345
     * Performs a deep copy on <i>other</i>.
11346
     */
11347
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
11348
      if (other.isSetE()) {
11349
        this.e = new PurchaseServiceException(other.e);
11350
      }
11351
    }
11352
 
11353
    public updatePurchaseOrder_result deepCopy() {
11354
      return new updatePurchaseOrder_result(this);
11355
    }
11356
 
11357
    @Override
11358
    public void clear() {
11359
      this.e = null;
11360
    }
11361
 
11362
    public PurchaseServiceException getE() {
11363
      return this.e;
11364
    }
11365
 
11366
    public void setE(PurchaseServiceException e) {
11367
      this.e = e;
11368
    }
11369
 
11370
    public void unsetE() {
11371
      this.e = null;
11372
    }
11373
 
11374
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11375
    public boolean isSetE() {
11376
      return this.e != null;
11377
    }
11378
 
11379
    public void setEIsSet(boolean value) {
11380
      if (!value) {
11381
        this.e = null;
11382
      }
11383
    }
11384
 
11385
    public void setFieldValue(_Fields field, Object value) {
11386
      switch (field) {
11387
      case E:
11388
        if (value == null) {
11389
          unsetE();
11390
        } else {
11391
          setE((PurchaseServiceException)value);
11392
        }
11393
        break;
11394
 
11395
      }
11396
    }
11397
 
11398
    public Object getFieldValue(_Fields field) {
11399
      switch (field) {
11400
      case E:
11401
        return getE();
11402
 
11403
      }
11404
      throw new IllegalStateException();
11405
    }
11406
 
11407
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11408
    public boolean isSet(_Fields field) {
11409
      if (field == null) {
11410
        throw new IllegalArgumentException();
11411
      }
11412
 
11413
      switch (field) {
11414
      case E:
11415
        return isSetE();
11416
      }
11417
      throw new IllegalStateException();
11418
    }
11419
 
11420
    @Override
11421
    public boolean equals(Object that) {
11422
      if (that == null)
11423
        return false;
11424
      if (that instanceof updatePurchaseOrder_result)
11425
        return this.equals((updatePurchaseOrder_result)that);
11426
      return false;
11427
    }
11428
 
11429
    public boolean equals(updatePurchaseOrder_result that) {
11430
      if (that == null)
11431
        return false;
11432
 
11433
      boolean this_present_e = true && this.isSetE();
11434
      boolean that_present_e = true && that.isSetE();
11435
      if (this_present_e || that_present_e) {
11436
        if (!(this_present_e && that_present_e))
11437
          return false;
11438
        if (!this.e.equals(that.e))
11439
          return false;
11440
      }
11441
 
11442
      return true;
11443
    }
11444
 
11445
    @Override
11446
    public int hashCode() {
11447
      return 0;
11448
    }
11449
 
11450
    public int compareTo(updatePurchaseOrder_result other) {
11451
      if (!getClass().equals(other.getClass())) {
11452
        return getClass().getName().compareTo(other.getClass().getName());
11453
      }
11454
 
11455
      int lastComparison = 0;
11456
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11457
 
11458
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11459
      if (lastComparison != 0) {
11460
        return lastComparison;
11461
      }
11462
      if (isSetE()) {
11463
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11464
        if (lastComparison != 0) {
11465
          return lastComparison;
11466
        }
11467
      }
11468
      return 0;
11469
    }
11470
 
11471
    public _Fields fieldForId(int fieldId) {
11472
      return _Fields.findByThriftId(fieldId);
11473
    }
11474
 
11475
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11476
      org.apache.thrift.protocol.TField field;
11477
      iprot.readStructBegin();
11478
      while (true)
11479
      {
11480
        field = iprot.readFieldBegin();
11481
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11482
          break;
11483
        }
11484
        switch (field.id) {
11485
          case 1: // E
11486
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11487
              this.e = new PurchaseServiceException();
11488
              this.e.read(iprot);
11489
            } else { 
11490
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11491
            }
11492
            break;
11493
          default:
11494
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11495
        }
11496
        iprot.readFieldEnd();
11497
      }
11498
      iprot.readStructEnd();
11499
      validate();
11500
    }
11501
 
11502
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11503
      oprot.writeStructBegin(STRUCT_DESC);
11504
 
11505
      if (this.isSetE()) {
11506
        oprot.writeFieldBegin(E_FIELD_DESC);
11507
        this.e.write(oprot);
11508
        oprot.writeFieldEnd();
11509
      }
11510
      oprot.writeFieldStop();
11511
      oprot.writeStructEnd();
11512
    }
11513
 
11514
    @Override
11515
    public String toString() {
11516
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11517
      boolean first = true;
11518
 
11519
      sb.append("e:");
11520
      if (this.e == null) {
11521
        sb.append("null");
11522
      } else {
11523
        sb.append(this.e);
11524
      }
11525
      first = false;
11526
      sb.append(")");
11527
      return sb.toString();
11528
    }
11529
 
11530
    public void validate() throws org.apache.thrift.TException {
11531
      // check for required fields
11532
    }
11533
 
11534
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11535
      try {
11536
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11537
      } catch (org.apache.thrift.TException te) {
11538
        throw new java.io.IOException(te);
11539
      }
11540
    }
11541
 
11542
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11543
      try {
11544
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11545
      } catch (org.apache.thrift.TException te) {
11546
        throw new java.io.IOException(te);
11547
      }
11548
    }
11549
 
11550
  }
11551
 
5185 mandeep.dh 11552
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11553
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11554
 
11555
    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);
11556
    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);
11557
    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);
11558
 
11559
    private long purchaseId; // required
11560
    private long itemId; // required
11561
    private long quantity; // required
11562
 
11563
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11564
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11565
      PURCHASE_ID((short)1, "purchaseId"),
11566
      ITEM_ID((short)2, "itemId"),
11567
      QUANTITY((short)3, "quantity");
11568
 
11569
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11570
 
11571
      static {
11572
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11573
          byName.put(field.getFieldName(), field);
11574
        }
11575
      }
11576
 
11577
      /**
11578
       * Find the _Fields constant that matches fieldId, or null if its not found.
11579
       */
11580
      public static _Fields findByThriftId(int fieldId) {
11581
        switch(fieldId) {
11582
          case 1: // PURCHASE_ID
11583
            return PURCHASE_ID;
11584
          case 2: // ITEM_ID
11585
            return ITEM_ID;
11586
          case 3: // QUANTITY
11587
            return QUANTITY;
11588
          default:
11589
            return null;
11590
        }
11591
      }
11592
 
11593
      /**
11594
       * Find the _Fields constant that matches fieldId, throwing an exception
11595
       * if it is not found.
11596
       */
11597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11598
        _Fields fields = findByThriftId(fieldId);
11599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11600
        return fields;
11601
      }
11602
 
11603
      /**
11604
       * Find the _Fields constant that matches name, or null if its not found.
11605
       */
11606
      public static _Fields findByName(String name) {
11607
        return byName.get(name);
11608
      }
11609
 
11610
      private final short _thriftId;
11611
      private final String _fieldName;
11612
 
11613
      _Fields(short thriftId, String fieldName) {
11614
        _thriftId = thriftId;
11615
        _fieldName = fieldName;
11616
      }
11617
 
11618
      public short getThriftFieldId() {
11619
        return _thriftId;
11620
      }
11621
 
11622
      public String getFieldName() {
11623
        return _fieldName;
11624
      }
11625
    }
11626
 
11627
    // isset id assignments
11628
    private static final int __PURCHASEID_ISSET_ID = 0;
11629
    private static final int __ITEMID_ISSET_ID = 1;
11630
    private static final int __QUANTITY_ISSET_ID = 2;
11631
    private BitSet __isset_bit_vector = new BitSet(3);
11632
 
11633
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11634
    static {
11635
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11636
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11637
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11638
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11639
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11640
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11641
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11642
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11643
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11644
    }
11645
 
11646
    public unFulfillPO_args() {
11647
    }
11648
 
11649
    public unFulfillPO_args(
11650
      long purchaseId,
11651
      long itemId,
11652
      long quantity)
11653
    {
11654
      this();
11655
      this.purchaseId = purchaseId;
11656
      setPurchaseIdIsSet(true);
11657
      this.itemId = itemId;
11658
      setItemIdIsSet(true);
11659
      this.quantity = quantity;
11660
      setQuantityIsSet(true);
11661
    }
11662
 
11663
    /**
11664
     * Performs a deep copy on <i>other</i>.
11665
     */
11666
    public unFulfillPO_args(unFulfillPO_args other) {
11667
      __isset_bit_vector.clear();
11668
      __isset_bit_vector.or(other.__isset_bit_vector);
11669
      this.purchaseId = other.purchaseId;
11670
      this.itemId = other.itemId;
11671
      this.quantity = other.quantity;
11672
    }
11673
 
11674
    public unFulfillPO_args deepCopy() {
11675
      return new unFulfillPO_args(this);
11676
    }
11677
 
11678
    @Override
11679
    public void clear() {
11680
      setPurchaseIdIsSet(false);
11681
      this.purchaseId = 0;
11682
      setItemIdIsSet(false);
11683
      this.itemId = 0;
11684
      setQuantityIsSet(false);
11685
      this.quantity = 0;
11686
    }
11687
 
11688
    public long getPurchaseId() {
11689
      return this.purchaseId;
11690
    }
11691
 
11692
    public void setPurchaseId(long purchaseId) {
11693
      this.purchaseId = purchaseId;
11694
      setPurchaseIdIsSet(true);
11695
    }
11696
 
11697
    public void unsetPurchaseId() {
11698
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11699
    }
11700
 
11701
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11702
    public boolean isSetPurchaseId() {
11703
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11704
    }
11705
 
11706
    public void setPurchaseIdIsSet(boolean value) {
11707
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11708
    }
11709
 
11710
    public long getItemId() {
11711
      return this.itemId;
11712
    }
11713
 
11714
    public void setItemId(long itemId) {
11715
      this.itemId = itemId;
11716
      setItemIdIsSet(true);
11717
    }
11718
 
11719
    public void unsetItemId() {
11720
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11721
    }
11722
 
11723
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11724
    public boolean isSetItemId() {
11725
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11726
    }
11727
 
11728
    public void setItemIdIsSet(boolean value) {
11729
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11730
    }
11731
 
11732
    public long getQuantity() {
11733
      return this.quantity;
11734
    }
11735
 
11736
    public void setQuantity(long quantity) {
11737
      this.quantity = quantity;
11738
      setQuantityIsSet(true);
11739
    }
11740
 
11741
    public void unsetQuantity() {
11742
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11743
    }
11744
 
11745
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11746
    public boolean isSetQuantity() {
11747
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11748
    }
11749
 
11750
    public void setQuantityIsSet(boolean value) {
11751
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11752
    }
11753
 
11754
    public void setFieldValue(_Fields field, Object value) {
11755
      switch (field) {
11756
      case PURCHASE_ID:
11757
        if (value == null) {
11758
          unsetPurchaseId();
11759
        } else {
11760
          setPurchaseId((Long)value);
11761
        }
11762
        break;
11763
 
11764
      case ITEM_ID:
11765
        if (value == null) {
11766
          unsetItemId();
11767
        } else {
11768
          setItemId((Long)value);
11769
        }
11770
        break;
11771
 
11772
      case QUANTITY:
11773
        if (value == null) {
11774
          unsetQuantity();
11775
        } else {
11776
          setQuantity((Long)value);
11777
        }
11778
        break;
11779
 
11780
      }
11781
    }
11782
 
11783
    public Object getFieldValue(_Fields field) {
11784
      switch (field) {
11785
      case PURCHASE_ID:
11786
        return Long.valueOf(getPurchaseId());
11787
 
11788
      case ITEM_ID:
11789
        return Long.valueOf(getItemId());
11790
 
11791
      case QUANTITY:
11792
        return Long.valueOf(getQuantity());
11793
 
11794
      }
11795
      throw new IllegalStateException();
11796
    }
11797
 
11798
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11799
    public boolean isSet(_Fields field) {
11800
      if (field == null) {
11801
        throw new IllegalArgumentException();
11802
      }
11803
 
11804
      switch (field) {
11805
      case PURCHASE_ID:
11806
        return isSetPurchaseId();
11807
      case ITEM_ID:
11808
        return isSetItemId();
11809
      case QUANTITY:
11810
        return isSetQuantity();
11811
      }
11812
      throw new IllegalStateException();
11813
    }
11814
 
11815
    @Override
11816
    public boolean equals(Object that) {
11817
      if (that == null)
11818
        return false;
11819
      if (that instanceof unFulfillPO_args)
11820
        return this.equals((unFulfillPO_args)that);
11821
      return false;
11822
    }
11823
 
11824
    public boolean equals(unFulfillPO_args that) {
11825
      if (that == null)
11826
        return false;
11827
 
11828
      boolean this_present_purchaseId = true;
11829
      boolean that_present_purchaseId = true;
11830
      if (this_present_purchaseId || that_present_purchaseId) {
11831
        if (!(this_present_purchaseId && that_present_purchaseId))
11832
          return false;
11833
        if (this.purchaseId != that.purchaseId)
11834
          return false;
11835
      }
11836
 
11837
      boolean this_present_itemId = true;
11838
      boolean that_present_itemId = true;
11839
      if (this_present_itemId || that_present_itemId) {
11840
        if (!(this_present_itemId && that_present_itemId))
11841
          return false;
11842
        if (this.itemId != that.itemId)
11843
          return false;
11844
      }
11845
 
11846
      boolean this_present_quantity = true;
11847
      boolean that_present_quantity = true;
11848
      if (this_present_quantity || that_present_quantity) {
11849
        if (!(this_present_quantity && that_present_quantity))
11850
          return false;
11851
        if (this.quantity != that.quantity)
11852
          return false;
11853
      }
11854
 
11855
      return true;
11856
    }
11857
 
11858
    @Override
11859
    public int hashCode() {
11860
      return 0;
11861
    }
11862
 
11863
    public int compareTo(unFulfillPO_args other) {
11864
      if (!getClass().equals(other.getClass())) {
11865
        return getClass().getName().compareTo(other.getClass().getName());
11866
      }
11867
 
11868
      int lastComparison = 0;
11869
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11870
 
11871
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11872
      if (lastComparison != 0) {
11873
        return lastComparison;
11874
      }
11875
      if (isSetPurchaseId()) {
11876
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11877
        if (lastComparison != 0) {
11878
          return lastComparison;
11879
        }
11880
      }
11881
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11882
      if (lastComparison != 0) {
11883
        return lastComparison;
11884
      }
11885
      if (isSetItemId()) {
11886
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11887
        if (lastComparison != 0) {
11888
          return lastComparison;
11889
        }
11890
      }
11891
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11892
      if (lastComparison != 0) {
11893
        return lastComparison;
11894
      }
11895
      if (isSetQuantity()) {
11896
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11897
        if (lastComparison != 0) {
11898
          return lastComparison;
11899
        }
11900
      }
11901
      return 0;
11902
    }
11903
 
11904
    public _Fields fieldForId(int fieldId) {
11905
      return _Fields.findByThriftId(fieldId);
11906
    }
11907
 
11908
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11909
      org.apache.thrift.protocol.TField field;
11910
      iprot.readStructBegin();
11911
      while (true)
11912
      {
11913
        field = iprot.readFieldBegin();
11914
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11915
          break;
11916
        }
11917
        switch (field.id) {
11918
          case 1: // PURCHASE_ID
11919
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11920
              this.purchaseId = iprot.readI64();
11921
              setPurchaseIdIsSet(true);
11922
            } else { 
11923
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11924
            }
11925
            break;
11926
          case 2: // ITEM_ID
11927
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11928
              this.itemId = iprot.readI64();
11929
              setItemIdIsSet(true);
11930
            } else { 
11931
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11932
            }
11933
            break;
11934
          case 3: // QUANTITY
11935
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11936
              this.quantity = iprot.readI64();
11937
              setQuantityIsSet(true);
11938
            } else { 
11939
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11940
            }
11941
            break;
11942
          default:
11943
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11944
        }
11945
        iprot.readFieldEnd();
11946
      }
11947
      iprot.readStructEnd();
11948
      validate();
11949
    }
11950
 
11951
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11952
      validate();
11953
 
11954
      oprot.writeStructBegin(STRUCT_DESC);
11955
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
11956
      oprot.writeI64(this.purchaseId);
11957
      oprot.writeFieldEnd();
11958
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11959
      oprot.writeI64(this.itemId);
11960
      oprot.writeFieldEnd();
11961
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11962
      oprot.writeI64(this.quantity);
11963
      oprot.writeFieldEnd();
11964
      oprot.writeFieldStop();
11965
      oprot.writeStructEnd();
11966
    }
11967
 
11968
    @Override
11969
    public String toString() {
11970
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
11971
      boolean first = true;
11972
 
11973
      sb.append("purchaseId:");
11974
      sb.append(this.purchaseId);
11975
      first = false;
11976
      if (!first) sb.append(", ");
11977
      sb.append("itemId:");
11978
      sb.append(this.itemId);
11979
      first = false;
11980
      if (!first) sb.append(", ");
11981
      sb.append("quantity:");
11982
      sb.append(this.quantity);
11983
      first = false;
11984
      sb.append(")");
11985
      return sb.toString();
11986
    }
11987
 
11988
    public void validate() throws org.apache.thrift.TException {
11989
      // check for required fields
11990
    }
11991
 
11992
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11993
      try {
11994
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11995
      } catch (org.apache.thrift.TException te) {
11996
        throw new java.io.IOException(te);
11997
      }
11998
    }
11999
 
12000
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12001
      try {
12002
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12003
        __isset_bit_vector = new BitSet(1);
12004
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12005
      } catch (org.apache.thrift.TException te) {
12006
        throw new java.io.IOException(te);
12007
      }
12008
    }
12009
 
12010
  }
12011
 
12012
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
12013
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
12014
 
12015
    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);
12016
 
12017
    private PurchaseServiceException e; // required
12018
 
12019
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12020
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12021
      E((short)1, "e");
12022
 
12023
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12024
 
12025
      static {
12026
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12027
          byName.put(field.getFieldName(), field);
12028
        }
12029
      }
12030
 
12031
      /**
12032
       * Find the _Fields constant that matches fieldId, or null if its not found.
12033
       */
12034
      public static _Fields findByThriftId(int fieldId) {
12035
        switch(fieldId) {
12036
          case 1: // E
12037
            return E;
12038
          default:
12039
            return null;
12040
        }
12041
      }
12042
 
12043
      /**
12044
       * Find the _Fields constant that matches fieldId, throwing an exception
12045
       * if it is not found.
12046
       */
12047
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12048
        _Fields fields = findByThriftId(fieldId);
12049
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12050
        return fields;
12051
      }
12052
 
12053
      /**
12054
       * Find the _Fields constant that matches name, or null if its not found.
12055
       */
12056
      public static _Fields findByName(String name) {
12057
        return byName.get(name);
12058
      }
12059
 
12060
      private final short _thriftId;
12061
      private final String _fieldName;
12062
 
12063
      _Fields(short thriftId, String fieldName) {
12064
        _thriftId = thriftId;
12065
        _fieldName = fieldName;
12066
      }
12067
 
12068
      public short getThriftFieldId() {
12069
        return _thriftId;
12070
      }
12071
 
12072
      public String getFieldName() {
12073
        return _fieldName;
12074
      }
12075
    }
12076
 
12077
    // isset id assignments
12078
 
12079
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12080
    static {
12081
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12082
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12083
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12084
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12085
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
12086
    }
12087
 
12088
    public unFulfillPO_result() {
12089
    }
12090
 
12091
    public unFulfillPO_result(
12092
      PurchaseServiceException e)
12093
    {
12094
      this();
12095
      this.e = e;
12096
    }
12097
 
12098
    /**
12099
     * Performs a deep copy on <i>other</i>.
12100
     */
12101
    public unFulfillPO_result(unFulfillPO_result other) {
12102
      if (other.isSetE()) {
12103
        this.e = new PurchaseServiceException(other.e);
12104
      }
12105
    }
12106
 
12107
    public unFulfillPO_result deepCopy() {
12108
      return new unFulfillPO_result(this);
12109
    }
12110
 
12111
    @Override
12112
    public void clear() {
12113
      this.e = null;
12114
    }
12115
 
12116
    public PurchaseServiceException getE() {
12117
      return this.e;
12118
    }
12119
 
12120
    public void setE(PurchaseServiceException e) {
12121
      this.e = e;
12122
    }
12123
 
12124
    public void unsetE() {
12125
      this.e = null;
12126
    }
12127
 
12128
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12129
    public boolean isSetE() {
12130
      return this.e != null;
12131
    }
12132
 
12133
    public void setEIsSet(boolean value) {
12134
      if (!value) {
12135
        this.e = null;
12136
      }
12137
    }
12138
 
12139
    public void setFieldValue(_Fields field, Object value) {
12140
      switch (field) {
12141
      case E:
12142
        if (value == null) {
12143
          unsetE();
12144
        } else {
12145
          setE((PurchaseServiceException)value);
12146
        }
12147
        break;
12148
 
12149
      }
12150
    }
12151
 
12152
    public Object getFieldValue(_Fields field) {
12153
      switch (field) {
12154
      case E:
12155
        return getE();
12156
 
12157
      }
12158
      throw new IllegalStateException();
12159
    }
12160
 
12161
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12162
    public boolean isSet(_Fields field) {
12163
      if (field == null) {
12164
        throw new IllegalArgumentException();
12165
      }
12166
 
12167
      switch (field) {
12168
      case E:
12169
        return isSetE();
12170
      }
12171
      throw new IllegalStateException();
12172
    }
12173
 
12174
    @Override
12175
    public boolean equals(Object that) {
12176
      if (that == null)
12177
        return false;
12178
      if (that instanceof unFulfillPO_result)
12179
        return this.equals((unFulfillPO_result)that);
12180
      return false;
12181
    }
12182
 
12183
    public boolean equals(unFulfillPO_result that) {
12184
      if (that == null)
12185
        return false;
12186
 
12187
      boolean this_present_e = true && this.isSetE();
12188
      boolean that_present_e = true && that.isSetE();
12189
      if (this_present_e || that_present_e) {
12190
        if (!(this_present_e && that_present_e))
12191
          return false;
12192
        if (!this.e.equals(that.e))
12193
          return false;
12194
      }
12195
 
12196
      return true;
12197
    }
12198
 
12199
    @Override
12200
    public int hashCode() {
12201
      return 0;
12202
    }
12203
 
12204
    public int compareTo(unFulfillPO_result other) {
12205
      if (!getClass().equals(other.getClass())) {
12206
        return getClass().getName().compareTo(other.getClass().getName());
12207
      }
12208
 
12209
      int lastComparison = 0;
12210
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
12211
 
12212
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12213
      if (lastComparison != 0) {
12214
        return lastComparison;
12215
      }
12216
      if (isSetE()) {
12217
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12218
        if (lastComparison != 0) {
12219
          return lastComparison;
12220
        }
12221
      }
12222
      return 0;
12223
    }
12224
 
12225
    public _Fields fieldForId(int fieldId) {
12226
      return _Fields.findByThriftId(fieldId);
12227
    }
12228
 
12229
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12230
      org.apache.thrift.protocol.TField field;
12231
      iprot.readStructBegin();
12232
      while (true)
12233
      {
12234
        field = iprot.readFieldBegin();
12235
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12236
          break;
12237
        }
12238
        switch (field.id) {
12239
          case 1: // E
12240
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12241
              this.e = new PurchaseServiceException();
12242
              this.e.read(iprot);
12243
            } else { 
12244
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12245
            }
12246
            break;
12247
          default:
12248
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12249
        }
12250
        iprot.readFieldEnd();
12251
      }
12252
      iprot.readStructEnd();
12253
      validate();
12254
    }
12255
 
12256
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12257
      oprot.writeStructBegin(STRUCT_DESC);
12258
 
12259
      if (this.isSetE()) {
12260
        oprot.writeFieldBegin(E_FIELD_DESC);
12261
        this.e.write(oprot);
12262
        oprot.writeFieldEnd();
12263
      }
12264
      oprot.writeFieldStop();
12265
      oprot.writeStructEnd();
12266
    }
12267
 
12268
    @Override
12269
    public String toString() {
12270
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
12271
      boolean first = true;
12272
 
12273
      sb.append("e:");
12274
      if (this.e == null) {
12275
        sb.append("null");
12276
      } else {
12277
        sb.append(this.e);
12278
      }
12279
      first = false;
12280
      sb.append(")");
12281
      return sb.toString();
12282
    }
12283
 
12284
    public void validate() throws org.apache.thrift.TException {
12285
      // check for required fields
12286
    }
12287
 
12288
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12289
      try {
12290
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12291
      } catch (org.apache.thrift.TException te) {
12292
        throw new java.io.IOException(te);
12293
      }
12294
    }
12295
 
12296
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12297
      try {
12298
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12299
      } catch (org.apache.thrift.TException te) {
12300
        throw new java.io.IOException(te);
12301
      }
12302
    }
12303
 
12304
  }
12305
 
5443 mandeep.dh 12306
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
12307
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
12308
 
12309
    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);
12310
 
12311
    private long date; // required
12312
 
12313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12314
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12315
      DATE((short)1, "date");
12316
 
12317
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12318
 
12319
      static {
12320
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12321
          byName.put(field.getFieldName(), field);
12322
        }
12323
      }
12324
 
12325
      /**
12326
       * Find the _Fields constant that matches fieldId, or null if its not found.
12327
       */
12328
      public static _Fields findByThriftId(int fieldId) {
12329
        switch(fieldId) {
12330
          case 1: // DATE
12331
            return DATE;
12332
          default:
12333
            return null;
12334
        }
12335
      }
12336
 
12337
      /**
12338
       * Find the _Fields constant that matches fieldId, throwing an exception
12339
       * if it is not found.
12340
       */
12341
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12342
        _Fields fields = findByThriftId(fieldId);
12343
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12344
        return fields;
12345
      }
12346
 
12347
      /**
12348
       * Find the _Fields constant that matches name, or null if its not found.
12349
       */
12350
      public static _Fields findByName(String name) {
12351
        return byName.get(name);
12352
      }
12353
 
12354
      private final short _thriftId;
12355
      private final String _fieldName;
12356
 
12357
      _Fields(short thriftId, String fieldName) {
12358
        _thriftId = thriftId;
12359
        _fieldName = fieldName;
12360
      }
12361
 
12362
      public short getThriftFieldId() {
12363
        return _thriftId;
12364
      }
12365
 
12366
      public String getFieldName() {
12367
        return _fieldName;
12368
      }
12369
    }
12370
 
12371
    // isset id assignments
12372
    private static final int __DATE_ISSET_ID = 0;
12373
    private BitSet __isset_bit_vector = new BitSet(1);
12374
 
12375
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12376
    static {
12377
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12378
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12379
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12380
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12381
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12382
    }
12383
 
12384
    public getInvoices_args() {
12385
    }
12386
 
12387
    public getInvoices_args(
12388
      long date)
12389
    {
12390
      this();
12391
      this.date = date;
12392
      setDateIsSet(true);
12393
    }
12394
 
12395
    /**
12396
     * Performs a deep copy on <i>other</i>.
12397
     */
12398
    public getInvoices_args(getInvoices_args other) {
12399
      __isset_bit_vector.clear();
12400
      __isset_bit_vector.or(other.__isset_bit_vector);
12401
      this.date = other.date;
12402
    }
12403
 
12404
    public getInvoices_args deepCopy() {
12405
      return new getInvoices_args(this);
12406
    }
12407
 
12408
    @Override
12409
    public void clear() {
12410
      setDateIsSet(false);
12411
      this.date = 0;
12412
    }
12413
 
12414
    public long getDate() {
12415
      return this.date;
12416
    }
12417
 
12418
    public void setDate(long date) {
12419
      this.date = date;
12420
      setDateIsSet(true);
12421
    }
12422
 
12423
    public void unsetDate() {
12424
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12425
    }
12426
 
12427
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12428
    public boolean isSetDate() {
12429
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12430
    }
12431
 
12432
    public void setDateIsSet(boolean value) {
12433
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12434
    }
12435
 
12436
    public void setFieldValue(_Fields field, Object value) {
12437
      switch (field) {
12438
      case DATE:
12439
        if (value == null) {
12440
          unsetDate();
12441
        } else {
12442
          setDate((Long)value);
12443
        }
12444
        break;
12445
 
12446
      }
12447
    }
12448
 
12449
    public Object getFieldValue(_Fields field) {
12450
      switch (field) {
12451
      case DATE:
12452
        return Long.valueOf(getDate());
12453
 
12454
      }
12455
      throw new IllegalStateException();
12456
    }
12457
 
12458
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12459
    public boolean isSet(_Fields field) {
12460
      if (field == null) {
12461
        throw new IllegalArgumentException();
12462
      }
12463
 
12464
      switch (field) {
12465
      case DATE:
12466
        return isSetDate();
12467
      }
12468
      throw new IllegalStateException();
12469
    }
12470
 
12471
    @Override
12472
    public boolean equals(Object that) {
12473
      if (that == null)
12474
        return false;
12475
      if (that instanceof getInvoices_args)
12476
        return this.equals((getInvoices_args)that);
12477
      return false;
12478
    }
12479
 
12480
    public boolean equals(getInvoices_args that) {
12481
      if (that == null)
12482
        return false;
12483
 
12484
      boolean this_present_date = true;
12485
      boolean that_present_date = true;
12486
      if (this_present_date || that_present_date) {
12487
        if (!(this_present_date && that_present_date))
12488
          return false;
12489
        if (this.date != that.date)
12490
          return false;
12491
      }
12492
 
12493
      return true;
12494
    }
12495
 
12496
    @Override
12497
    public int hashCode() {
12498
      return 0;
12499
    }
12500
 
12501
    public int compareTo(getInvoices_args other) {
12502
      if (!getClass().equals(other.getClass())) {
12503
        return getClass().getName().compareTo(other.getClass().getName());
12504
      }
12505
 
12506
      int lastComparison = 0;
12507
      getInvoices_args typedOther = (getInvoices_args)other;
12508
 
12509
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12510
      if (lastComparison != 0) {
12511
        return lastComparison;
12512
      }
12513
      if (isSetDate()) {
12514
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12515
        if (lastComparison != 0) {
12516
          return lastComparison;
12517
        }
12518
      }
12519
      return 0;
12520
    }
12521
 
12522
    public _Fields fieldForId(int fieldId) {
12523
      return _Fields.findByThriftId(fieldId);
12524
    }
12525
 
12526
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12527
      org.apache.thrift.protocol.TField field;
12528
      iprot.readStructBegin();
12529
      while (true)
12530
      {
12531
        field = iprot.readFieldBegin();
12532
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12533
          break;
12534
        }
12535
        switch (field.id) {
12536
          case 1: // DATE
12537
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12538
              this.date = iprot.readI64();
12539
              setDateIsSet(true);
12540
            } else { 
12541
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12542
            }
12543
            break;
12544
          default:
12545
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12546
        }
12547
        iprot.readFieldEnd();
12548
      }
12549
      iprot.readStructEnd();
12550
      validate();
12551
    }
12552
 
12553
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12554
      validate();
12555
 
12556
      oprot.writeStructBegin(STRUCT_DESC);
12557
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12558
      oprot.writeI64(this.date);
12559
      oprot.writeFieldEnd();
12560
      oprot.writeFieldStop();
12561
      oprot.writeStructEnd();
12562
    }
12563
 
12564
    @Override
12565
    public String toString() {
12566
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12567
      boolean first = true;
12568
 
12569
      sb.append("date:");
12570
      sb.append(this.date);
12571
      first = false;
12572
      sb.append(")");
12573
      return sb.toString();
12574
    }
12575
 
12576
    public void validate() throws org.apache.thrift.TException {
12577
      // check for required fields
12578
    }
12579
 
12580
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12581
      try {
12582
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12583
      } catch (org.apache.thrift.TException te) {
12584
        throw new java.io.IOException(te);
12585
      }
12586
    }
12587
 
12588
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12589
      try {
12590
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12591
        __isset_bit_vector = new BitSet(1);
12592
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12593
      } catch (org.apache.thrift.TException te) {
12594
        throw new java.io.IOException(te);
12595
      }
12596
    }
12597
 
12598
  }
12599
 
12600
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12601
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12602
 
12603
    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);
12604
 
12605
    private List<Invoice> success; // required
12606
 
12607
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12608
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12609
      SUCCESS((short)0, "success");
12610
 
12611
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12612
 
12613
      static {
12614
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12615
          byName.put(field.getFieldName(), field);
12616
        }
12617
      }
12618
 
12619
      /**
12620
       * Find the _Fields constant that matches fieldId, or null if its not found.
12621
       */
12622
      public static _Fields findByThriftId(int fieldId) {
12623
        switch(fieldId) {
12624
          case 0: // SUCCESS
12625
            return SUCCESS;
12626
          default:
12627
            return null;
12628
        }
12629
      }
12630
 
12631
      /**
12632
       * Find the _Fields constant that matches fieldId, throwing an exception
12633
       * if it is not found.
12634
       */
12635
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12636
        _Fields fields = findByThriftId(fieldId);
12637
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12638
        return fields;
12639
      }
12640
 
12641
      /**
12642
       * Find the _Fields constant that matches name, or null if its not found.
12643
       */
12644
      public static _Fields findByName(String name) {
12645
        return byName.get(name);
12646
      }
12647
 
12648
      private final short _thriftId;
12649
      private final String _fieldName;
12650
 
12651
      _Fields(short thriftId, String fieldName) {
12652
        _thriftId = thriftId;
12653
        _fieldName = fieldName;
12654
      }
12655
 
12656
      public short getThriftFieldId() {
12657
        return _thriftId;
12658
      }
12659
 
12660
      public String getFieldName() {
12661
        return _fieldName;
12662
      }
12663
    }
12664
 
12665
    // isset id assignments
12666
 
12667
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12668
    static {
12669
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12670
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12671
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12672
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12673
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12674
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12675
    }
12676
 
12677
    public getInvoices_result() {
12678
    }
12679
 
12680
    public getInvoices_result(
12681
      List<Invoice> success)
12682
    {
12683
      this();
12684
      this.success = success;
12685
    }
12686
 
12687
    /**
12688
     * Performs a deep copy on <i>other</i>.
12689
     */
12690
    public getInvoices_result(getInvoices_result other) {
12691
      if (other.isSetSuccess()) {
12692
        List<Invoice> __this__success = new ArrayList<Invoice>();
12693
        for (Invoice other_element : other.success) {
12694
          __this__success.add(new Invoice(other_element));
12695
        }
12696
        this.success = __this__success;
12697
      }
12698
    }
12699
 
12700
    public getInvoices_result deepCopy() {
12701
      return new getInvoices_result(this);
12702
    }
12703
 
12704
    @Override
12705
    public void clear() {
12706
      this.success = null;
12707
    }
12708
 
12709
    public int getSuccessSize() {
12710
      return (this.success == null) ? 0 : this.success.size();
12711
    }
12712
 
12713
    public java.util.Iterator<Invoice> getSuccessIterator() {
12714
      return (this.success == null) ? null : this.success.iterator();
12715
    }
12716
 
12717
    public void addToSuccess(Invoice elem) {
12718
      if (this.success == null) {
12719
        this.success = new ArrayList<Invoice>();
12720
      }
12721
      this.success.add(elem);
12722
    }
12723
 
12724
    public List<Invoice> getSuccess() {
12725
      return this.success;
12726
    }
12727
 
12728
    public void setSuccess(List<Invoice> success) {
12729
      this.success = success;
12730
    }
12731
 
12732
    public void unsetSuccess() {
12733
      this.success = null;
12734
    }
12735
 
12736
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12737
    public boolean isSetSuccess() {
12738
      return this.success != null;
12739
    }
12740
 
12741
    public void setSuccessIsSet(boolean value) {
12742
      if (!value) {
12743
        this.success = null;
12744
      }
12745
    }
12746
 
12747
    public void setFieldValue(_Fields field, Object value) {
12748
      switch (field) {
12749
      case SUCCESS:
12750
        if (value == null) {
12751
          unsetSuccess();
12752
        } else {
12753
          setSuccess((List<Invoice>)value);
12754
        }
12755
        break;
12756
 
12757
      }
12758
    }
12759
 
12760
    public Object getFieldValue(_Fields field) {
12761
      switch (field) {
12762
      case SUCCESS:
12763
        return getSuccess();
12764
 
12765
      }
12766
      throw new IllegalStateException();
12767
    }
12768
 
12769
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12770
    public boolean isSet(_Fields field) {
12771
      if (field == null) {
12772
        throw new IllegalArgumentException();
12773
      }
12774
 
12775
      switch (field) {
12776
      case SUCCESS:
12777
        return isSetSuccess();
12778
      }
12779
      throw new IllegalStateException();
12780
    }
12781
 
12782
    @Override
12783
    public boolean equals(Object that) {
12784
      if (that == null)
12785
        return false;
12786
      if (that instanceof getInvoices_result)
12787
        return this.equals((getInvoices_result)that);
12788
      return false;
12789
    }
12790
 
12791
    public boolean equals(getInvoices_result that) {
12792
      if (that == null)
12793
        return false;
12794
 
12795
      boolean this_present_success = true && this.isSetSuccess();
12796
      boolean that_present_success = true && that.isSetSuccess();
12797
      if (this_present_success || that_present_success) {
12798
        if (!(this_present_success && that_present_success))
12799
          return false;
12800
        if (!this.success.equals(that.success))
12801
          return false;
12802
      }
12803
 
12804
      return true;
12805
    }
12806
 
12807
    @Override
12808
    public int hashCode() {
12809
      return 0;
12810
    }
12811
 
12812
    public int compareTo(getInvoices_result other) {
12813
      if (!getClass().equals(other.getClass())) {
12814
        return getClass().getName().compareTo(other.getClass().getName());
12815
      }
12816
 
12817
      int lastComparison = 0;
12818
      getInvoices_result typedOther = (getInvoices_result)other;
12819
 
12820
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12821
      if (lastComparison != 0) {
12822
        return lastComparison;
12823
      }
12824
      if (isSetSuccess()) {
12825
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12826
        if (lastComparison != 0) {
12827
          return lastComparison;
12828
        }
12829
      }
12830
      return 0;
12831
    }
12832
 
12833
    public _Fields fieldForId(int fieldId) {
12834
      return _Fields.findByThriftId(fieldId);
12835
    }
12836
 
12837
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12838
      org.apache.thrift.protocol.TField field;
12839
      iprot.readStructBegin();
12840
      while (true)
12841
      {
12842
        field = iprot.readFieldBegin();
12843
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12844
          break;
12845
        }
12846
        switch (field.id) {
12847
          case 0: // SUCCESS
12848
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12849
              {
6385 amar.kumar 12850
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12851
                this.success = new ArrayList<Invoice>(_list24.size);
12852
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12853
                {
6385 amar.kumar 12854
                  Invoice _elem26; // required
12855
                  _elem26 = new Invoice();
12856
                  _elem26.read(iprot);
12857
                  this.success.add(_elem26);
5443 mandeep.dh 12858
                }
12859
                iprot.readListEnd();
12860
              }
12861
            } else { 
12862
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12863
            }
12864
            break;
12865
          default:
12866
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12867
        }
12868
        iprot.readFieldEnd();
12869
      }
12870
      iprot.readStructEnd();
12871
      validate();
12872
    }
12873
 
12874
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12875
      oprot.writeStructBegin(STRUCT_DESC);
12876
 
12877
      if (this.isSetSuccess()) {
12878
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12879
        {
12880
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12881
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12882
          {
6385 amar.kumar 12883
            _iter27.write(oprot);
5443 mandeep.dh 12884
          }
12885
          oprot.writeListEnd();
12886
        }
12887
        oprot.writeFieldEnd();
12888
      }
12889
      oprot.writeFieldStop();
12890
      oprot.writeStructEnd();
12891
    }
12892
 
12893
    @Override
12894
    public String toString() {
12895
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12896
      boolean first = true;
12897
 
12898
      sb.append("success:");
12899
      if (this.success == null) {
12900
        sb.append("null");
12901
      } else {
12902
        sb.append(this.success);
12903
      }
12904
      first = false;
12905
      sb.append(")");
12906
      return sb.toString();
12907
    }
12908
 
12909
    public void validate() throws org.apache.thrift.TException {
12910
      // check for required fields
12911
    }
12912
 
12913
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12914
      try {
12915
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12916
      } catch (org.apache.thrift.TException te) {
12917
        throw new java.io.IOException(te);
12918
      }
12919
    }
12920
 
12921
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12922
      try {
12923
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12924
      } catch (org.apache.thrift.TException te) {
12925
        throw new java.io.IOException(te);
12926
      }
12927
    }
12928
 
12929
  }
12930
 
7410 amar.kumar 12931
  public static class getInvoicesForWarehouse_args implements org.apache.thrift.TBase<getInvoicesForWarehouse_args, getInvoicesForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
12932
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_args");
12933
 
12934
    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);
12935
    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);
12936
    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);
12937
 
12938
    private long warehouseId; // required
12939
    private long supplierId; // required
12940
    private long date; // required
12941
 
12942
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12943
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12944
      WAREHOUSE_ID((short)1, "warehouseId"),
12945
      SUPPLIER_ID((short)2, "supplierId"),
12946
      DATE((short)3, "date");
12947
 
12948
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12949
 
12950
      static {
12951
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12952
          byName.put(field.getFieldName(), field);
12953
        }
12954
      }
12955
 
12956
      /**
12957
       * Find the _Fields constant that matches fieldId, or null if its not found.
12958
       */
12959
      public static _Fields findByThriftId(int fieldId) {
12960
        switch(fieldId) {
12961
          case 1: // WAREHOUSE_ID
12962
            return WAREHOUSE_ID;
12963
          case 2: // SUPPLIER_ID
12964
            return SUPPLIER_ID;
12965
          case 3: // DATE
12966
            return DATE;
12967
          default:
12968
            return null;
12969
        }
12970
      }
12971
 
12972
      /**
12973
       * Find the _Fields constant that matches fieldId, throwing an exception
12974
       * if it is not found.
12975
       */
12976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12977
        _Fields fields = findByThriftId(fieldId);
12978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12979
        return fields;
12980
      }
12981
 
12982
      /**
12983
       * Find the _Fields constant that matches name, or null if its not found.
12984
       */
12985
      public static _Fields findByName(String name) {
12986
        return byName.get(name);
12987
      }
12988
 
12989
      private final short _thriftId;
12990
      private final String _fieldName;
12991
 
12992
      _Fields(short thriftId, String fieldName) {
12993
        _thriftId = thriftId;
12994
        _fieldName = fieldName;
12995
      }
12996
 
12997
      public short getThriftFieldId() {
12998
        return _thriftId;
12999
      }
13000
 
13001
      public String getFieldName() {
13002
        return _fieldName;
13003
      }
13004
    }
13005
 
13006
    // isset id assignments
13007
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13008
    private static final int __SUPPLIERID_ISSET_ID = 1;
13009
    private static final int __DATE_ISSET_ID = 2;
13010
    private BitSet __isset_bit_vector = new BitSet(3);
13011
 
13012
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13013
    static {
13014
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13015
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13016
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13017
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13018
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13019
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13020
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13021
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13022
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_args.class, metaDataMap);
13023
    }
13024
 
13025
    public getInvoicesForWarehouse_args() {
13026
    }
13027
 
13028
    public getInvoicesForWarehouse_args(
13029
      long warehouseId,
13030
      long supplierId,
13031
      long date)
13032
    {
13033
      this();
13034
      this.warehouseId = warehouseId;
13035
      setWarehouseIdIsSet(true);
13036
      this.supplierId = supplierId;
13037
      setSupplierIdIsSet(true);
13038
      this.date = date;
13039
      setDateIsSet(true);
13040
    }
13041
 
13042
    /**
13043
     * Performs a deep copy on <i>other</i>.
13044
     */
13045
    public getInvoicesForWarehouse_args(getInvoicesForWarehouse_args other) {
13046
      __isset_bit_vector.clear();
13047
      __isset_bit_vector.or(other.__isset_bit_vector);
13048
      this.warehouseId = other.warehouseId;
13049
      this.supplierId = other.supplierId;
13050
      this.date = other.date;
13051
    }
13052
 
13053
    public getInvoicesForWarehouse_args deepCopy() {
13054
      return new getInvoicesForWarehouse_args(this);
13055
    }
13056
 
13057
    @Override
13058
    public void clear() {
13059
      setWarehouseIdIsSet(false);
13060
      this.warehouseId = 0;
13061
      setSupplierIdIsSet(false);
13062
      this.supplierId = 0;
13063
      setDateIsSet(false);
13064
      this.date = 0;
13065
    }
13066
 
13067
    public long getWarehouseId() {
13068
      return this.warehouseId;
13069
    }
13070
 
13071
    public void setWarehouseId(long warehouseId) {
13072
      this.warehouseId = warehouseId;
13073
      setWarehouseIdIsSet(true);
13074
    }
13075
 
13076
    public void unsetWarehouseId() {
13077
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13078
    }
13079
 
13080
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
13081
    public boolean isSetWarehouseId() {
13082
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13083
    }
13084
 
13085
    public void setWarehouseIdIsSet(boolean value) {
13086
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13087
    }
13088
 
13089
    public long getSupplierId() {
13090
      return this.supplierId;
13091
    }
13092
 
13093
    public void setSupplierId(long supplierId) {
13094
      this.supplierId = supplierId;
13095
      setSupplierIdIsSet(true);
13096
    }
13097
 
13098
    public void unsetSupplierId() {
13099
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
13100
    }
13101
 
13102
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
13103
    public boolean isSetSupplierId() {
13104
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
13105
    }
13106
 
13107
    public void setSupplierIdIsSet(boolean value) {
13108
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
13109
    }
13110
 
13111
    public long getDate() {
13112
      return this.date;
13113
    }
13114
 
13115
    public void setDate(long date) {
13116
      this.date = date;
13117
      setDateIsSet(true);
13118
    }
13119
 
13120
    public void unsetDate() {
13121
      __isset_bit_vector.clear(__DATE_ISSET_ID);
13122
    }
13123
 
13124
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
13125
    public boolean isSetDate() {
13126
      return __isset_bit_vector.get(__DATE_ISSET_ID);
13127
    }
13128
 
13129
    public void setDateIsSet(boolean value) {
13130
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
13131
    }
13132
 
13133
    public void setFieldValue(_Fields field, Object value) {
13134
      switch (field) {
13135
      case WAREHOUSE_ID:
13136
        if (value == null) {
13137
          unsetWarehouseId();
13138
        } else {
13139
          setWarehouseId((Long)value);
13140
        }
13141
        break;
13142
 
13143
      case SUPPLIER_ID:
13144
        if (value == null) {
13145
          unsetSupplierId();
13146
        } else {
13147
          setSupplierId((Long)value);
13148
        }
13149
        break;
13150
 
13151
      case DATE:
13152
        if (value == null) {
13153
          unsetDate();
13154
        } else {
13155
          setDate((Long)value);
13156
        }
13157
        break;
13158
 
13159
      }
13160
    }
13161
 
13162
    public Object getFieldValue(_Fields field) {
13163
      switch (field) {
13164
      case WAREHOUSE_ID:
13165
        return Long.valueOf(getWarehouseId());
13166
 
13167
      case SUPPLIER_ID:
13168
        return Long.valueOf(getSupplierId());
13169
 
13170
      case DATE:
13171
        return Long.valueOf(getDate());
13172
 
13173
      }
13174
      throw new IllegalStateException();
13175
    }
13176
 
13177
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13178
    public boolean isSet(_Fields field) {
13179
      if (field == null) {
13180
        throw new IllegalArgumentException();
13181
      }
13182
 
13183
      switch (field) {
13184
      case WAREHOUSE_ID:
13185
        return isSetWarehouseId();
13186
      case SUPPLIER_ID:
13187
        return isSetSupplierId();
13188
      case DATE:
13189
        return isSetDate();
13190
      }
13191
      throw new IllegalStateException();
13192
    }
13193
 
13194
    @Override
13195
    public boolean equals(Object that) {
13196
      if (that == null)
13197
        return false;
13198
      if (that instanceof getInvoicesForWarehouse_args)
13199
        return this.equals((getInvoicesForWarehouse_args)that);
13200
      return false;
13201
    }
13202
 
13203
    public boolean equals(getInvoicesForWarehouse_args that) {
13204
      if (that == null)
13205
        return false;
13206
 
13207
      boolean this_present_warehouseId = true;
13208
      boolean that_present_warehouseId = true;
13209
      if (this_present_warehouseId || that_present_warehouseId) {
13210
        if (!(this_present_warehouseId && that_present_warehouseId))
13211
          return false;
13212
        if (this.warehouseId != that.warehouseId)
13213
          return false;
13214
      }
13215
 
13216
      boolean this_present_supplierId = true;
13217
      boolean that_present_supplierId = true;
13218
      if (this_present_supplierId || that_present_supplierId) {
13219
        if (!(this_present_supplierId && that_present_supplierId))
13220
          return false;
13221
        if (this.supplierId != that.supplierId)
13222
          return false;
13223
      }
13224
 
13225
      boolean this_present_date = true;
13226
      boolean that_present_date = true;
13227
      if (this_present_date || that_present_date) {
13228
        if (!(this_present_date && that_present_date))
13229
          return false;
13230
        if (this.date != that.date)
13231
          return false;
13232
      }
13233
 
13234
      return true;
13235
    }
13236
 
13237
    @Override
13238
    public int hashCode() {
13239
      return 0;
13240
    }
13241
 
13242
    public int compareTo(getInvoicesForWarehouse_args other) {
13243
      if (!getClass().equals(other.getClass())) {
13244
        return getClass().getName().compareTo(other.getClass().getName());
13245
      }
13246
 
13247
      int lastComparison = 0;
13248
      getInvoicesForWarehouse_args typedOther = (getInvoicesForWarehouse_args)other;
13249
 
13250
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
13251
      if (lastComparison != 0) {
13252
        return lastComparison;
13253
      }
13254
      if (isSetWarehouseId()) {
13255
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
13256
        if (lastComparison != 0) {
13257
          return lastComparison;
13258
        }
13259
      }
13260
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
13261
      if (lastComparison != 0) {
13262
        return lastComparison;
13263
      }
13264
      if (isSetSupplierId()) {
13265
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
13266
        if (lastComparison != 0) {
13267
          return lastComparison;
13268
        }
13269
      }
13270
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
13271
      if (lastComparison != 0) {
13272
        return lastComparison;
13273
      }
13274
      if (isSetDate()) {
13275
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
13276
        if (lastComparison != 0) {
13277
          return lastComparison;
13278
        }
13279
      }
13280
      return 0;
13281
    }
13282
 
13283
    public _Fields fieldForId(int fieldId) {
13284
      return _Fields.findByThriftId(fieldId);
13285
    }
13286
 
13287
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13288
      org.apache.thrift.protocol.TField field;
13289
      iprot.readStructBegin();
13290
      while (true)
13291
      {
13292
        field = iprot.readFieldBegin();
13293
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13294
          break;
13295
        }
13296
        switch (field.id) {
13297
          case 1: // WAREHOUSE_ID
13298
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13299
              this.warehouseId = iprot.readI64();
13300
              setWarehouseIdIsSet(true);
13301
            } else { 
13302
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13303
            }
13304
            break;
13305
          case 2: // SUPPLIER_ID
13306
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13307
              this.supplierId = iprot.readI64();
13308
              setSupplierIdIsSet(true);
13309
            } else { 
13310
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13311
            }
13312
            break;
13313
          case 3: // DATE
13314
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13315
              this.date = iprot.readI64();
13316
              setDateIsSet(true);
13317
            } else { 
13318
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13319
            }
13320
            break;
13321
          default:
13322
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13323
        }
13324
        iprot.readFieldEnd();
13325
      }
13326
      iprot.readStructEnd();
13327
      validate();
13328
    }
13329
 
13330
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13331
      validate();
13332
 
13333
      oprot.writeStructBegin(STRUCT_DESC);
13334
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
13335
      oprot.writeI64(this.warehouseId);
13336
      oprot.writeFieldEnd();
13337
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
13338
      oprot.writeI64(this.supplierId);
13339
      oprot.writeFieldEnd();
13340
      oprot.writeFieldBegin(DATE_FIELD_DESC);
13341
      oprot.writeI64(this.date);
13342
      oprot.writeFieldEnd();
13343
      oprot.writeFieldStop();
13344
      oprot.writeStructEnd();
13345
    }
13346
 
13347
    @Override
13348
    public String toString() {
13349
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_args(");
13350
      boolean first = true;
13351
 
13352
      sb.append("warehouseId:");
13353
      sb.append(this.warehouseId);
13354
      first = false;
13355
      if (!first) sb.append(", ");
13356
      sb.append("supplierId:");
13357
      sb.append(this.supplierId);
13358
      first = false;
13359
      if (!first) sb.append(", ");
13360
      sb.append("date:");
13361
      sb.append(this.date);
13362
      first = false;
13363
      sb.append(")");
13364
      return sb.toString();
13365
    }
13366
 
13367
    public void validate() throws org.apache.thrift.TException {
13368
      // check for required fields
13369
    }
13370
 
13371
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13372
      try {
13373
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13374
      } catch (org.apache.thrift.TException te) {
13375
        throw new java.io.IOException(te);
13376
      }
13377
    }
13378
 
13379
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13380
      try {
13381
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13382
        __isset_bit_vector = new BitSet(1);
13383
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13384
      } catch (org.apache.thrift.TException te) {
13385
        throw new java.io.IOException(te);
13386
      }
13387
    }
13388
 
13389
  }
13390
 
13391
  public static class getInvoicesForWarehouse_result implements org.apache.thrift.TBase<getInvoicesForWarehouse_result, getInvoicesForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
13392
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoicesForWarehouse_result");
13393
 
13394
    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);
13395
 
13396
    private List<Invoice> success; // required
13397
 
13398
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13399
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13400
      SUCCESS((short)0, "success");
13401
 
13402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13403
 
13404
      static {
13405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13406
          byName.put(field.getFieldName(), field);
13407
        }
13408
      }
13409
 
13410
      /**
13411
       * Find the _Fields constant that matches fieldId, or null if its not found.
13412
       */
13413
      public static _Fields findByThriftId(int fieldId) {
13414
        switch(fieldId) {
13415
          case 0: // SUCCESS
13416
            return SUCCESS;
13417
          default:
13418
            return null;
13419
        }
13420
      }
13421
 
13422
      /**
13423
       * Find the _Fields constant that matches fieldId, throwing an exception
13424
       * if it is not found.
13425
       */
13426
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13427
        _Fields fields = findByThriftId(fieldId);
13428
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13429
        return fields;
13430
      }
13431
 
13432
      /**
13433
       * Find the _Fields constant that matches name, or null if its not found.
13434
       */
13435
      public static _Fields findByName(String name) {
13436
        return byName.get(name);
13437
      }
13438
 
13439
      private final short _thriftId;
13440
      private final String _fieldName;
13441
 
13442
      _Fields(short thriftId, String fieldName) {
13443
        _thriftId = thriftId;
13444
        _fieldName = fieldName;
13445
      }
13446
 
13447
      public short getThriftFieldId() {
13448
        return _thriftId;
13449
      }
13450
 
13451
      public String getFieldName() {
13452
        return _fieldName;
13453
      }
13454
    }
13455
 
13456
    // isset id assignments
13457
 
13458
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13459
    static {
13460
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13461
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13462
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13463
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
13464
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13465
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoicesForWarehouse_result.class, metaDataMap);
13466
    }
13467
 
13468
    public getInvoicesForWarehouse_result() {
13469
    }
13470
 
13471
    public getInvoicesForWarehouse_result(
13472
      List<Invoice> success)
13473
    {
13474
      this();
13475
      this.success = success;
13476
    }
13477
 
13478
    /**
13479
     * Performs a deep copy on <i>other</i>.
13480
     */
13481
    public getInvoicesForWarehouse_result(getInvoicesForWarehouse_result other) {
13482
      if (other.isSetSuccess()) {
13483
        List<Invoice> __this__success = new ArrayList<Invoice>();
13484
        for (Invoice other_element : other.success) {
13485
          __this__success.add(new Invoice(other_element));
13486
        }
13487
        this.success = __this__success;
13488
      }
13489
    }
13490
 
13491
    public getInvoicesForWarehouse_result deepCopy() {
13492
      return new getInvoicesForWarehouse_result(this);
13493
    }
13494
 
13495
    @Override
13496
    public void clear() {
13497
      this.success = null;
13498
    }
13499
 
13500
    public int getSuccessSize() {
13501
      return (this.success == null) ? 0 : this.success.size();
13502
    }
13503
 
13504
    public java.util.Iterator<Invoice> getSuccessIterator() {
13505
      return (this.success == null) ? null : this.success.iterator();
13506
    }
13507
 
13508
    public void addToSuccess(Invoice elem) {
13509
      if (this.success == null) {
13510
        this.success = new ArrayList<Invoice>();
13511
      }
13512
      this.success.add(elem);
13513
    }
13514
 
13515
    public List<Invoice> getSuccess() {
13516
      return this.success;
13517
    }
13518
 
13519
    public void setSuccess(List<Invoice> success) {
13520
      this.success = success;
13521
    }
13522
 
13523
    public void unsetSuccess() {
13524
      this.success = null;
13525
    }
13526
 
13527
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13528
    public boolean isSetSuccess() {
13529
      return this.success != null;
13530
    }
13531
 
13532
    public void setSuccessIsSet(boolean value) {
13533
      if (!value) {
13534
        this.success = null;
13535
      }
13536
    }
13537
 
13538
    public void setFieldValue(_Fields field, Object value) {
13539
      switch (field) {
13540
      case SUCCESS:
13541
        if (value == null) {
13542
          unsetSuccess();
13543
        } else {
13544
          setSuccess((List<Invoice>)value);
13545
        }
13546
        break;
13547
 
13548
      }
13549
    }
13550
 
13551
    public Object getFieldValue(_Fields field) {
13552
      switch (field) {
13553
      case SUCCESS:
13554
        return getSuccess();
13555
 
13556
      }
13557
      throw new IllegalStateException();
13558
    }
13559
 
13560
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13561
    public boolean isSet(_Fields field) {
13562
      if (field == null) {
13563
        throw new IllegalArgumentException();
13564
      }
13565
 
13566
      switch (field) {
13567
      case SUCCESS:
13568
        return isSetSuccess();
13569
      }
13570
      throw new IllegalStateException();
13571
    }
13572
 
13573
    @Override
13574
    public boolean equals(Object that) {
13575
      if (that == null)
13576
        return false;
13577
      if (that instanceof getInvoicesForWarehouse_result)
13578
        return this.equals((getInvoicesForWarehouse_result)that);
13579
      return false;
13580
    }
13581
 
13582
    public boolean equals(getInvoicesForWarehouse_result that) {
13583
      if (that == null)
13584
        return false;
13585
 
13586
      boolean this_present_success = true && this.isSetSuccess();
13587
      boolean that_present_success = true && that.isSetSuccess();
13588
      if (this_present_success || that_present_success) {
13589
        if (!(this_present_success && that_present_success))
13590
          return false;
13591
        if (!this.success.equals(that.success))
13592
          return false;
13593
      }
13594
 
13595
      return true;
13596
    }
13597
 
13598
    @Override
13599
    public int hashCode() {
13600
      return 0;
13601
    }
13602
 
13603
    public int compareTo(getInvoicesForWarehouse_result other) {
13604
      if (!getClass().equals(other.getClass())) {
13605
        return getClass().getName().compareTo(other.getClass().getName());
13606
      }
13607
 
13608
      int lastComparison = 0;
13609
      getInvoicesForWarehouse_result typedOther = (getInvoicesForWarehouse_result)other;
13610
 
13611
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13612
      if (lastComparison != 0) {
13613
        return lastComparison;
13614
      }
13615
      if (isSetSuccess()) {
13616
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13617
        if (lastComparison != 0) {
13618
          return lastComparison;
13619
        }
13620
      }
13621
      return 0;
13622
    }
13623
 
13624
    public _Fields fieldForId(int fieldId) {
13625
      return _Fields.findByThriftId(fieldId);
13626
    }
13627
 
13628
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13629
      org.apache.thrift.protocol.TField field;
13630
      iprot.readStructBegin();
13631
      while (true)
13632
      {
13633
        field = iprot.readFieldBegin();
13634
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13635
          break;
13636
        }
13637
        switch (field.id) {
13638
          case 0: // SUCCESS
13639
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13640
              {
13641
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
13642
                this.success = new ArrayList<Invoice>(_list28.size);
13643
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
13644
                {
13645
                  Invoice _elem30; // required
13646
                  _elem30 = new Invoice();
13647
                  _elem30.read(iprot);
13648
                  this.success.add(_elem30);
13649
                }
13650
                iprot.readListEnd();
13651
              }
13652
            } else { 
13653
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13654
            }
13655
            break;
13656
          default:
13657
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13658
        }
13659
        iprot.readFieldEnd();
13660
      }
13661
      iprot.readStructEnd();
13662
      validate();
13663
    }
13664
 
13665
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13666
      oprot.writeStructBegin(STRUCT_DESC);
13667
 
13668
      if (this.isSetSuccess()) {
13669
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13670
        {
13671
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13672
          for (Invoice _iter31 : this.success)
13673
          {
13674
            _iter31.write(oprot);
13675
          }
13676
          oprot.writeListEnd();
13677
        }
13678
        oprot.writeFieldEnd();
13679
      }
13680
      oprot.writeFieldStop();
13681
      oprot.writeStructEnd();
13682
    }
13683
 
13684
    @Override
13685
    public String toString() {
13686
      StringBuilder sb = new StringBuilder("getInvoicesForWarehouse_result(");
13687
      boolean first = true;
13688
 
13689
      sb.append("success:");
13690
      if (this.success == null) {
13691
        sb.append("null");
13692
      } else {
13693
        sb.append(this.success);
13694
      }
13695
      first = false;
13696
      sb.append(")");
13697
      return sb.toString();
13698
    }
13699
 
13700
    public void validate() throws org.apache.thrift.TException {
13701
      // check for required fields
13702
    }
13703
 
13704
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13705
      try {
13706
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13707
      } catch (org.apache.thrift.TException te) {
13708
        throw new java.io.IOException(te);
13709
      }
13710
    }
13711
 
13712
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13713
      try {
13714
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13715
      } catch (org.apache.thrift.TException te) {
13716
        throw new java.io.IOException(te);
13717
      }
13718
    }
13719
 
13720
  }
13721
 
5443 mandeep.dh 13722
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
13723
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
13724
 
13725
    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);
13726
 
13727
    private Invoice invoice; // required
13728
 
13729
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13730
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13731
      INVOICE((short)1, "invoice");
13732
 
13733
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13734
 
13735
      static {
13736
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13737
          byName.put(field.getFieldName(), field);
13738
        }
13739
      }
13740
 
13741
      /**
13742
       * Find the _Fields constant that matches fieldId, or null if its not found.
13743
       */
13744
      public static _Fields findByThriftId(int fieldId) {
13745
        switch(fieldId) {
13746
          case 1: // INVOICE
13747
            return INVOICE;
13748
          default:
13749
            return null;
13750
        }
13751
      }
13752
 
13753
      /**
13754
       * Find the _Fields constant that matches fieldId, throwing an exception
13755
       * if it is not found.
13756
       */
13757
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13758
        _Fields fields = findByThriftId(fieldId);
13759
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13760
        return fields;
13761
      }
13762
 
13763
      /**
13764
       * Find the _Fields constant that matches name, or null if its not found.
13765
       */
13766
      public static _Fields findByName(String name) {
13767
        return byName.get(name);
13768
      }
13769
 
13770
      private final short _thriftId;
13771
      private final String _fieldName;
13772
 
13773
      _Fields(short thriftId, String fieldName) {
13774
        _thriftId = thriftId;
13775
        _fieldName = fieldName;
13776
      }
13777
 
13778
      public short getThriftFieldId() {
13779
        return _thriftId;
13780
      }
13781
 
13782
      public String getFieldName() {
13783
        return _fieldName;
13784
      }
13785
    }
13786
 
13787
    // isset id assignments
13788
 
13789
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13790
    static {
13791
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13792
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13793
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
13794
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13795
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
13796
    }
13797
 
13798
    public createInvoice_args() {
13799
    }
13800
 
13801
    public createInvoice_args(
13802
      Invoice invoice)
13803
    {
13804
      this();
13805
      this.invoice = invoice;
13806
    }
13807
 
13808
    /**
13809
     * Performs a deep copy on <i>other</i>.
13810
     */
13811
    public createInvoice_args(createInvoice_args other) {
13812
      if (other.isSetInvoice()) {
13813
        this.invoice = new Invoice(other.invoice);
13814
      }
13815
    }
13816
 
13817
    public createInvoice_args deepCopy() {
13818
      return new createInvoice_args(this);
13819
    }
13820
 
13821
    @Override
13822
    public void clear() {
13823
      this.invoice = null;
13824
    }
13825
 
13826
    public Invoice getInvoice() {
13827
      return this.invoice;
13828
    }
13829
 
13830
    public void setInvoice(Invoice invoice) {
13831
      this.invoice = invoice;
13832
    }
13833
 
13834
    public void unsetInvoice() {
13835
      this.invoice = null;
13836
    }
13837
 
13838
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
13839
    public boolean isSetInvoice() {
13840
      return this.invoice != null;
13841
    }
13842
 
13843
    public void setInvoiceIsSet(boolean value) {
13844
      if (!value) {
13845
        this.invoice = null;
13846
      }
13847
    }
13848
 
13849
    public void setFieldValue(_Fields field, Object value) {
13850
      switch (field) {
13851
      case INVOICE:
13852
        if (value == null) {
13853
          unsetInvoice();
13854
        } else {
13855
          setInvoice((Invoice)value);
13856
        }
13857
        break;
13858
 
13859
      }
13860
    }
13861
 
13862
    public Object getFieldValue(_Fields field) {
13863
      switch (field) {
13864
      case INVOICE:
13865
        return getInvoice();
13866
 
13867
      }
13868
      throw new IllegalStateException();
13869
    }
13870
 
13871
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13872
    public boolean isSet(_Fields field) {
13873
      if (field == null) {
13874
        throw new IllegalArgumentException();
13875
      }
13876
 
13877
      switch (field) {
13878
      case INVOICE:
13879
        return isSetInvoice();
13880
      }
13881
      throw new IllegalStateException();
13882
    }
13883
 
13884
    @Override
13885
    public boolean equals(Object that) {
13886
      if (that == null)
13887
        return false;
13888
      if (that instanceof createInvoice_args)
13889
        return this.equals((createInvoice_args)that);
13890
      return false;
13891
    }
13892
 
13893
    public boolean equals(createInvoice_args that) {
13894
      if (that == null)
13895
        return false;
13896
 
13897
      boolean this_present_invoice = true && this.isSetInvoice();
13898
      boolean that_present_invoice = true && that.isSetInvoice();
13899
      if (this_present_invoice || that_present_invoice) {
13900
        if (!(this_present_invoice && that_present_invoice))
13901
          return false;
13902
        if (!this.invoice.equals(that.invoice))
13903
          return false;
13904
      }
13905
 
13906
      return true;
13907
    }
13908
 
13909
    @Override
13910
    public int hashCode() {
13911
      return 0;
13912
    }
13913
 
13914
    public int compareTo(createInvoice_args other) {
13915
      if (!getClass().equals(other.getClass())) {
13916
        return getClass().getName().compareTo(other.getClass().getName());
13917
      }
13918
 
13919
      int lastComparison = 0;
13920
      createInvoice_args typedOther = (createInvoice_args)other;
13921
 
13922
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
13923
      if (lastComparison != 0) {
13924
        return lastComparison;
13925
      }
13926
      if (isSetInvoice()) {
13927
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
13928
        if (lastComparison != 0) {
13929
          return lastComparison;
13930
        }
13931
      }
13932
      return 0;
13933
    }
13934
 
13935
    public _Fields fieldForId(int fieldId) {
13936
      return _Fields.findByThriftId(fieldId);
13937
    }
13938
 
13939
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13940
      org.apache.thrift.protocol.TField field;
13941
      iprot.readStructBegin();
13942
      while (true)
13943
      {
13944
        field = iprot.readFieldBegin();
13945
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13946
          break;
13947
        }
13948
        switch (field.id) {
13949
          case 1: // INVOICE
13950
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13951
              this.invoice = new Invoice();
13952
              this.invoice.read(iprot);
13953
            } else { 
13954
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13955
            }
13956
            break;
13957
          default:
13958
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13959
        }
13960
        iprot.readFieldEnd();
13961
      }
13962
      iprot.readStructEnd();
13963
      validate();
13964
    }
13965
 
13966
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13967
      validate();
13968
 
13969
      oprot.writeStructBegin(STRUCT_DESC);
13970
      if (this.invoice != null) {
13971
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
13972
        this.invoice.write(oprot);
13973
        oprot.writeFieldEnd();
13974
      }
13975
      oprot.writeFieldStop();
13976
      oprot.writeStructEnd();
13977
    }
13978
 
13979
    @Override
13980
    public String toString() {
13981
      StringBuilder sb = new StringBuilder("createInvoice_args(");
13982
      boolean first = true;
13983
 
13984
      sb.append("invoice:");
13985
      if (this.invoice == null) {
13986
        sb.append("null");
13987
      } else {
13988
        sb.append(this.invoice);
13989
      }
13990
      first = false;
13991
      sb.append(")");
13992
      return sb.toString();
13993
    }
13994
 
13995
    public void validate() throws org.apache.thrift.TException {
13996
      // check for required fields
13997
    }
13998
 
13999
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14000
      try {
14001
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14002
      } catch (org.apache.thrift.TException te) {
14003
        throw new java.io.IOException(te);
14004
      }
14005
    }
14006
 
14007
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14008
      try {
14009
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14010
      } catch (org.apache.thrift.TException te) {
14011
        throw new java.io.IOException(te);
14012
      }
14013
    }
14014
 
14015
  }
14016
 
14017
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
14018
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
14019
 
14020
    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);
14021
 
14022
    private PurchaseServiceException e; // required
14023
 
14024
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14025
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14026
      E((short)1, "e");
14027
 
14028
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14029
 
14030
      static {
14031
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14032
          byName.put(field.getFieldName(), field);
14033
        }
14034
      }
14035
 
14036
      /**
14037
       * Find the _Fields constant that matches fieldId, or null if its not found.
14038
       */
14039
      public static _Fields findByThriftId(int fieldId) {
14040
        switch(fieldId) {
14041
          case 1: // E
14042
            return E;
14043
          default:
14044
            return null;
14045
        }
14046
      }
14047
 
14048
      /**
14049
       * Find the _Fields constant that matches fieldId, throwing an exception
14050
       * if it is not found.
14051
       */
14052
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14053
        _Fields fields = findByThriftId(fieldId);
14054
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14055
        return fields;
14056
      }
14057
 
14058
      /**
14059
       * Find the _Fields constant that matches name, or null if its not found.
14060
       */
14061
      public static _Fields findByName(String name) {
14062
        return byName.get(name);
14063
      }
14064
 
14065
      private final short _thriftId;
14066
      private final String _fieldName;
14067
 
14068
      _Fields(short thriftId, String fieldName) {
14069
        _thriftId = thriftId;
14070
        _fieldName = fieldName;
14071
      }
14072
 
14073
      public short getThriftFieldId() {
14074
        return _thriftId;
14075
      }
14076
 
14077
      public String getFieldName() {
14078
        return _fieldName;
14079
      }
14080
    }
14081
 
14082
    // isset id assignments
14083
 
14084
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14085
    static {
14086
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14087
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14088
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14089
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14090
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
14091
    }
14092
 
14093
    public createInvoice_result() {
14094
    }
14095
 
14096
    public createInvoice_result(
14097
      PurchaseServiceException e)
14098
    {
14099
      this();
14100
      this.e = e;
14101
    }
14102
 
14103
    /**
14104
     * Performs a deep copy on <i>other</i>.
14105
     */
14106
    public createInvoice_result(createInvoice_result other) {
14107
      if (other.isSetE()) {
14108
        this.e = new PurchaseServiceException(other.e);
14109
      }
14110
    }
14111
 
14112
    public createInvoice_result deepCopy() {
14113
      return new createInvoice_result(this);
14114
    }
14115
 
14116
    @Override
14117
    public void clear() {
14118
      this.e = null;
14119
    }
14120
 
14121
    public PurchaseServiceException getE() {
14122
      return this.e;
14123
    }
14124
 
14125
    public void setE(PurchaseServiceException e) {
14126
      this.e = e;
14127
    }
14128
 
14129
    public void unsetE() {
14130
      this.e = null;
14131
    }
14132
 
14133
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
14134
    public boolean isSetE() {
14135
      return this.e != null;
14136
    }
14137
 
14138
    public void setEIsSet(boolean value) {
14139
      if (!value) {
14140
        this.e = null;
14141
      }
14142
    }
14143
 
14144
    public void setFieldValue(_Fields field, Object value) {
14145
      switch (field) {
14146
      case E:
14147
        if (value == null) {
14148
          unsetE();
14149
        } else {
14150
          setE((PurchaseServiceException)value);
14151
        }
14152
        break;
14153
 
14154
      }
14155
    }
14156
 
14157
    public Object getFieldValue(_Fields field) {
14158
      switch (field) {
14159
      case E:
14160
        return getE();
14161
 
14162
      }
14163
      throw new IllegalStateException();
14164
    }
14165
 
14166
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14167
    public boolean isSet(_Fields field) {
14168
      if (field == null) {
14169
        throw new IllegalArgumentException();
14170
      }
14171
 
14172
      switch (field) {
14173
      case E:
14174
        return isSetE();
14175
      }
14176
      throw new IllegalStateException();
14177
    }
14178
 
14179
    @Override
14180
    public boolean equals(Object that) {
14181
      if (that == null)
14182
        return false;
14183
      if (that instanceof createInvoice_result)
14184
        return this.equals((createInvoice_result)that);
14185
      return false;
14186
    }
14187
 
14188
    public boolean equals(createInvoice_result that) {
14189
      if (that == null)
14190
        return false;
14191
 
14192
      boolean this_present_e = true && this.isSetE();
14193
      boolean that_present_e = true && that.isSetE();
14194
      if (this_present_e || that_present_e) {
14195
        if (!(this_present_e && that_present_e))
14196
          return false;
14197
        if (!this.e.equals(that.e))
14198
          return false;
14199
      }
14200
 
14201
      return true;
14202
    }
14203
 
14204
    @Override
14205
    public int hashCode() {
14206
      return 0;
14207
    }
14208
 
14209
    public int compareTo(createInvoice_result other) {
14210
      if (!getClass().equals(other.getClass())) {
14211
        return getClass().getName().compareTo(other.getClass().getName());
14212
      }
14213
 
14214
      int lastComparison = 0;
14215
      createInvoice_result typedOther = (createInvoice_result)other;
14216
 
14217
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
14218
      if (lastComparison != 0) {
14219
        return lastComparison;
14220
      }
14221
      if (isSetE()) {
14222
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
14223
        if (lastComparison != 0) {
14224
          return lastComparison;
14225
        }
14226
      }
14227
      return 0;
14228
    }
14229
 
14230
    public _Fields fieldForId(int fieldId) {
14231
      return _Fields.findByThriftId(fieldId);
14232
    }
14233
 
14234
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14235
      org.apache.thrift.protocol.TField field;
14236
      iprot.readStructBegin();
14237
      while (true)
14238
      {
14239
        field = iprot.readFieldBegin();
14240
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14241
          break;
14242
        }
14243
        switch (field.id) {
14244
          case 1: // E
14245
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14246
              this.e = new PurchaseServiceException();
14247
              this.e.read(iprot);
14248
            } else { 
14249
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14250
            }
14251
            break;
14252
          default:
14253
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14254
        }
14255
        iprot.readFieldEnd();
14256
      }
14257
      iprot.readStructEnd();
14258
      validate();
14259
    }
14260
 
14261
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14262
      oprot.writeStructBegin(STRUCT_DESC);
14263
 
14264
      if (this.isSetE()) {
14265
        oprot.writeFieldBegin(E_FIELD_DESC);
14266
        this.e.write(oprot);
14267
        oprot.writeFieldEnd();
14268
      }
14269
      oprot.writeFieldStop();
14270
      oprot.writeStructEnd();
14271
    }
14272
 
14273
    @Override
14274
    public String toString() {
14275
      StringBuilder sb = new StringBuilder("createInvoice_result(");
14276
      boolean first = true;
14277
 
14278
      sb.append("e:");
14279
      if (this.e == null) {
14280
        sb.append("null");
14281
      } else {
14282
        sb.append(this.e);
14283
      }
14284
      first = false;
14285
      sb.append(")");
14286
      return sb.toString();
14287
    }
14288
 
14289
    public void validate() throws org.apache.thrift.TException {
14290
      // check for required fields
14291
    }
14292
 
14293
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14294
      try {
14295
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14296
      } catch (org.apache.thrift.TException te) {
14297
        throw new java.io.IOException(te);
14298
      }
14299
    }
14300
 
14301
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14302
      try {
14303
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14304
      } catch (org.apache.thrift.TException te) {
14305
        throw new java.io.IOException(te);
14306
      }
14307
    }
14308
 
14309
  }
14310
 
5591 mandeep.dh 14311
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14312
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
14313
 
14314
    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);
14315
 
14316
    private Supplier supplier; // required
14317
 
14318
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14319
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14320
      SUPPLIER((short)1, "supplier");
14321
 
14322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14323
 
14324
      static {
14325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14326
          byName.put(field.getFieldName(), field);
14327
        }
14328
      }
14329
 
14330
      /**
14331
       * Find the _Fields constant that matches fieldId, or null if its not found.
14332
       */
14333
      public static _Fields findByThriftId(int fieldId) {
14334
        switch(fieldId) {
14335
          case 1: // SUPPLIER
14336
            return SUPPLIER;
14337
          default:
14338
            return null;
14339
        }
14340
      }
14341
 
14342
      /**
14343
       * Find the _Fields constant that matches fieldId, throwing an exception
14344
       * if it is not found.
14345
       */
14346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14347
        _Fields fields = findByThriftId(fieldId);
14348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14349
        return fields;
14350
      }
14351
 
14352
      /**
14353
       * Find the _Fields constant that matches name, or null if its not found.
14354
       */
14355
      public static _Fields findByName(String name) {
14356
        return byName.get(name);
14357
      }
14358
 
14359
      private final short _thriftId;
14360
      private final String _fieldName;
14361
 
14362
      _Fields(short thriftId, String fieldName) {
14363
        _thriftId = thriftId;
14364
        _fieldName = fieldName;
14365
      }
14366
 
14367
      public short getThriftFieldId() {
14368
        return _thriftId;
14369
      }
14370
 
14371
      public String getFieldName() {
14372
        return _fieldName;
14373
      }
14374
    }
14375
 
14376
    // isset id assignments
14377
 
14378
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14379
    static {
14380
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14381
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14382
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14383
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14384
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
14385
    }
14386
 
14387
    public addSupplier_args() {
14388
    }
14389
 
14390
    public addSupplier_args(
14391
      Supplier supplier)
14392
    {
14393
      this();
14394
      this.supplier = supplier;
14395
    }
14396
 
14397
    /**
14398
     * Performs a deep copy on <i>other</i>.
14399
     */
14400
    public addSupplier_args(addSupplier_args other) {
14401
      if (other.isSetSupplier()) {
14402
        this.supplier = new Supplier(other.supplier);
14403
      }
14404
    }
14405
 
14406
    public addSupplier_args deepCopy() {
14407
      return new addSupplier_args(this);
14408
    }
14409
 
14410
    @Override
14411
    public void clear() {
14412
      this.supplier = null;
14413
    }
14414
 
14415
    public Supplier getSupplier() {
14416
      return this.supplier;
14417
    }
14418
 
14419
    public void setSupplier(Supplier supplier) {
14420
      this.supplier = supplier;
14421
    }
14422
 
14423
    public void unsetSupplier() {
14424
      this.supplier = null;
14425
    }
14426
 
14427
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
14428
    public boolean isSetSupplier() {
14429
      return this.supplier != null;
14430
    }
14431
 
14432
    public void setSupplierIsSet(boolean value) {
14433
      if (!value) {
14434
        this.supplier = null;
14435
      }
14436
    }
14437
 
14438
    public void setFieldValue(_Fields field, Object value) {
14439
      switch (field) {
14440
      case SUPPLIER:
14441
        if (value == null) {
14442
          unsetSupplier();
14443
        } else {
14444
          setSupplier((Supplier)value);
14445
        }
14446
        break;
14447
 
14448
      }
14449
    }
14450
 
14451
    public Object getFieldValue(_Fields field) {
14452
      switch (field) {
14453
      case SUPPLIER:
14454
        return getSupplier();
14455
 
14456
      }
14457
      throw new IllegalStateException();
14458
    }
14459
 
14460
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14461
    public boolean isSet(_Fields field) {
14462
      if (field == null) {
14463
        throw new IllegalArgumentException();
14464
      }
14465
 
14466
      switch (field) {
14467
      case SUPPLIER:
14468
        return isSetSupplier();
14469
      }
14470
      throw new IllegalStateException();
14471
    }
14472
 
14473
    @Override
14474
    public boolean equals(Object that) {
14475
      if (that == null)
14476
        return false;
14477
      if (that instanceof addSupplier_args)
14478
        return this.equals((addSupplier_args)that);
14479
      return false;
14480
    }
14481
 
14482
    public boolean equals(addSupplier_args that) {
14483
      if (that == null)
14484
        return false;
14485
 
14486
      boolean this_present_supplier = true && this.isSetSupplier();
14487
      boolean that_present_supplier = true && that.isSetSupplier();
14488
      if (this_present_supplier || that_present_supplier) {
14489
        if (!(this_present_supplier && that_present_supplier))
14490
          return false;
14491
        if (!this.supplier.equals(that.supplier))
14492
          return false;
14493
      }
14494
 
14495
      return true;
14496
    }
14497
 
14498
    @Override
14499
    public int hashCode() {
14500
      return 0;
14501
    }
14502
 
14503
    public int compareTo(addSupplier_args other) {
14504
      if (!getClass().equals(other.getClass())) {
14505
        return getClass().getName().compareTo(other.getClass().getName());
14506
      }
14507
 
14508
      int lastComparison = 0;
14509
      addSupplier_args typedOther = (addSupplier_args)other;
14510
 
14511
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
14512
      if (lastComparison != 0) {
14513
        return lastComparison;
14514
      }
14515
      if (isSetSupplier()) {
14516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
14517
        if (lastComparison != 0) {
14518
          return lastComparison;
14519
        }
14520
      }
14521
      return 0;
14522
    }
14523
 
14524
    public _Fields fieldForId(int fieldId) {
14525
      return _Fields.findByThriftId(fieldId);
14526
    }
14527
 
14528
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14529
      org.apache.thrift.protocol.TField field;
14530
      iprot.readStructBegin();
14531
      while (true)
14532
      {
14533
        field = iprot.readFieldBegin();
14534
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14535
          break;
14536
        }
14537
        switch (field.id) {
14538
          case 1: // SUPPLIER
14539
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14540
              this.supplier = new Supplier();
14541
              this.supplier.read(iprot);
14542
            } else { 
14543
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14544
            }
14545
            break;
14546
          default:
14547
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14548
        }
14549
        iprot.readFieldEnd();
14550
      }
14551
      iprot.readStructEnd();
14552
      validate();
14553
    }
14554
 
14555
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14556
      validate();
14557
 
14558
      oprot.writeStructBegin(STRUCT_DESC);
14559
      if (this.supplier != null) {
14560
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14561
        this.supplier.write(oprot);
14562
        oprot.writeFieldEnd();
14563
      }
14564
      oprot.writeFieldStop();
14565
      oprot.writeStructEnd();
14566
    }
14567
 
14568
    @Override
14569
    public String toString() {
14570
      StringBuilder sb = new StringBuilder("addSupplier_args(");
14571
      boolean first = true;
14572
 
14573
      sb.append("supplier:");
14574
      if (this.supplier == null) {
14575
        sb.append("null");
14576
      } else {
14577
        sb.append(this.supplier);
14578
      }
14579
      first = false;
14580
      sb.append(")");
14581
      return sb.toString();
14582
    }
14583
 
14584
    public void validate() throws org.apache.thrift.TException {
14585
      // check for required fields
14586
    }
14587
 
14588
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14589
      try {
14590
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14591
      } catch (org.apache.thrift.TException te) {
14592
        throw new java.io.IOException(te);
14593
      }
14594
    }
14595
 
14596
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14597
      try {
14598
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14599
      } catch (org.apache.thrift.TException te) {
14600
        throw new java.io.IOException(te);
14601
      }
14602
    }
14603
 
14604
  }
14605
 
14606
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14607
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
14608
 
14609
    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);
14610
 
14611
    private Supplier success; // required
14612
 
14613
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14614
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14615
      SUCCESS((short)0, "success");
14616
 
14617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14618
 
14619
      static {
14620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14621
          byName.put(field.getFieldName(), field);
14622
        }
14623
      }
14624
 
14625
      /**
14626
       * Find the _Fields constant that matches fieldId, or null if its not found.
14627
       */
14628
      public static _Fields findByThriftId(int fieldId) {
14629
        switch(fieldId) {
14630
          case 0: // SUCCESS
14631
            return SUCCESS;
14632
          default:
14633
            return null;
14634
        }
14635
      }
14636
 
14637
      /**
14638
       * Find the _Fields constant that matches fieldId, throwing an exception
14639
       * if it is not found.
14640
       */
14641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14642
        _Fields fields = findByThriftId(fieldId);
14643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14644
        return fields;
14645
      }
14646
 
14647
      /**
14648
       * Find the _Fields constant that matches name, or null if its not found.
14649
       */
14650
      public static _Fields findByName(String name) {
14651
        return byName.get(name);
14652
      }
14653
 
14654
      private final short _thriftId;
14655
      private final String _fieldName;
14656
 
14657
      _Fields(short thriftId, String fieldName) {
14658
        _thriftId = thriftId;
14659
        _fieldName = fieldName;
14660
      }
14661
 
14662
      public short getThriftFieldId() {
14663
        return _thriftId;
14664
      }
14665
 
14666
      public String getFieldName() {
14667
        return _fieldName;
14668
      }
14669
    }
14670
 
14671
    // isset id assignments
14672
 
14673
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14674
    static {
14675
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14676
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14677
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14678
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14679
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
14680
    }
14681
 
14682
    public addSupplier_result() {
14683
    }
14684
 
14685
    public addSupplier_result(
14686
      Supplier success)
14687
    {
14688
      this();
14689
      this.success = success;
14690
    }
14691
 
14692
    /**
14693
     * Performs a deep copy on <i>other</i>.
14694
     */
14695
    public addSupplier_result(addSupplier_result other) {
14696
      if (other.isSetSuccess()) {
14697
        this.success = new Supplier(other.success);
14698
      }
14699
    }
14700
 
14701
    public addSupplier_result deepCopy() {
14702
      return new addSupplier_result(this);
14703
    }
14704
 
14705
    @Override
14706
    public void clear() {
14707
      this.success = null;
14708
    }
14709
 
14710
    public Supplier getSuccess() {
14711
      return this.success;
14712
    }
14713
 
14714
    public void setSuccess(Supplier success) {
14715
      this.success = success;
14716
    }
14717
 
14718
    public void unsetSuccess() {
14719
      this.success = null;
14720
    }
14721
 
14722
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14723
    public boolean isSetSuccess() {
14724
      return this.success != null;
14725
    }
14726
 
14727
    public void setSuccessIsSet(boolean value) {
14728
      if (!value) {
14729
        this.success = null;
14730
      }
14731
    }
14732
 
14733
    public void setFieldValue(_Fields field, Object value) {
14734
      switch (field) {
14735
      case SUCCESS:
14736
        if (value == null) {
14737
          unsetSuccess();
14738
        } else {
14739
          setSuccess((Supplier)value);
14740
        }
14741
        break;
14742
 
14743
      }
14744
    }
14745
 
14746
    public Object getFieldValue(_Fields field) {
14747
      switch (field) {
14748
      case SUCCESS:
14749
        return getSuccess();
14750
 
14751
      }
14752
      throw new IllegalStateException();
14753
    }
14754
 
14755
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14756
    public boolean isSet(_Fields field) {
14757
      if (field == null) {
14758
        throw new IllegalArgumentException();
14759
      }
14760
 
14761
      switch (field) {
14762
      case SUCCESS:
14763
        return isSetSuccess();
14764
      }
14765
      throw new IllegalStateException();
14766
    }
14767
 
14768
    @Override
14769
    public boolean equals(Object that) {
14770
      if (that == null)
14771
        return false;
14772
      if (that instanceof addSupplier_result)
14773
        return this.equals((addSupplier_result)that);
14774
      return false;
14775
    }
14776
 
14777
    public boolean equals(addSupplier_result that) {
14778
      if (that == null)
14779
        return false;
14780
 
14781
      boolean this_present_success = true && this.isSetSuccess();
14782
      boolean that_present_success = true && that.isSetSuccess();
14783
      if (this_present_success || that_present_success) {
14784
        if (!(this_present_success && that_present_success))
14785
          return false;
14786
        if (!this.success.equals(that.success))
14787
          return false;
14788
      }
14789
 
14790
      return true;
14791
    }
14792
 
14793
    @Override
14794
    public int hashCode() {
14795
      return 0;
14796
    }
14797
 
14798
    public int compareTo(addSupplier_result other) {
14799
      if (!getClass().equals(other.getClass())) {
14800
        return getClass().getName().compareTo(other.getClass().getName());
14801
      }
14802
 
14803
      int lastComparison = 0;
14804
      addSupplier_result typedOther = (addSupplier_result)other;
14805
 
14806
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14807
      if (lastComparison != 0) {
14808
        return lastComparison;
14809
      }
14810
      if (isSetSuccess()) {
14811
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14812
        if (lastComparison != 0) {
14813
          return lastComparison;
14814
        }
14815
      }
14816
      return 0;
14817
    }
14818
 
14819
    public _Fields fieldForId(int fieldId) {
14820
      return _Fields.findByThriftId(fieldId);
14821
    }
14822
 
14823
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14824
      org.apache.thrift.protocol.TField field;
14825
      iprot.readStructBegin();
14826
      while (true)
14827
      {
14828
        field = iprot.readFieldBegin();
14829
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14830
          break;
14831
        }
14832
        switch (field.id) {
14833
          case 0: // SUCCESS
14834
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14835
              this.success = new Supplier();
14836
              this.success.read(iprot);
14837
            } else { 
14838
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14839
            }
14840
            break;
14841
          default:
14842
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14843
        }
14844
        iprot.readFieldEnd();
14845
      }
14846
      iprot.readStructEnd();
14847
      validate();
14848
    }
14849
 
14850
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14851
      oprot.writeStructBegin(STRUCT_DESC);
14852
 
14853
      if (this.isSetSuccess()) {
14854
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14855
        this.success.write(oprot);
14856
        oprot.writeFieldEnd();
14857
      }
14858
      oprot.writeFieldStop();
14859
      oprot.writeStructEnd();
14860
    }
14861
 
14862
    @Override
14863
    public String toString() {
14864
      StringBuilder sb = new StringBuilder("addSupplier_result(");
14865
      boolean first = true;
14866
 
14867
      sb.append("success:");
14868
      if (this.success == null) {
14869
        sb.append("null");
14870
      } else {
14871
        sb.append(this.success);
14872
      }
14873
      first = false;
14874
      sb.append(")");
14875
      return sb.toString();
14876
    }
14877
 
14878
    public void validate() throws org.apache.thrift.TException {
14879
      // check for required fields
14880
    }
14881
 
14882
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14883
      try {
14884
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14885
      } catch (org.apache.thrift.TException te) {
14886
        throw new java.io.IOException(te);
14887
      }
14888
    }
14889
 
14890
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14891
      try {
14892
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14893
      } catch (org.apache.thrift.TException te) {
14894
        throw new java.io.IOException(te);
14895
      }
14896
    }
14897
 
14898
  }
14899
 
14900
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
14901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
14902
 
14903
    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);
14904
 
14905
    private Supplier supplier; // required
14906
 
14907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14908
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14909
      SUPPLIER((short)1, "supplier");
14910
 
14911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14912
 
14913
      static {
14914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14915
          byName.put(field.getFieldName(), field);
14916
        }
14917
      }
14918
 
14919
      /**
14920
       * Find the _Fields constant that matches fieldId, or null if its not found.
14921
       */
14922
      public static _Fields findByThriftId(int fieldId) {
14923
        switch(fieldId) {
14924
          case 1: // SUPPLIER
14925
            return SUPPLIER;
14926
          default:
14927
            return null;
14928
        }
14929
      }
14930
 
14931
      /**
14932
       * Find the _Fields constant that matches fieldId, throwing an exception
14933
       * if it is not found.
14934
       */
14935
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14936
        _Fields fields = findByThriftId(fieldId);
14937
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14938
        return fields;
14939
      }
14940
 
14941
      /**
14942
       * Find the _Fields constant that matches name, or null if its not found.
14943
       */
14944
      public static _Fields findByName(String name) {
14945
        return byName.get(name);
14946
      }
14947
 
14948
      private final short _thriftId;
14949
      private final String _fieldName;
14950
 
14951
      _Fields(short thriftId, String fieldName) {
14952
        _thriftId = thriftId;
14953
        _fieldName = fieldName;
14954
      }
14955
 
14956
      public short getThriftFieldId() {
14957
        return _thriftId;
14958
      }
14959
 
14960
      public String getFieldName() {
14961
        return _fieldName;
14962
      }
14963
    }
14964
 
14965
    // isset id assignments
14966
 
14967
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14968
    static {
14969
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14970
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14971
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
14972
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14973
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
14974
    }
14975
 
14976
    public updateSupplier_args() {
14977
    }
14978
 
14979
    public updateSupplier_args(
14980
      Supplier supplier)
14981
    {
14982
      this();
14983
      this.supplier = supplier;
14984
    }
14985
 
14986
    /**
14987
     * Performs a deep copy on <i>other</i>.
14988
     */
14989
    public updateSupplier_args(updateSupplier_args other) {
14990
      if (other.isSetSupplier()) {
14991
        this.supplier = new Supplier(other.supplier);
14992
      }
14993
    }
14994
 
14995
    public updateSupplier_args deepCopy() {
14996
      return new updateSupplier_args(this);
14997
    }
14998
 
14999
    @Override
15000
    public void clear() {
15001
      this.supplier = null;
15002
    }
15003
 
15004
    public Supplier getSupplier() {
15005
      return this.supplier;
15006
    }
15007
 
15008
    public void setSupplier(Supplier supplier) {
15009
      this.supplier = supplier;
15010
    }
15011
 
15012
    public void unsetSupplier() {
15013
      this.supplier = null;
15014
    }
15015
 
15016
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
15017
    public boolean isSetSupplier() {
15018
      return this.supplier != null;
15019
    }
15020
 
15021
    public void setSupplierIsSet(boolean value) {
15022
      if (!value) {
15023
        this.supplier = null;
15024
      }
15025
    }
15026
 
15027
    public void setFieldValue(_Fields field, Object value) {
15028
      switch (field) {
15029
      case SUPPLIER:
15030
        if (value == null) {
15031
          unsetSupplier();
15032
        } else {
15033
          setSupplier((Supplier)value);
15034
        }
15035
        break;
15036
 
15037
      }
15038
    }
15039
 
15040
    public Object getFieldValue(_Fields field) {
15041
      switch (field) {
15042
      case SUPPLIER:
15043
        return getSupplier();
15044
 
15045
      }
15046
      throw new IllegalStateException();
15047
    }
15048
 
15049
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15050
    public boolean isSet(_Fields field) {
15051
      if (field == null) {
15052
        throw new IllegalArgumentException();
15053
      }
15054
 
15055
      switch (field) {
15056
      case SUPPLIER:
15057
        return isSetSupplier();
15058
      }
15059
      throw new IllegalStateException();
15060
    }
15061
 
15062
    @Override
15063
    public boolean equals(Object that) {
15064
      if (that == null)
15065
        return false;
15066
      if (that instanceof updateSupplier_args)
15067
        return this.equals((updateSupplier_args)that);
15068
      return false;
15069
    }
15070
 
15071
    public boolean equals(updateSupplier_args that) {
15072
      if (that == null)
15073
        return false;
15074
 
15075
      boolean this_present_supplier = true && this.isSetSupplier();
15076
      boolean that_present_supplier = true && that.isSetSupplier();
15077
      if (this_present_supplier || that_present_supplier) {
15078
        if (!(this_present_supplier && that_present_supplier))
15079
          return false;
15080
        if (!this.supplier.equals(that.supplier))
15081
          return false;
15082
      }
15083
 
15084
      return true;
15085
    }
15086
 
15087
    @Override
15088
    public int hashCode() {
15089
      return 0;
15090
    }
15091
 
15092
    public int compareTo(updateSupplier_args other) {
15093
      if (!getClass().equals(other.getClass())) {
15094
        return getClass().getName().compareTo(other.getClass().getName());
15095
      }
15096
 
15097
      int lastComparison = 0;
15098
      updateSupplier_args typedOther = (updateSupplier_args)other;
15099
 
15100
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
15101
      if (lastComparison != 0) {
15102
        return lastComparison;
15103
      }
15104
      if (isSetSupplier()) {
15105
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
15106
        if (lastComparison != 0) {
15107
          return lastComparison;
15108
        }
15109
      }
15110
      return 0;
15111
    }
15112
 
15113
    public _Fields fieldForId(int fieldId) {
15114
      return _Fields.findByThriftId(fieldId);
15115
    }
15116
 
15117
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15118
      org.apache.thrift.protocol.TField field;
15119
      iprot.readStructBegin();
15120
      while (true)
15121
      {
15122
        field = iprot.readFieldBegin();
15123
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15124
          break;
15125
        }
15126
        switch (field.id) {
15127
          case 1: // SUPPLIER
15128
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15129
              this.supplier = new Supplier();
15130
              this.supplier.read(iprot);
15131
            } else { 
15132
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15133
            }
15134
            break;
15135
          default:
15136
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15137
        }
15138
        iprot.readFieldEnd();
15139
      }
15140
      iprot.readStructEnd();
15141
      validate();
15142
    }
15143
 
15144
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15145
      validate();
15146
 
15147
      oprot.writeStructBegin(STRUCT_DESC);
15148
      if (this.supplier != null) {
15149
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
15150
        this.supplier.write(oprot);
15151
        oprot.writeFieldEnd();
15152
      }
15153
      oprot.writeFieldStop();
15154
      oprot.writeStructEnd();
15155
    }
15156
 
15157
    @Override
15158
    public String toString() {
15159
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
15160
      boolean first = true;
15161
 
15162
      sb.append("supplier:");
15163
      if (this.supplier == null) {
15164
        sb.append("null");
15165
      } else {
15166
        sb.append(this.supplier);
15167
      }
15168
      first = false;
15169
      sb.append(")");
15170
      return sb.toString();
15171
    }
15172
 
15173
    public void validate() throws org.apache.thrift.TException {
15174
      // check for required fields
15175
    }
15176
 
15177
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15178
      try {
15179
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15180
      } catch (org.apache.thrift.TException te) {
15181
        throw new java.io.IOException(te);
15182
      }
15183
    }
15184
 
15185
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15186
      try {
15187
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15188
      } catch (org.apache.thrift.TException te) {
15189
        throw new java.io.IOException(te);
15190
      }
15191
    }
15192
 
15193
  }
15194
 
15195
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
15196
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
15197
 
15198
 
15199
 
15200
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15201
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15202
;
15203
 
15204
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15205
 
15206
      static {
15207
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15208
          byName.put(field.getFieldName(), field);
15209
        }
15210
      }
15211
 
15212
      /**
15213
       * Find the _Fields constant that matches fieldId, or null if its not found.
15214
       */
15215
      public static _Fields findByThriftId(int fieldId) {
15216
        switch(fieldId) {
15217
          default:
15218
            return null;
15219
        }
15220
      }
15221
 
15222
      /**
15223
       * Find the _Fields constant that matches fieldId, throwing an exception
15224
       * if it is not found.
15225
       */
15226
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15227
        _Fields fields = findByThriftId(fieldId);
15228
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15229
        return fields;
15230
      }
15231
 
15232
      /**
15233
       * Find the _Fields constant that matches name, or null if its not found.
15234
       */
15235
      public static _Fields findByName(String name) {
15236
        return byName.get(name);
15237
      }
15238
 
15239
      private final short _thriftId;
15240
      private final String _fieldName;
15241
 
15242
      _Fields(short thriftId, String fieldName) {
15243
        _thriftId = thriftId;
15244
        _fieldName = fieldName;
15245
      }
15246
 
15247
      public short getThriftFieldId() {
15248
        return _thriftId;
15249
      }
15250
 
15251
      public String getFieldName() {
15252
        return _fieldName;
15253
      }
15254
    }
15255
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15256
    static {
15257
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15258
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15259
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
15260
    }
15261
 
15262
    public updateSupplier_result() {
15263
    }
15264
 
15265
    /**
15266
     * Performs a deep copy on <i>other</i>.
15267
     */
15268
    public updateSupplier_result(updateSupplier_result other) {
15269
    }
15270
 
15271
    public updateSupplier_result deepCopy() {
15272
      return new updateSupplier_result(this);
15273
    }
15274
 
15275
    @Override
15276
    public void clear() {
15277
    }
15278
 
15279
    public void setFieldValue(_Fields field, Object value) {
15280
      switch (field) {
15281
      }
15282
    }
15283
 
15284
    public Object getFieldValue(_Fields field) {
15285
      switch (field) {
15286
      }
15287
      throw new IllegalStateException();
15288
    }
15289
 
15290
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15291
    public boolean isSet(_Fields field) {
15292
      if (field == null) {
15293
        throw new IllegalArgumentException();
15294
      }
15295
 
15296
      switch (field) {
15297
      }
15298
      throw new IllegalStateException();
15299
    }
15300
 
15301
    @Override
15302
    public boolean equals(Object that) {
15303
      if (that == null)
15304
        return false;
15305
      if (that instanceof updateSupplier_result)
15306
        return this.equals((updateSupplier_result)that);
15307
      return false;
15308
    }
15309
 
15310
    public boolean equals(updateSupplier_result that) {
15311
      if (that == null)
15312
        return false;
15313
 
15314
      return true;
15315
    }
15316
 
15317
    @Override
15318
    public int hashCode() {
15319
      return 0;
15320
    }
15321
 
15322
    public int compareTo(updateSupplier_result other) {
15323
      if (!getClass().equals(other.getClass())) {
15324
        return getClass().getName().compareTo(other.getClass().getName());
15325
      }
15326
 
15327
      int lastComparison = 0;
15328
      updateSupplier_result typedOther = (updateSupplier_result)other;
15329
 
15330
      return 0;
15331
    }
15332
 
15333
    public _Fields fieldForId(int fieldId) {
15334
      return _Fields.findByThriftId(fieldId);
15335
    }
15336
 
15337
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15338
      org.apache.thrift.protocol.TField field;
15339
      iprot.readStructBegin();
15340
      while (true)
15341
      {
15342
        field = iprot.readFieldBegin();
15343
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15344
          break;
15345
        }
15346
        switch (field.id) {
15347
          default:
15348
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15349
        }
15350
        iprot.readFieldEnd();
15351
      }
15352
      iprot.readStructEnd();
15353
      validate();
15354
    }
15355
 
15356
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15357
      oprot.writeStructBegin(STRUCT_DESC);
15358
 
15359
      oprot.writeFieldStop();
15360
      oprot.writeStructEnd();
15361
    }
15362
 
15363
    @Override
15364
    public String toString() {
15365
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
15366
      boolean first = true;
15367
 
15368
      sb.append(")");
15369
      return sb.toString();
15370
    }
15371
 
15372
    public void validate() throws org.apache.thrift.TException {
15373
      // check for required fields
15374
    }
15375
 
15376
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15377
      try {
15378
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15379
      } catch (org.apache.thrift.TException te) {
15380
        throw new java.io.IOException(te);
15381
      }
15382
    }
15383
 
15384
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15385
      try {
15386
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15387
      } catch (org.apache.thrift.TException te) {
15388
        throw new java.io.IOException(te);
15389
      }
15390
    }
15391
 
15392
  }
15393
 
6467 amar.kumar 15394
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15395
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
15396
 
15397
    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);
15398
 
15399
    private PurchaseReturn purchaseReturn; // required
15400
 
15401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15402
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15403
      PURCHASE_RETURN((short)1, "purchaseReturn");
15404
 
15405
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15406
 
15407
      static {
15408
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15409
          byName.put(field.getFieldName(), field);
15410
        }
15411
      }
15412
 
15413
      /**
15414
       * Find the _Fields constant that matches fieldId, or null if its not found.
15415
       */
15416
      public static _Fields findByThriftId(int fieldId) {
15417
        switch(fieldId) {
15418
          case 1: // PURCHASE_RETURN
15419
            return PURCHASE_RETURN;
15420
          default:
15421
            return null;
15422
        }
15423
      }
15424
 
15425
      /**
15426
       * Find the _Fields constant that matches fieldId, throwing an exception
15427
       * if it is not found.
15428
       */
15429
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15430
        _Fields fields = findByThriftId(fieldId);
15431
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15432
        return fields;
15433
      }
15434
 
15435
      /**
15436
       * Find the _Fields constant that matches name, or null if its not found.
15437
       */
15438
      public static _Fields findByName(String name) {
15439
        return byName.get(name);
15440
      }
15441
 
15442
      private final short _thriftId;
15443
      private final String _fieldName;
15444
 
15445
      _Fields(short thriftId, String fieldName) {
15446
        _thriftId = thriftId;
15447
        _fieldName = fieldName;
15448
      }
15449
 
15450
      public short getThriftFieldId() {
15451
        return _thriftId;
15452
      }
15453
 
15454
      public String getFieldName() {
15455
        return _fieldName;
15456
      }
15457
    }
15458
 
15459
    // isset id assignments
15460
 
15461
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15462
    static {
15463
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15464
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15465
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
15466
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15467
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
15468
    }
15469
 
15470
    public createPurchaseReturn_args() {
15471
    }
15472
 
15473
    public createPurchaseReturn_args(
15474
      PurchaseReturn purchaseReturn)
15475
    {
15476
      this();
15477
      this.purchaseReturn = purchaseReturn;
15478
    }
15479
 
15480
    /**
15481
     * Performs a deep copy on <i>other</i>.
15482
     */
15483
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
15484
      if (other.isSetPurchaseReturn()) {
15485
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
15486
      }
15487
    }
15488
 
15489
    public createPurchaseReturn_args deepCopy() {
15490
      return new createPurchaseReturn_args(this);
15491
    }
15492
 
15493
    @Override
15494
    public void clear() {
15495
      this.purchaseReturn = null;
15496
    }
15497
 
15498
    public PurchaseReturn getPurchaseReturn() {
15499
      return this.purchaseReturn;
15500
    }
15501
 
15502
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
15503
      this.purchaseReturn = purchaseReturn;
15504
    }
15505
 
15506
    public void unsetPurchaseReturn() {
15507
      this.purchaseReturn = null;
15508
    }
15509
 
15510
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
15511
    public boolean isSetPurchaseReturn() {
15512
      return this.purchaseReturn != null;
15513
    }
15514
 
15515
    public void setPurchaseReturnIsSet(boolean value) {
15516
      if (!value) {
15517
        this.purchaseReturn = null;
15518
      }
15519
    }
15520
 
15521
    public void setFieldValue(_Fields field, Object value) {
15522
      switch (field) {
15523
      case PURCHASE_RETURN:
15524
        if (value == null) {
15525
          unsetPurchaseReturn();
15526
        } else {
15527
          setPurchaseReturn((PurchaseReturn)value);
15528
        }
15529
        break;
15530
 
15531
      }
15532
    }
15533
 
15534
    public Object getFieldValue(_Fields field) {
15535
      switch (field) {
15536
      case PURCHASE_RETURN:
15537
        return getPurchaseReturn();
15538
 
15539
      }
15540
      throw new IllegalStateException();
15541
    }
15542
 
15543
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15544
    public boolean isSet(_Fields field) {
15545
      if (field == null) {
15546
        throw new IllegalArgumentException();
15547
      }
15548
 
15549
      switch (field) {
15550
      case PURCHASE_RETURN:
15551
        return isSetPurchaseReturn();
15552
      }
15553
      throw new IllegalStateException();
15554
    }
15555
 
15556
    @Override
15557
    public boolean equals(Object that) {
15558
      if (that == null)
15559
        return false;
15560
      if (that instanceof createPurchaseReturn_args)
15561
        return this.equals((createPurchaseReturn_args)that);
15562
      return false;
15563
    }
15564
 
15565
    public boolean equals(createPurchaseReturn_args that) {
15566
      if (that == null)
15567
        return false;
15568
 
15569
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
15570
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
15571
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
15572
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
15573
          return false;
15574
        if (!this.purchaseReturn.equals(that.purchaseReturn))
15575
          return false;
15576
      }
15577
 
15578
      return true;
15579
    }
15580
 
15581
    @Override
15582
    public int hashCode() {
15583
      return 0;
15584
    }
15585
 
15586
    public int compareTo(createPurchaseReturn_args other) {
15587
      if (!getClass().equals(other.getClass())) {
15588
        return getClass().getName().compareTo(other.getClass().getName());
15589
      }
15590
 
15591
      int lastComparison = 0;
15592
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
15593
 
15594
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
15595
      if (lastComparison != 0) {
15596
        return lastComparison;
15597
      }
15598
      if (isSetPurchaseReturn()) {
15599
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
15600
        if (lastComparison != 0) {
15601
          return lastComparison;
15602
        }
15603
      }
15604
      return 0;
15605
    }
15606
 
15607
    public _Fields fieldForId(int fieldId) {
15608
      return _Fields.findByThriftId(fieldId);
15609
    }
15610
 
15611
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15612
      org.apache.thrift.protocol.TField field;
15613
      iprot.readStructBegin();
15614
      while (true)
15615
      {
15616
        field = iprot.readFieldBegin();
15617
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15618
          break;
15619
        }
15620
        switch (field.id) {
15621
          case 1: // PURCHASE_RETURN
15622
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15623
              this.purchaseReturn = new PurchaseReturn();
15624
              this.purchaseReturn.read(iprot);
15625
            } else { 
15626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15627
            }
15628
            break;
15629
          default:
15630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15631
        }
15632
        iprot.readFieldEnd();
15633
      }
15634
      iprot.readStructEnd();
15635
      validate();
15636
    }
15637
 
15638
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15639
      validate();
15640
 
15641
      oprot.writeStructBegin(STRUCT_DESC);
15642
      if (this.purchaseReturn != null) {
15643
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
15644
        this.purchaseReturn.write(oprot);
15645
        oprot.writeFieldEnd();
15646
      }
15647
      oprot.writeFieldStop();
15648
      oprot.writeStructEnd();
15649
    }
15650
 
15651
    @Override
15652
    public String toString() {
15653
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
15654
      boolean first = true;
15655
 
15656
      sb.append("purchaseReturn:");
15657
      if (this.purchaseReturn == null) {
15658
        sb.append("null");
15659
      } else {
15660
        sb.append(this.purchaseReturn);
15661
      }
15662
      first = false;
15663
      sb.append(")");
15664
      return sb.toString();
15665
    }
15666
 
15667
    public void validate() throws org.apache.thrift.TException {
15668
      // check for required fields
15669
    }
15670
 
15671
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15672
      try {
15673
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15674
      } catch (org.apache.thrift.TException te) {
15675
        throw new java.io.IOException(te);
15676
      }
15677
    }
15678
 
15679
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15680
      try {
15681
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15682
      } catch (org.apache.thrift.TException te) {
15683
        throw new java.io.IOException(te);
15684
      }
15685
    }
15686
 
15687
  }
15688
 
15689
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15690
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
15691
 
15692
    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);
15693
 
15694
    private long success; // required
15695
 
15696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15697
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15698
      SUCCESS((short)0, "success");
15699
 
15700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15701
 
15702
      static {
15703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15704
          byName.put(field.getFieldName(), field);
15705
        }
15706
      }
15707
 
15708
      /**
15709
       * Find the _Fields constant that matches fieldId, or null if its not found.
15710
       */
15711
      public static _Fields findByThriftId(int fieldId) {
15712
        switch(fieldId) {
15713
          case 0: // SUCCESS
15714
            return SUCCESS;
15715
          default:
15716
            return null;
15717
        }
15718
      }
15719
 
15720
      /**
15721
       * Find the _Fields constant that matches fieldId, throwing an exception
15722
       * if it is not found.
15723
       */
15724
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15725
        _Fields fields = findByThriftId(fieldId);
15726
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15727
        return fields;
15728
      }
15729
 
15730
      /**
15731
       * Find the _Fields constant that matches name, or null if its not found.
15732
       */
15733
      public static _Fields findByName(String name) {
15734
        return byName.get(name);
15735
      }
15736
 
15737
      private final short _thriftId;
15738
      private final String _fieldName;
15739
 
15740
      _Fields(short thriftId, String fieldName) {
15741
        _thriftId = thriftId;
15742
        _fieldName = fieldName;
15743
      }
15744
 
15745
      public short getThriftFieldId() {
15746
        return _thriftId;
15747
      }
15748
 
15749
      public String getFieldName() {
15750
        return _fieldName;
15751
      }
15752
    }
15753
 
15754
    // isset id assignments
15755
    private static final int __SUCCESS_ISSET_ID = 0;
15756
    private BitSet __isset_bit_vector = new BitSet(1);
15757
 
15758
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15759
    static {
15760
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15761
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15762
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15763
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15764
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
15765
    }
15766
 
15767
    public createPurchaseReturn_result() {
15768
    }
15769
 
15770
    public createPurchaseReturn_result(
15771
      long success)
15772
    {
15773
      this();
15774
      this.success = success;
15775
      setSuccessIsSet(true);
15776
    }
15777
 
15778
    /**
15779
     * Performs a deep copy on <i>other</i>.
15780
     */
15781
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
15782
      __isset_bit_vector.clear();
15783
      __isset_bit_vector.or(other.__isset_bit_vector);
15784
      this.success = other.success;
15785
    }
15786
 
15787
    public createPurchaseReturn_result deepCopy() {
15788
      return new createPurchaseReturn_result(this);
15789
    }
15790
 
15791
    @Override
15792
    public void clear() {
15793
      setSuccessIsSet(false);
15794
      this.success = 0;
15795
    }
15796
 
15797
    public long getSuccess() {
15798
      return this.success;
15799
    }
15800
 
15801
    public void setSuccess(long success) {
15802
      this.success = success;
15803
      setSuccessIsSet(true);
15804
    }
15805
 
15806
    public void unsetSuccess() {
15807
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15808
    }
15809
 
15810
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15811
    public boolean isSetSuccess() {
15812
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15813
    }
15814
 
15815
    public void setSuccessIsSet(boolean value) {
15816
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15817
    }
15818
 
15819
    public void setFieldValue(_Fields field, Object value) {
15820
      switch (field) {
15821
      case SUCCESS:
15822
        if (value == null) {
15823
          unsetSuccess();
15824
        } else {
15825
          setSuccess((Long)value);
15826
        }
15827
        break;
15828
 
15829
      }
15830
    }
15831
 
15832
    public Object getFieldValue(_Fields field) {
15833
      switch (field) {
15834
      case SUCCESS:
15835
        return Long.valueOf(getSuccess());
15836
 
15837
      }
15838
      throw new IllegalStateException();
15839
    }
15840
 
15841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15842
    public boolean isSet(_Fields field) {
15843
      if (field == null) {
15844
        throw new IllegalArgumentException();
15845
      }
15846
 
15847
      switch (field) {
15848
      case SUCCESS:
15849
        return isSetSuccess();
15850
      }
15851
      throw new IllegalStateException();
15852
    }
15853
 
15854
    @Override
15855
    public boolean equals(Object that) {
15856
      if (that == null)
15857
        return false;
15858
      if (that instanceof createPurchaseReturn_result)
15859
        return this.equals((createPurchaseReturn_result)that);
15860
      return false;
15861
    }
15862
 
15863
    public boolean equals(createPurchaseReturn_result that) {
15864
      if (that == null)
15865
        return false;
15866
 
15867
      boolean this_present_success = true;
15868
      boolean that_present_success = true;
15869
      if (this_present_success || that_present_success) {
15870
        if (!(this_present_success && that_present_success))
15871
          return false;
15872
        if (this.success != that.success)
15873
          return false;
15874
      }
15875
 
15876
      return true;
15877
    }
15878
 
15879
    @Override
15880
    public int hashCode() {
15881
      return 0;
15882
    }
15883
 
15884
    public int compareTo(createPurchaseReturn_result other) {
15885
      if (!getClass().equals(other.getClass())) {
15886
        return getClass().getName().compareTo(other.getClass().getName());
15887
      }
15888
 
15889
      int lastComparison = 0;
15890
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
15891
 
15892
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15893
      if (lastComparison != 0) {
15894
        return lastComparison;
15895
      }
15896
      if (isSetSuccess()) {
15897
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15898
        if (lastComparison != 0) {
15899
          return lastComparison;
15900
        }
15901
      }
15902
      return 0;
15903
    }
15904
 
15905
    public _Fields fieldForId(int fieldId) {
15906
      return _Fields.findByThriftId(fieldId);
15907
    }
15908
 
15909
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15910
      org.apache.thrift.protocol.TField field;
15911
      iprot.readStructBegin();
15912
      while (true)
15913
      {
15914
        field = iprot.readFieldBegin();
15915
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15916
          break;
15917
        }
15918
        switch (field.id) {
15919
          case 0: // SUCCESS
15920
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15921
              this.success = iprot.readI64();
15922
              setSuccessIsSet(true);
15923
            } else { 
15924
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15925
            }
15926
            break;
15927
          default:
15928
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15929
        }
15930
        iprot.readFieldEnd();
15931
      }
15932
      iprot.readStructEnd();
15933
      validate();
15934
    }
15935
 
15936
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15937
      oprot.writeStructBegin(STRUCT_DESC);
15938
 
15939
      if (this.isSetSuccess()) {
15940
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15941
        oprot.writeI64(this.success);
15942
        oprot.writeFieldEnd();
15943
      }
15944
      oprot.writeFieldStop();
15945
      oprot.writeStructEnd();
15946
    }
15947
 
15948
    @Override
15949
    public String toString() {
15950
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
15951
      boolean first = true;
15952
 
15953
      sb.append("success:");
15954
      sb.append(this.success);
15955
      first = false;
15956
      sb.append(")");
15957
      return sb.toString();
15958
    }
15959
 
15960
    public void validate() throws org.apache.thrift.TException {
15961
      // check for required fields
15962
    }
15963
 
15964
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15965
      try {
15966
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15967
      } catch (org.apache.thrift.TException te) {
15968
        throw new java.io.IOException(te);
15969
      }
15970
    }
15971
 
15972
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15973
      try {
15974
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15975
      } catch (org.apache.thrift.TException te) {
15976
        throw new java.io.IOException(te);
15977
      }
15978
    }
15979
 
15980
  }
15981
 
15982
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
15983
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
15984
 
15985
    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);
15986
 
15987
    private long id; // required
15988
 
15989
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15990
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15991
      ID((short)1, "id");
15992
 
15993
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15994
 
15995
      static {
15996
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15997
          byName.put(field.getFieldName(), field);
15998
        }
15999
      }
16000
 
16001
      /**
16002
       * Find the _Fields constant that matches fieldId, or null if its not found.
16003
       */
16004
      public static _Fields findByThriftId(int fieldId) {
16005
        switch(fieldId) {
16006
          case 1: // ID
16007
            return ID;
16008
          default:
16009
            return null;
16010
        }
16011
      }
16012
 
16013
      /**
16014
       * Find the _Fields constant that matches fieldId, throwing an exception
16015
       * if it is not found.
16016
       */
16017
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16018
        _Fields fields = findByThriftId(fieldId);
16019
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16020
        return fields;
16021
      }
16022
 
16023
      /**
16024
       * Find the _Fields constant that matches name, or null if its not found.
16025
       */
16026
      public static _Fields findByName(String name) {
16027
        return byName.get(name);
16028
      }
16029
 
16030
      private final short _thriftId;
16031
      private final String _fieldName;
16032
 
16033
      _Fields(short thriftId, String fieldName) {
16034
        _thriftId = thriftId;
16035
        _fieldName = fieldName;
16036
      }
16037
 
16038
      public short getThriftFieldId() {
16039
        return _thriftId;
16040
      }
16041
 
16042
      public String getFieldName() {
16043
        return _fieldName;
16044
      }
16045
    }
16046
 
16047
    // isset id assignments
16048
    private static final int __ID_ISSET_ID = 0;
16049
    private BitSet __isset_bit_vector = new BitSet(1);
16050
 
16051
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16052
    static {
16053
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16054
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16055
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16056
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16057
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
16058
    }
16059
 
16060
    public settlePurchaseReturn_args() {
16061
    }
16062
 
16063
    public settlePurchaseReturn_args(
16064
      long id)
16065
    {
16066
      this();
16067
      this.id = id;
16068
      setIdIsSet(true);
16069
    }
16070
 
16071
    /**
16072
     * Performs a deep copy on <i>other</i>.
16073
     */
16074
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
16075
      __isset_bit_vector.clear();
16076
      __isset_bit_vector.or(other.__isset_bit_vector);
16077
      this.id = other.id;
16078
    }
16079
 
16080
    public settlePurchaseReturn_args deepCopy() {
16081
      return new settlePurchaseReturn_args(this);
16082
    }
16083
 
16084
    @Override
16085
    public void clear() {
16086
      setIdIsSet(false);
16087
      this.id = 0;
16088
    }
16089
 
16090
    public long getId() {
16091
      return this.id;
16092
    }
16093
 
16094
    public void setId(long id) {
16095
      this.id = id;
16096
      setIdIsSet(true);
16097
    }
16098
 
16099
    public void unsetId() {
16100
      __isset_bit_vector.clear(__ID_ISSET_ID);
16101
    }
16102
 
16103
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
16104
    public boolean isSetId() {
16105
      return __isset_bit_vector.get(__ID_ISSET_ID);
16106
    }
16107
 
16108
    public void setIdIsSet(boolean value) {
16109
      __isset_bit_vector.set(__ID_ISSET_ID, value);
16110
    }
16111
 
16112
    public void setFieldValue(_Fields field, Object value) {
16113
      switch (field) {
16114
      case ID:
16115
        if (value == null) {
16116
          unsetId();
16117
        } else {
16118
          setId((Long)value);
16119
        }
16120
        break;
16121
 
16122
      }
16123
    }
16124
 
16125
    public Object getFieldValue(_Fields field) {
16126
      switch (field) {
16127
      case ID:
16128
        return Long.valueOf(getId());
16129
 
16130
      }
16131
      throw new IllegalStateException();
16132
    }
16133
 
16134
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16135
    public boolean isSet(_Fields field) {
16136
      if (field == null) {
16137
        throw new IllegalArgumentException();
16138
      }
16139
 
16140
      switch (field) {
16141
      case ID:
16142
        return isSetId();
16143
      }
16144
      throw new IllegalStateException();
16145
    }
16146
 
16147
    @Override
16148
    public boolean equals(Object that) {
16149
      if (that == null)
16150
        return false;
16151
      if (that instanceof settlePurchaseReturn_args)
16152
        return this.equals((settlePurchaseReturn_args)that);
16153
      return false;
16154
    }
16155
 
16156
    public boolean equals(settlePurchaseReturn_args that) {
16157
      if (that == null)
16158
        return false;
16159
 
16160
      boolean this_present_id = true;
16161
      boolean that_present_id = true;
16162
      if (this_present_id || that_present_id) {
16163
        if (!(this_present_id && that_present_id))
16164
          return false;
16165
        if (this.id != that.id)
16166
          return false;
16167
      }
16168
 
16169
      return true;
16170
    }
16171
 
16172
    @Override
16173
    public int hashCode() {
16174
      return 0;
16175
    }
16176
 
16177
    public int compareTo(settlePurchaseReturn_args other) {
16178
      if (!getClass().equals(other.getClass())) {
16179
        return getClass().getName().compareTo(other.getClass().getName());
16180
      }
16181
 
16182
      int lastComparison = 0;
16183
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
16184
 
16185
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
16186
      if (lastComparison != 0) {
16187
        return lastComparison;
16188
      }
16189
      if (isSetId()) {
16190
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
16191
        if (lastComparison != 0) {
16192
          return lastComparison;
16193
        }
16194
      }
16195
      return 0;
16196
    }
16197
 
16198
    public _Fields fieldForId(int fieldId) {
16199
      return _Fields.findByThriftId(fieldId);
16200
    }
16201
 
16202
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16203
      org.apache.thrift.protocol.TField field;
16204
      iprot.readStructBegin();
16205
      while (true)
16206
      {
16207
        field = iprot.readFieldBegin();
16208
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16209
          break;
16210
        }
16211
        switch (field.id) {
16212
          case 1: // ID
16213
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16214
              this.id = iprot.readI64();
16215
              setIdIsSet(true);
16216
            } else { 
16217
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16218
            }
16219
            break;
16220
          default:
16221
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16222
        }
16223
        iprot.readFieldEnd();
16224
      }
16225
      iprot.readStructEnd();
16226
      validate();
16227
    }
16228
 
16229
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16230
      validate();
16231
 
16232
      oprot.writeStructBegin(STRUCT_DESC);
16233
      oprot.writeFieldBegin(ID_FIELD_DESC);
16234
      oprot.writeI64(this.id);
16235
      oprot.writeFieldEnd();
16236
      oprot.writeFieldStop();
16237
      oprot.writeStructEnd();
16238
    }
16239
 
16240
    @Override
16241
    public String toString() {
16242
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
16243
      boolean first = true;
16244
 
16245
      sb.append("id:");
16246
      sb.append(this.id);
16247
      first = false;
16248
      sb.append(")");
16249
      return sb.toString();
16250
    }
16251
 
16252
    public void validate() throws org.apache.thrift.TException {
16253
      // check for required fields
16254
    }
16255
 
16256
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16257
      try {
16258
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16259
      } catch (org.apache.thrift.TException te) {
16260
        throw new java.io.IOException(te);
16261
      }
16262
    }
16263
 
16264
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16265
      try {
16266
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
16267
        __isset_bit_vector = new BitSet(1);
16268
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16269
      } catch (org.apache.thrift.TException te) {
16270
        throw new java.io.IOException(te);
16271
      }
16272
    }
16273
 
16274
  }
16275
 
16276
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
16277
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
16278
 
16279
 
16280
 
16281
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16282
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16283
;
16284
 
16285
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16286
 
16287
      static {
16288
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16289
          byName.put(field.getFieldName(), field);
16290
        }
16291
      }
16292
 
16293
      /**
16294
       * Find the _Fields constant that matches fieldId, or null if its not found.
16295
       */
16296
      public static _Fields findByThriftId(int fieldId) {
16297
        switch(fieldId) {
16298
          default:
16299
            return null;
16300
        }
16301
      }
16302
 
16303
      /**
16304
       * Find the _Fields constant that matches fieldId, throwing an exception
16305
       * if it is not found.
16306
       */
16307
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16308
        _Fields fields = findByThriftId(fieldId);
16309
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16310
        return fields;
16311
      }
16312
 
16313
      /**
16314
       * Find the _Fields constant that matches name, or null if its not found.
16315
       */
16316
      public static _Fields findByName(String name) {
16317
        return byName.get(name);
16318
      }
16319
 
16320
      private final short _thriftId;
16321
      private final String _fieldName;
16322
 
16323
      _Fields(short thriftId, String fieldName) {
16324
        _thriftId = thriftId;
16325
        _fieldName = fieldName;
16326
      }
16327
 
16328
      public short getThriftFieldId() {
16329
        return _thriftId;
16330
      }
16331
 
16332
      public String getFieldName() {
16333
        return _fieldName;
16334
      }
16335
    }
16336
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16337
    static {
16338
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16339
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16340
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
16341
    }
16342
 
16343
    public settlePurchaseReturn_result() {
16344
    }
16345
 
16346
    /**
16347
     * Performs a deep copy on <i>other</i>.
16348
     */
16349
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
16350
    }
16351
 
16352
    public settlePurchaseReturn_result deepCopy() {
16353
      return new settlePurchaseReturn_result(this);
16354
    }
16355
 
16356
    @Override
16357
    public void clear() {
16358
    }
16359
 
16360
    public void setFieldValue(_Fields field, Object value) {
16361
      switch (field) {
16362
      }
16363
    }
16364
 
16365
    public Object getFieldValue(_Fields field) {
16366
      switch (field) {
16367
      }
16368
      throw new IllegalStateException();
16369
    }
16370
 
16371
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16372
    public boolean isSet(_Fields field) {
16373
      if (field == null) {
16374
        throw new IllegalArgumentException();
16375
      }
16376
 
16377
      switch (field) {
16378
      }
16379
      throw new IllegalStateException();
16380
    }
16381
 
16382
    @Override
16383
    public boolean equals(Object that) {
16384
      if (that == null)
16385
        return false;
16386
      if (that instanceof settlePurchaseReturn_result)
16387
        return this.equals((settlePurchaseReturn_result)that);
16388
      return false;
16389
    }
16390
 
16391
    public boolean equals(settlePurchaseReturn_result that) {
16392
      if (that == null)
16393
        return false;
16394
 
16395
      return true;
16396
    }
16397
 
16398
    @Override
16399
    public int hashCode() {
16400
      return 0;
16401
    }
16402
 
16403
    public int compareTo(settlePurchaseReturn_result other) {
16404
      if (!getClass().equals(other.getClass())) {
16405
        return getClass().getName().compareTo(other.getClass().getName());
16406
      }
16407
 
16408
      int lastComparison = 0;
16409
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
16410
 
16411
      return 0;
16412
    }
16413
 
16414
    public _Fields fieldForId(int fieldId) {
16415
      return _Fields.findByThriftId(fieldId);
16416
    }
16417
 
16418
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16419
      org.apache.thrift.protocol.TField field;
16420
      iprot.readStructBegin();
16421
      while (true)
16422
      {
16423
        field = iprot.readFieldBegin();
16424
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16425
          break;
16426
        }
16427
        switch (field.id) {
16428
          default:
16429
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16430
        }
16431
        iprot.readFieldEnd();
16432
      }
16433
      iprot.readStructEnd();
16434
      validate();
16435
    }
16436
 
16437
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16438
      oprot.writeStructBegin(STRUCT_DESC);
16439
 
16440
      oprot.writeFieldStop();
16441
      oprot.writeStructEnd();
16442
    }
16443
 
16444
    @Override
16445
    public String toString() {
16446
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
16447
      boolean first = true;
16448
 
16449
      sb.append(")");
16450
      return sb.toString();
16451
    }
16452
 
16453
    public void validate() throws org.apache.thrift.TException {
16454
      // check for required fields
16455
    }
16456
 
16457
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16458
      try {
16459
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16460
      } catch (org.apache.thrift.TException te) {
16461
        throw new java.io.IOException(te);
16462
      }
16463
    }
16464
 
16465
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16466
      try {
16467
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16468
      } catch (org.apache.thrift.TException te) {
16469
        throw new java.io.IOException(te);
16470
      }
16471
    }
16472
 
16473
  }
16474
 
16475
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
16476
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
16477
 
16478
 
16479
 
16480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16481
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16482
;
16483
 
16484
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16485
 
16486
      static {
16487
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16488
          byName.put(field.getFieldName(), field);
16489
        }
16490
      }
16491
 
16492
      /**
16493
       * Find the _Fields constant that matches fieldId, or null if its not found.
16494
       */
16495
      public static _Fields findByThriftId(int fieldId) {
16496
        switch(fieldId) {
16497
          default:
16498
            return null;
16499
        }
16500
      }
16501
 
16502
      /**
16503
       * Find the _Fields constant that matches fieldId, throwing an exception
16504
       * if it is not found.
16505
       */
16506
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16507
        _Fields fields = findByThriftId(fieldId);
16508
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16509
        return fields;
16510
      }
16511
 
16512
      /**
16513
       * Find the _Fields constant that matches name, or null if its not found.
16514
       */
16515
      public static _Fields findByName(String name) {
16516
        return byName.get(name);
16517
      }
16518
 
16519
      private final short _thriftId;
16520
      private final String _fieldName;
16521
 
16522
      _Fields(short thriftId, String fieldName) {
16523
        _thriftId = thriftId;
16524
        _fieldName = fieldName;
16525
      }
16526
 
16527
      public short getThriftFieldId() {
16528
        return _thriftId;
16529
      }
16530
 
16531
      public String getFieldName() {
16532
        return _fieldName;
16533
      }
16534
    }
16535
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16536
    static {
16537
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16538
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16539
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
16540
    }
16541
 
16542
    public getUnsettledPurchaseReturns_args() {
16543
    }
16544
 
16545
    /**
16546
     * Performs a deep copy on <i>other</i>.
16547
     */
16548
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
16549
    }
16550
 
16551
    public getUnsettledPurchaseReturns_args deepCopy() {
16552
      return new getUnsettledPurchaseReturns_args(this);
16553
    }
16554
 
16555
    @Override
16556
    public void clear() {
16557
    }
16558
 
16559
    public void setFieldValue(_Fields field, Object value) {
16560
      switch (field) {
16561
      }
16562
    }
16563
 
16564
    public Object getFieldValue(_Fields field) {
16565
      switch (field) {
16566
      }
16567
      throw new IllegalStateException();
16568
    }
16569
 
16570
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16571
    public boolean isSet(_Fields field) {
16572
      if (field == null) {
16573
        throw new IllegalArgumentException();
16574
      }
16575
 
16576
      switch (field) {
16577
      }
16578
      throw new IllegalStateException();
16579
    }
16580
 
16581
    @Override
16582
    public boolean equals(Object that) {
16583
      if (that == null)
16584
        return false;
16585
      if (that instanceof getUnsettledPurchaseReturns_args)
16586
        return this.equals((getUnsettledPurchaseReturns_args)that);
16587
      return false;
16588
    }
16589
 
16590
    public boolean equals(getUnsettledPurchaseReturns_args that) {
16591
      if (that == null)
16592
        return false;
16593
 
16594
      return true;
16595
    }
16596
 
16597
    @Override
16598
    public int hashCode() {
16599
      return 0;
16600
    }
16601
 
16602
    public int compareTo(getUnsettledPurchaseReturns_args other) {
16603
      if (!getClass().equals(other.getClass())) {
16604
        return getClass().getName().compareTo(other.getClass().getName());
16605
      }
16606
 
16607
      int lastComparison = 0;
16608
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
16609
 
16610
      return 0;
16611
    }
16612
 
16613
    public _Fields fieldForId(int fieldId) {
16614
      return _Fields.findByThriftId(fieldId);
16615
    }
16616
 
16617
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16618
      org.apache.thrift.protocol.TField field;
16619
      iprot.readStructBegin();
16620
      while (true)
16621
      {
16622
        field = iprot.readFieldBegin();
16623
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16624
          break;
16625
        }
16626
        switch (field.id) {
16627
          default:
16628
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16629
        }
16630
        iprot.readFieldEnd();
16631
      }
16632
      iprot.readStructEnd();
16633
      validate();
16634
    }
16635
 
16636
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16637
      validate();
16638
 
16639
      oprot.writeStructBegin(STRUCT_DESC);
16640
      oprot.writeFieldStop();
16641
      oprot.writeStructEnd();
16642
    }
16643
 
16644
    @Override
16645
    public String toString() {
16646
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
16647
      boolean first = true;
16648
 
16649
      sb.append(")");
16650
      return sb.toString();
16651
    }
16652
 
16653
    public void validate() throws org.apache.thrift.TException {
16654
      // check for required fields
16655
    }
16656
 
16657
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16658
      try {
16659
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16660
      } catch (org.apache.thrift.TException te) {
16661
        throw new java.io.IOException(te);
16662
      }
16663
    }
16664
 
16665
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16666
      try {
16667
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16668
      } catch (org.apache.thrift.TException te) {
16669
        throw new java.io.IOException(te);
16670
      }
16671
    }
16672
 
16673
  }
16674
 
16675
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
16676
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
16677
 
16678
    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);
16679
 
16680
    private List<PurchaseReturn> success; // required
16681
 
16682
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16683
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16684
      SUCCESS((short)0, "success");
16685
 
16686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16687
 
16688
      static {
16689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16690
          byName.put(field.getFieldName(), field);
16691
        }
16692
      }
16693
 
16694
      /**
16695
       * Find the _Fields constant that matches fieldId, or null if its not found.
16696
       */
16697
      public static _Fields findByThriftId(int fieldId) {
16698
        switch(fieldId) {
16699
          case 0: // SUCCESS
16700
            return SUCCESS;
16701
          default:
16702
            return null;
16703
        }
16704
      }
16705
 
16706
      /**
16707
       * Find the _Fields constant that matches fieldId, throwing an exception
16708
       * if it is not found.
16709
       */
16710
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16711
        _Fields fields = findByThriftId(fieldId);
16712
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16713
        return fields;
16714
      }
16715
 
16716
      /**
16717
       * Find the _Fields constant that matches name, or null if its not found.
16718
       */
16719
      public static _Fields findByName(String name) {
16720
        return byName.get(name);
16721
      }
16722
 
16723
      private final short _thriftId;
16724
      private final String _fieldName;
16725
 
16726
      _Fields(short thriftId, String fieldName) {
16727
        _thriftId = thriftId;
16728
        _fieldName = fieldName;
16729
      }
16730
 
16731
      public short getThriftFieldId() {
16732
        return _thriftId;
16733
      }
16734
 
16735
      public String getFieldName() {
16736
        return _fieldName;
16737
      }
16738
    }
16739
 
16740
    // isset id assignments
16741
 
16742
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16743
    static {
16744
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16745
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16746
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16747
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16748
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16749
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
16750
    }
16751
 
16752
    public getUnsettledPurchaseReturns_result() {
16753
    }
16754
 
16755
    public getUnsettledPurchaseReturns_result(
16756
      List<PurchaseReturn> success)
16757
    {
16758
      this();
16759
      this.success = success;
16760
    }
16761
 
16762
    /**
16763
     * Performs a deep copy on <i>other</i>.
16764
     */
16765
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
16766
      if (other.isSetSuccess()) {
16767
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16768
        for (PurchaseReturn other_element : other.success) {
16769
          __this__success.add(new PurchaseReturn(other_element));
16770
        }
16771
        this.success = __this__success;
16772
      }
16773
    }
16774
 
16775
    public getUnsettledPurchaseReturns_result deepCopy() {
16776
      return new getUnsettledPurchaseReturns_result(this);
16777
    }
16778
 
16779
    @Override
16780
    public void clear() {
16781
      this.success = null;
16782
    }
16783
 
16784
    public int getSuccessSize() {
16785
      return (this.success == null) ? 0 : this.success.size();
16786
    }
16787
 
16788
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16789
      return (this.success == null) ? null : this.success.iterator();
16790
    }
16791
 
16792
    public void addToSuccess(PurchaseReturn elem) {
16793
      if (this.success == null) {
16794
        this.success = new ArrayList<PurchaseReturn>();
16795
      }
16796
      this.success.add(elem);
16797
    }
16798
 
16799
    public List<PurchaseReturn> getSuccess() {
16800
      return this.success;
16801
    }
16802
 
16803
    public void setSuccess(List<PurchaseReturn> success) {
16804
      this.success = success;
16805
    }
16806
 
16807
    public void unsetSuccess() {
16808
      this.success = null;
16809
    }
16810
 
16811
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16812
    public boolean isSetSuccess() {
16813
      return this.success != null;
16814
    }
16815
 
16816
    public void setSuccessIsSet(boolean value) {
16817
      if (!value) {
16818
        this.success = null;
16819
      }
16820
    }
16821
 
16822
    public void setFieldValue(_Fields field, Object value) {
16823
      switch (field) {
16824
      case SUCCESS:
16825
        if (value == null) {
16826
          unsetSuccess();
16827
        } else {
16828
          setSuccess((List<PurchaseReturn>)value);
16829
        }
16830
        break;
16831
 
16832
      }
16833
    }
16834
 
16835
    public Object getFieldValue(_Fields field) {
16836
      switch (field) {
16837
      case SUCCESS:
16838
        return getSuccess();
16839
 
16840
      }
16841
      throw new IllegalStateException();
16842
    }
16843
 
16844
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16845
    public boolean isSet(_Fields field) {
16846
      if (field == null) {
16847
        throw new IllegalArgumentException();
16848
      }
16849
 
16850
      switch (field) {
16851
      case SUCCESS:
16852
        return isSetSuccess();
16853
      }
16854
      throw new IllegalStateException();
16855
    }
16856
 
16857
    @Override
16858
    public boolean equals(Object that) {
16859
      if (that == null)
16860
        return false;
16861
      if (that instanceof getUnsettledPurchaseReturns_result)
16862
        return this.equals((getUnsettledPurchaseReturns_result)that);
16863
      return false;
16864
    }
16865
 
16866
    public boolean equals(getUnsettledPurchaseReturns_result that) {
16867
      if (that == null)
16868
        return false;
16869
 
16870
      boolean this_present_success = true && this.isSetSuccess();
16871
      boolean that_present_success = true && that.isSetSuccess();
16872
      if (this_present_success || that_present_success) {
16873
        if (!(this_present_success && that_present_success))
16874
          return false;
16875
        if (!this.success.equals(that.success))
16876
          return false;
16877
      }
16878
 
16879
      return true;
16880
    }
16881
 
16882
    @Override
16883
    public int hashCode() {
16884
      return 0;
16885
    }
16886
 
16887
    public int compareTo(getUnsettledPurchaseReturns_result other) {
16888
      if (!getClass().equals(other.getClass())) {
16889
        return getClass().getName().compareTo(other.getClass().getName());
16890
      }
16891
 
16892
      int lastComparison = 0;
16893
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
16894
 
16895
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16896
      if (lastComparison != 0) {
16897
        return lastComparison;
16898
      }
16899
      if (isSetSuccess()) {
16900
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16901
        if (lastComparison != 0) {
16902
          return lastComparison;
16903
        }
16904
      }
16905
      return 0;
16906
    }
16907
 
16908
    public _Fields fieldForId(int fieldId) {
16909
      return _Fields.findByThriftId(fieldId);
16910
    }
16911
 
16912
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16913
      org.apache.thrift.protocol.TField field;
16914
      iprot.readStructBegin();
16915
      while (true)
16916
      {
16917
        field = iprot.readFieldBegin();
16918
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16919
          break;
16920
        }
16921
        switch (field.id) {
16922
          case 0: // SUCCESS
16923
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16924
              {
7410 amar.kumar 16925
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
16926
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
16927
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
6467 amar.kumar 16928
                {
7410 amar.kumar 16929
                  PurchaseReturn _elem34; // required
16930
                  _elem34 = new PurchaseReturn();
16931
                  _elem34.read(iprot);
16932
                  this.success.add(_elem34);
6467 amar.kumar 16933
                }
16934
                iprot.readListEnd();
16935
              }
16936
            } else { 
16937
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16938
            }
16939
            break;
16940
          default:
16941
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16942
        }
16943
        iprot.readFieldEnd();
16944
      }
16945
      iprot.readStructEnd();
16946
      validate();
16947
    }
16948
 
16949
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16950
      oprot.writeStructBegin(STRUCT_DESC);
16951
 
16952
      if (this.isSetSuccess()) {
16953
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16954
        {
16955
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 16956
          for (PurchaseReturn _iter35 : this.success)
6467 amar.kumar 16957
          {
7410 amar.kumar 16958
            _iter35.write(oprot);
6467 amar.kumar 16959
          }
16960
          oprot.writeListEnd();
16961
        }
16962
        oprot.writeFieldEnd();
16963
      }
16964
      oprot.writeFieldStop();
16965
      oprot.writeStructEnd();
16966
    }
16967
 
16968
    @Override
16969
    public String toString() {
16970
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
16971
      boolean first = true;
16972
 
16973
      sb.append("success:");
16974
      if (this.success == null) {
16975
        sb.append("null");
16976
      } else {
16977
        sb.append(this.success);
16978
      }
16979
      first = false;
16980
      sb.append(")");
16981
      return sb.toString();
16982
    }
16983
 
16984
    public void validate() throws org.apache.thrift.TException {
16985
      // check for required fields
16986
    }
16987
 
16988
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16989
      try {
16990
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16991
      } catch (org.apache.thrift.TException te) {
16992
        throw new java.io.IOException(te);
16993
      }
16994
    }
16995
 
16996
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16997
      try {
16998
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16999
      } catch (org.apache.thrift.TException te) {
17000
        throw new java.io.IOException(te);
17001
      }
17002
    }
17003
 
17004
  }
17005
 
6630 amar.kumar 17006
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
17007
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
17008
 
17009
    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);
17010
    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);
17011
 
17012
    private String invoiceNumber; // required
17013
    private long supplierId; // required
17014
 
17015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17016
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17017
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17018
      SUPPLIER_ID((short)2, "supplierId");
17019
 
17020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17021
 
17022
      static {
17023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17024
          byName.put(field.getFieldName(), field);
17025
        }
17026
      }
17027
 
17028
      /**
17029
       * Find the _Fields constant that matches fieldId, or null if its not found.
17030
       */
17031
      public static _Fields findByThriftId(int fieldId) {
17032
        switch(fieldId) {
17033
          case 1: // INVOICE_NUMBER
17034
            return INVOICE_NUMBER;
17035
          case 2: // SUPPLIER_ID
17036
            return SUPPLIER_ID;
17037
          default:
17038
            return null;
17039
        }
17040
      }
17041
 
17042
      /**
17043
       * Find the _Fields constant that matches fieldId, throwing an exception
17044
       * if it is not found.
17045
       */
17046
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17047
        _Fields fields = findByThriftId(fieldId);
17048
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17049
        return fields;
17050
      }
17051
 
17052
      /**
17053
       * Find the _Fields constant that matches name, or null if its not found.
17054
       */
17055
      public static _Fields findByName(String name) {
17056
        return byName.get(name);
17057
      }
17058
 
17059
      private final short _thriftId;
17060
      private final String _fieldName;
17061
 
17062
      _Fields(short thriftId, String fieldName) {
17063
        _thriftId = thriftId;
17064
        _fieldName = fieldName;
17065
      }
17066
 
17067
      public short getThriftFieldId() {
17068
        return _thriftId;
17069
      }
17070
 
17071
      public String getFieldName() {
17072
        return _fieldName;
17073
      }
17074
    }
17075
 
17076
    // isset id assignments
17077
    private static final int __SUPPLIERID_ISSET_ID = 0;
17078
    private BitSet __isset_bit_vector = new BitSet(1);
17079
 
17080
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17081
    static {
17082
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17083
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17084
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17085
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17086
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17087
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17088
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
17089
    }
17090
 
17091
    public getInvoice_args() {
17092
    }
17093
 
17094
    public getInvoice_args(
17095
      String invoiceNumber,
17096
      long supplierId)
17097
    {
17098
      this();
17099
      this.invoiceNumber = invoiceNumber;
17100
      this.supplierId = supplierId;
17101
      setSupplierIdIsSet(true);
17102
    }
17103
 
17104
    /**
17105
     * Performs a deep copy on <i>other</i>.
17106
     */
17107
    public getInvoice_args(getInvoice_args other) {
17108
      __isset_bit_vector.clear();
17109
      __isset_bit_vector.or(other.__isset_bit_vector);
17110
      if (other.isSetInvoiceNumber()) {
17111
        this.invoiceNumber = other.invoiceNumber;
17112
      }
17113
      this.supplierId = other.supplierId;
17114
    }
17115
 
17116
    public getInvoice_args deepCopy() {
17117
      return new getInvoice_args(this);
17118
    }
17119
 
17120
    @Override
17121
    public void clear() {
17122
      this.invoiceNumber = null;
17123
      setSupplierIdIsSet(false);
17124
      this.supplierId = 0;
17125
    }
17126
 
17127
    public String getInvoiceNumber() {
17128
      return this.invoiceNumber;
17129
    }
17130
 
17131
    public void setInvoiceNumber(String invoiceNumber) {
17132
      this.invoiceNumber = invoiceNumber;
17133
    }
17134
 
17135
    public void unsetInvoiceNumber() {
17136
      this.invoiceNumber = null;
17137
    }
17138
 
17139
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17140
    public boolean isSetInvoiceNumber() {
17141
      return this.invoiceNumber != null;
17142
    }
17143
 
17144
    public void setInvoiceNumberIsSet(boolean value) {
17145
      if (!value) {
17146
        this.invoiceNumber = null;
17147
      }
17148
    }
17149
 
17150
    public long getSupplierId() {
17151
      return this.supplierId;
17152
    }
17153
 
17154
    public void setSupplierId(long supplierId) {
17155
      this.supplierId = supplierId;
17156
      setSupplierIdIsSet(true);
17157
    }
17158
 
17159
    public void unsetSupplierId() {
17160
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
17161
    }
17162
 
17163
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
17164
    public boolean isSetSupplierId() {
17165
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
17166
    }
17167
 
17168
    public void setSupplierIdIsSet(boolean value) {
17169
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
17170
    }
17171
 
17172
    public void setFieldValue(_Fields field, Object value) {
17173
      switch (field) {
17174
      case INVOICE_NUMBER:
17175
        if (value == null) {
17176
          unsetInvoiceNumber();
17177
        } else {
17178
          setInvoiceNumber((String)value);
17179
        }
17180
        break;
17181
 
17182
      case SUPPLIER_ID:
17183
        if (value == null) {
17184
          unsetSupplierId();
17185
        } else {
17186
          setSupplierId((Long)value);
17187
        }
17188
        break;
17189
 
17190
      }
17191
    }
17192
 
17193
    public Object getFieldValue(_Fields field) {
17194
      switch (field) {
17195
      case INVOICE_NUMBER:
17196
        return getInvoiceNumber();
17197
 
17198
      case SUPPLIER_ID:
17199
        return Long.valueOf(getSupplierId());
17200
 
17201
      }
17202
      throw new IllegalStateException();
17203
    }
17204
 
17205
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17206
    public boolean isSet(_Fields field) {
17207
      if (field == null) {
17208
        throw new IllegalArgumentException();
17209
      }
17210
 
17211
      switch (field) {
17212
      case INVOICE_NUMBER:
17213
        return isSetInvoiceNumber();
17214
      case SUPPLIER_ID:
17215
        return isSetSupplierId();
17216
      }
17217
      throw new IllegalStateException();
17218
    }
17219
 
17220
    @Override
17221
    public boolean equals(Object that) {
17222
      if (that == null)
17223
        return false;
17224
      if (that instanceof getInvoice_args)
17225
        return this.equals((getInvoice_args)that);
17226
      return false;
17227
    }
17228
 
17229
    public boolean equals(getInvoice_args that) {
17230
      if (that == null)
17231
        return false;
17232
 
17233
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
17234
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
17235
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
17236
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
17237
          return false;
17238
        if (!this.invoiceNumber.equals(that.invoiceNumber))
17239
          return false;
17240
      }
17241
 
17242
      boolean this_present_supplierId = true;
17243
      boolean that_present_supplierId = true;
17244
      if (this_present_supplierId || that_present_supplierId) {
17245
        if (!(this_present_supplierId && that_present_supplierId))
17246
          return false;
17247
        if (this.supplierId != that.supplierId)
17248
          return false;
17249
      }
17250
 
17251
      return true;
17252
    }
17253
 
17254
    @Override
17255
    public int hashCode() {
17256
      return 0;
17257
    }
17258
 
17259
    public int compareTo(getInvoice_args other) {
17260
      if (!getClass().equals(other.getClass())) {
17261
        return getClass().getName().compareTo(other.getClass().getName());
17262
      }
17263
 
17264
      int lastComparison = 0;
17265
      getInvoice_args typedOther = (getInvoice_args)other;
17266
 
17267
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
17268
      if (lastComparison != 0) {
17269
        return lastComparison;
17270
      }
17271
      if (isSetInvoiceNumber()) {
17272
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
17273
        if (lastComparison != 0) {
17274
          return lastComparison;
17275
        }
17276
      }
17277
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
17278
      if (lastComparison != 0) {
17279
        return lastComparison;
17280
      }
17281
      if (isSetSupplierId()) {
17282
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
17283
        if (lastComparison != 0) {
17284
          return lastComparison;
17285
        }
17286
      }
17287
      return 0;
17288
    }
17289
 
17290
    public _Fields fieldForId(int fieldId) {
17291
      return _Fields.findByThriftId(fieldId);
17292
    }
17293
 
17294
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17295
      org.apache.thrift.protocol.TField field;
17296
      iprot.readStructBegin();
17297
      while (true)
17298
      {
17299
        field = iprot.readFieldBegin();
17300
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17301
          break;
17302
        }
17303
        switch (field.id) {
17304
          case 1: // INVOICE_NUMBER
17305
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17306
              this.invoiceNumber = iprot.readString();
17307
            } else { 
17308
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17309
            }
17310
            break;
17311
          case 2: // SUPPLIER_ID
17312
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17313
              this.supplierId = iprot.readI64();
17314
              setSupplierIdIsSet(true);
17315
            } else { 
17316
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17317
            }
17318
            break;
17319
          default:
17320
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17321
        }
17322
        iprot.readFieldEnd();
17323
      }
17324
      iprot.readStructEnd();
17325
      validate();
17326
    }
17327
 
17328
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17329
      validate();
17330
 
17331
      oprot.writeStructBegin(STRUCT_DESC);
17332
      if (this.invoiceNumber != null) {
17333
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
17334
        oprot.writeString(this.invoiceNumber);
17335
        oprot.writeFieldEnd();
17336
      }
17337
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
17338
      oprot.writeI64(this.supplierId);
17339
      oprot.writeFieldEnd();
17340
      oprot.writeFieldStop();
17341
      oprot.writeStructEnd();
17342
    }
17343
 
17344
    @Override
17345
    public String toString() {
17346
      StringBuilder sb = new StringBuilder("getInvoice_args(");
17347
      boolean first = true;
17348
 
17349
      sb.append("invoiceNumber:");
17350
      if (this.invoiceNumber == null) {
17351
        sb.append("null");
17352
      } else {
17353
        sb.append(this.invoiceNumber);
17354
      }
17355
      first = false;
17356
      if (!first) sb.append(", ");
17357
      sb.append("supplierId:");
17358
      sb.append(this.supplierId);
17359
      first = false;
17360
      sb.append(")");
17361
      return sb.toString();
17362
    }
17363
 
17364
    public void validate() throws org.apache.thrift.TException {
17365
      // check for required fields
17366
    }
17367
 
17368
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17369
      try {
17370
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17371
      } catch (org.apache.thrift.TException te) {
17372
        throw new java.io.IOException(te);
17373
      }
17374
    }
17375
 
17376
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17377
      try {
17378
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17379
      } catch (org.apache.thrift.TException te) {
17380
        throw new java.io.IOException(te);
17381
      }
17382
    }
17383
 
17384
  }
17385
 
17386
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
17387
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
17388
 
17389
    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);
17390
 
17391
    private List<PurchaseReturn> success; // required
17392
 
17393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17394
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17395
      SUCCESS((short)0, "success");
17396
 
17397
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17398
 
17399
      static {
17400
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17401
          byName.put(field.getFieldName(), field);
17402
        }
17403
      }
17404
 
17405
      /**
17406
       * Find the _Fields constant that matches fieldId, or null if its not found.
17407
       */
17408
      public static _Fields findByThriftId(int fieldId) {
17409
        switch(fieldId) {
17410
          case 0: // SUCCESS
17411
            return SUCCESS;
17412
          default:
17413
            return null;
17414
        }
17415
      }
17416
 
17417
      /**
17418
       * Find the _Fields constant that matches fieldId, throwing an exception
17419
       * if it is not found.
17420
       */
17421
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17422
        _Fields fields = findByThriftId(fieldId);
17423
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17424
        return fields;
17425
      }
17426
 
17427
      /**
17428
       * Find the _Fields constant that matches name, or null if its not found.
17429
       */
17430
      public static _Fields findByName(String name) {
17431
        return byName.get(name);
17432
      }
17433
 
17434
      private final short _thriftId;
17435
      private final String _fieldName;
17436
 
17437
      _Fields(short thriftId, String fieldName) {
17438
        _thriftId = thriftId;
17439
        _fieldName = fieldName;
17440
      }
17441
 
17442
      public short getThriftFieldId() {
17443
        return _thriftId;
17444
      }
17445
 
17446
      public String getFieldName() {
17447
        return _fieldName;
17448
      }
17449
    }
17450
 
17451
    // isset id assignments
17452
 
17453
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17454
    static {
17455
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17456
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17457
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17458
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
17459
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17460
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
17461
    }
17462
 
17463
    public getInvoice_result() {
17464
    }
17465
 
17466
    public getInvoice_result(
17467
      List<PurchaseReturn> success)
17468
    {
17469
      this();
17470
      this.success = success;
17471
    }
17472
 
17473
    /**
17474
     * Performs a deep copy on <i>other</i>.
17475
     */
17476
    public getInvoice_result(getInvoice_result other) {
17477
      if (other.isSetSuccess()) {
17478
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
17479
        for (PurchaseReturn other_element : other.success) {
17480
          __this__success.add(new PurchaseReturn(other_element));
17481
        }
17482
        this.success = __this__success;
17483
      }
17484
    }
17485
 
17486
    public getInvoice_result deepCopy() {
17487
      return new getInvoice_result(this);
17488
    }
17489
 
17490
    @Override
17491
    public void clear() {
17492
      this.success = null;
17493
    }
17494
 
17495
    public int getSuccessSize() {
17496
      return (this.success == null) ? 0 : this.success.size();
17497
    }
17498
 
17499
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
17500
      return (this.success == null) ? null : this.success.iterator();
17501
    }
17502
 
17503
    public void addToSuccess(PurchaseReturn elem) {
17504
      if (this.success == null) {
17505
        this.success = new ArrayList<PurchaseReturn>();
17506
      }
17507
      this.success.add(elem);
17508
    }
17509
 
17510
    public List<PurchaseReturn> getSuccess() {
17511
      return this.success;
17512
    }
17513
 
17514
    public void setSuccess(List<PurchaseReturn> success) {
17515
      this.success = success;
17516
    }
17517
 
17518
    public void unsetSuccess() {
17519
      this.success = null;
17520
    }
17521
 
17522
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17523
    public boolean isSetSuccess() {
17524
      return this.success != null;
17525
    }
17526
 
17527
    public void setSuccessIsSet(boolean value) {
17528
      if (!value) {
17529
        this.success = null;
17530
      }
17531
    }
17532
 
17533
    public void setFieldValue(_Fields field, Object value) {
17534
      switch (field) {
17535
      case SUCCESS:
17536
        if (value == null) {
17537
          unsetSuccess();
17538
        } else {
17539
          setSuccess((List<PurchaseReturn>)value);
17540
        }
17541
        break;
17542
 
17543
      }
17544
    }
17545
 
17546
    public Object getFieldValue(_Fields field) {
17547
      switch (field) {
17548
      case SUCCESS:
17549
        return getSuccess();
17550
 
17551
      }
17552
      throw new IllegalStateException();
17553
    }
17554
 
17555
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17556
    public boolean isSet(_Fields field) {
17557
      if (field == null) {
17558
        throw new IllegalArgumentException();
17559
      }
17560
 
17561
      switch (field) {
17562
      case SUCCESS:
17563
        return isSetSuccess();
17564
      }
17565
      throw new IllegalStateException();
17566
    }
17567
 
17568
    @Override
17569
    public boolean equals(Object that) {
17570
      if (that == null)
17571
        return false;
17572
      if (that instanceof getInvoice_result)
17573
        return this.equals((getInvoice_result)that);
17574
      return false;
17575
    }
17576
 
17577
    public boolean equals(getInvoice_result that) {
17578
      if (that == null)
17579
        return false;
17580
 
17581
      boolean this_present_success = true && this.isSetSuccess();
17582
      boolean that_present_success = true && that.isSetSuccess();
17583
      if (this_present_success || that_present_success) {
17584
        if (!(this_present_success && that_present_success))
17585
          return false;
17586
        if (!this.success.equals(that.success))
17587
          return false;
17588
      }
17589
 
17590
      return true;
17591
    }
17592
 
17593
    @Override
17594
    public int hashCode() {
17595
      return 0;
17596
    }
17597
 
17598
    public int compareTo(getInvoice_result other) {
17599
      if (!getClass().equals(other.getClass())) {
17600
        return getClass().getName().compareTo(other.getClass().getName());
17601
      }
17602
 
17603
      int lastComparison = 0;
17604
      getInvoice_result typedOther = (getInvoice_result)other;
17605
 
17606
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17607
      if (lastComparison != 0) {
17608
        return lastComparison;
17609
      }
17610
      if (isSetSuccess()) {
17611
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17612
        if (lastComparison != 0) {
17613
          return lastComparison;
17614
        }
17615
      }
17616
      return 0;
17617
    }
17618
 
17619
    public _Fields fieldForId(int fieldId) {
17620
      return _Fields.findByThriftId(fieldId);
17621
    }
17622
 
17623
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17624
      org.apache.thrift.protocol.TField field;
17625
      iprot.readStructBegin();
17626
      while (true)
17627
      {
17628
        field = iprot.readFieldBegin();
17629
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17630
          break;
17631
        }
17632
        switch (field.id) {
17633
          case 0: // SUCCESS
17634
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17635
              {
7410 amar.kumar 17636
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
17637
                this.success = new ArrayList<PurchaseReturn>(_list36.size);
17638
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
6630 amar.kumar 17639
                {
7410 amar.kumar 17640
                  PurchaseReturn _elem38; // required
17641
                  _elem38 = new PurchaseReturn();
17642
                  _elem38.read(iprot);
17643
                  this.success.add(_elem38);
6630 amar.kumar 17644
                }
17645
                iprot.readListEnd();
17646
              }
17647
            } else { 
17648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17649
            }
17650
            break;
17651
          default:
17652
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17653
        }
17654
        iprot.readFieldEnd();
17655
      }
17656
      iprot.readStructEnd();
17657
      validate();
17658
    }
17659
 
17660
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17661
      oprot.writeStructBegin(STRUCT_DESC);
17662
 
17663
      if (this.isSetSuccess()) {
17664
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17665
        {
17666
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7410 amar.kumar 17667
          for (PurchaseReturn _iter39 : this.success)
6630 amar.kumar 17668
          {
7410 amar.kumar 17669
            _iter39.write(oprot);
6630 amar.kumar 17670
          }
17671
          oprot.writeListEnd();
17672
        }
17673
        oprot.writeFieldEnd();
17674
      }
17675
      oprot.writeFieldStop();
17676
      oprot.writeStructEnd();
17677
    }
17678
 
17679
    @Override
17680
    public String toString() {
17681
      StringBuilder sb = new StringBuilder("getInvoice_result(");
17682
      boolean first = true;
17683
 
17684
      sb.append("success:");
17685
      if (this.success == null) {
17686
        sb.append("null");
17687
      } else {
17688
        sb.append(this.success);
17689
      }
17690
      first = false;
17691
      sb.append(")");
17692
      return sb.toString();
17693
    }
17694
 
17695
    public void validate() throws org.apache.thrift.TException {
17696
      // check for required fields
17697
    }
17698
 
17699
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17700
      try {
17701
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17702
      } catch (org.apache.thrift.TException te) {
17703
        throw new java.io.IOException(te);
17704
      }
17705
    }
17706
 
17707
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17708
      try {
17709
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17710
      } catch (org.apache.thrift.TException te) {
17711
        throw new java.io.IOException(te);
17712
      }
17713
    }
17714
 
17715
  }
17716
 
6762 amar.kumar 17717
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17718
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
17719
 
17720
    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);
17721
    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 17722
    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);
17723
    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 17724
 
17725
    private String invoiceNumber; // required
17726
    private double unitPrice; // required
7672 rajveer 17727
    private double nlc; // required
6762 amar.kumar 17728
    private long itemId; // required
17729
 
17730
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17731
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17732
      INVOICE_NUMBER((short)1, "invoiceNumber"),
17733
      UNIT_PRICE((short)2, "unitPrice"),
7672 rajveer 17734
      NLC((short)3, "nlc"),
17735
      ITEM_ID((short)4, "itemId");
6762 amar.kumar 17736
 
17737
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17738
 
17739
      static {
17740
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17741
          byName.put(field.getFieldName(), field);
17742
        }
17743
      }
17744
 
17745
      /**
17746
       * Find the _Fields constant that matches fieldId, or null if its not found.
17747
       */
17748
      public static _Fields findByThriftId(int fieldId) {
17749
        switch(fieldId) {
17750
          case 1: // INVOICE_NUMBER
17751
            return INVOICE_NUMBER;
17752
          case 2: // UNIT_PRICE
17753
            return UNIT_PRICE;
7672 rajveer 17754
          case 3: // NLC
17755
            return NLC;
17756
          case 4: // ITEM_ID
6762 amar.kumar 17757
            return ITEM_ID;
17758
          default:
17759
            return null;
17760
        }
17761
      }
17762
 
17763
      /**
17764
       * Find the _Fields constant that matches fieldId, throwing an exception
17765
       * if it is not found.
17766
       */
17767
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17768
        _Fields fields = findByThriftId(fieldId);
17769
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17770
        return fields;
17771
      }
17772
 
17773
      /**
17774
       * Find the _Fields constant that matches name, or null if its not found.
17775
       */
17776
      public static _Fields findByName(String name) {
17777
        return byName.get(name);
17778
      }
17779
 
17780
      private final short _thriftId;
17781
      private final String _fieldName;
17782
 
17783
      _Fields(short thriftId, String fieldName) {
17784
        _thriftId = thriftId;
17785
        _fieldName = fieldName;
17786
      }
17787
 
17788
      public short getThriftFieldId() {
17789
        return _thriftId;
17790
      }
17791
 
17792
      public String getFieldName() {
17793
        return _fieldName;
17794
      }
17795
    }
17796
 
17797
    // isset id assignments
17798
    private static final int __UNITPRICE_ISSET_ID = 0;
7672 rajveer 17799
    private static final int __NLC_ISSET_ID = 1;
17800
    private static final int __ITEMID_ISSET_ID = 2;
17801
    private BitSet __isset_bit_vector = new BitSet(3);
6762 amar.kumar 17802
 
17803
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17804
    static {
17805
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17806
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17807
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17808
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17809
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7672 rajveer 17810
      tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17811
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
6762 amar.kumar 17812
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17813
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17814
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17815
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
17816
    }
17817
 
17818
    public createPurchaseForOurExtBilling_args() {
17819
    }
17820
 
17821
    public createPurchaseForOurExtBilling_args(
17822
      String invoiceNumber,
17823
      double unitPrice,
7672 rajveer 17824
      double nlc,
6762 amar.kumar 17825
      long itemId)
17826
    {
17827
      this();
17828
      this.invoiceNumber = invoiceNumber;
17829
      this.unitPrice = unitPrice;
17830
      setUnitPriceIsSet(true);
7672 rajveer 17831
      this.nlc = nlc;
17832
      setNlcIsSet(true);
6762 amar.kumar 17833
      this.itemId = itemId;
17834
      setItemIdIsSet(true);
17835
    }
17836
 
17837
    /**
17838
     * Performs a deep copy on <i>other</i>.
17839
     */
17840
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
17841
      __isset_bit_vector.clear();
17842
      __isset_bit_vector.or(other.__isset_bit_vector);
17843
      if (other.isSetInvoiceNumber()) {
17844
        this.invoiceNumber = other.invoiceNumber;
17845
      }
17846
      this.unitPrice = other.unitPrice;
7672 rajveer 17847
      this.nlc = other.nlc;
6762 amar.kumar 17848
      this.itemId = other.itemId;
17849
    }
17850
 
17851
    public createPurchaseForOurExtBilling_args deepCopy() {
17852
      return new createPurchaseForOurExtBilling_args(this);
17853
    }
17854
 
17855
    @Override
17856
    public void clear() {
17857
      this.invoiceNumber = null;
17858
      setUnitPriceIsSet(false);
17859
      this.unitPrice = 0.0;
7672 rajveer 17860
      setNlcIsSet(false);
17861
      this.nlc = 0.0;
6762 amar.kumar 17862
      setItemIdIsSet(false);
17863
      this.itemId = 0;
17864
    }
17865
 
17866
    public String getInvoiceNumber() {
17867
      return this.invoiceNumber;
17868
    }
17869
 
17870
    public void setInvoiceNumber(String invoiceNumber) {
17871
      this.invoiceNumber = invoiceNumber;
17872
    }
17873
 
17874
    public void unsetInvoiceNumber() {
17875
      this.invoiceNumber = null;
17876
    }
17877
 
17878
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
17879
    public boolean isSetInvoiceNumber() {
17880
      return this.invoiceNumber != null;
17881
    }
17882
 
17883
    public void setInvoiceNumberIsSet(boolean value) {
17884
      if (!value) {
17885
        this.invoiceNumber = null;
17886
      }
17887
    }
17888
 
17889
    public double getUnitPrice() {
17890
      return this.unitPrice;
17891
    }
17892
 
17893
    public void setUnitPrice(double unitPrice) {
17894
      this.unitPrice = unitPrice;
17895
      setUnitPriceIsSet(true);
17896
    }
17897
 
17898
    public void unsetUnitPrice() {
17899
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
17900
    }
17901
 
17902
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
17903
    public boolean isSetUnitPrice() {
17904
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
17905
    }
17906
 
17907
    public void setUnitPriceIsSet(boolean value) {
17908
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
17909
    }
17910
 
7672 rajveer 17911
    public double getNlc() {
17912
      return this.nlc;
17913
    }
17914
 
17915
    public void setNlc(double nlc) {
17916
      this.nlc = nlc;
17917
      setNlcIsSet(true);
17918
    }
17919
 
17920
    public void unsetNlc() {
17921
      __isset_bit_vector.clear(__NLC_ISSET_ID);
17922
    }
17923
 
17924
    /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
17925
    public boolean isSetNlc() {
17926
      return __isset_bit_vector.get(__NLC_ISSET_ID);
17927
    }
17928
 
17929
    public void setNlcIsSet(boolean value) {
17930
      __isset_bit_vector.set(__NLC_ISSET_ID, value);
17931
    }
17932
 
6762 amar.kumar 17933
    public long getItemId() {
17934
      return this.itemId;
17935
    }
17936
 
17937
    public void setItemId(long itemId) {
17938
      this.itemId = itemId;
17939
      setItemIdIsSet(true);
17940
    }
17941
 
17942
    public void unsetItemId() {
17943
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
17944
    }
17945
 
17946
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
17947
    public boolean isSetItemId() {
17948
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
17949
    }
17950
 
17951
    public void setItemIdIsSet(boolean value) {
17952
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
17953
    }
17954
 
17955
    public void setFieldValue(_Fields field, Object value) {
17956
      switch (field) {
17957
      case INVOICE_NUMBER:
17958
        if (value == null) {
17959
          unsetInvoiceNumber();
17960
        } else {
17961
          setInvoiceNumber((String)value);
17962
        }
17963
        break;
17964
 
17965
      case UNIT_PRICE:
17966
        if (value == null) {
17967
          unsetUnitPrice();
17968
        } else {
17969
          setUnitPrice((Double)value);
17970
        }
17971
        break;
17972
 
7672 rajveer 17973
      case NLC:
17974
        if (value == null) {
17975
          unsetNlc();
17976
        } else {
17977
          setNlc((Double)value);
17978
        }
17979
        break;
17980
 
6762 amar.kumar 17981
      case ITEM_ID:
17982
        if (value == null) {
17983
          unsetItemId();
17984
        } else {
17985
          setItemId((Long)value);
17986
        }
17987
        break;
17988
 
17989
      }
17990
    }
17991
 
17992
    public Object getFieldValue(_Fields field) {
17993
      switch (field) {
17994
      case INVOICE_NUMBER:
17995
        return getInvoiceNumber();
17996
 
17997
      case UNIT_PRICE:
17998
        return Double.valueOf(getUnitPrice());
17999
 
7672 rajveer 18000
      case NLC:
18001
        return Double.valueOf(getNlc());
18002
 
6762 amar.kumar 18003
      case ITEM_ID:
18004
        return Long.valueOf(getItemId());
18005
 
18006
      }
18007
      throw new IllegalStateException();
18008
    }
18009
 
18010
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18011
    public boolean isSet(_Fields field) {
18012
      if (field == null) {
18013
        throw new IllegalArgumentException();
18014
      }
18015
 
18016
      switch (field) {
18017
      case INVOICE_NUMBER:
18018
        return isSetInvoiceNumber();
18019
      case UNIT_PRICE:
18020
        return isSetUnitPrice();
7672 rajveer 18021
      case NLC:
18022
        return isSetNlc();
6762 amar.kumar 18023
      case ITEM_ID:
18024
        return isSetItemId();
18025
      }
18026
      throw new IllegalStateException();
18027
    }
18028
 
18029
    @Override
18030
    public boolean equals(Object that) {
18031
      if (that == null)
18032
        return false;
18033
      if (that instanceof createPurchaseForOurExtBilling_args)
18034
        return this.equals((createPurchaseForOurExtBilling_args)that);
18035
      return false;
18036
    }
18037
 
18038
    public boolean equals(createPurchaseForOurExtBilling_args that) {
18039
      if (that == null)
18040
        return false;
18041
 
18042
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18043
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18044
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18045
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18046
          return false;
18047
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18048
          return false;
18049
      }
18050
 
18051
      boolean this_present_unitPrice = true;
18052
      boolean that_present_unitPrice = true;
18053
      if (this_present_unitPrice || that_present_unitPrice) {
18054
        if (!(this_present_unitPrice && that_present_unitPrice))
18055
          return false;
18056
        if (this.unitPrice != that.unitPrice)
18057
          return false;
18058
      }
18059
 
7672 rajveer 18060
      boolean this_present_nlc = true;
18061
      boolean that_present_nlc = true;
18062
      if (this_present_nlc || that_present_nlc) {
18063
        if (!(this_present_nlc && that_present_nlc))
18064
          return false;
18065
        if (this.nlc != that.nlc)
18066
          return false;
18067
      }
18068
 
6762 amar.kumar 18069
      boolean this_present_itemId = true;
18070
      boolean that_present_itemId = true;
18071
      if (this_present_itemId || that_present_itemId) {
18072
        if (!(this_present_itemId && that_present_itemId))
18073
          return false;
18074
        if (this.itemId != that.itemId)
18075
          return false;
18076
      }
18077
 
18078
      return true;
18079
    }
18080
 
18081
    @Override
18082
    public int hashCode() {
18083
      return 0;
18084
    }
18085
 
18086
    public int compareTo(createPurchaseForOurExtBilling_args other) {
18087
      if (!getClass().equals(other.getClass())) {
18088
        return getClass().getName().compareTo(other.getClass().getName());
18089
      }
18090
 
18091
      int lastComparison = 0;
18092
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
18093
 
18094
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18095
      if (lastComparison != 0) {
18096
        return lastComparison;
18097
      }
18098
      if (isSetInvoiceNumber()) {
18099
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18100
        if (lastComparison != 0) {
18101
          return lastComparison;
18102
        }
18103
      }
18104
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18105
      if (lastComparison != 0) {
18106
        return lastComparison;
18107
      }
18108
      if (isSetUnitPrice()) {
18109
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18110
        if (lastComparison != 0) {
18111
          return lastComparison;
18112
        }
18113
      }
7672 rajveer 18114
      lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
18115
      if (lastComparison != 0) {
18116
        return lastComparison;
18117
      }
18118
      if (isSetNlc()) {
18119
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
18120
        if (lastComparison != 0) {
18121
          return lastComparison;
18122
        }
18123
      }
6762 amar.kumar 18124
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18125
      if (lastComparison != 0) {
18126
        return lastComparison;
18127
      }
18128
      if (isSetItemId()) {
18129
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18130
        if (lastComparison != 0) {
18131
          return lastComparison;
18132
        }
18133
      }
18134
      return 0;
18135
    }
18136
 
18137
    public _Fields fieldForId(int fieldId) {
18138
      return _Fields.findByThriftId(fieldId);
18139
    }
18140
 
18141
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18142
      org.apache.thrift.protocol.TField field;
18143
      iprot.readStructBegin();
18144
      while (true)
18145
      {
18146
        field = iprot.readFieldBegin();
18147
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18148
          break;
18149
        }
18150
        switch (field.id) {
18151
          case 1: // INVOICE_NUMBER
18152
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18153
              this.invoiceNumber = iprot.readString();
18154
            } else { 
18155
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18156
            }
18157
            break;
18158
          case 2: // UNIT_PRICE
18159
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18160
              this.unitPrice = iprot.readDouble();
18161
              setUnitPriceIsSet(true);
18162
            } else { 
18163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18164
            }
18165
            break;
7672 rajveer 18166
          case 3: // NLC
18167
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18168
              this.nlc = iprot.readDouble();
18169
              setNlcIsSet(true);
18170
            } else { 
18171
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18172
            }
18173
            break;
18174
          case 4: // ITEM_ID
6762 amar.kumar 18175
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18176
              this.itemId = iprot.readI64();
18177
              setItemIdIsSet(true);
18178
            } else { 
18179
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18180
            }
18181
            break;
18182
          default:
18183
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18184
        }
18185
        iprot.readFieldEnd();
18186
      }
18187
      iprot.readStructEnd();
18188
      validate();
18189
    }
18190
 
18191
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18192
      validate();
18193
 
18194
      oprot.writeStructBegin(STRUCT_DESC);
18195
      if (this.invoiceNumber != null) {
18196
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18197
        oprot.writeString(this.invoiceNumber);
18198
        oprot.writeFieldEnd();
18199
      }
18200
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18201
      oprot.writeDouble(this.unitPrice);
18202
      oprot.writeFieldEnd();
7672 rajveer 18203
      oprot.writeFieldBegin(NLC_FIELD_DESC);
18204
      oprot.writeDouble(this.nlc);
18205
      oprot.writeFieldEnd();
6762 amar.kumar 18206
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18207
      oprot.writeI64(this.itemId);
18208
      oprot.writeFieldEnd();
18209
      oprot.writeFieldStop();
18210
      oprot.writeStructEnd();
18211
    }
18212
 
18213
    @Override
18214
    public String toString() {
18215
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
18216
      boolean first = true;
18217
 
18218
      sb.append("invoiceNumber:");
18219
      if (this.invoiceNumber == null) {
18220
        sb.append("null");
18221
      } else {
18222
        sb.append(this.invoiceNumber);
18223
      }
18224
      first = false;
18225
      if (!first) sb.append(", ");
18226
      sb.append("unitPrice:");
18227
      sb.append(this.unitPrice);
18228
      first = false;
18229
      if (!first) sb.append(", ");
7672 rajveer 18230
      sb.append("nlc:");
18231
      sb.append(this.nlc);
18232
      first = false;
18233
      if (!first) sb.append(", ");
6762 amar.kumar 18234
      sb.append("itemId:");
18235
      sb.append(this.itemId);
18236
      first = false;
18237
      sb.append(")");
18238
      return sb.toString();
18239
    }
18240
 
18241
    public void validate() throws org.apache.thrift.TException {
18242
      // check for required fields
18243
    }
18244
 
18245
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18246
      try {
18247
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18248
      } catch (org.apache.thrift.TException te) {
18249
        throw new java.io.IOException(te);
18250
      }
18251
    }
18252
 
18253
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18254
      try {
18255
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18256
        __isset_bit_vector = new BitSet(1);
18257
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18258
      } catch (org.apache.thrift.TException te) {
18259
        throw new java.io.IOException(te);
18260
      }
18261
    }
18262
 
18263
  }
18264
 
18265
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18266
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
18267
 
18268
    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);
18269
 
18270
    private long success; // required
18271
 
18272
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18273
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18274
      SUCCESS((short)0, "success");
18275
 
18276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18277
 
18278
      static {
18279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18280
          byName.put(field.getFieldName(), field);
18281
        }
18282
      }
18283
 
18284
      /**
18285
       * Find the _Fields constant that matches fieldId, or null if its not found.
18286
       */
18287
      public static _Fields findByThriftId(int fieldId) {
18288
        switch(fieldId) {
18289
          case 0: // SUCCESS
18290
            return SUCCESS;
18291
          default:
18292
            return null;
18293
        }
18294
      }
18295
 
18296
      /**
18297
       * Find the _Fields constant that matches fieldId, throwing an exception
18298
       * if it is not found.
18299
       */
18300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18301
        _Fields fields = findByThriftId(fieldId);
18302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18303
        return fields;
18304
      }
18305
 
18306
      /**
18307
       * Find the _Fields constant that matches name, or null if its not found.
18308
       */
18309
      public static _Fields findByName(String name) {
18310
        return byName.get(name);
18311
      }
18312
 
18313
      private final short _thriftId;
18314
      private final String _fieldName;
18315
 
18316
      _Fields(short thriftId, String fieldName) {
18317
        _thriftId = thriftId;
18318
        _fieldName = fieldName;
18319
      }
18320
 
18321
      public short getThriftFieldId() {
18322
        return _thriftId;
18323
      }
18324
 
18325
      public String getFieldName() {
18326
        return _fieldName;
18327
      }
18328
    }
18329
 
18330
    // isset id assignments
18331
    private static final int __SUCCESS_ISSET_ID = 0;
18332
    private BitSet __isset_bit_vector = new BitSet(1);
18333
 
18334
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18335
    static {
18336
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18337
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18338
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18339
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18340
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
18341
    }
18342
 
18343
    public createPurchaseForOurExtBilling_result() {
18344
    }
18345
 
18346
    public createPurchaseForOurExtBilling_result(
18347
      long success)
18348
    {
18349
      this();
18350
      this.success = success;
18351
      setSuccessIsSet(true);
18352
    }
18353
 
18354
    /**
18355
     * Performs a deep copy on <i>other</i>.
18356
     */
18357
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
18358
      __isset_bit_vector.clear();
18359
      __isset_bit_vector.or(other.__isset_bit_vector);
18360
      this.success = other.success;
18361
    }
18362
 
18363
    public createPurchaseForOurExtBilling_result deepCopy() {
18364
      return new createPurchaseForOurExtBilling_result(this);
18365
    }
18366
 
18367
    @Override
18368
    public void clear() {
18369
      setSuccessIsSet(false);
18370
      this.success = 0;
18371
    }
18372
 
18373
    public long getSuccess() {
18374
      return this.success;
18375
    }
18376
 
18377
    public void setSuccess(long success) {
18378
      this.success = success;
18379
      setSuccessIsSet(true);
18380
    }
18381
 
18382
    public void unsetSuccess() {
18383
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18384
    }
18385
 
18386
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18387
    public boolean isSetSuccess() {
18388
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18389
    }
18390
 
18391
    public void setSuccessIsSet(boolean value) {
18392
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18393
    }
18394
 
18395
    public void setFieldValue(_Fields field, Object value) {
18396
      switch (field) {
18397
      case SUCCESS:
18398
        if (value == null) {
18399
          unsetSuccess();
18400
        } else {
18401
          setSuccess((Long)value);
18402
        }
18403
        break;
18404
 
18405
      }
18406
    }
18407
 
18408
    public Object getFieldValue(_Fields field) {
18409
      switch (field) {
18410
      case SUCCESS:
18411
        return Long.valueOf(getSuccess());
18412
 
18413
      }
18414
      throw new IllegalStateException();
18415
    }
18416
 
18417
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18418
    public boolean isSet(_Fields field) {
18419
      if (field == null) {
18420
        throw new IllegalArgumentException();
18421
      }
18422
 
18423
      switch (field) {
18424
      case SUCCESS:
18425
        return isSetSuccess();
18426
      }
18427
      throw new IllegalStateException();
18428
    }
18429
 
18430
    @Override
18431
    public boolean equals(Object that) {
18432
      if (that == null)
18433
        return false;
18434
      if (that instanceof createPurchaseForOurExtBilling_result)
18435
        return this.equals((createPurchaseForOurExtBilling_result)that);
18436
      return false;
18437
    }
18438
 
18439
    public boolean equals(createPurchaseForOurExtBilling_result that) {
18440
      if (that == null)
18441
        return false;
18442
 
18443
      boolean this_present_success = true;
18444
      boolean that_present_success = true;
18445
      if (this_present_success || that_present_success) {
18446
        if (!(this_present_success && that_present_success))
18447
          return false;
18448
        if (this.success != that.success)
18449
          return false;
18450
      }
18451
 
18452
      return true;
18453
    }
18454
 
18455
    @Override
18456
    public int hashCode() {
18457
      return 0;
18458
    }
18459
 
18460
    public int compareTo(createPurchaseForOurExtBilling_result other) {
18461
      if (!getClass().equals(other.getClass())) {
18462
        return getClass().getName().compareTo(other.getClass().getName());
18463
      }
18464
 
18465
      int lastComparison = 0;
18466
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
18467
 
18468
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18469
      if (lastComparison != 0) {
18470
        return lastComparison;
18471
      }
18472
      if (isSetSuccess()) {
18473
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18474
        if (lastComparison != 0) {
18475
          return lastComparison;
18476
        }
18477
      }
18478
      return 0;
18479
    }
18480
 
18481
    public _Fields fieldForId(int fieldId) {
18482
      return _Fields.findByThriftId(fieldId);
18483
    }
18484
 
18485
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18486
      org.apache.thrift.protocol.TField field;
18487
      iprot.readStructBegin();
18488
      while (true)
18489
      {
18490
        field = iprot.readFieldBegin();
18491
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18492
          break;
18493
        }
18494
        switch (field.id) {
18495
          case 0: // SUCCESS
18496
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18497
              this.success = iprot.readI64();
18498
              setSuccessIsSet(true);
18499
            } else { 
18500
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18501
            }
18502
            break;
18503
          default:
18504
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18505
        }
18506
        iprot.readFieldEnd();
18507
      }
18508
      iprot.readStructEnd();
18509
      validate();
18510
    }
18511
 
18512
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18513
      oprot.writeStructBegin(STRUCT_DESC);
18514
 
18515
      if (this.isSetSuccess()) {
18516
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18517
        oprot.writeI64(this.success);
18518
        oprot.writeFieldEnd();
18519
      }
18520
      oprot.writeFieldStop();
18521
      oprot.writeStructEnd();
18522
    }
18523
 
18524
    @Override
18525
    public String toString() {
18526
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
18527
      boolean first = true;
18528
 
18529
      sb.append("success:");
18530
      sb.append(this.success);
18531
      first = false;
18532
      sb.append(")");
18533
      return sb.toString();
18534
    }
18535
 
18536
    public void validate() throws org.apache.thrift.TException {
18537
      // check for required fields
18538
    }
18539
 
18540
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18541
      try {
18542
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18543
      } catch (org.apache.thrift.TException te) {
18544
        throw new java.io.IOException(te);
18545
      }
18546
    }
18547
 
18548
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18549
      try {
18550
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18551
      } catch (org.apache.thrift.TException te) {
18552
        throw new java.io.IOException(te);
18553
      }
18554
    }
18555
 
18556
  }
18557
 
18558
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
18559
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
18560
 
18561
    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);
18562
    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);
18563
 
18564
    private long itemId; // required
18565
    private long quantity; // required
18566
 
18567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18568
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18569
      ITEM_ID((short)1, "itemId"),
18570
      QUANTITY((short)2, "quantity");
18571
 
18572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18573
 
18574
      static {
18575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18576
          byName.put(field.getFieldName(), field);
18577
        }
18578
      }
18579
 
18580
      /**
18581
       * Find the _Fields constant that matches fieldId, or null if its not found.
18582
       */
18583
      public static _Fields findByThriftId(int fieldId) {
18584
        switch(fieldId) {
18585
          case 1: // ITEM_ID
18586
            return ITEM_ID;
18587
          case 2: // QUANTITY
18588
            return QUANTITY;
18589
          default:
18590
            return null;
18591
        }
18592
      }
18593
 
18594
      /**
18595
       * Find the _Fields constant that matches fieldId, throwing an exception
18596
       * if it is not found.
18597
       */
18598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18599
        _Fields fields = findByThriftId(fieldId);
18600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18601
        return fields;
18602
      }
18603
 
18604
      /**
18605
       * Find the _Fields constant that matches name, or null if its not found.
18606
       */
18607
      public static _Fields findByName(String name) {
18608
        return byName.get(name);
18609
      }
18610
 
18611
      private final short _thriftId;
18612
      private final String _fieldName;
18613
 
18614
      _Fields(short thriftId, String fieldName) {
18615
        _thriftId = thriftId;
18616
        _fieldName = fieldName;
18617
      }
18618
 
18619
      public short getThriftFieldId() {
18620
        return _thriftId;
18621
      }
18622
 
18623
      public String getFieldName() {
18624
        return _fieldName;
18625
      }
18626
    }
18627
 
18628
    // isset id assignments
18629
    private static final int __ITEMID_ISSET_ID = 0;
18630
    private static final int __QUANTITY_ISSET_ID = 1;
18631
    private BitSet __isset_bit_vector = new BitSet(2);
18632
 
18633
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18634
    static {
18635
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18636
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18637
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18638
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18639
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18640
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18641
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
18642
    }
18643
 
18644
    public fulfillPOForExtBilling_args() {
18645
    }
18646
 
18647
    public fulfillPOForExtBilling_args(
18648
      long itemId,
18649
      long quantity)
18650
    {
18651
      this();
18652
      this.itemId = itemId;
18653
      setItemIdIsSet(true);
18654
      this.quantity = quantity;
18655
      setQuantityIsSet(true);
18656
    }
18657
 
18658
    /**
18659
     * Performs a deep copy on <i>other</i>.
18660
     */
18661
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
18662
      __isset_bit_vector.clear();
18663
      __isset_bit_vector.or(other.__isset_bit_vector);
18664
      this.itemId = other.itemId;
18665
      this.quantity = other.quantity;
18666
    }
18667
 
18668
    public fulfillPOForExtBilling_args deepCopy() {
18669
      return new fulfillPOForExtBilling_args(this);
18670
    }
18671
 
18672
    @Override
18673
    public void clear() {
18674
      setItemIdIsSet(false);
18675
      this.itemId = 0;
18676
      setQuantityIsSet(false);
18677
      this.quantity = 0;
18678
    }
18679
 
18680
    public long getItemId() {
18681
      return this.itemId;
18682
    }
18683
 
18684
    public void setItemId(long itemId) {
18685
      this.itemId = itemId;
18686
      setItemIdIsSet(true);
18687
    }
18688
 
18689
    public void unsetItemId() {
18690
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18691
    }
18692
 
18693
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18694
    public boolean isSetItemId() {
18695
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18696
    }
18697
 
18698
    public void setItemIdIsSet(boolean value) {
18699
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18700
    }
18701
 
18702
    public long getQuantity() {
18703
      return this.quantity;
18704
    }
18705
 
18706
    public void setQuantity(long quantity) {
18707
      this.quantity = quantity;
18708
      setQuantityIsSet(true);
18709
    }
18710
 
18711
    public void unsetQuantity() {
18712
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
18713
    }
18714
 
18715
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
18716
    public boolean isSetQuantity() {
18717
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
18718
    }
18719
 
18720
    public void setQuantityIsSet(boolean value) {
18721
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
18722
    }
18723
 
18724
    public void setFieldValue(_Fields field, Object value) {
18725
      switch (field) {
18726
      case ITEM_ID:
18727
        if (value == null) {
18728
          unsetItemId();
18729
        } else {
18730
          setItemId((Long)value);
18731
        }
18732
        break;
18733
 
18734
      case QUANTITY:
18735
        if (value == null) {
18736
          unsetQuantity();
18737
        } else {
18738
          setQuantity((Long)value);
18739
        }
18740
        break;
18741
 
18742
      }
18743
    }
18744
 
18745
    public Object getFieldValue(_Fields field) {
18746
      switch (field) {
18747
      case ITEM_ID:
18748
        return Long.valueOf(getItemId());
18749
 
18750
      case QUANTITY:
18751
        return Long.valueOf(getQuantity());
18752
 
18753
      }
18754
      throw new IllegalStateException();
18755
    }
18756
 
18757
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18758
    public boolean isSet(_Fields field) {
18759
      if (field == null) {
18760
        throw new IllegalArgumentException();
18761
      }
18762
 
18763
      switch (field) {
18764
      case ITEM_ID:
18765
        return isSetItemId();
18766
      case QUANTITY:
18767
        return isSetQuantity();
18768
      }
18769
      throw new IllegalStateException();
18770
    }
18771
 
18772
    @Override
18773
    public boolean equals(Object that) {
18774
      if (that == null)
18775
        return false;
18776
      if (that instanceof fulfillPOForExtBilling_args)
18777
        return this.equals((fulfillPOForExtBilling_args)that);
18778
      return false;
18779
    }
18780
 
18781
    public boolean equals(fulfillPOForExtBilling_args that) {
18782
      if (that == null)
18783
        return false;
18784
 
18785
      boolean this_present_itemId = true;
18786
      boolean that_present_itemId = true;
18787
      if (this_present_itemId || that_present_itemId) {
18788
        if (!(this_present_itemId && that_present_itemId))
18789
          return false;
18790
        if (this.itemId != that.itemId)
18791
          return false;
18792
      }
18793
 
18794
      boolean this_present_quantity = true;
18795
      boolean that_present_quantity = true;
18796
      if (this_present_quantity || that_present_quantity) {
18797
        if (!(this_present_quantity && that_present_quantity))
18798
          return false;
18799
        if (this.quantity != that.quantity)
18800
          return false;
18801
      }
18802
 
18803
      return true;
18804
    }
18805
 
18806
    @Override
18807
    public int hashCode() {
18808
      return 0;
18809
    }
18810
 
18811
    public int compareTo(fulfillPOForExtBilling_args other) {
18812
      if (!getClass().equals(other.getClass())) {
18813
        return getClass().getName().compareTo(other.getClass().getName());
18814
      }
18815
 
18816
      int lastComparison = 0;
18817
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
18818
 
18819
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18820
      if (lastComparison != 0) {
18821
        return lastComparison;
18822
      }
18823
      if (isSetItemId()) {
18824
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18825
        if (lastComparison != 0) {
18826
          return lastComparison;
18827
        }
18828
      }
18829
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
18830
      if (lastComparison != 0) {
18831
        return lastComparison;
18832
      }
18833
      if (isSetQuantity()) {
18834
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
18835
        if (lastComparison != 0) {
18836
          return lastComparison;
18837
        }
18838
      }
18839
      return 0;
18840
    }
18841
 
18842
    public _Fields fieldForId(int fieldId) {
18843
      return _Fields.findByThriftId(fieldId);
18844
    }
18845
 
18846
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18847
      org.apache.thrift.protocol.TField field;
18848
      iprot.readStructBegin();
18849
      while (true)
18850
      {
18851
        field = iprot.readFieldBegin();
18852
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18853
          break;
18854
        }
18855
        switch (field.id) {
18856
          case 1: // ITEM_ID
18857
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18858
              this.itemId = iprot.readI64();
18859
              setItemIdIsSet(true);
18860
            } else { 
18861
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18862
            }
18863
            break;
18864
          case 2: // QUANTITY
18865
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18866
              this.quantity = iprot.readI64();
18867
              setQuantityIsSet(true);
18868
            } else { 
18869
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18870
            }
18871
            break;
18872
          default:
18873
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18874
        }
18875
        iprot.readFieldEnd();
18876
      }
18877
      iprot.readStructEnd();
18878
      validate();
18879
    }
18880
 
18881
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18882
      validate();
18883
 
18884
      oprot.writeStructBegin(STRUCT_DESC);
18885
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18886
      oprot.writeI64(this.itemId);
18887
      oprot.writeFieldEnd();
18888
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
18889
      oprot.writeI64(this.quantity);
18890
      oprot.writeFieldEnd();
18891
      oprot.writeFieldStop();
18892
      oprot.writeStructEnd();
18893
    }
18894
 
18895
    @Override
18896
    public String toString() {
18897
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
18898
      boolean first = true;
18899
 
18900
      sb.append("itemId:");
18901
      sb.append(this.itemId);
18902
      first = false;
18903
      if (!first) sb.append(", ");
18904
      sb.append("quantity:");
18905
      sb.append(this.quantity);
18906
      first = false;
18907
      sb.append(")");
18908
      return sb.toString();
18909
    }
18910
 
18911
    public void validate() throws org.apache.thrift.TException {
18912
      // check for required fields
18913
    }
18914
 
18915
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18916
      try {
18917
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18918
      } catch (org.apache.thrift.TException te) {
18919
        throw new java.io.IOException(te);
18920
      }
18921
    }
18922
 
18923
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18924
      try {
18925
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18926
        __isset_bit_vector = new BitSet(1);
18927
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18928
      } catch (org.apache.thrift.TException te) {
18929
        throw new java.io.IOException(te);
18930
      }
18931
    }
18932
 
18933
  }
18934
 
18935
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
18936
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
18937
 
18938
 
18939
 
18940
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18941
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18942
;
18943
 
18944
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18945
 
18946
      static {
18947
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18948
          byName.put(field.getFieldName(), field);
18949
        }
18950
      }
18951
 
18952
      /**
18953
       * Find the _Fields constant that matches fieldId, or null if its not found.
18954
       */
18955
      public static _Fields findByThriftId(int fieldId) {
18956
        switch(fieldId) {
18957
          default:
18958
            return null;
18959
        }
18960
      }
18961
 
18962
      /**
18963
       * Find the _Fields constant that matches fieldId, throwing an exception
18964
       * if it is not found.
18965
       */
18966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18967
        _Fields fields = findByThriftId(fieldId);
18968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18969
        return fields;
18970
      }
18971
 
18972
      /**
18973
       * Find the _Fields constant that matches name, or null if its not found.
18974
       */
18975
      public static _Fields findByName(String name) {
18976
        return byName.get(name);
18977
      }
18978
 
18979
      private final short _thriftId;
18980
      private final String _fieldName;
18981
 
18982
      _Fields(short thriftId, String fieldName) {
18983
        _thriftId = thriftId;
18984
        _fieldName = fieldName;
18985
      }
18986
 
18987
      public short getThriftFieldId() {
18988
        return _thriftId;
18989
      }
18990
 
18991
      public String getFieldName() {
18992
        return _fieldName;
18993
      }
18994
    }
18995
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18996
    static {
18997
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18998
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18999
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
19000
    }
19001
 
19002
    public fulfillPOForExtBilling_result() {
19003
    }
19004
 
19005
    /**
19006
     * Performs a deep copy on <i>other</i>.
19007
     */
19008
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
19009
    }
19010
 
19011
    public fulfillPOForExtBilling_result deepCopy() {
19012
      return new fulfillPOForExtBilling_result(this);
19013
    }
19014
 
19015
    @Override
19016
    public void clear() {
19017
    }
19018
 
19019
    public void setFieldValue(_Fields field, Object value) {
19020
      switch (field) {
19021
      }
19022
    }
19023
 
19024
    public Object getFieldValue(_Fields field) {
19025
      switch (field) {
19026
      }
19027
      throw new IllegalStateException();
19028
    }
19029
 
19030
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19031
    public boolean isSet(_Fields field) {
19032
      if (field == null) {
19033
        throw new IllegalArgumentException();
19034
      }
19035
 
19036
      switch (field) {
19037
      }
19038
      throw new IllegalStateException();
19039
    }
19040
 
19041
    @Override
19042
    public boolean equals(Object that) {
19043
      if (that == null)
19044
        return false;
19045
      if (that instanceof fulfillPOForExtBilling_result)
19046
        return this.equals((fulfillPOForExtBilling_result)that);
19047
      return false;
19048
    }
19049
 
19050
    public boolean equals(fulfillPOForExtBilling_result that) {
19051
      if (that == null)
19052
        return false;
19053
 
19054
      return true;
19055
    }
19056
 
19057
    @Override
19058
    public int hashCode() {
19059
      return 0;
19060
    }
19061
 
19062
    public int compareTo(fulfillPOForExtBilling_result other) {
19063
      if (!getClass().equals(other.getClass())) {
19064
        return getClass().getName().compareTo(other.getClass().getName());
19065
      }
19066
 
19067
      int lastComparison = 0;
19068
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
19069
 
19070
      return 0;
19071
    }
19072
 
19073
    public _Fields fieldForId(int fieldId) {
19074
      return _Fields.findByThriftId(fieldId);
19075
    }
19076
 
19077
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19078
      org.apache.thrift.protocol.TField field;
19079
      iprot.readStructBegin();
19080
      while (true)
19081
      {
19082
        field = iprot.readFieldBegin();
19083
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19084
          break;
19085
        }
19086
        switch (field.id) {
19087
          default:
19088
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19089
        }
19090
        iprot.readFieldEnd();
19091
      }
19092
      iprot.readStructEnd();
19093
      validate();
19094
    }
19095
 
19096
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19097
      oprot.writeStructBegin(STRUCT_DESC);
19098
 
19099
      oprot.writeFieldStop();
19100
      oprot.writeStructEnd();
19101
    }
19102
 
19103
    @Override
19104
    public String toString() {
19105
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
19106
      boolean first = true;
19107
 
19108
      sb.append(")");
19109
      return sb.toString();
19110
    }
19111
 
19112
    public void validate() throws org.apache.thrift.TException {
19113
      // check for required fields
19114
    }
19115
 
19116
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19117
      try {
19118
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19119
      } catch (org.apache.thrift.TException te) {
19120
        throw new java.io.IOException(te);
19121
      }
19122
    }
19123
 
19124
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19125
      try {
19126
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19127
      } catch (org.apache.thrift.TException te) {
19128
        throw new java.io.IOException(te);
19129
      }
19130
    }
19131
 
19132
  }
19133
 
7410 amar.kumar 19134
  public static class closePO_args implements org.apache.thrift.TBase<closePO_args, closePO_args._Fields>, java.io.Serializable, Cloneable   {
19135
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_args");
19136
 
19137
    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);
19138
 
19139
    private long poId; // required
19140
 
19141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19142
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19143
      PO_ID((short)1, "poId");
19144
 
19145
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19146
 
19147
      static {
19148
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19149
          byName.put(field.getFieldName(), field);
19150
        }
19151
      }
19152
 
19153
      /**
19154
       * Find the _Fields constant that matches fieldId, or null if its not found.
19155
       */
19156
      public static _Fields findByThriftId(int fieldId) {
19157
        switch(fieldId) {
19158
          case 1: // PO_ID
19159
            return PO_ID;
19160
          default:
19161
            return null;
19162
        }
19163
      }
19164
 
19165
      /**
19166
       * Find the _Fields constant that matches fieldId, throwing an exception
19167
       * if it is not found.
19168
       */
19169
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19170
        _Fields fields = findByThriftId(fieldId);
19171
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19172
        return fields;
19173
      }
19174
 
19175
      /**
19176
       * Find the _Fields constant that matches name, or null if its not found.
19177
       */
19178
      public static _Fields findByName(String name) {
19179
        return byName.get(name);
19180
      }
19181
 
19182
      private final short _thriftId;
19183
      private final String _fieldName;
19184
 
19185
      _Fields(short thriftId, String fieldName) {
19186
        _thriftId = thriftId;
19187
        _fieldName = fieldName;
19188
      }
19189
 
19190
      public short getThriftFieldId() {
19191
        return _thriftId;
19192
      }
19193
 
19194
      public String getFieldName() {
19195
        return _fieldName;
19196
      }
19197
    }
19198
 
19199
    // isset id assignments
19200
    private static final int __POID_ISSET_ID = 0;
19201
    private BitSet __isset_bit_vector = new BitSet(1);
19202
 
19203
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19204
    static {
19205
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19206
      tmpMap.put(_Fields.PO_ID, new org.apache.thrift.meta_data.FieldMetaData("poId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19207
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19208
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19209
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_args.class, metaDataMap);
19210
    }
19211
 
19212
    public closePO_args() {
19213
    }
19214
 
19215
    public closePO_args(
19216
      long poId)
19217
    {
19218
      this();
19219
      this.poId = poId;
19220
      setPoIdIsSet(true);
19221
    }
19222
 
19223
    /**
19224
     * Performs a deep copy on <i>other</i>.
19225
     */
19226
    public closePO_args(closePO_args other) {
19227
      __isset_bit_vector.clear();
19228
      __isset_bit_vector.or(other.__isset_bit_vector);
19229
      this.poId = other.poId;
19230
    }
19231
 
19232
    public closePO_args deepCopy() {
19233
      return new closePO_args(this);
19234
    }
19235
 
19236
    @Override
19237
    public void clear() {
19238
      setPoIdIsSet(false);
19239
      this.poId = 0;
19240
    }
19241
 
19242
    public long getPoId() {
19243
      return this.poId;
19244
    }
19245
 
19246
    public void setPoId(long poId) {
19247
      this.poId = poId;
19248
      setPoIdIsSet(true);
19249
    }
19250
 
19251
    public void unsetPoId() {
19252
      __isset_bit_vector.clear(__POID_ISSET_ID);
19253
    }
19254
 
19255
    /** Returns true if field poId is set (has been assigned a value) and false otherwise */
19256
    public boolean isSetPoId() {
19257
      return __isset_bit_vector.get(__POID_ISSET_ID);
19258
    }
19259
 
19260
    public void setPoIdIsSet(boolean value) {
19261
      __isset_bit_vector.set(__POID_ISSET_ID, value);
19262
    }
19263
 
19264
    public void setFieldValue(_Fields field, Object value) {
19265
      switch (field) {
19266
      case PO_ID:
19267
        if (value == null) {
19268
          unsetPoId();
19269
        } else {
19270
          setPoId((Long)value);
19271
        }
19272
        break;
19273
 
19274
      }
19275
    }
19276
 
19277
    public Object getFieldValue(_Fields field) {
19278
      switch (field) {
19279
      case PO_ID:
19280
        return Long.valueOf(getPoId());
19281
 
19282
      }
19283
      throw new IllegalStateException();
19284
    }
19285
 
19286
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19287
    public boolean isSet(_Fields field) {
19288
      if (field == null) {
19289
        throw new IllegalArgumentException();
19290
      }
19291
 
19292
      switch (field) {
19293
      case PO_ID:
19294
        return isSetPoId();
19295
      }
19296
      throw new IllegalStateException();
19297
    }
19298
 
19299
    @Override
19300
    public boolean equals(Object that) {
19301
      if (that == null)
19302
        return false;
19303
      if (that instanceof closePO_args)
19304
        return this.equals((closePO_args)that);
19305
      return false;
19306
    }
19307
 
19308
    public boolean equals(closePO_args that) {
19309
      if (that == null)
19310
        return false;
19311
 
19312
      boolean this_present_poId = true;
19313
      boolean that_present_poId = true;
19314
      if (this_present_poId || that_present_poId) {
19315
        if (!(this_present_poId && that_present_poId))
19316
          return false;
19317
        if (this.poId != that.poId)
19318
          return false;
19319
      }
19320
 
19321
      return true;
19322
    }
19323
 
19324
    @Override
19325
    public int hashCode() {
19326
      return 0;
19327
    }
19328
 
19329
    public int compareTo(closePO_args other) {
19330
      if (!getClass().equals(other.getClass())) {
19331
        return getClass().getName().compareTo(other.getClass().getName());
19332
      }
19333
 
19334
      int lastComparison = 0;
19335
      closePO_args typedOther = (closePO_args)other;
19336
 
19337
      lastComparison = Boolean.valueOf(isSetPoId()).compareTo(typedOther.isSetPoId());
19338
      if (lastComparison != 0) {
19339
        return lastComparison;
19340
      }
19341
      if (isSetPoId()) {
19342
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.poId, typedOther.poId);
19343
        if (lastComparison != 0) {
19344
          return lastComparison;
19345
        }
19346
      }
19347
      return 0;
19348
    }
19349
 
19350
    public _Fields fieldForId(int fieldId) {
19351
      return _Fields.findByThriftId(fieldId);
19352
    }
19353
 
19354
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19355
      org.apache.thrift.protocol.TField field;
19356
      iprot.readStructBegin();
19357
      while (true)
19358
      {
19359
        field = iprot.readFieldBegin();
19360
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19361
          break;
19362
        }
19363
        switch (field.id) {
19364
          case 1: // PO_ID
19365
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19366
              this.poId = iprot.readI64();
19367
              setPoIdIsSet(true);
19368
            } else { 
19369
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19370
            }
19371
            break;
19372
          default:
19373
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19374
        }
19375
        iprot.readFieldEnd();
19376
      }
19377
      iprot.readStructEnd();
19378
      validate();
19379
    }
19380
 
19381
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19382
      validate();
19383
 
19384
      oprot.writeStructBegin(STRUCT_DESC);
19385
      oprot.writeFieldBegin(PO_ID_FIELD_DESC);
19386
      oprot.writeI64(this.poId);
19387
      oprot.writeFieldEnd();
19388
      oprot.writeFieldStop();
19389
      oprot.writeStructEnd();
19390
    }
19391
 
19392
    @Override
19393
    public String toString() {
19394
      StringBuilder sb = new StringBuilder("closePO_args(");
19395
      boolean first = true;
19396
 
19397
      sb.append("poId:");
19398
      sb.append(this.poId);
19399
      first = false;
19400
      sb.append(")");
19401
      return sb.toString();
19402
    }
19403
 
19404
    public void validate() throws org.apache.thrift.TException {
19405
      // check for required fields
19406
    }
19407
 
19408
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19409
      try {
19410
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19411
      } catch (org.apache.thrift.TException te) {
19412
        throw new java.io.IOException(te);
19413
      }
19414
    }
19415
 
19416
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19417
      try {
19418
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19419
      } catch (org.apache.thrift.TException te) {
19420
        throw new java.io.IOException(te);
19421
      }
19422
    }
19423
 
19424
  }
19425
 
19426
  public static class closePO_result implements org.apache.thrift.TBase<closePO_result, closePO_result._Fields>, java.io.Serializable, Cloneable   {
19427
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePO_result");
19428
 
19429
    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);
19430
 
19431
    private PurchaseServiceException e; // required
19432
 
19433
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19434
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19435
      E((short)1, "e");
19436
 
19437
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19438
 
19439
      static {
19440
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19441
          byName.put(field.getFieldName(), field);
19442
        }
19443
      }
19444
 
19445
      /**
19446
       * Find the _Fields constant that matches fieldId, or null if its not found.
19447
       */
19448
      public static _Fields findByThriftId(int fieldId) {
19449
        switch(fieldId) {
19450
          case 1: // E
19451
            return E;
19452
          default:
19453
            return null;
19454
        }
19455
      }
19456
 
19457
      /**
19458
       * Find the _Fields constant that matches fieldId, throwing an exception
19459
       * if it is not found.
19460
       */
19461
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19462
        _Fields fields = findByThriftId(fieldId);
19463
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19464
        return fields;
19465
      }
19466
 
19467
      /**
19468
       * Find the _Fields constant that matches name, or null if its not found.
19469
       */
19470
      public static _Fields findByName(String name) {
19471
        return byName.get(name);
19472
      }
19473
 
19474
      private final short _thriftId;
19475
      private final String _fieldName;
19476
 
19477
      _Fields(short thriftId, String fieldName) {
19478
        _thriftId = thriftId;
19479
        _fieldName = fieldName;
19480
      }
19481
 
19482
      public short getThriftFieldId() {
19483
        return _thriftId;
19484
      }
19485
 
19486
      public String getFieldName() {
19487
        return _fieldName;
19488
      }
19489
    }
19490
 
19491
    // isset id assignments
19492
 
19493
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19494
    static {
19495
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19496
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19497
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19498
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19499
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePO_result.class, metaDataMap);
19500
    }
19501
 
19502
    public closePO_result() {
19503
    }
19504
 
19505
    public closePO_result(
19506
      PurchaseServiceException e)
19507
    {
19508
      this();
19509
      this.e = e;
19510
    }
19511
 
19512
    /**
19513
     * Performs a deep copy on <i>other</i>.
19514
     */
19515
    public closePO_result(closePO_result other) {
19516
      if (other.isSetE()) {
19517
        this.e = new PurchaseServiceException(other.e);
19518
      }
19519
    }
19520
 
19521
    public closePO_result deepCopy() {
19522
      return new closePO_result(this);
19523
    }
19524
 
19525
    @Override
19526
    public void clear() {
19527
      this.e = null;
19528
    }
19529
 
19530
    public PurchaseServiceException getE() {
19531
      return this.e;
19532
    }
19533
 
19534
    public void setE(PurchaseServiceException e) {
19535
      this.e = e;
19536
    }
19537
 
19538
    public void unsetE() {
19539
      this.e = null;
19540
    }
19541
 
19542
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
19543
    public boolean isSetE() {
19544
      return this.e != null;
19545
    }
19546
 
19547
    public void setEIsSet(boolean value) {
19548
      if (!value) {
19549
        this.e = null;
19550
      }
19551
    }
19552
 
19553
    public void setFieldValue(_Fields field, Object value) {
19554
      switch (field) {
19555
      case E:
19556
        if (value == null) {
19557
          unsetE();
19558
        } else {
19559
          setE((PurchaseServiceException)value);
19560
        }
19561
        break;
19562
 
19563
      }
19564
    }
19565
 
19566
    public Object getFieldValue(_Fields field) {
19567
      switch (field) {
19568
      case E:
19569
        return getE();
19570
 
19571
      }
19572
      throw new IllegalStateException();
19573
    }
19574
 
19575
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19576
    public boolean isSet(_Fields field) {
19577
      if (field == null) {
19578
        throw new IllegalArgumentException();
19579
      }
19580
 
19581
      switch (field) {
19582
      case E:
19583
        return isSetE();
19584
      }
19585
      throw new IllegalStateException();
19586
    }
19587
 
19588
    @Override
19589
    public boolean equals(Object that) {
19590
      if (that == null)
19591
        return false;
19592
      if (that instanceof closePO_result)
19593
        return this.equals((closePO_result)that);
19594
      return false;
19595
    }
19596
 
19597
    public boolean equals(closePO_result that) {
19598
      if (that == null)
19599
        return false;
19600
 
19601
      boolean this_present_e = true && this.isSetE();
19602
      boolean that_present_e = true && that.isSetE();
19603
      if (this_present_e || that_present_e) {
19604
        if (!(this_present_e && that_present_e))
19605
          return false;
19606
        if (!this.e.equals(that.e))
19607
          return false;
19608
      }
19609
 
19610
      return true;
19611
    }
19612
 
19613
    @Override
19614
    public int hashCode() {
19615
      return 0;
19616
    }
19617
 
19618
    public int compareTo(closePO_result other) {
19619
      if (!getClass().equals(other.getClass())) {
19620
        return getClass().getName().compareTo(other.getClass().getName());
19621
      }
19622
 
19623
      int lastComparison = 0;
19624
      closePO_result typedOther = (closePO_result)other;
19625
 
19626
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
19627
      if (lastComparison != 0) {
19628
        return lastComparison;
19629
      }
19630
      if (isSetE()) {
19631
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
19632
        if (lastComparison != 0) {
19633
          return lastComparison;
19634
        }
19635
      }
19636
      return 0;
19637
    }
19638
 
19639
    public _Fields fieldForId(int fieldId) {
19640
      return _Fields.findByThriftId(fieldId);
19641
    }
19642
 
19643
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19644
      org.apache.thrift.protocol.TField field;
19645
      iprot.readStructBegin();
19646
      while (true)
19647
      {
19648
        field = iprot.readFieldBegin();
19649
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19650
          break;
19651
        }
19652
        switch (field.id) {
19653
          case 1: // E
19654
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19655
              this.e = new PurchaseServiceException();
19656
              this.e.read(iprot);
19657
            } else { 
19658
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19659
            }
19660
            break;
19661
          default:
19662
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19663
        }
19664
        iprot.readFieldEnd();
19665
      }
19666
      iprot.readStructEnd();
19667
      validate();
19668
    }
19669
 
19670
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19671
      oprot.writeStructBegin(STRUCT_DESC);
19672
 
19673
      if (this.isSetE()) {
19674
        oprot.writeFieldBegin(E_FIELD_DESC);
19675
        this.e.write(oprot);
19676
        oprot.writeFieldEnd();
19677
      }
19678
      oprot.writeFieldStop();
19679
      oprot.writeStructEnd();
19680
    }
19681
 
19682
    @Override
19683
    public String toString() {
19684
      StringBuilder sb = new StringBuilder("closePO_result(");
19685
      boolean first = true;
19686
 
19687
      sb.append("e:");
19688
      if (this.e == null) {
19689
        sb.append("null");
19690
      } else {
19691
        sb.append(this.e);
19692
      }
19693
      first = false;
19694
      sb.append(")");
19695
      return sb.toString();
19696
    }
19697
 
19698
    public void validate() throws org.apache.thrift.TException {
19699
      // check for required fields
19700
    }
19701
 
19702
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19703
      try {
19704
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19705
      } catch (org.apache.thrift.TException te) {
19706
        throw new java.io.IOException(te);
19707
      }
19708
    }
19709
 
19710
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19711
      try {
19712
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19713
      } catch (org.apache.thrift.TException te) {
19714
        throw new java.io.IOException(te);
19715
      }
19716
    }
19717
 
19718
  }
19719
 
19720
  public static class isInvoiceReceived_args implements org.apache.thrift.TBase<isInvoiceReceived_args, isInvoiceReceived_args._Fields>, java.io.Serializable, Cloneable   {
19721
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_args");
19722
 
19723
    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);
19724
    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);
19725
 
19726
    private String invoiceNumber; // required
19727
    private long supplierId; // required
19728
 
19729
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19730
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19731
      INVOICE_NUMBER((short)1, "invoiceNumber"),
19732
      SUPPLIER_ID((short)2, "supplierId");
19733
 
19734
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19735
 
19736
      static {
19737
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19738
          byName.put(field.getFieldName(), field);
19739
        }
19740
      }
19741
 
19742
      /**
19743
       * Find the _Fields constant that matches fieldId, or null if its not found.
19744
       */
19745
      public static _Fields findByThriftId(int fieldId) {
19746
        switch(fieldId) {
19747
          case 1: // INVOICE_NUMBER
19748
            return INVOICE_NUMBER;
19749
          case 2: // SUPPLIER_ID
19750
            return SUPPLIER_ID;
19751
          default:
19752
            return null;
19753
        }
19754
      }
19755
 
19756
      /**
19757
       * Find the _Fields constant that matches fieldId, throwing an exception
19758
       * if it is not found.
19759
       */
19760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19761
        _Fields fields = findByThriftId(fieldId);
19762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19763
        return fields;
19764
      }
19765
 
19766
      /**
19767
       * Find the _Fields constant that matches name, or null if its not found.
19768
       */
19769
      public static _Fields findByName(String name) {
19770
        return byName.get(name);
19771
      }
19772
 
19773
      private final short _thriftId;
19774
      private final String _fieldName;
19775
 
19776
      _Fields(short thriftId, String fieldName) {
19777
        _thriftId = thriftId;
19778
        _fieldName = fieldName;
19779
      }
19780
 
19781
      public short getThriftFieldId() {
19782
        return _thriftId;
19783
      }
19784
 
19785
      public String getFieldName() {
19786
        return _fieldName;
19787
      }
19788
    }
19789
 
19790
    // isset id assignments
19791
    private static final int __SUPPLIERID_ISSET_ID = 0;
19792
    private BitSet __isset_bit_vector = new BitSet(1);
19793
 
19794
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19795
    static {
19796
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19797
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19798
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19799
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19800
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19801
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19802
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_args.class, metaDataMap);
19803
    }
19804
 
19805
    public isInvoiceReceived_args() {
19806
    }
19807
 
19808
    public isInvoiceReceived_args(
19809
      String invoiceNumber,
19810
      long supplierId)
19811
    {
19812
      this();
19813
      this.invoiceNumber = invoiceNumber;
19814
      this.supplierId = supplierId;
19815
      setSupplierIdIsSet(true);
19816
    }
19817
 
19818
    /**
19819
     * Performs a deep copy on <i>other</i>.
19820
     */
19821
    public isInvoiceReceived_args(isInvoiceReceived_args other) {
19822
      __isset_bit_vector.clear();
19823
      __isset_bit_vector.or(other.__isset_bit_vector);
19824
      if (other.isSetInvoiceNumber()) {
19825
        this.invoiceNumber = other.invoiceNumber;
19826
      }
19827
      this.supplierId = other.supplierId;
19828
    }
19829
 
19830
    public isInvoiceReceived_args deepCopy() {
19831
      return new isInvoiceReceived_args(this);
19832
    }
19833
 
19834
    @Override
19835
    public void clear() {
19836
      this.invoiceNumber = null;
19837
      setSupplierIdIsSet(false);
19838
      this.supplierId = 0;
19839
    }
19840
 
19841
    public String getInvoiceNumber() {
19842
      return this.invoiceNumber;
19843
    }
19844
 
19845
    public void setInvoiceNumber(String invoiceNumber) {
19846
      this.invoiceNumber = invoiceNumber;
19847
    }
19848
 
19849
    public void unsetInvoiceNumber() {
19850
      this.invoiceNumber = null;
19851
    }
19852
 
19853
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
19854
    public boolean isSetInvoiceNumber() {
19855
      return this.invoiceNumber != null;
19856
    }
19857
 
19858
    public void setInvoiceNumberIsSet(boolean value) {
19859
      if (!value) {
19860
        this.invoiceNumber = null;
19861
      }
19862
    }
19863
 
19864
    public long getSupplierId() {
19865
      return this.supplierId;
19866
    }
19867
 
19868
    public void setSupplierId(long supplierId) {
19869
      this.supplierId = supplierId;
19870
      setSupplierIdIsSet(true);
19871
    }
19872
 
19873
    public void unsetSupplierId() {
19874
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
19875
    }
19876
 
19877
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
19878
    public boolean isSetSupplierId() {
19879
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
19880
    }
19881
 
19882
    public void setSupplierIdIsSet(boolean value) {
19883
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
19884
    }
19885
 
19886
    public void setFieldValue(_Fields field, Object value) {
19887
      switch (field) {
19888
      case INVOICE_NUMBER:
19889
        if (value == null) {
19890
          unsetInvoiceNumber();
19891
        } else {
19892
          setInvoiceNumber((String)value);
19893
        }
19894
        break;
19895
 
19896
      case SUPPLIER_ID:
19897
        if (value == null) {
19898
          unsetSupplierId();
19899
        } else {
19900
          setSupplierId((Long)value);
19901
        }
19902
        break;
19903
 
19904
      }
19905
    }
19906
 
19907
    public Object getFieldValue(_Fields field) {
19908
      switch (field) {
19909
      case INVOICE_NUMBER:
19910
        return getInvoiceNumber();
19911
 
19912
      case SUPPLIER_ID:
19913
        return Long.valueOf(getSupplierId());
19914
 
19915
      }
19916
      throw new IllegalStateException();
19917
    }
19918
 
19919
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19920
    public boolean isSet(_Fields field) {
19921
      if (field == null) {
19922
        throw new IllegalArgumentException();
19923
      }
19924
 
19925
      switch (field) {
19926
      case INVOICE_NUMBER:
19927
        return isSetInvoiceNumber();
19928
      case SUPPLIER_ID:
19929
        return isSetSupplierId();
19930
      }
19931
      throw new IllegalStateException();
19932
    }
19933
 
19934
    @Override
19935
    public boolean equals(Object that) {
19936
      if (that == null)
19937
        return false;
19938
      if (that instanceof isInvoiceReceived_args)
19939
        return this.equals((isInvoiceReceived_args)that);
19940
      return false;
19941
    }
19942
 
19943
    public boolean equals(isInvoiceReceived_args that) {
19944
      if (that == null)
19945
        return false;
19946
 
19947
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
19948
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
19949
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
19950
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
19951
          return false;
19952
        if (!this.invoiceNumber.equals(that.invoiceNumber))
19953
          return false;
19954
      }
19955
 
19956
      boolean this_present_supplierId = true;
19957
      boolean that_present_supplierId = true;
19958
      if (this_present_supplierId || that_present_supplierId) {
19959
        if (!(this_present_supplierId && that_present_supplierId))
19960
          return false;
19961
        if (this.supplierId != that.supplierId)
19962
          return false;
19963
      }
19964
 
19965
      return true;
19966
    }
19967
 
19968
    @Override
19969
    public int hashCode() {
19970
      return 0;
19971
    }
19972
 
19973
    public int compareTo(isInvoiceReceived_args other) {
19974
      if (!getClass().equals(other.getClass())) {
19975
        return getClass().getName().compareTo(other.getClass().getName());
19976
      }
19977
 
19978
      int lastComparison = 0;
19979
      isInvoiceReceived_args typedOther = (isInvoiceReceived_args)other;
19980
 
19981
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
19982
      if (lastComparison != 0) {
19983
        return lastComparison;
19984
      }
19985
      if (isSetInvoiceNumber()) {
19986
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
19987
        if (lastComparison != 0) {
19988
          return lastComparison;
19989
        }
19990
      }
19991
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
19992
      if (lastComparison != 0) {
19993
        return lastComparison;
19994
      }
19995
      if (isSetSupplierId()) {
19996
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
19997
        if (lastComparison != 0) {
19998
          return lastComparison;
19999
        }
20000
      }
20001
      return 0;
20002
    }
20003
 
20004
    public _Fields fieldForId(int fieldId) {
20005
      return _Fields.findByThriftId(fieldId);
20006
    }
20007
 
20008
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20009
      org.apache.thrift.protocol.TField field;
20010
      iprot.readStructBegin();
20011
      while (true)
20012
      {
20013
        field = iprot.readFieldBegin();
20014
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20015
          break;
20016
        }
20017
        switch (field.id) {
20018
          case 1: // INVOICE_NUMBER
20019
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
20020
              this.invoiceNumber = iprot.readString();
20021
            } else { 
20022
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20023
            }
20024
            break;
20025
          case 2: // SUPPLIER_ID
20026
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20027
              this.supplierId = iprot.readI64();
20028
              setSupplierIdIsSet(true);
20029
            } else { 
20030
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20031
            }
20032
            break;
20033
          default:
20034
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20035
        }
20036
        iprot.readFieldEnd();
20037
      }
20038
      iprot.readStructEnd();
20039
      validate();
20040
    }
20041
 
20042
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20043
      validate();
20044
 
20045
      oprot.writeStructBegin(STRUCT_DESC);
20046
      if (this.invoiceNumber != null) {
20047
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
20048
        oprot.writeString(this.invoiceNumber);
20049
        oprot.writeFieldEnd();
20050
      }
20051
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
20052
      oprot.writeI64(this.supplierId);
20053
      oprot.writeFieldEnd();
20054
      oprot.writeFieldStop();
20055
      oprot.writeStructEnd();
20056
    }
20057
 
20058
    @Override
20059
    public String toString() {
20060
      StringBuilder sb = new StringBuilder("isInvoiceReceived_args(");
20061
      boolean first = true;
20062
 
20063
      sb.append("invoiceNumber:");
20064
      if (this.invoiceNumber == null) {
20065
        sb.append("null");
20066
      } else {
20067
        sb.append(this.invoiceNumber);
20068
      }
20069
      first = false;
20070
      if (!first) sb.append(", ");
20071
      sb.append("supplierId:");
20072
      sb.append(this.supplierId);
20073
      first = false;
20074
      sb.append(")");
20075
      return sb.toString();
20076
    }
20077
 
20078
    public void validate() throws org.apache.thrift.TException {
20079
      // check for required fields
20080
    }
20081
 
20082
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20083
      try {
20084
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20085
      } catch (org.apache.thrift.TException te) {
20086
        throw new java.io.IOException(te);
20087
      }
20088
    }
20089
 
20090
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20091
      try {
20092
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20093
      } catch (org.apache.thrift.TException te) {
20094
        throw new java.io.IOException(te);
20095
      }
20096
    }
20097
 
20098
  }
20099
 
20100
  public static class isInvoiceReceived_result implements org.apache.thrift.TBase<isInvoiceReceived_result, isInvoiceReceived_result._Fields>, java.io.Serializable, Cloneable   {
20101
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInvoiceReceived_result");
20102
 
20103
    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);
20104
 
20105
    private boolean success; // required
20106
 
20107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20108
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20109
      SUCCESS((short)0, "success");
20110
 
20111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20112
 
20113
      static {
20114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20115
          byName.put(field.getFieldName(), field);
20116
        }
20117
      }
20118
 
20119
      /**
20120
       * Find the _Fields constant that matches fieldId, or null if its not found.
20121
       */
20122
      public static _Fields findByThriftId(int fieldId) {
20123
        switch(fieldId) {
20124
          case 0: // SUCCESS
20125
            return SUCCESS;
20126
          default:
20127
            return null;
20128
        }
20129
      }
20130
 
20131
      /**
20132
       * Find the _Fields constant that matches fieldId, throwing an exception
20133
       * if it is not found.
20134
       */
20135
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20136
        _Fields fields = findByThriftId(fieldId);
20137
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20138
        return fields;
20139
      }
20140
 
20141
      /**
20142
       * Find the _Fields constant that matches name, or null if its not found.
20143
       */
20144
      public static _Fields findByName(String name) {
20145
        return byName.get(name);
20146
      }
20147
 
20148
      private final short _thriftId;
20149
      private final String _fieldName;
20150
 
20151
      _Fields(short thriftId, String fieldName) {
20152
        _thriftId = thriftId;
20153
        _fieldName = fieldName;
20154
      }
20155
 
20156
      public short getThriftFieldId() {
20157
        return _thriftId;
20158
      }
20159
 
20160
      public String getFieldName() {
20161
        return _fieldName;
20162
      }
20163
    }
20164
 
20165
    // isset id assignments
20166
    private static final int __SUCCESS_ISSET_ID = 0;
20167
    private BitSet __isset_bit_vector = new BitSet(1);
20168
 
20169
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20170
    static {
20171
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20172
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20173
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
20174
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20175
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInvoiceReceived_result.class, metaDataMap);
20176
    }
20177
 
20178
    public isInvoiceReceived_result() {
20179
    }
20180
 
20181
    public isInvoiceReceived_result(
20182
      boolean success)
20183
    {
20184
      this();
20185
      this.success = success;
20186
      setSuccessIsSet(true);
20187
    }
20188
 
20189
    /**
20190
     * Performs a deep copy on <i>other</i>.
20191
     */
20192
    public isInvoiceReceived_result(isInvoiceReceived_result other) {
20193
      __isset_bit_vector.clear();
20194
      __isset_bit_vector.or(other.__isset_bit_vector);
20195
      this.success = other.success;
20196
    }
20197
 
20198
    public isInvoiceReceived_result deepCopy() {
20199
      return new isInvoiceReceived_result(this);
20200
    }
20201
 
20202
    @Override
20203
    public void clear() {
20204
      setSuccessIsSet(false);
20205
      this.success = false;
20206
    }
20207
 
20208
    public boolean isSuccess() {
20209
      return this.success;
20210
    }
20211
 
20212
    public void setSuccess(boolean success) {
20213
      this.success = success;
20214
      setSuccessIsSet(true);
20215
    }
20216
 
20217
    public void unsetSuccess() {
20218
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20219
    }
20220
 
20221
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20222
    public boolean isSetSuccess() {
20223
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20224
    }
20225
 
20226
    public void setSuccessIsSet(boolean value) {
20227
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20228
    }
20229
 
20230
    public void setFieldValue(_Fields field, Object value) {
20231
      switch (field) {
20232
      case SUCCESS:
20233
        if (value == null) {
20234
          unsetSuccess();
20235
        } else {
20236
          setSuccess((Boolean)value);
20237
        }
20238
        break;
20239
 
20240
      }
20241
    }
20242
 
20243
    public Object getFieldValue(_Fields field) {
20244
      switch (field) {
20245
      case SUCCESS:
20246
        return Boolean.valueOf(isSuccess());
20247
 
20248
      }
20249
      throw new IllegalStateException();
20250
    }
20251
 
20252
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20253
    public boolean isSet(_Fields field) {
20254
      if (field == null) {
20255
        throw new IllegalArgumentException();
20256
      }
20257
 
20258
      switch (field) {
20259
      case SUCCESS:
20260
        return isSetSuccess();
20261
      }
20262
      throw new IllegalStateException();
20263
    }
20264
 
20265
    @Override
20266
    public boolean equals(Object that) {
20267
      if (that == null)
20268
        return false;
20269
      if (that instanceof isInvoiceReceived_result)
20270
        return this.equals((isInvoiceReceived_result)that);
20271
      return false;
20272
    }
20273
 
20274
    public boolean equals(isInvoiceReceived_result that) {
20275
      if (that == null)
20276
        return false;
20277
 
20278
      boolean this_present_success = true;
20279
      boolean that_present_success = true;
20280
      if (this_present_success || that_present_success) {
20281
        if (!(this_present_success && that_present_success))
20282
          return false;
20283
        if (this.success != that.success)
20284
          return false;
20285
      }
20286
 
20287
      return true;
20288
    }
20289
 
20290
    @Override
20291
    public int hashCode() {
20292
      return 0;
20293
    }
20294
 
20295
    public int compareTo(isInvoiceReceived_result other) {
20296
      if (!getClass().equals(other.getClass())) {
20297
        return getClass().getName().compareTo(other.getClass().getName());
20298
      }
20299
 
20300
      int lastComparison = 0;
20301
      isInvoiceReceived_result typedOther = (isInvoiceReceived_result)other;
20302
 
20303
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20304
      if (lastComparison != 0) {
20305
        return lastComparison;
20306
      }
20307
      if (isSetSuccess()) {
20308
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20309
        if (lastComparison != 0) {
20310
          return lastComparison;
20311
        }
20312
      }
20313
      return 0;
20314
    }
20315
 
20316
    public _Fields fieldForId(int fieldId) {
20317
      return _Fields.findByThriftId(fieldId);
20318
    }
20319
 
20320
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20321
      org.apache.thrift.protocol.TField field;
20322
      iprot.readStructBegin();
20323
      while (true)
20324
      {
20325
        field = iprot.readFieldBegin();
20326
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20327
          break;
20328
        }
20329
        switch (field.id) {
20330
          case 0: // SUCCESS
20331
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20332
              this.success = iprot.readBool();
20333
              setSuccessIsSet(true);
20334
            } else { 
20335
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20336
            }
20337
            break;
20338
          default:
20339
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20340
        }
20341
        iprot.readFieldEnd();
20342
      }
20343
      iprot.readStructEnd();
20344
      validate();
20345
    }
20346
 
20347
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20348
      oprot.writeStructBegin(STRUCT_DESC);
20349
 
20350
      if (this.isSetSuccess()) {
20351
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20352
        oprot.writeBool(this.success);
20353
        oprot.writeFieldEnd();
20354
      }
20355
      oprot.writeFieldStop();
20356
      oprot.writeStructEnd();
20357
    }
20358
 
20359
    @Override
20360
    public String toString() {
20361
      StringBuilder sb = new StringBuilder("isInvoiceReceived_result(");
20362
      boolean first = true;
20363
 
20364
      sb.append("success:");
20365
      sb.append(this.success);
20366
      first = false;
20367
      sb.append(")");
20368
      return sb.toString();
20369
    }
20370
 
20371
    public void validate() throws org.apache.thrift.TException {
20372
      // check for required fields
20373
    }
20374
 
20375
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20376
      try {
20377
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20378
      } catch (org.apache.thrift.TException te) {
20379
        throw new java.io.IOException(te);
20380
      }
20381
    }
20382
 
20383
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20384
      try {
20385
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20386
      } catch (org.apache.thrift.TException te) {
20387
        throw new java.io.IOException(te);
20388
      }
20389
    }
20390
 
20391
  }
20392
 
9829 amar.kumar 20393
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
20394
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
20395
 
20396
    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);
20397
    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);
20398
 
20399
    private long id; // required
20400
    private long warehouseId; // required
20401
 
20402
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20403
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20404
      ID((short)1, "id"),
20405
      WAREHOUSE_ID((short)2, "warehouseId");
20406
 
20407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20408
 
20409
      static {
20410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20411
          byName.put(field.getFieldName(), field);
20412
        }
20413
      }
20414
 
20415
      /**
20416
       * Find the _Fields constant that matches fieldId, or null if its not found.
20417
       */
20418
      public static _Fields findByThriftId(int fieldId) {
20419
        switch(fieldId) {
20420
          case 1: // ID
20421
            return ID;
20422
          case 2: // WAREHOUSE_ID
20423
            return WAREHOUSE_ID;
20424
          default:
20425
            return null;
20426
        }
20427
      }
20428
 
20429
      /**
20430
       * Find the _Fields constant that matches fieldId, throwing an exception
20431
       * if it is not found.
20432
       */
20433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20434
        _Fields fields = findByThriftId(fieldId);
20435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20436
        return fields;
20437
      }
20438
 
20439
      /**
20440
       * Find the _Fields constant that matches name, or null if its not found.
20441
       */
20442
      public static _Fields findByName(String name) {
20443
        return byName.get(name);
20444
      }
20445
 
20446
      private final short _thriftId;
20447
      private final String _fieldName;
20448
 
20449
      _Fields(short thriftId, String fieldName) {
20450
        _thriftId = thriftId;
20451
        _fieldName = fieldName;
20452
      }
20453
 
20454
      public short getThriftFieldId() {
20455
        return _thriftId;
20456
      }
20457
 
20458
      public String getFieldName() {
20459
        return _fieldName;
20460
      }
20461
    }
20462
 
20463
    // isset id assignments
20464
    private static final int __ID_ISSET_ID = 0;
20465
    private static final int __WAREHOUSEID_ISSET_ID = 1;
20466
    private BitSet __isset_bit_vector = new BitSet(2);
20467
 
20468
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20469
    static {
20470
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20471
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20472
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20473
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20474
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20475
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20476
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
20477
    }
20478
 
20479
    public changeWarehouseForPO_args() {
20480
    }
20481
 
20482
    public changeWarehouseForPO_args(
20483
      long id,
20484
      long warehouseId)
20485
    {
20486
      this();
20487
      this.id = id;
20488
      setIdIsSet(true);
20489
      this.warehouseId = warehouseId;
20490
      setWarehouseIdIsSet(true);
20491
    }
20492
 
20493
    /**
20494
     * Performs a deep copy on <i>other</i>.
20495
     */
20496
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
20497
      __isset_bit_vector.clear();
20498
      __isset_bit_vector.or(other.__isset_bit_vector);
20499
      this.id = other.id;
20500
      this.warehouseId = other.warehouseId;
20501
    }
20502
 
20503
    public changeWarehouseForPO_args deepCopy() {
20504
      return new changeWarehouseForPO_args(this);
20505
    }
20506
 
20507
    @Override
20508
    public void clear() {
20509
      setIdIsSet(false);
20510
      this.id = 0;
20511
      setWarehouseIdIsSet(false);
20512
      this.warehouseId = 0;
20513
    }
20514
 
20515
    public long getId() {
20516
      return this.id;
20517
    }
20518
 
20519
    public void setId(long id) {
20520
      this.id = id;
20521
      setIdIsSet(true);
20522
    }
20523
 
20524
    public void unsetId() {
20525
      __isset_bit_vector.clear(__ID_ISSET_ID);
20526
    }
20527
 
20528
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
20529
    public boolean isSetId() {
20530
      return __isset_bit_vector.get(__ID_ISSET_ID);
20531
    }
20532
 
20533
    public void setIdIsSet(boolean value) {
20534
      __isset_bit_vector.set(__ID_ISSET_ID, value);
20535
    }
20536
 
20537
    public long getWarehouseId() {
20538
      return this.warehouseId;
20539
    }
20540
 
20541
    public void setWarehouseId(long warehouseId) {
20542
      this.warehouseId = warehouseId;
20543
      setWarehouseIdIsSet(true);
20544
    }
20545
 
20546
    public void unsetWarehouseId() {
20547
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20548
    }
20549
 
20550
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
20551
    public boolean isSetWarehouseId() {
20552
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20553
    }
20554
 
20555
    public void setWarehouseIdIsSet(boolean value) {
20556
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20557
    }
20558
 
20559
    public void setFieldValue(_Fields field, Object value) {
20560
      switch (field) {
20561
      case ID:
20562
        if (value == null) {
20563
          unsetId();
20564
        } else {
20565
          setId((Long)value);
20566
        }
20567
        break;
20568
 
20569
      case WAREHOUSE_ID:
20570
        if (value == null) {
20571
          unsetWarehouseId();
20572
        } else {
20573
          setWarehouseId((Long)value);
20574
        }
20575
        break;
20576
 
20577
      }
20578
    }
20579
 
20580
    public Object getFieldValue(_Fields field) {
20581
      switch (field) {
20582
      case ID:
20583
        return Long.valueOf(getId());
20584
 
20585
      case WAREHOUSE_ID:
20586
        return Long.valueOf(getWarehouseId());
20587
 
20588
      }
20589
      throw new IllegalStateException();
20590
    }
20591
 
20592
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20593
    public boolean isSet(_Fields field) {
20594
      if (field == null) {
20595
        throw new IllegalArgumentException();
20596
      }
20597
 
20598
      switch (field) {
20599
      case ID:
20600
        return isSetId();
20601
      case WAREHOUSE_ID:
20602
        return isSetWarehouseId();
20603
      }
20604
      throw new IllegalStateException();
20605
    }
20606
 
20607
    @Override
20608
    public boolean equals(Object that) {
20609
      if (that == null)
20610
        return false;
20611
      if (that instanceof changeWarehouseForPO_args)
20612
        return this.equals((changeWarehouseForPO_args)that);
20613
      return false;
20614
    }
20615
 
20616
    public boolean equals(changeWarehouseForPO_args that) {
20617
      if (that == null)
20618
        return false;
20619
 
20620
      boolean this_present_id = true;
20621
      boolean that_present_id = true;
20622
      if (this_present_id || that_present_id) {
20623
        if (!(this_present_id && that_present_id))
20624
          return false;
20625
        if (this.id != that.id)
20626
          return false;
20627
      }
20628
 
20629
      boolean this_present_warehouseId = true;
20630
      boolean that_present_warehouseId = true;
20631
      if (this_present_warehouseId || that_present_warehouseId) {
20632
        if (!(this_present_warehouseId && that_present_warehouseId))
20633
          return false;
20634
        if (this.warehouseId != that.warehouseId)
20635
          return false;
20636
      }
20637
 
20638
      return true;
20639
    }
20640
 
20641
    @Override
20642
    public int hashCode() {
20643
      return 0;
20644
    }
20645
 
20646
    public int compareTo(changeWarehouseForPO_args other) {
20647
      if (!getClass().equals(other.getClass())) {
20648
        return getClass().getName().compareTo(other.getClass().getName());
20649
      }
20650
 
20651
      int lastComparison = 0;
20652
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
20653
 
20654
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
20655
      if (lastComparison != 0) {
20656
        return lastComparison;
20657
      }
20658
      if (isSetId()) {
20659
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
20660
        if (lastComparison != 0) {
20661
          return lastComparison;
20662
        }
20663
      }
20664
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
20665
      if (lastComparison != 0) {
20666
        return lastComparison;
20667
      }
20668
      if (isSetWarehouseId()) {
20669
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
20670
        if (lastComparison != 0) {
20671
          return lastComparison;
20672
        }
20673
      }
20674
      return 0;
20675
    }
20676
 
20677
    public _Fields fieldForId(int fieldId) {
20678
      return _Fields.findByThriftId(fieldId);
20679
    }
20680
 
20681
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20682
      org.apache.thrift.protocol.TField field;
20683
      iprot.readStructBegin();
20684
      while (true)
20685
      {
20686
        field = iprot.readFieldBegin();
20687
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20688
          break;
20689
        }
20690
        switch (field.id) {
20691
          case 1: // ID
20692
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20693
              this.id = iprot.readI64();
20694
              setIdIsSet(true);
20695
            } else { 
20696
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20697
            }
20698
            break;
20699
          case 2: // WAREHOUSE_ID
20700
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20701
              this.warehouseId = iprot.readI64();
20702
              setWarehouseIdIsSet(true);
20703
            } else { 
20704
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20705
            }
20706
            break;
20707
          default:
20708
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20709
        }
20710
        iprot.readFieldEnd();
20711
      }
20712
      iprot.readStructEnd();
20713
      validate();
20714
    }
20715
 
20716
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20717
      validate();
20718
 
20719
      oprot.writeStructBegin(STRUCT_DESC);
20720
      oprot.writeFieldBegin(ID_FIELD_DESC);
20721
      oprot.writeI64(this.id);
20722
      oprot.writeFieldEnd();
20723
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20724
      oprot.writeI64(this.warehouseId);
20725
      oprot.writeFieldEnd();
20726
      oprot.writeFieldStop();
20727
      oprot.writeStructEnd();
20728
    }
20729
 
20730
    @Override
20731
    public String toString() {
20732
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
20733
      boolean first = true;
20734
 
20735
      sb.append("id:");
20736
      sb.append(this.id);
20737
      first = false;
20738
      if (!first) sb.append(", ");
20739
      sb.append("warehouseId:");
20740
      sb.append(this.warehouseId);
20741
      first = false;
20742
      sb.append(")");
20743
      return sb.toString();
20744
    }
20745
 
20746
    public void validate() throws org.apache.thrift.TException {
20747
      // check for required fields
20748
    }
20749
 
20750
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20751
      try {
20752
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20753
      } catch (org.apache.thrift.TException te) {
20754
        throw new java.io.IOException(te);
20755
      }
20756
    }
20757
 
20758
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20759
      try {
20760
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20761
      } catch (org.apache.thrift.TException te) {
20762
        throw new java.io.IOException(te);
20763
      }
20764
    }
20765
 
20766
  }
20767
 
20768
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
20769
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
20770
 
20771
    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);
20772
 
20773
    private PurchaseServiceException e; // required
20774
 
20775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20776
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20777
      E((short)1, "e");
20778
 
20779
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20780
 
20781
      static {
20782
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20783
          byName.put(field.getFieldName(), field);
20784
        }
20785
      }
20786
 
20787
      /**
20788
       * Find the _Fields constant that matches fieldId, or null if its not found.
20789
       */
20790
      public static _Fields findByThriftId(int fieldId) {
20791
        switch(fieldId) {
20792
          case 1: // E
20793
            return E;
20794
          default:
20795
            return null;
20796
        }
20797
      }
20798
 
20799
      /**
20800
       * Find the _Fields constant that matches fieldId, throwing an exception
20801
       * if it is not found.
20802
       */
20803
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20804
        _Fields fields = findByThriftId(fieldId);
20805
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20806
        return fields;
20807
      }
20808
 
20809
      /**
20810
       * Find the _Fields constant that matches name, or null if its not found.
20811
       */
20812
      public static _Fields findByName(String name) {
20813
        return byName.get(name);
20814
      }
20815
 
20816
      private final short _thriftId;
20817
      private final String _fieldName;
20818
 
20819
      _Fields(short thriftId, String fieldName) {
20820
        _thriftId = thriftId;
20821
        _fieldName = fieldName;
20822
      }
20823
 
20824
      public short getThriftFieldId() {
20825
        return _thriftId;
20826
      }
20827
 
20828
      public String getFieldName() {
20829
        return _fieldName;
20830
      }
20831
    }
20832
 
20833
    // isset id assignments
20834
 
20835
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20836
    static {
20837
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20838
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20839
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
20840
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20841
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
20842
    }
20843
 
20844
    public changeWarehouseForPO_result() {
20845
    }
20846
 
20847
    public changeWarehouseForPO_result(
20848
      PurchaseServiceException e)
20849
    {
20850
      this();
20851
      this.e = e;
20852
    }
20853
 
20854
    /**
20855
     * Performs a deep copy on <i>other</i>.
20856
     */
20857
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
20858
      if (other.isSetE()) {
20859
        this.e = new PurchaseServiceException(other.e);
20860
      }
20861
    }
20862
 
20863
    public changeWarehouseForPO_result deepCopy() {
20864
      return new changeWarehouseForPO_result(this);
20865
    }
20866
 
20867
    @Override
20868
    public void clear() {
20869
      this.e = null;
20870
    }
20871
 
20872
    public PurchaseServiceException getE() {
20873
      return this.e;
20874
    }
20875
 
20876
    public void setE(PurchaseServiceException e) {
20877
      this.e = e;
20878
    }
20879
 
20880
    public void unsetE() {
20881
      this.e = null;
20882
    }
20883
 
20884
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
20885
    public boolean isSetE() {
20886
      return this.e != null;
20887
    }
20888
 
20889
    public void setEIsSet(boolean value) {
20890
      if (!value) {
20891
        this.e = null;
20892
      }
20893
    }
20894
 
20895
    public void setFieldValue(_Fields field, Object value) {
20896
      switch (field) {
20897
      case E:
20898
        if (value == null) {
20899
          unsetE();
20900
        } else {
20901
          setE((PurchaseServiceException)value);
20902
        }
20903
        break;
20904
 
20905
      }
20906
    }
20907
 
20908
    public Object getFieldValue(_Fields field) {
20909
      switch (field) {
20910
      case E:
20911
        return getE();
20912
 
20913
      }
20914
      throw new IllegalStateException();
20915
    }
20916
 
20917
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20918
    public boolean isSet(_Fields field) {
20919
      if (field == null) {
20920
        throw new IllegalArgumentException();
20921
      }
20922
 
20923
      switch (field) {
20924
      case E:
20925
        return isSetE();
20926
      }
20927
      throw new IllegalStateException();
20928
    }
20929
 
20930
    @Override
20931
    public boolean equals(Object that) {
20932
      if (that == null)
20933
        return false;
20934
      if (that instanceof changeWarehouseForPO_result)
20935
        return this.equals((changeWarehouseForPO_result)that);
20936
      return false;
20937
    }
20938
 
20939
    public boolean equals(changeWarehouseForPO_result that) {
20940
      if (that == null)
20941
        return false;
20942
 
20943
      boolean this_present_e = true && this.isSetE();
20944
      boolean that_present_e = true && that.isSetE();
20945
      if (this_present_e || that_present_e) {
20946
        if (!(this_present_e && that_present_e))
20947
          return false;
20948
        if (!this.e.equals(that.e))
20949
          return false;
20950
      }
20951
 
20952
      return true;
20953
    }
20954
 
20955
    @Override
20956
    public int hashCode() {
20957
      return 0;
20958
    }
20959
 
20960
    public int compareTo(changeWarehouseForPO_result other) {
20961
      if (!getClass().equals(other.getClass())) {
20962
        return getClass().getName().compareTo(other.getClass().getName());
20963
      }
20964
 
20965
      int lastComparison = 0;
20966
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
20967
 
20968
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
20969
      if (lastComparison != 0) {
20970
        return lastComparison;
20971
      }
20972
      if (isSetE()) {
20973
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
20974
        if (lastComparison != 0) {
20975
          return lastComparison;
20976
        }
20977
      }
20978
      return 0;
20979
    }
20980
 
20981
    public _Fields fieldForId(int fieldId) {
20982
      return _Fields.findByThriftId(fieldId);
20983
    }
20984
 
20985
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20986
      org.apache.thrift.protocol.TField field;
20987
      iprot.readStructBegin();
20988
      while (true)
20989
      {
20990
        field = iprot.readFieldBegin();
20991
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20992
          break;
20993
        }
20994
        switch (field.id) {
20995
          case 1: // E
20996
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20997
              this.e = new PurchaseServiceException();
20998
              this.e.read(iprot);
20999
            } else { 
21000
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21001
            }
21002
            break;
21003
          default:
21004
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21005
        }
21006
        iprot.readFieldEnd();
21007
      }
21008
      iprot.readStructEnd();
21009
      validate();
21010
    }
21011
 
21012
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21013
      oprot.writeStructBegin(STRUCT_DESC);
21014
 
21015
      if (this.isSetE()) {
21016
        oprot.writeFieldBegin(E_FIELD_DESC);
21017
        this.e.write(oprot);
21018
        oprot.writeFieldEnd();
21019
      }
21020
      oprot.writeFieldStop();
21021
      oprot.writeStructEnd();
21022
    }
21023
 
21024
    @Override
21025
    public String toString() {
21026
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
21027
      boolean first = true;
21028
 
21029
      sb.append("e:");
21030
      if (this.e == null) {
21031
        sb.append("null");
21032
      } else {
21033
        sb.append(this.e);
21034
      }
21035
      first = false;
21036
      sb.append(")");
21037
      return sb.toString();
21038
    }
21039
 
21040
    public void validate() throws org.apache.thrift.TException {
21041
      // check for required fields
21042
    }
21043
 
21044
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21045
      try {
21046
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21047
      } catch (org.apache.thrift.TException te) {
21048
        throw new java.io.IOException(te);
21049
      }
21050
    }
21051
 
21052
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21053
      try {
21054
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21055
      } catch (org.apache.thrift.TException te) {
21056
        throw new java.io.IOException(te);
21057
      }
21058
    }
21059
 
21060
  }
21061
 
4496 mandeep.dh 21062
}