Subversion Repositories SmartDukaan

Rev

Rev 6630 | Rev 7410 | 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
    /**
141
     * Creates an invoice object
142
     * 
143
     * @param invoice
144
     */
145
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
146
 
5591 mandeep.dh 147
    /**
148
     * Creates a supplier
149
     * 
150
     * @param supplier
151
     */
152
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
153
 
154
    /**
155
     * Updates a supplier
156
     * 
157
     * @param supplier
158
     */
159
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
160
 
6467 amar.kumar 161
    /**
162
     * Create a new Purchase Return
163
     * 
164
     * @param purchaseReturn
165
     */
166
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException;
167
 
168
    /**
169
     * Create a new Purchase Return
170
     * 
171
     * @param id
172
     */
173
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException;
174
 
175
    /**
176
     * Create a new Purchase Return
177
     */
178
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
179
 
6630 amar.kumar 180
    /**
181
     * Get invoice with given supplierId and invoiceNumber
182
     * 
183
     * @param invoiceNumber
184
     * @param supplierId
185
     */
186
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
187
 
6762 amar.kumar 188
    /**
189
     *  * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
190
     * *
191
     * 
192
     * @param invoiceNumber
193
     * @param unitPrice
194
     * @param itemId
195
     */
196
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId) throws org.apache.thrift.TException;
197
 
198
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException;
199
 
4496 mandeep.dh 200
  }
201
 
202
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
203
 
204
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
205
 
206
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
207
 
208
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
209
 
210
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
211
 
212
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
213
 
214
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
215
 
216
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
217
 
6385 amar.kumar 218
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
219
 
4555 mandeep.dh 220
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 221
 
4754 mandeep.dh 222
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
223
 
224
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
225
 
226
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
227
 
228
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
229
 
5185 mandeep.dh 230
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
231
 
5443 mandeep.dh 232
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
233
 
234
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
235
 
5591 mandeep.dh 236
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
237
 
238
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
239
 
6467 amar.kumar 240
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
241
 
242
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
243
 
244
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
245
 
6630 amar.kumar 246
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
247
 
6762 amar.kumar 248
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException;
249
 
250
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException;
251
 
4496 mandeep.dh 252
  }
253
 
254
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
255
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
256
      public Factory() {}
257
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
258
        return new Client(prot);
259
      }
260
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
261
        return new Client(iprot, oprot);
262
      }
263
    }
264
 
265
    public Client(org.apache.thrift.protocol.TProtocol prot)
266
    {
267
      super(prot, prot);
268
    }
269
 
270
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
271
      super(iprot, oprot);
272
    }
273
 
274
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
275
    {
276
      send_createPurchaseOrder(purchaseOrder);
277
      return recv_createPurchaseOrder();
278
    }
279
 
280
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
281
    {
282
      createPurchaseOrder_args args = new createPurchaseOrder_args();
283
      args.setPurchaseOrder(purchaseOrder);
284
      sendBase("createPurchaseOrder", args);
285
    }
286
 
287
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
288
    {
289
      createPurchaseOrder_result result = new createPurchaseOrder_result();
290
      receiveBase(result, "createPurchaseOrder");
291
      if (result.isSetSuccess()) {
292
        return result.success;
293
      }
294
      if (result.e != null) {
295
        throw result.e;
296
      }
297
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
298
    }
299
 
300
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
301
    {
302
      send_getPurchaseOrder(id);
303
      return recv_getPurchaseOrder();
304
    }
305
 
306
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
307
    {
308
      getPurchaseOrder_args args = new getPurchaseOrder_args();
309
      args.setId(id);
310
      sendBase("getPurchaseOrder", args);
311
    }
312
 
313
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
314
    {
315
      getPurchaseOrder_result result = new getPurchaseOrder_result();
316
      receiveBase(result, "getPurchaseOrder");
317
      if (result.isSetSuccess()) {
318
        return result.success;
319
      }
320
      if (result.e != null) {
321
        throw result.e;
322
      }
323
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
324
    }
325
 
326
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
327
    {
328
      send_getAllPurchaseOrders(status);
329
      return recv_getAllPurchaseOrders();
330
    }
331
 
332
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
333
    {
334
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
335
      args.setStatus(status);
336
      sendBase("getAllPurchaseOrders", args);
337
    }
338
 
339
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
340
    {
341
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
342
      receiveBase(result, "getAllPurchaseOrders");
343
      if (result.isSetSuccess()) {
344
        return result.success;
345
      }
346
      if (result.e != null) {
347
        throw result.e;
348
      }
349
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
350
    }
351
 
352
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
353
    {
354
      send_getSupplier(id);
355
      return recv_getSupplier();
356
    }
357
 
358
    public void send_getSupplier(long id) throws org.apache.thrift.TException
359
    {
360
      getSupplier_args args = new getSupplier_args();
361
      args.setId(id);
362
      sendBase("getSupplier", args);
363
    }
364
 
365
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
366
    {
367
      getSupplier_result result = new getSupplier_result();
368
      receiveBase(result, "getSupplier");
369
      if (result.isSetSuccess()) {
370
        return result.success;
371
      }
372
      if (result.e != null) {
373
        throw result.e;
374
      }
375
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
376
    }
377
 
378
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
379
    {
380
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
381
      return recv_startPurchase();
382
    }
383
 
384
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
385
    {
386
      startPurchase_args args = new startPurchase_args();
387
      args.setPurchaseOrderId(purchaseOrderId);
388
      args.setInvoiceNumber(invoiceNumber);
389
      args.setFreightCharges(freightCharges);
390
      sendBase("startPurchase", args);
391
    }
392
 
393
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
394
    {
395
      startPurchase_result result = new startPurchase_result();
396
      receiveBase(result, "startPurchase");
397
      if (result.isSetSuccess()) {
398
        return result.success;
399
      }
400
      if (result.e != null) {
401
        throw result.e;
402
      }
403
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
404
    }
405
 
406
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
407
    {
408
      send_closePurchase(purchaseId);
409
      return recv_closePurchase();
410
    }
411
 
412
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
413
    {
414
      closePurchase_args args = new closePurchase_args();
415
      args.setPurchaseId(purchaseId);
416
      sendBase("closePurchase", args);
417
    }
418
 
419
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
420
    {
421
      closePurchase_result result = new closePurchase_result();
422
      receiveBase(result, "closePurchase");
423
      if (result.isSetSuccess()) {
424
        return result.success;
425
      }
426
      if (result.e != null) {
427
        throw result.e;
428
      }
429
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
430
    }
431
 
432
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
433
    {
434
      send_getAllPurchases(purchaseOrderId, open);
435
      return recv_getAllPurchases();
436
    }
437
 
438
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
439
    {
440
      getAllPurchases_args args = new getAllPurchases_args();
441
      args.setPurchaseOrderId(purchaseOrderId);
442
      args.setOpen(open);
443
      sendBase("getAllPurchases", args);
444
    }
445
 
446
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
447
    {
448
      getAllPurchases_result result = new getAllPurchases_result();
449
      receiveBase(result, "getAllPurchases");
450
      if (result.isSetSuccess()) {
451
        return result.success;
452
      }
453
      if (result.e != null) {
454
        throw result.e;
455
      }
456
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
457
    }
458
 
6385 amar.kumar 459
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
460
    {
461
      send_getPurchasesForPO(purchaseOrderId);
462
      return recv_getPurchasesForPO();
463
    }
464
 
465
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
466
    {
467
      getPurchasesForPO_args args = new getPurchasesForPO_args();
468
      args.setPurchaseOrderId(purchaseOrderId);
469
      sendBase("getPurchasesForPO", args);
470
    }
471
 
472
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
473
    {
474
      getPurchasesForPO_result result = new getPurchasesForPO_result();
475
      receiveBase(result, "getPurchasesForPO");
476
      if (result.isSetSuccess()) {
477
        return result.success;
478
      }
479
      if (result.e != null) {
480
        throw result.e;
481
      }
482
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
483
    }
484
 
4555 mandeep.dh 485
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 486
    {
4555 mandeep.dh 487
      send_getPurchaseOrderForPurchase(purchaseId);
488
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 489
    }
490
 
4555 mandeep.dh 491
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 492
    {
4555 mandeep.dh 493
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 494
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 495
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 496
    }
497
 
4555 mandeep.dh 498
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 499
    {
4555 mandeep.dh 500
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
501
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 502
      if (result.isSetSuccess()) {
503
        return result.success;
504
      }
4555 mandeep.dh 505
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 506
    }
507
 
4754 mandeep.dh 508
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
509
    {
510
      send_getPendingPurchaseOrders(warehouseId);
511
      return recv_getPendingPurchaseOrders();
512
    }
513
 
514
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
515
    {
516
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
517
      args.setWarehouseId(warehouseId);
518
      sendBase("getPendingPurchaseOrders", args);
519
    }
520
 
521
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
522
    {
523
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
524
      receiveBase(result, "getPendingPurchaseOrders");
525
      if (result.isSetSuccess()) {
526
        return result.success;
527
      }
528
      if (result.e != null) {
529
        throw result.e;
530
      }
531
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
532
    }
533
 
534
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
535
    {
536
      send_getSuppliers();
537
      return recv_getSuppliers();
538
    }
539
 
540
    public void send_getSuppliers() throws org.apache.thrift.TException
541
    {
542
      getSuppliers_args args = new getSuppliers_args();
543
      sendBase("getSuppliers", args);
544
    }
545
 
546
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
547
    {
548
      getSuppliers_result result = new getSuppliers_result();
549
      receiveBase(result, "getSuppliers");
550
      if (result.isSetSuccess()) {
551
        return result.success;
552
      }
553
      if (result.e != null) {
554
        throw result.e;
555
      }
556
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
557
    }
558
 
559
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
560
    {
561
      send_fulfillPO(purchaseOrderId, itemId, quantity);
562
      recv_fulfillPO();
563
    }
564
 
565
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
566
    {
567
      fulfillPO_args args = new fulfillPO_args();
568
      args.setPurchaseOrderId(purchaseOrderId);
569
      args.setItemId(itemId);
570
      args.setQuantity(quantity);
571
      sendBase("fulfillPO", args);
572
    }
573
 
574
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
575
    {
576
      fulfillPO_result result = new fulfillPO_result();
577
      receiveBase(result, "fulfillPO");
578
      if (result.e != null) {
579
        throw result.e;
580
      }
581
      return;
582
    }
583
 
584
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
585
    {
586
      send_updatePurchaseOrder(purchaseOrder);
587
      recv_updatePurchaseOrder();
588
    }
589
 
590
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
591
    {
592
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
593
      args.setPurchaseOrder(purchaseOrder);
594
      sendBase("updatePurchaseOrder", args);
595
    }
596
 
597
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
598
    {
599
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
600
      receiveBase(result, "updatePurchaseOrder");
601
      if (result.e != null) {
602
        throw result.e;
603
      }
604
      return;
605
    }
606
 
5185 mandeep.dh 607
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
608
    {
609
      send_unFulfillPO(purchaseId, itemId, quantity);
610
      recv_unFulfillPO();
611
    }
612
 
613
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
614
    {
615
      unFulfillPO_args args = new unFulfillPO_args();
616
      args.setPurchaseId(purchaseId);
617
      args.setItemId(itemId);
618
      args.setQuantity(quantity);
619
      sendBase("unFulfillPO", args);
620
    }
621
 
622
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
623
    {
624
      unFulfillPO_result result = new unFulfillPO_result();
625
      receiveBase(result, "unFulfillPO");
626
      if (result.e != null) {
627
        throw result.e;
628
      }
629
      return;
630
    }
631
 
5443 mandeep.dh 632
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
633
    {
634
      send_getInvoices(date);
635
      return recv_getInvoices();
636
    }
637
 
638
    public void send_getInvoices(long date) throws org.apache.thrift.TException
639
    {
640
      getInvoices_args args = new getInvoices_args();
641
      args.setDate(date);
642
      sendBase("getInvoices", args);
643
    }
644
 
645
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
646
    {
647
      getInvoices_result result = new getInvoices_result();
648
      receiveBase(result, "getInvoices");
649
      if (result.isSetSuccess()) {
650
        return result.success;
651
      }
652
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
653
    }
654
 
655
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
656
    {
657
      send_createInvoice(invoice);
658
      recv_createInvoice();
659
    }
660
 
661
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
662
    {
663
      createInvoice_args args = new createInvoice_args();
664
      args.setInvoice(invoice);
665
      sendBase("createInvoice", args);
666
    }
667
 
668
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
669
    {
670
      createInvoice_result result = new createInvoice_result();
671
      receiveBase(result, "createInvoice");
672
      if (result.e != null) {
673
        throw result.e;
674
      }
675
      return;
676
    }
677
 
5591 mandeep.dh 678
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
679
    {
680
      send_addSupplier(supplier);
681
      return recv_addSupplier();
682
    }
683
 
684
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
685
    {
686
      addSupplier_args args = new addSupplier_args();
687
      args.setSupplier(supplier);
688
      sendBase("addSupplier", args);
689
    }
690
 
691
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
692
    {
693
      addSupplier_result result = new addSupplier_result();
694
      receiveBase(result, "addSupplier");
695
      if (result.isSetSuccess()) {
696
        return result.success;
697
      }
698
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
699
    }
700
 
701
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
702
    {
703
      send_updateSupplier(supplier);
704
      recv_updateSupplier();
705
    }
706
 
707
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
708
    {
709
      updateSupplier_args args = new updateSupplier_args();
710
      args.setSupplier(supplier);
711
      sendBase("updateSupplier", args);
712
    }
713
 
714
    public void recv_updateSupplier() throws org.apache.thrift.TException
715
    {
716
      updateSupplier_result result = new updateSupplier_result();
717
      receiveBase(result, "updateSupplier");
718
      return;
719
    }
720
 
6467 amar.kumar 721
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
722
    {
723
      send_createPurchaseReturn(purchaseReturn);
724
      return recv_createPurchaseReturn();
725
    }
726
 
727
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
728
    {
729
      createPurchaseReturn_args args = new createPurchaseReturn_args();
730
      args.setPurchaseReturn(purchaseReturn);
731
      sendBase("createPurchaseReturn", args);
732
    }
733
 
734
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
735
    {
736
      createPurchaseReturn_result result = new createPurchaseReturn_result();
737
      receiveBase(result, "createPurchaseReturn");
738
      if (result.isSetSuccess()) {
739
        return result.success;
740
      }
741
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
742
    }
743
 
744
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
745
    {
746
      send_settlePurchaseReturn(id);
747
      recv_settlePurchaseReturn();
748
    }
749
 
750
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
751
    {
752
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
753
      args.setId(id);
754
      sendBase("settlePurchaseReturn", args);
755
    }
756
 
757
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
758
    {
759
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
760
      receiveBase(result, "settlePurchaseReturn");
761
      return;
762
    }
763
 
764
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
765
    {
766
      send_getUnsettledPurchaseReturns();
767
      return recv_getUnsettledPurchaseReturns();
768
    }
769
 
770
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
771
    {
772
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
773
      sendBase("getUnsettledPurchaseReturns", args);
774
    }
775
 
776
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
777
    {
778
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
779
      receiveBase(result, "getUnsettledPurchaseReturns");
780
      if (result.isSetSuccess()) {
781
        return result.success;
782
      }
783
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
784
    }
785
 
6630 amar.kumar 786
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
787
    {
788
      send_getInvoice(invoiceNumber, supplierId);
789
      return recv_getInvoice();
790
    }
791
 
792
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
793
    {
794
      getInvoice_args args = new getInvoice_args();
795
      args.setInvoiceNumber(invoiceNumber);
796
      args.setSupplierId(supplierId);
797
      sendBase("getInvoice", args);
798
    }
799
 
800
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
801
    {
802
      getInvoice_result result = new getInvoice_result();
803
      receiveBase(result, "getInvoice");
804
      if (result.isSetSuccess()) {
805
        return result.success;
806
      }
807
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
808
    }
809
 
6762 amar.kumar 810
    public long createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId) throws org.apache.thrift.TException
811
    {
812
      send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, itemId);
813
      return recv_createPurchaseForOurExtBilling();
814
    }
815
 
816
    public void send_createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId) throws org.apache.thrift.TException
817
    {
818
      createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
819
      args.setInvoiceNumber(invoiceNumber);
820
      args.setUnitPrice(unitPrice);
821
      args.setItemId(itemId);
822
      sendBase("createPurchaseForOurExtBilling", args);
823
    }
824
 
825
    public long recv_createPurchaseForOurExtBilling() throws org.apache.thrift.TException
826
    {
827
      createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
828
      receiveBase(result, "createPurchaseForOurExtBilling");
829
      if (result.isSetSuccess()) {
830
        return result.success;
831
      }
832
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
833
    }
834
 
835
    public void fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
836
    {
837
      send_fulfillPOForExtBilling(itemId, quantity);
838
      recv_fulfillPOForExtBilling();
839
    }
840
 
841
    public void send_fulfillPOForExtBilling(long itemId, long quantity) throws org.apache.thrift.TException
842
    {
843
      fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
844
      args.setItemId(itemId);
845
      args.setQuantity(quantity);
846
      sendBase("fulfillPOForExtBilling", args);
847
    }
848
 
849
    public void recv_fulfillPOForExtBilling() throws org.apache.thrift.TException
850
    {
851
      fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
852
      receiveBase(result, "fulfillPOForExtBilling");
853
      return;
854
    }
855
 
4496 mandeep.dh 856
  }
857
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
858
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
859
      private org.apache.thrift.async.TAsyncClientManager clientManager;
860
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
861
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
862
        this.clientManager = clientManager;
863
        this.protocolFactory = protocolFactory;
864
      }
865
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
866
        return new AsyncClient(protocolFactory, clientManager, transport);
867
      }
868
    }
869
 
870
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
871
      super(protocolFactory, clientManager, transport);
872
    }
873
 
874
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
875
      checkReady();
876
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
877
      this.___currentMethod = method_call;
878
      ___manager.call(method_call);
879
    }
880
 
881
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
882
      private PurchaseOrder purchaseOrder;
883
      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 {
884
        super(client, protocolFactory, transport, resultHandler, false);
885
        this.purchaseOrder = purchaseOrder;
886
      }
887
 
888
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
889
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
890
        createPurchaseOrder_args args = new createPurchaseOrder_args();
891
        args.setPurchaseOrder(purchaseOrder);
892
        args.write(prot);
893
        prot.writeMessageEnd();
894
      }
895
 
896
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
897
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
898
          throw new IllegalStateException("Method call not finished!");
899
        }
900
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
901
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
902
        return (new Client(prot)).recv_createPurchaseOrder();
903
      }
904
    }
905
 
906
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
907
      checkReady();
908
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
909
      this.___currentMethod = method_call;
910
      ___manager.call(method_call);
911
    }
912
 
913
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
914
      private long id;
915
      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 {
916
        super(client, protocolFactory, transport, resultHandler, false);
917
        this.id = id;
918
      }
919
 
920
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
921
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
922
        getPurchaseOrder_args args = new getPurchaseOrder_args();
923
        args.setId(id);
924
        args.write(prot);
925
        prot.writeMessageEnd();
926
      }
927
 
928
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
929
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
930
          throw new IllegalStateException("Method call not finished!");
931
        }
932
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
933
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
934
        return (new Client(prot)).recv_getPurchaseOrder();
935
      }
936
    }
937
 
938
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
939
      checkReady();
940
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
941
      this.___currentMethod = method_call;
942
      ___manager.call(method_call);
943
    }
944
 
945
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
946
      private POStatus status;
947
      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 {
948
        super(client, protocolFactory, transport, resultHandler, false);
949
        this.status = status;
950
      }
951
 
952
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
953
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
954
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
955
        args.setStatus(status);
956
        args.write(prot);
957
        prot.writeMessageEnd();
958
      }
959
 
960
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
961
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
962
          throw new IllegalStateException("Method call not finished!");
963
        }
964
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
965
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
966
        return (new Client(prot)).recv_getAllPurchaseOrders();
967
      }
968
    }
969
 
970
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
971
      checkReady();
972
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
973
      this.___currentMethod = method_call;
974
      ___manager.call(method_call);
975
    }
976
 
977
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
978
      private long id;
979
      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 {
980
        super(client, protocolFactory, transport, resultHandler, false);
981
        this.id = id;
982
      }
983
 
984
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
985
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
986
        getSupplier_args args = new getSupplier_args();
987
        args.setId(id);
988
        args.write(prot);
989
        prot.writeMessageEnd();
990
      }
991
 
992
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
993
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
994
          throw new IllegalStateException("Method call not finished!");
995
        }
996
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
997
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
998
        return (new Client(prot)).recv_getSupplier();
999
      }
1000
    }
1001
 
1002
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1003
      checkReady();
1004
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1005
      this.___currentMethod = method_call;
1006
      ___manager.call(method_call);
1007
    }
1008
 
1009
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1010
      private long purchaseOrderId;
1011
      private String invoiceNumber;
1012
      private double freightCharges;
1013
      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 {
1014
        super(client, protocolFactory, transport, resultHandler, false);
1015
        this.purchaseOrderId = purchaseOrderId;
1016
        this.invoiceNumber = invoiceNumber;
1017
        this.freightCharges = freightCharges;
1018
      }
1019
 
1020
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1021
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1022
        startPurchase_args args = new startPurchase_args();
1023
        args.setPurchaseOrderId(purchaseOrderId);
1024
        args.setInvoiceNumber(invoiceNumber);
1025
        args.setFreightCharges(freightCharges);
1026
        args.write(prot);
1027
        prot.writeMessageEnd();
1028
      }
1029
 
1030
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1031
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1032
          throw new IllegalStateException("Method call not finished!");
1033
        }
1034
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1035
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1036
        return (new Client(prot)).recv_startPurchase();
1037
      }
1038
    }
1039
 
1040
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
1041
      checkReady();
1042
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
1043
      this.___currentMethod = method_call;
1044
      ___manager.call(method_call);
1045
    }
1046
 
1047
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1048
      private long purchaseId;
1049
      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 {
1050
        super(client, protocolFactory, transport, resultHandler, false);
1051
        this.purchaseId = purchaseId;
1052
      }
1053
 
1054
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1055
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1056
        closePurchase_args args = new closePurchase_args();
1057
        args.setPurchaseId(purchaseId);
1058
        args.write(prot);
1059
        prot.writeMessageEnd();
1060
      }
1061
 
1062
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1063
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1064
          throw new IllegalStateException("Method call not finished!");
1065
        }
1066
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1067
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1068
        return (new Client(prot)).recv_closePurchase();
1069
      }
1070
    }
1071
 
1072
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1073
      checkReady();
1074
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1075
      this.___currentMethod = method_call;
1076
      ___manager.call(method_call);
1077
    }
1078
 
1079
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1080
      private long purchaseOrderId;
1081
      private boolean open;
1082
      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 {
1083
        super(client, protocolFactory, transport, resultHandler, false);
1084
        this.purchaseOrderId = purchaseOrderId;
1085
        this.open = open;
1086
      }
1087
 
1088
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1089
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1090
        getAllPurchases_args args = new getAllPurchases_args();
1091
        args.setPurchaseOrderId(purchaseOrderId);
1092
        args.setOpen(open);
1093
        args.write(prot);
1094
        prot.writeMessageEnd();
1095
      }
1096
 
1097
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1098
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1099
          throw new IllegalStateException("Method call not finished!");
1100
        }
1101
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1102
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1103
        return (new Client(prot)).recv_getAllPurchases();
1104
      }
1105
    }
1106
 
6385 amar.kumar 1107
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1108
      checkReady();
1109
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1110
      this.___currentMethod = method_call;
1111
      ___manager.call(method_call);
1112
    }
1113
 
1114
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1115
      private long purchaseOrderId;
1116
      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 {
1117
        super(client, protocolFactory, transport, resultHandler, false);
1118
        this.purchaseOrderId = purchaseOrderId;
1119
      }
1120
 
1121
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1122
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1123
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1124
        args.setPurchaseOrderId(purchaseOrderId);
1125
        args.write(prot);
1126
        prot.writeMessageEnd();
1127
      }
1128
 
1129
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1130
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1131
          throw new IllegalStateException("Method call not finished!");
1132
        }
1133
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1134
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1135
        return (new Client(prot)).recv_getPurchasesForPO();
1136
      }
1137
    }
1138
 
4555 mandeep.dh 1139
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1140
      checkReady();
4555 mandeep.dh 1141
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1142
      this.___currentMethod = method_call;
1143
      ___manager.call(method_call);
1144
    }
1145
 
4555 mandeep.dh 1146
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1147
      private long purchaseId;
4555 mandeep.dh 1148
      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 1149
        super(client, protocolFactory, transport, resultHandler, false);
1150
        this.purchaseId = purchaseId;
1151
      }
1152
 
1153
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1154
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1155
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1156
        args.setPurchaseId(purchaseId);
1157
        args.write(prot);
1158
        prot.writeMessageEnd();
1159
      }
1160
 
4555 mandeep.dh 1161
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1162
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1163
          throw new IllegalStateException("Method call not finished!");
1164
        }
1165
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1166
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1167
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1168
      }
1169
    }
1170
 
4754 mandeep.dh 1171
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1172
      checkReady();
1173
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1174
      this.___currentMethod = method_call;
1175
      ___manager.call(method_call);
1176
    }
1177
 
1178
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1179
      private long warehouseId;
1180
      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 {
1181
        super(client, protocolFactory, transport, resultHandler, false);
1182
        this.warehouseId = warehouseId;
1183
      }
1184
 
1185
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1186
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1187
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1188
        args.setWarehouseId(warehouseId);
1189
        args.write(prot);
1190
        prot.writeMessageEnd();
1191
      }
1192
 
1193
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1194
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1195
          throw new IllegalStateException("Method call not finished!");
1196
        }
1197
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1198
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1199
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1200
      }
1201
    }
1202
 
1203
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1204
      checkReady();
1205
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1206
      this.___currentMethod = method_call;
1207
      ___manager.call(method_call);
1208
    }
1209
 
1210
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1211
      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 {
1212
        super(client, protocolFactory, transport, resultHandler, false);
1213
      }
1214
 
1215
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1216
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1217
        getSuppliers_args args = new getSuppliers_args();
1218
        args.write(prot);
1219
        prot.writeMessageEnd();
1220
      }
1221
 
1222
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1223
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1224
          throw new IllegalStateException("Method call not finished!");
1225
        }
1226
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1227
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1228
        return (new Client(prot)).recv_getSuppliers();
1229
      }
1230
    }
1231
 
1232
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1233
      checkReady();
1234
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1235
      this.___currentMethod = method_call;
1236
      ___manager.call(method_call);
1237
    }
1238
 
1239
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1240
      private long purchaseOrderId;
1241
      private long itemId;
1242
      private long quantity;
1243
      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 {
1244
        super(client, protocolFactory, transport, resultHandler, false);
1245
        this.purchaseOrderId = purchaseOrderId;
1246
        this.itemId = itemId;
1247
        this.quantity = quantity;
1248
      }
1249
 
1250
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1251
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1252
        fulfillPO_args args = new fulfillPO_args();
1253
        args.setPurchaseOrderId(purchaseOrderId);
1254
        args.setItemId(itemId);
1255
        args.setQuantity(quantity);
1256
        args.write(prot);
1257
        prot.writeMessageEnd();
1258
      }
1259
 
1260
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1261
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1262
          throw new IllegalStateException("Method call not finished!");
1263
        }
1264
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1265
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1266
        (new Client(prot)).recv_fulfillPO();
1267
      }
1268
    }
1269
 
1270
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1271
      checkReady();
1272
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1273
      this.___currentMethod = method_call;
1274
      ___manager.call(method_call);
1275
    }
1276
 
1277
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1278
      private PurchaseOrder purchaseOrder;
1279
      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 {
1280
        super(client, protocolFactory, transport, resultHandler, false);
1281
        this.purchaseOrder = purchaseOrder;
1282
      }
1283
 
1284
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1285
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1286
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1287
        args.setPurchaseOrder(purchaseOrder);
1288
        args.write(prot);
1289
        prot.writeMessageEnd();
1290
      }
1291
 
1292
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1293
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1294
          throw new IllegalStateException("Method call not finished!");
1295
        }
1296
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1297
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1298
        (new Client(prot)).recv_updatePurchaseOrder();
1299
      }
1300
    }
1301
 
5185 mandeep.dh 1302
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1303
      checkReady();
1304
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1305
      this.___currentMethod = method_call;
1306
      ___manager.call(method_call);
1307
    }
1308
 
1309
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1310
      private long purchaseId;
1311
      private long itemId;
1312
      private long quantity;
1313
      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 {
1314
        super(client, protocolFactory, transport, resultHandler, false);
1315
        this.purchaseId = purchaseId;
1316
        this.itemId = itemId;
1317
        this.quantity = quantity;
1318
      }
1319
 
1320
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1321
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1322
        unFulfillPO_args args = new unFulfillPO_args();
1323
        args.setPurchaseId(purchaseId);
1324
        args.setItemId(itemId);
1325
        args.setQuantity(quantity);
1326
        args.write(prot);
1327
        prot.writeMessageEnd();
1328
      }
1329
 
1330
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1331
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1332
          throw new IllegalStateException("Method call not finished!");
1333
        }
1334
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1335
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1336
        (new Client(prot)).recv_unFulfillPO();
1337
      }
1338
    }
1339
 
5443 mandeep.dh 1340
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1341
      checkReady();
1342
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1343
      this.___currentMethod = method_call;
1344
      ___manager.call(method_call);
1345
    }
1346
 
1347
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1348
      private long date;
1349
      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 {
1350
        super(client, protocolFactory, transport, resultHandler, false);
1351
        this.date = date;
1352
      }
1353
 
1354
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1355
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1356
        getInvoices_args args = new getInvoices_args();
1357
        args.setDate(date);
1358
        args.write(prot);
1359
        prot.writeMessageEnd();
1360
      }
1361
 
1362
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1363
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1364
          throw new IllegalStateException("Method call not finished!");
1365
        }
1366
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1367
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1368
        return (new Client(prot)).recv_getInvoices();
1369
      }
1370
    }
1371
 
1372
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1373
      checkReady();
1374
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1375
      this.___currentMethod = method_call;
1376
      ___manager.call(method_call);
1377
    }
1378
 
1379
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1380
      private Invoice invoice;
1381
      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 {
1382
        super(client, protocolFactory, transport, resultHandler, false);
1383
        this.invoice = invoice;
1384
      }
1385
 
1386
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1387
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1388
        createInvoice_args args = new createInvoice_args();
1389
        args.setInvoice(invoice);
1390
        args.write(prot);
1391
        prot.writeMessageEnd();
1392
      }
1393
 
1394
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1395
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1396
          throw new IllegalStateException("Method call not finished!");
1397
        }
1398
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1399
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1400
        (new Client(prot)).recv_createInvoice();
1401
      }
1402
    }
1403
 
5591 mandeep.dh 1404
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1405
      checkReady();
1406
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1407
      this.___currentMethod = method_call;
1408
      ___manager.call(method_call);
1409
    }
1410
 
1411
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1412
      private Supplier supplier;
1413
      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 {
1414
        super(client, protocolFactory, transport, resultHandler, false);
1415
        this.supplier = supplier;
1416
      }
1417
 
1418
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1419
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1420
        addSupplier_args args = new addSupplier_args();
1421
        args.setSupplier(supplier);
1422
        args.write(prot);
1423
        prot.writeMessageEnd();
1424
      }
1425
 
1426
      public Supplier getResult() throws org.apache.thrift.TException {
1427
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1428
          throw new IllegalStateException("Method call not finished!");
1429
        }
1430
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1431
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1432
        return (new Client(prot)).recv_addSupplier();
1433
      }
1434
    }
1435
 
1436
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1437
      checkReady();
1438
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1439
      this.___currentMethod = method_call;
1440
      ___manager.call(method_call);
1441
    }
1442
 
1443
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1444
      private Supplier supplier;
1445
      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 {
1446
        super(client, protocolFactory, transport, resultHandler, false);
1447
        this.supplier = supplier;
1448
      }
1449
 
1450
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1451
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1452
        updateSupplier_args args = new updateSupplier_args();
1453
        args.setSupplier(supplier);
1454
        args.write(prot);
1455
        prot.writeMessageEnd();
1456
      }
1457
 
1458
      public void getResult() throws org.apache.thrift.TException {
1459
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1460
          throw new IllegalStateException("Method call not finished!");
1461
        }
1462
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1463
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1464
        (new Client(prot)).recv_updateSupplier();
1465
      }
1466
    }
1467
 
6467 amar.kumar 1468
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1469
      checkReady();
1470
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1471
      this.___currentMethod = method_call;
1472
      ___manager.call(method_call);
1473
    }
1474
 
1475
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1476
      private PurchaseReturn purchaseReturn;
1477
      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 {
1478
        super(client, protocolFactory, transport, resultHandler, false);
1479
        this.purchaseReturn = purchaseReturn;
1480
      }
1481
 
1482
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1483
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1484
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1485
        args.setPurchaseReturn(purchaseReturn);
1486
        args.write(prot);
1487
        prot.writeMessageEnd();
1488
      }
1489
 
1490
      public long getResult() throws org.apache.thrift.TException {
1491
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1492
          throw new IllegalStateException("Method call not finished!");
1493
        }
1494
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1495
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1496
        return (new Client(prot)).recv_createPurchaseReturn();
1497
      }
1498
    }
1499
 
1500
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1501
      checkReady();
1502
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1503
      this.___currentMethod = method_call;
1504
      ___manager.call(method_call);
1505
    }
1506
 
1507
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1508
      private long id;
1509
      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 {
1510
        super(client, protocolFactory, transport, resultHandler, false);
1511
        this.id = id;
1512
      }
1513
 
1514
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1515
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1516
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1517
        args.setId(id);
1518
        args.write(prot);
1519
        prot.writeMessageEnd();
1520
      }
1521
 
1522
      public void getResult() throws org.apache.thrift.TException {
1523
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1524
          throw new IllegalStateException("Method call not finished!");
1525
        }
1526
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1527
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1528
        (new Client(prot)).recv_settlePurchaseReturn();
1529
      }
1530
    }
1531
 
1532
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1533
      checkReady();
1534
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1535
      this.___currentMethod = method_call;
1536
      ___manager.call(method_call);
1537
    }
1538
 
1539
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1540
      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 {
1541
        super(client, protocolFactory, transport, resultHandler, false);
1542
      }
1543
 
1544
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1545
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1546
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1547
        args.write(prot);
1548
        prot.writeMessageEnd();
1549
      }
1550
 
1551
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1552
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1553
          throw new IllegalStateException("Method call not finished!");
1554
        }
1555
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1556
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1557
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1558
      }
1559
    }
1560
 
6630 amar.kumar 1561
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1562
      checkReady();
1563
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1564
      this.___currentMethod = method_call;
1565
      ___manager.call(method_call);
1566
    }
1567
 
1568
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1569
      private String invoiceNumber;
1570
      private long supplierId;
1571
      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 {
1572
        super(client, protocolFactory, transport, resultHandler, false);
1573
        this.invoiceNumber = invoiceNumber;
1574
        this.supplierId = supplierId;
1575
      }
1576
 
1577
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1578
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1579
        getInvoice_args args = new getInvoice_args();
1580
        args.setInvoiceNumber(invoiceNumber);
1581
        args.setSupplierId(supplierId);
1582
        args.write(prot);
1583
        prot.writeMessageEnd();
1584
      }
1585
 
1586
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1587
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1588
          throw new IllegalStateException("Method call not finished!");
1589
        }
1590
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1591
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1592
        return (new Client(prot)).recv_getInvoice();
1593
      }
1594
    }
1595
 
6762 amar.kumar 1596
    public void createPurchaseForOurExtBilling(String invoiceNumber, double unitPrice, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1597
      checkReady();
1598
      createPurchaseForOurExtBilling_call method_call = new createPurchaseForOurExtBilling_call(invoiceNumber, unitPrice, itemId, resultHandler, this, ___protocolFactory, ___transport);
1599
      this.___currentMethod = method_call;
1600
      ___manager.call(method_call);
1601
    }
1602
 
1603
    public static class createPurchaseForOurExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1604
      private String invoiceNumber;
1605
      private double unitPrice;
1606
      private long itemId;
1607
      public createPurchaseForOurExtBilling_call(String invoiceNumber, double unitPrice, long itemId, org.apache.thrift.async.AsyncMethodCallback<createPurchaseForOurExtBilling_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1608
        super(client, protocolFactory, transport, resultHandler, false);
1609
        this.invoiceNumber = invoiceNumber;
1610
        this.unitPrice = unitPrice;
1611
        this.itemId = itemId;
1612
      }
1613
 
1614
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1615
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseForOurExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1616
        createPurchaseForOurExtBilling_args args = new createPurchaseForOurExtBilling_args();
1617
        args.setInvoiceNumber(invoiceNumber);
1618
        args.setUnitPrice(unitPrice);
1619
        args.setItemId(itemId);
1620
        args.write(prot);
1621
        prot.writeMessageEnd();
1622
      }
1623
 
1624
      public long getResult() throws org.apache.thrift.TException {
1625
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1626
          throw new IllegalStateException("Method call not finished!");
1627
        }
1628
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1629
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1630
        return (new Client(prot)).recv_createPurchaseForOurExtBilling();
1631
      }
1632
    }
1633
 
1634
    public void fulfillPOForExtBilling(long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPOForExtBilling_call> resultHandler) throws org.apache.thrift.TException {
1635
      checkReady();
1636
      fulfillPOForExtBilling_call method_call = new fulfillPOForExtBilling_call(itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1637
      this.___currentMethod = method_call;
1638
      ___manager.call(method_call);
1639
    }
1640
 
1641
    public static class fulfillPOForExtBilling_call extends org.apache.thrift.async.TAsyncMethodCall {
1642
      private long itemId;
1643
      private long quantity;
1644
      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 {
1645
        super(client, protocolFactory, transport, resultHandler, false);
1646
        this.itemId = itemId;
1647
        this.quantity = quantity;
1648
      }
1649
 
1650
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1651
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPOForExtBilling", org.apache.thrift.protocol.TMessageType.CALL, 0));
1652
        fulfillPOForExtBilling_args args = new fulfillPOForExtBilling_args();
1653
        args.setItemId(itemId);
1654
        args.setQuantity(quantity);
1655
        args.write(prot);
1656
        prot.writeMessageEnd();
1657
      }
1658
 
1659
      public void getResult() throws org.apache.thrift.TException {
1660
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1661
          throw new IllegalStateException("Method call not finished!");
1662
        }
1663
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1664
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1665
        (new Client(prot)).recv_fulfillPOForExtBilling();
1666
      }
1667
    }
1668
 
4496 mandeep.dh 1669
  }
1670
 
1671
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1672
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1673
    public Processor(I iface) {
1674
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1675
    }
1676
 
1677
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1678
      super(iface, getProcessMap(processMap));
1679
    }
1680
 
1681
    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) {
1682
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1683
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1684
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1685
      processMap.put("getSupplier", new getSupplier());
1686
      processMap.put("startPurchase", new startPurchase());
1687
      processMap.put("closePurchase", new closePurchase());
1688
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 1689
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 1690
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1691
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1692
      processMap.put("getSuppliers", new getSuppliers());
1693
      processMap.put("fulfillPO", new fulfillPO());
1694
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1695
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1696
      processMap.put("getInvoices", new getInvoices());
1697
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1698
      processMap.put("addSupplier", new addSupplier());
1699
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 1700
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1701
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1702
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 1703
      processMap.put("getInvoice", new getInvoice());
6762 amar.kumar 1704
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
1705
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
4496 mandeep.dh 1706
      return processMap;
1707
    }
1708
 
1709
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1710
      public createPurchaseOrder() {
1711
        super("createPurchaseOrder");
1712
      }
1713
 
1714
      protected createPurchaseOrder_args getEmptyArgsInstance() {
1715
        return new createPurchaseOrder_args();
1716
      }
1717
 
1718
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1719
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1720
        try {
1721
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1722
          result.setSuccessIsSet(true);
1723
        } catch (PurchaseServiceException e) {
1724
          result.e = e;
1725
        }
1726
        return result;
1727
      }
1728
    }
1729
 
1730
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1731
      public getPurchaseOrder() {
1732
        super("getPurchaseOrder");
1733
      }
1734
 
1735
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1736
        return new getPurchaseOrder_args();
1737
      }
1738
 
1739
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1740
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1741
        try {
1742
          result.success = iface.getPurchaseOrder(args.id);
1743
        } catch (PurchaseServiceException e) {
1744
          result.e = e;
1745
        }
1746
        return result;
1747
      }
1748
    }
1749
 
1750
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1751
      public getAllPurchaseOrders() {
1752
        super("getAllPurchaseOrders");
1753
      }
1754
 
1755
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1756
        return new getAllPurchaseOrders_args();
1757
      }
1758
 
1759
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1760
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1761
        try {
1762
          result.success = iface.getAllPurchaseOrders(args.status);
1763
        } catch (PurchaseServiceException e) {
1764
          result.e = e;
1765
        }
1766
        return result;
1767
      }
1768
    }
1769
 
1770
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1771
      public getSupplier() {
1772
        super("getSupplier");
1773
      }
1774
 
1775
      protected getSupplier_args getEmptyArgsInstance() {
1776
        return new getSupplier_args();
1777
      }
1778
 
1779
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1780
        getSupplier_result result = new getSupplier_result();
1781
        try {
1782
          result.success = iface.getSupplier(args.id);
1783
        } catch (PurchaseServiceException e) {
1784
          result.e = e;
1785
        }
1786
        return result;
1787
      }
1788
    }
1789
 
1790
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
1791
      public startPurchase() {
1792
        super("startPurchase");
1793
      }
1794
 
1795
      protected startPurchase_args getEmptyArgsInstance() {
1796
        return new startPurchase_args();
1797
      }
1798
 
1799
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
1800
        startPurchase_result result = new startPurchase_result();
1801
        try {
1802
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
1803
          result.setSuccessIsSet(true);
1804
        } catch (PurchaseServiceException e) {
1805
          result.e = e;
1806
        }
1807
        return result;
1808
      }
1809
    }
1810
 
1811
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
1812
      public closePurchase() {
1813
        super("closePurchase");
1814
      }
1815
 
1816
      protected closePurchase_args getEmptyArgsInstance() {
1817
        return new closePurchase_args();
1818
      }
1819
 
1820
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
1821
        closePurchase_result result = new closePurchase_result();
1822
        try {
1823
          result.success = iface.closePurchase(args.purchaseId);
1824
          result.setSuccessIsSet(true);
1825
        } catch (PurchaseServiceException e) {
1826
          result.e = e;
1827
        }
1828
        return result;
1829
      }
1830
    }
1831
 
1832
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
1833
      public getAllPurchases() {
1834
        super("getAllPurchases");
1835
      }
1836
 
1837
      protected getAllPurchases_args getEmptyArgsInstance() {
1838
        return new getAllPurchases_args();
1839
      }
1840
 
1841
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
1842
        getAllPurchases_result result = new getAllPurchases_result();
1843
        try {
1844
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
1845
        } catch (PurchaseServiceException e) {
1846
          result.e = e;
1847
        }
1848
        return result;
1849
      }
1850
    }
1851
 
6385 amar.kumar 1852
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
1853
      public getPurchasesForPO() {
1854
        super("getPurchasesForPO");
1855
      }
1856
 
1857
      protected getPurchasesForPO_args getEmptyArgsInstance() {
1858
        return new getPurchasesForPO_args();
1859
      }
1860
 
1861
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
1862
        getPurchasesForPO_result result = new getPurchasesForPO_result();
1863
        try {
1864
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
1865
        } catch (PurchaseServiceException e) {
1866
          result.e = e;
1867
        }
1868
        return result;
1869
      }
1870
    }
1871
 
4555 mandeep.dh 1872
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
1873
      public getPurchaseOrderForPurchase() {
1874
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 1875
      }
1876
 
4555 mandeep.dh 1877
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
1878
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1879
      }
1880
 
4555 mandeep.dh 1881
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
1882
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
1883
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 1884
        return result;
1885
      }
1886
    }
1887
 
4754 mandeep.dh 1888
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
1889
      public getPendingPurchaseOrders() {
1890
        super("getPendingPurchaseOrders");
1891
      }
1892
 
1893
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
1894
        return new getPendingPurchaseOrders_args();
1895
      }
1896
 
1897
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
1898
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
1899
        try {
1900
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
1901
        } catch (PurchaseServiceException e) {
1902
          result.e = e;
1903
        }
1904
        return result;
1905
      }
1906
    }
1907
 
1908
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
1909
      public getSuppliers() {
1910
        super("getSuppliers");
1911
      }
1912
 
1913
      protected getSuppliers_args getEmptyArgsInstance() {
1914
        return new getSuppliers_args();
1915
      }
1916
 
1917
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
1918
        getSuppliers_result result = new getSuppliers_result();
1919
        try {
1920
          result.success = iface.getSuppliers();
1921
        } catch (PurchaseServiceException e) {
1922
          result.e = e;
1923
        }
1924
        return result;
1925
      }
1926
    }
1927
 
1928
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
1929
      public fulfillPO() {
1930
        super("fulfillPO");
1931
      }
1932
 
1933
      protected fulfillPO_args getEmptyArgsInstance() {
1934
        return new fulfillPO_args();
1935
      }
1936
 
1937
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
1938
        fulfillPO_result result = new fulfillPO_result();
1939
        try {
1940
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
1941
        } catch (PurchaseServiceException e) {
1942
          result.e = e;
1943
        }
1944
        return result;
1945
      }
1946
    }
1947
 
1948
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
1949
      public updatePurchaseOrder() {
1950
        super("updatePurchaseOrder");
1951
      }
1952
 
1953
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
1954
        return new updatePurchaseOrder_args();
1955
      }
1956
 
1957
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
1958
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
1959
        try {
1960
          iface.updatePurchaseOrder(args.purchaseOrder);
1961
        } catch (PurchaseServiceException e) {
1962
          result.e = e;
1963
        }
1964
        return result;
1965
      }
1966
    }
1967
 
5185 mandeep.dh 1968
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
1969
      public unFulfillPO() {
1970
        super("unFulfillPO");
1971
      }
1972
 
1973
      protected unFulfillPO_args getEmptyArgsInstance() {
1974
        return new unFulfillPO_args();
1975
      }
1976
 
1977
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
1978
        unFulfillPO_result result = new unFulfillPO_result();
1979
        try {
1980
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
1981
        } catch (PurchaseServiceException e) {
1982
          result.e = e;
1983
        }
1984
        return result;
1985
      }
1986
    }
1987
 
5443 mandeep.dh 1988
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
1989
      public getInvoices() {
1990
        super("getInvoices");
1991
      }
1992
 
1993
      protected getInvoices_args getEmptyArgsInstance() {
1994
        return new getInvoices_args();
1995
      }
1996
 
1997
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
1998
        getInvoices_result result = new getInvoices_result();
1999
        result.success = iface.getInvoices(args.date);
2000
        return result;
2001
      }
2002
    }
2003
 
2004
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
2005
      public createInvoice() {
2006
        super("createInvoice");
2007
      }
2008
 
2009
      protected createInvoice_args getEmptyArgsInstance() {
2010
        return new createInvoice_args();
2011
      }
2012
 
2013
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
2014
        createInvoice_result result = new createInvoice_result();
2015
        try {
2016
          iface.createInvoice(args.invoice);
2017
        } catch (PurchaseServiceException e) {
2018
          result.e = e;
2019
        }
2020
        return result;
2021
      }
2022
    }
2023
 
5591 mandeep.dh 2024
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
2025
      public addSupplier() {
2026
        super("addSupplier");
2027
      }
2028
 
2029
      protected addSupplier_args getEmptyArgsInstance() {
2030
        return new addSupplier_args();
2031
      }
2032
 
2033
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
2034
        addSupplier_result result = new addSupplier_result();
2035
        result.success = iface.addSupplier(args.supplier);
2036
        return result;
2037
      }
2038
    }
2039
 
2040
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
2041
      public updateSupplier() {
2042
        super("updateSupplier");
2043
      }
2044
 
2045
      protected updateSupplier_args getEmptyArgsInstance() {
2046
        return new updateSupplier_args();
2047
      }
2048
 
2049
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
2050
        updateSupplier_result result = new updateSupplier_result();
2051
        iface.updateSupplier(args.supplier);
2052
        return result;
2053
      }
2054
    }
2055
 
6467 amar.kumar 2056
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
2057
      public createPurchaseReturn() {
2058
        super("createPurchaseReturn");
2059
      }
2060
 
2061
      protected createPurchaseReturn_args getEmptyArgsInstance() {
2062
        return new createPurchaseReturn_args();
2063
      }
2064
 
2065
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
2066
        createPurchaseReturn_result result = new createPurchaseReturn_result();
2067
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
2068
        result.setSuccessIsSet(true);
2069
        return result;
2070
      }
2071
    }
2072
 
2073
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
2074
      public settlePurchaseReturn() {
2075
        super("settlePurchaseReturn");
2076
      }
2077
 
2078
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
2079
        return new settlePurchaseReturn_args();
2080
      }
2081
 
2082
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
2083
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
2084
        iface.settlePurchaseReturn(args.id);
2085
        return result;
2086
      }
2087
    }
2088
 
2089
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
2090
      public getUnsettledPurchaseReturns() {
2091
        super("getUnsettledPurchaseReturns");
2092
      }
2093
 
2094
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
2095
        return new getUnsettledPurchaseReturns_args();
2096
      }
2097
 
2098
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
2099
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
2100
        result.success = iface.getUnsettledPurchaseReturns();
2101
        return result;
2102
      }
2103
    }
2104
 
6630 amar.kumar 2105
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
2106
      public getInvoice() {
2107
        super("getInvoice");
2108
      }
2109
 
2110
      protected getInvoice_args getEmptyArgsInstance() {
2111
        return new getInvoice_args();
2112
      }
2113
 
2114
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
2115
        getInvoice_result result = new getInvoice_result();
2116
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
2117
        return result;
2118
      }
2119
    }
2120
 
6762 amar.kumar 2121
    private static class createPurchaseForOurExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseForOurExtBilling_args> {
2122
      public createPurchaseForOurExtBilling() {
2123
        super("createPurchaseForOurExtBilling");
2124
      }
2125
 
2126
      protected createPurchaseForOurExtBilling_args getEmptyArgsInstance() {
2127
        return new createPurchaseForOurExtBilling_args();
2128
      }
2129
 
2130
      protected createPurchaseForOurExtBilling_result getResult(I iface, createPurchaseForOurExtBilling_args args) throws org.apache.thrift.TException {
2131
        createPurchaseForOurExtBilling_result result = new createPurchaseForOurExtBilling_result();
2132
        result.success = iface.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.itemId);
2133
        result.setSuccessIsSet(true);
2134
        return result;
2135
      }
2136
    }
2137
 
2138
    private static class fulfillPOForExtBilling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPOForExtBilling_args> {
2139
      public fulfillPOForExtBilling() {
2140
        super("fulfillPOForExtBilling");
2141
      }
2142
 
2143
      protected fulfillPOForExtBilling_args getEmptyArgsInstance() {
2144
        return new fulfillPOForExtBilling_args();
2145
      }
2146
 
2147
      protected fulfillPOForExtBilling_result getResult(I iface, fulfillPOForExtBilling_args args) throws org.apache.thrift.TException {
2148
        fulfillPOForExtBilling_result result = new fulfillPOForExtBilling_result();
2149
        iface.fulfillPOForExtBilling(args.itemId, args.quantity);
2150
        return result;
2151
      }
2152
    }
2153
 
4496 mandeep.dh 2154
  }
2155
 
2156
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2157
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2158
 
2159
    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);
2160
 
2161
    private PurchaseOrder purchaseOrder; // required
2162
 
2163
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2164
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2165
      PURCHASE_ORDER((short)1, "purchaseOrder");
2166
 
2167
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2168
 
2169
      static {
2170
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2171
          byName.put(field.getFieldName(), field);
2172
        }
2173
      }
2174
 
2175
      /**
2176
       * Find the _Fields constant that matches fieldId, or null if its not found.
2177
       */
2178
      public static _Fields findByThriftId(int fieldId) {
2179
        switch(fieldId) {
2180
          case 1: // PURCHASE_ORDER
2181
            return PURCHASE_ORDER;
2182
          default:
2183
            return null;
2184
        }
2185
      }
2186
 
2187
      /**
2188
       * Find the _Fields constant that matches fieldId, throwing an exception
2189
       * if it is not found.
2190
       */
2191
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2192
        _Fields fields = findByThriftId(fieldId);
2193
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2194
        return fields;
2195
      }
2196
 
2197
      /**
2198
       * Find the _Fields constant that matches name, or null if its not found.
2199
       */
2200
      public static _Fields findByName(String name) {
2201
        return byName.get(name);
2202
      }
2203
 
2204
      private final short _thriftId;
2205
      private final String _fieldName;
2206
 
2207
      _Fields(short thriftId, String fieldName) {
2208
        _thriftId = thriftId;
2209
        _fieldName = fieldName;
2210
      }
2211
 
2212
      public short getThriftFieldId() {
2213
        return _thriftId;
2214
      }
2215
 
2216
      public String getFieldName() {
2217
        return _fieldName;
2218
      }
2219
    }
2220
 
2221
    // isset id assignments
2222
 
2223
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2224
    static {
2225
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2226
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2227
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2228
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2229
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2230
    }
2231
 
2232
    public createPurchaseOrder_args() {
2233
    }
2234
 
2235
    public createPurchaseOrder_args(
2236
      PurchaseOrder purchaseOrder)
2237
    {
2238
      this();
2239
      this.purchaseOrder = purchaseOrder;
2240
    }
2241
 
2242
    /**
2243
     * Performs a deep copy on <i>other</i>.
2244
     */
2245
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2246
      if (other.isSetPurchaseOrder()) {
2247
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2248
      }
2249
    }
2250
 
2251
    public createPurchaseOrder_args deepCopy() {
2252
      return new createPurchaseOrder_args(this);
2253
    }
2254
 
2255
    @Override
2256
    public void clear() {
2257
      this.purchaseOrder = null;
2258
    }
2259
 
2260
    public PurchaseOrder getPurchaseOrder() {
2261
      return this.purchaseOrder;
2262
    }
2263
 
2264
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2265
      this.purchaseOrder = purchaseOrder;
2266
    }
2267
 
2268
    public void unsetPurchaseOrder() {
2269
      this.purchaseOrder = null;
2270
    }
2271
 
2272
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2273
    public boolean isSetPurchaseOrder() {
2274
      return this.purchaseOrder != null;
2275
    }
2276
 
2277
    public void setPurchaseOrderIsSet(boolean value) {
2278
      if (!value) {
2279
        this.purchaseOrder = null;
2280
      }
2281
    }
2282
 
2283
    public void setFieldValue(_Fields field, Object value) {
2284
      switch (field) {
2285
      case PURCHASE_ORDER:
2286
        if (value == null) {
2287
          unsetPurchaseOrder();
2288
        } else {
2289
          setPurchaseOrder((PurchaseOrder)value);
2290
        }
2291
        break;
2292
 
2293
      }
2294
    }
2295
 
2296
    public Object getFieldValue(_Fields field) {
2297
      switch (field) {
2298
      case PURCHASE_ORDER:
2299
        return getPurchaseOrder();
2300
 
2301
      }
2302
      throw new IllegalStateException();
2303
    }
2304
 
2305
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2306
    public boolean isSet(_Fields field) {
2307
      if (field == null) {
2308
        throw new IllegalArgumentException();
2309
      }
2310
 
2311
      switch (field) {
2312
      case PURCHASE_ORDER:
2313
        return isSetPurchaseOrder();
2314
      }
2315
      throw new IllegalStateException();
2316
    }
2317
 
2318
    @Override
2319
    public boolean equals(Object that) {
2320
      if (that == null)
2321
        return false;
2322
      if (that instanceof createPurchaseOrder_args)
2323
        return this.equals((createPurchaseOrder_args)that);
2324
      return false;
2325
    }
2326
 
2327
    public boolean equals(createPurchaseOrder_args that) {
2328
      if (that == null)
2329
        return false;
2330
 
2331
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2332
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2333
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2334
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2335
          return false;
2336
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2337
          return false;
2338
      }
2339
 
2340
      return true;
2341
    }
2342
 
2343
    @Override
2344
    public int hashCode() {
2345
      return 0;
2346
    }
2347
 
2348
    public int compareTo(createPurchaseOrder_args other) {
2349
      if (!getClass().equals(other.getClass())) {
2350
        return getClass().getName().compareTo(other.getClass().getName());
2351
      }
2352
 
2353
      int lastComparison = 0;
2354
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2355
 
2356
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2357
      if (lastComparison != 0) {
2358
        return lastComparison;
2359
      }
2360
      if (isSetPurchaseOrder()) {
2361
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2362
        if (lastComparison != 0) {
2363
          return lastComparison;
2364
        }
2365
      }
2366
      return 0;
2367
    }
2368
 
2369
    public _Fields fieldForId(int fieldId) {
2370
      return _Fields.findByThriftId(fieldId);
2371
    }
2372
 
2373
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2374
      org.apache.thrift.protocol.TField field;
2375
      iprot.readStructBegin();
2376
      while (true)
2377
      {
2378
        field = iprot.readFieldBegin();
2379
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2380
          break;
2381
        }
2382
        switch (field.id) {
2383
          case 1: // PURCHASE_ORDER
2384
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2385
              this.purchaseOrder = new PurchaseOrder();
2386
              this.purchaseOrder.read(iprot);
2387
            } else { 
2388
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2389
            }
2390
            break;
2391
          default:
2392
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2393
        }
2394
        iprot.readFieldEnd();
2395
      }
2396
      iprot.readStructEnd();
2397
      validate();
2398
    }
2399
 
2400
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2401
      validate();
2402
 
2403
      oprot.writeStructBegin(STRUCT_DESC);
2404
      if (this.purchaseOrder != null) {
2405
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2406
        this.purchaseOrder.write(oprot);
2407
        oprot.writeFieldEnd();
2408
      }
2409
      oprot.writeFieldStop();
2410
      oprot.writeStructEnd();
2411
    }
2412
 
2413
    @Override
2414
    public String toString() {
2415
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2416
      boolean first = true;
2417
 
2418
      sb.append("purchaseOrder:");
2419
      if (this.purchaseOrder == null) {
2420
        sb.append("null");
2421
      } else {
2422
        sb.append(this.purchaseOrder);
2423
      }
2424
      first = false;
2425
      sb.append(")");
2426
      return sb.toString();
2427
    }
2428
 
2429
    public void validate() throws org.apache.thrift.TException {
2430
      // check for required fields
2431
    }
2432
 
2433
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2434
      try {
2435
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2436
      } catch (org.apache.thrift.TException te) {
2437
        throw new java.io.IOException(te);
2438
      }
2439
    }
2440
 
2441
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2442
      try {
2443
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2444
      } catch (org.apache.thrift.TException te) {
2445
        throw new java.io.IOException(te);
2446
      }
2447
    }
2448
 
2449
  }
2450
 
2451
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2452
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2453
 
2454
    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);
2455
    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);
2456
 
2457
    private long success; // required
2458
    private PurchaseServiceException e; // required
2459
 
2460
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2461
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462
      SUCCESS((short)0, "success"),
2463
      E((short)1, "e");
2464
 
2465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2466
 
2467
      static {
2468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2469
          byName.put(field.getFieldName(), field);
2470
        }
2471
      }
2472
 
2473
      /**
2474
       * Find the _Fields constant that matches fieldId, or null if its not found.
2475
       */
2476
      public static _Fields findByThriftId(int fieldId) {
2477
        switch(fieldId) {
2478
          case 0: // SUCCESS
2479
            return SUCCESS;
2480
          case 1: // E
2481
            return E;
2482
          default:
2483
            return null;
2484
        }
2485
      }
2486
 
2487
      /**
2488
       * Find the _Fields constant that matches fieldId, throwing an exception
2489
       * if it is not found.
2490
       */
2491
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2492
        _Fields fields = findByThriftId(fieldId);
2493
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2494
        return fields;
2495
      }
2496
 
2497
      /**
2498
       * Find the _Fields constant that matches name, or null if its not found.
2499
       */
2500
      public static _Fields findByName(String name) {
2501
        return byName.get(name);
2502
      }
2503
 
2504
      private final short _thriftId;
2505
      private final String _fieldName;
2506
 
2507
      _Fields(short thriftId, String fieldName) {
2508
        _thriftId = thriftId;
2509
        _fieldName = fieldName;
2510
      }
2511
 
2512
      public short getThriftFieldId() {
2513
        return _thriftId;
2514
      }
2515
 
2516
      public String getFieldName() {
2517
        return _fieldName;
2518
      }
2519
    }
2520
 
2521
    // isset id assignments
2522
    private static final int __SUCCESS_ISSET_ID = 0;
2523
    private BitSet __isset_bit_vector = new BitSet(1);
2524
 
2525
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2526
    static {
2527
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2528
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2529
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2530
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2531
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2532
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2533
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2534
    }
2535
 
2536
    public createPurchaseOrder_result() {
2537
    }
2538
 
2539
    public createPurchaseOrder_result(
2540
      long success,
2541
      PurchaseServiceException e)
2542
    {
2543
      this();
2544
      this.success = success;
2545
      setSuccessIsSet(true);
2546
      this.e = e;
2547
    }
2548
 
2549
    /**
2550
     * Performs a deep copy on <i>other</i>.
2551
     */
2552
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
2553
      __isset_bit_vector.clear();
2554
      __isset_bit_vector.or(other.__isset_bit_vector);
2555
      this.success = other.success;
2556
      if (other.isSetE()) {
2557
        this.e = new PurchaseServiceException(other.e);
2558
      }
2559
    }
2560
 
2561
    public createPurchaseOrder_result deepCopy() {
2562
      return new createPurchaseOrder_result(this);
2563
    }
2564
 
2565
    @Override
2566
    public void clear() {
2567
      setSuccessIsSet(false);
2568
      this.success = 0;
2569
      this.e = null;
2570
    }
2571
 
2572
    public long getSuccess() {
2573
      return this.success;
2574
    }
2575
 
2576
    public void setSuccess(long success) {
2577
      this.success = success;
2578
      setSuccessIsSet(true);
2579
    }
2580
 
2581
    public void unsetSuccess() {
2582
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2583
    }
2584
 
2585
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2586
    public boolean isSetSuccess() {
2587
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2588
    }
2589
 
2590
    public void setSuccessIsSet(boolean value) {
2591
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2592
    }
2593
 
2594
    public PurchaseServiceException getE() {
2595
      return this.e;
2596
    }
2597
 
2598
    public void setE(PurchaseServiceException e) {
2599
      this.e = e;
2600
    }
2601
 
2602
    public void unsetE() {
2603
      this.e = null;
2604
    }
2605
 
2606
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2607
    public boolean isSetE() {
2608
      return this.e != null;
2609
    }
2610
 
2611
    public void setEIsSet(boolean value) {
2612
      if (!value) {
2613
        this.e = null;
2614
      }
2615
    }
2616
 
2617
    public void setFieldValue(_Fields field, Object value) {
2618
      switch (field) {
2619
      case SUCCESS:
2620
        if (value == null) {
2621
          unsetSuccess();
2622
        } else {
2623
          setSuccess((Long)value);
2624
        }
2625
        break;
2626
 
2627
      case E:
2628
        if (value == null) {
2629
          unsetE();
2630
        } else {
2631
          setE((PurchaseServiceException)value);
2632
        }
2633
        break;
2634
 
2635
      }
2636
    }
2637
 
2638
    public Object getFieldValue(_Fields field) {
2639
      switch (field) {
2640
      case SUCCESS:
2641
        return Long.valueOf(getSuccess());
2642
 
2643
      case E:
2644
        return getE();
2645
 
2646
      }
2647
      throw new IllegalStateException();
2648
    }
2649
 
2650
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2651
    public boolean isSet(_Fields field) {
2652
      if (field == null) {
2653
        throw new IllegalArgumentException();
2654
      }
2655
 
2656
      switch (field) {
2657
      case SUCCESS:
2658
        return isSetSuccess();
2659
      case E:
2660
        return isSetE();
2661
      }
2662
      throw new IllegalStateException();
2663
    }
2664
 
2665
    @Override
2666
    public boolean equals(Object that) {
2667
      if (that == null)
2668
        return false;
2669
      if (that instanceof createPurchaseOrder_result)
2670
        return this.equals((createPurchaseOrder_result)that);
2671
      return false;
2672
    }
2673
 
2674
    public boolean equals(createPurchaseOrder_result that) {
2675
      if (that == null)
2676
        return false;
2677
 
2678
      boolean this_present_success = true;
2679
      boolean that_present_success = true;
2680
      if (this_present_success || that_present_success) {
2681
        if (!(this_present_success && that_present_success))
2682
          return false;
2683
        if (this.success != that.success)
2684
          return false;
2685
      }
2686
 
2687
      boolean this_present_e = true && this.isSetE();
2688
      boolean that_present_e = true && that.isSetE();
2689
      if (this_present_e || that_present_e) {
2690
        if (!(this_present_e && that_present_e))
2691
          return false;
2692
        if (!this.e.equals(that.e))
2693
          return false;
2694
      }
2695
 
2696
      return true;
2697
    }
2698
 
2699
    @Override
2700
    public int hashCode() {
2701
      return 0;
2702
    }
2703
 
2704
    public int compareTo(createPurchaseOrder_result other) {
2705
      if (!getClass().equals(other.getClass())) {
2706
        return getClass().getName().compareTo(other.getClass().getName());
2707
      }
2708
 
2709
      int lastComparison = 0;
2710
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
2711
 
2712
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2713
      if (lastComparison != 0) {
2714
        return lastComparison;
2715
      }
2716
      if (isSetSuccess()) {
2717
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2718
        if (lastComparison != 0) {
2719
          return lastComparison;
2720
        }
2721
      }
2722
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2723
      if (lastComparison != 0) {
2724
        return lastComparison;
2725
      }
2726
      if (isSetE()) {
2727
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2728
        if (lastComparison != 0) {
2729
          return lastComparison;
2730
        }
2731
      }
2732
      return 0;
2733
    }
2734
 
2735
    public _Fields fieldForId(int fieldId) {
2736
      return _Fields.findByThriftId(fieldId);
2737
    }
2738
 
2739
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2740
      org.apache.thrift.protocol.TField field;
2741
      iprot.readStructBegin();
2742
      while (true)
2743
      {
2744
        field = iprot.readFieldBegin();
2745
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2746
          break;
2747
        }
2748
        switch (field.id) {
2749
          case 0: // SUCCESS
2750
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2751
              this.success = iprot.readI64();
2752
              setSuccessIsSet(true);
2753
            } else { 
2754
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2755
            }
2756
            break;
2757
          case 1: // E
2758
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2759
              this.e = new PurchaseServiceException();
2760
              this.e.read(iprot);
2761
            } else { 
2762
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2763
            }
2764
            break;
2765
          default:
2766
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2767
        }
2768
        iprot.readFieldEnd();
2769
      }
2770
      iprot.readStructEnd();
2771
      validate();
2772
    }
2773
 
2774
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2775
      oprot.writeStructBegin(STRUCT_DESC);
2776
 
2777
      if (this.isSetSuccess()) {
2778
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2779
        oprot.writeI64(this.success);
2780
        oprot.writeFieldEnd();
2781
      } else if (this.isSetE()) {
2782
        oprot.writeFieldBegin(E_FIELD_DESC);
2783
        this.e.write(oprot);
2784
        oprot.writeFieldEnd();
2785
      }
2786
      oprot.writeFieldStop();
2787
      oprot.writeStructEnd();
2788
    }
2789
 
2790
    @Override
2791
    public String toString() {
2792
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
2793
      boolean first = true;
2794
 
2795
      sb.append("success:");
2796
      sb.append(this.success);
2797
      first = false;
2798
      if (!first) sb.append(", ");
2799
      sb.append("e:");
2800
      if (this.e == null) {
2801
        sb.append("null");
2802
      } else {
2803
        sb.append(this.e);
2804
      }
2805
      first = false;
2806
      sb.append(")");
2807
      return sb.toString();
2808
    }
2809
 
2810
    public void validate() throws org.apache.thrift.TException {
2811
      // check for required fields
2812
    }
2813
 
2814
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2815
      try {
2816
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2817
      } catch (org.apache.thrift.TException te) {
2818
        throw new java.io.IOException(te);
2819
      }
2820
    }
2821
 
2822
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2823
      try {
2824
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2825
      } catch (org.apache.thrift.TException te) {
2826
        throw new java.io.IOException(te);
2827
      }
2828
    }
2829
 
2830
  }
2831
 
2832
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2833
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
2834
 
2835
    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);
2836
 
2837
    private long id; // required
2838
 
2839
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2840
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2841
      ID((short)1, "id");
2842
 
2843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2844
 
2845
      static {
2846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2847
          byName.put(field.getFieldName(), field);
2848
        }
2849
      }
2850
 
2851
      /**
2852
       * Find the _Fields constant that matches fieldId, or null if its not found.
2853
       */
2854
      public static _Fields findByThriftId(int fieldId) {
2855
        switch(fieldId) {
2856
          case 1: // ID
2857
            return ID;
2858
          default:
2859
            return null;
2860
        }
2861
      }
2862
 
2863
      /**
2864
       * Find the _Fields constant that matches fieldId, throwing an exception
2865
       * if it is not found.
2866
       */
2867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2868
        _Fields fields = findByThriftId(fieldId);
2869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2870
        return fields;
2871
      }
2872
 
2873
      /**
2874
       * Find the _Fields constant that matches name, or null if its not found.
2875
       */
2876
      public static _Fields findByName(String name) {
2877
        return byName.get(name);
2878
      }
2879
 
2880
      private final short _thriftId;
2881
      private final String _fieldName;
2882
 
2883
      _Fields(short thriftId, String fieldName) {
2884
        _thriftId = thriftId;
2885
        _fieldName = fieldName;
2886
      }
2887
 
2888
      public short getThriftFieldId() {
2889
        return _thriftId;
2890
      }
2891
 
2892
      public String getFieldName() {
2893
        return _fieldName;
2894
      }
2895
    }
2896
 
2897
    // isset id assignments
2898
    private static final int __ID_ISSET_ID = 0;
2899
    private BitSet __isset_bit_vector = new BitSet(1);
2900
 
2901
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2902
    static {
2903
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2904
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2905
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2906
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2907
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
2908
    }
2909
 
2910
    public getPurchaseOrder_args() {
2911
    }
2912
 
2913
    public getPurchaseOrder_args(
2914
      long id)
2915
    {
2916
      this();
2917
      this.id = id;
2918
      setIdIsSet(true);
2919
    }
2920
 
2921
    /**
2922
     * Performs a deep copy on <i>other</i>.
2923
     */
2924
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
2925
      __isset_bit_vector.clear();
2926
      __isset_bit_vector.or(other.__isset_bit_vector);
2927
      this.id = other.id;
2928
    }
2929
 
2930
    public getPurchaseOrder_args deepCopy() {
2931
      return new getPurchaseOrder_args(this);
2932
    }
2933
 
2934
    @Override
2935
    public void clear() {
2936
      setIdIsSet(false);
2937
      this.id = 0;
2938
    }
2939
 
2940
    public long getId() {
2941
      return this.id;
2942
    }
2943
 
2944
    public void setId(long id) {
2945
      this.id = id;
2946
      setIdIsSet(true);
2947
    }
2948
 
2949
    public void unsetId() {
2950
      __isset_bit_vector.clear(__ID_ISSET_ID);
2951
    }
2952
 
2953
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
2954
    public boolean isSetId() {
2955
      return __isset_bit_vector.get(__ID_ISSET_ID);
2956
    }
2957
 
2958
    public void setIdIsSet(boolean value) {
2959
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2960
    }
2961
 
2962
    public void setFieldValue(_Fields field, Object value) {
2963
      switch (field) {
2964
      case ID:
2965
        if (value == null) {
2966
          unsetId();
2967
        } else {
2968
          setId((Long)value);
2969
        }
2970
        break;
2971
 
2972
      }
2973
    }
2974
 
2975
    public Object getFieldValue(_Fields field) {
2976
      switch (field) {
2977
      case ID:
2978
        return Long.valueOf(getId());
2979
 
2980
      }
2981
      throw new IllegalStateException();
2982
    }
2983
 
2984
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2985
    public boolean isSet(_Fields field) {
2986
      if (field == null) {
2987
        throw new IllegalArgumentException();
2988
      }
2989
 
2990
      switch (field) {
2991
      case ID:
2992
        return isSetId();
2993
      }
2994
      throw new IllegalStateException();
2995
    }
2996
 
2997
    @Override
2998
    public boolean equals(Object that) {
2999
      if (that == null)
3000
        return false;
3001
      if (that instanceof getPurchaseOrder_args)
3002
        return this.equals((getPurchaseOrder_args)that);
3003
      return false;
3004
    }
3005
 
3006
    public boolean equals(getPurchaseOrder_args that) {
3007
      if (that == null)
3008
        return false;
3009
 
3010
      boolean this_present_id = true;
3011
      boolean that_present_id = true;
3012
      if (this_present_id || that_present_id) {
3013
        if (!(this_present_id && that_present_id))
3014
          return false;
3015
        if (this.id != that.id)
3016
          return false;
3017
      }
3018
 
3019
      return true;
3020
    }
3021
 
3022
    @Override
3023
    public int hashCode() {
3024
      return 0;
3025
    }
3026
 
3027
    public int compareTo(getPurchaseOrder_args other) {
3028
      if (!getClass().equals(other.getClass())) {
3029
        return getClass().getName().compareTo(other.getClass().getName());
3030
      }
3031
 
3032
      int lastComparison = 0;
3033
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
3034
 
3035
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3036
      if (lastComparison != 0) {
3037
        return lastComparison;
3038
      }
3039
      if (isSetId()) {
3040
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3041
        if (lastComparison != 0) {
3042
          return lastComparison;
3043
        }
3044
      }
3045
      return 0;
3046
    }
3047
 
3048
    public _Fields fieldForId(int fieldId) {
3049
      return _Fields.findByThriftId(fieldId);
3050
    }
3051
 
3052
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3053
      org.apache.thrift.protocol.TField field;
3054
      iprot.readStructBegin();
3055
      while (true)
3056
      {
3057
        field = iprot.readFieldBegin();
3058
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3059
          break;
3060
        }
3061
        switch (field.id) {
3062
          case 1: // ID
3063
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3064
              this.id = iprot.readI64();
3065
              setIdIsSet(true);
3066
            } else { 
3067
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3068
            }
3069
            break;
3070
          default:
3071
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3072
        }
3073
        iprot.readFieldEnd();
3074
      }
3075
      iprot.readStructEnd();
3076
      validate();
3077
    }
3078
 
3079
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3080
      validate();
3081
 
3082
      oprot.writeStructBegin(STRUCT_DESC);
3083
      oprot.writeFieldBegin(ID_FIELD_DESC);
3084
      oprot.writeI64(this.id);
3085
      oprot.writeFieldEnd();
3086
      oprot.writeFieldStop();
3087
      oprot.writeStructEnd();
3088
    }
3089
 
3090
    @Override
3091
    public String toString() {
3092
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
3093
      boolean first = true;
3094
 
3095
      sb.append("id:");
3096
      sb.append(this.id);
3097
      first = false;
3098
      sb.append(")");
3099
      return sb.toString();
3100
    }
3101
 
3102
    public void validate() throws org.apache.thrift.TException {
3103
      // check for required fields
3104
    }
3105
 
3106
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3107
      try {
3108
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3109
      } catch (org.apache.thrift.TException te) {
3110
        throw new java.io.IOException(te);
3111
      }
3112
    }
3113
 
3114
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3115
      try {
3116
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3117
      } catch (org.apache.thrift.TException te) {
3118
        throw new java.io.IOException(te);
3119
      }
3120
    }
3121
 
3122
  }
3123
 
3124
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
3125
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
3126
 
3127
    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);
3128
    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);
3129
 
3130
    private PurchaseOrder success; // required
3131
    private PurchaseServiceException e; // required
3132
 
3133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3134
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3135
      SUCCESS((short)0, "success"),
3136
      E((short)1, "e");
3137
 
3138
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3139
 
3140
      static {
3141
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3142
          byName.put(field.getFieldName(), field);
3143
        }
3144
      }
3145
 
3146
      /**
3147
       * Find the _Fields constant that matches fieldId, or null if its not found.
3148
       */
3149
      public static _Fields findByThriftId(int fieldId) {
3150
        switch(fieldId) {
3151
          case 0: // SUCCESS
3152
            return SUCCESS;
3153
          case 1: // E
3154
            return E;
3155
          default:
3156
            return null;
3157
        }
3158
      }
3159
 
3160
      /**
3161
       * Find the _Fields constant that matches fieldId, throwing an exception
3162
       * if it is not found.
3163
       */
3164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3165
        _Fields fields = findByThriftId(fieldId);
3166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3167
        return fields;
3168
      }
3169
 
3170
      /**
3171
       * Find the _Fields constant that matches name, or null if its not found.
3172
       */
3173
      public static _Fields findByName(String name) {
3174
        return byName.get(name);
3175
      }
3176
 
3177
      private final short _thriftId;
3178
      private final String _fieldName;
3179
 
3180
      _Fields(short thriftId, String fieldName) {
3181
        _thriftId = thriftId;
3182
        _fieldName = fieldName;
3183
      }
3184
 
3185
      public short getThriftFieldId() {
3186
        return _thriftId;
3187
      }
3188
 
3189
      public String getFieldName() {
3190
        return _fieldName;
3191
      }
3192
    }
3193
 
3194
    // isset id assignments
3195
 
3196
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3197
    static {
3198
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3199
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3200
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3201
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3202
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3203
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3204
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3205
    }
3206
 
3207
    public getPurchaseOrder_result() {
3208
    }
3209
 
3210
    public getPurchaseOrder_result(
3211
      PurchaseOrder success,
3212
      PurchaseServiceException e)
3213
    {
3214
      this();
3215
      this.success = success;
3216
      this.e = e;
3217
    }
3218
 
3219
    /**
3220
     * Performs a deep copy on <i>other</i>.
3221
     */
3222
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3223
      if (other.isSetSuccess()) {
3224
        this.success = new PurchaseOrder(other.success);
3225
      }
3226
      if (other.isSetE()) {
3227
        this.e = new PurchaseServiceException(other.e);
3228
      }
3229
    }
3230
 
3231
    public getPurchaseOrder_result deepCopy() {
3232
      return new getPurchaseOrder_result(this);
3233
    }
3234
 
3235
    @Override
3236
    public void clear() {
3237
      this.success = null;
3238
      this.e = null;
3239
    }
3240
 
3241
    public PurchaseOrder getSuccess() {
3242
      return this.success;
3243
    }
3244
 
3245
    public void setSuccess(PurchaseOrder success) {
3246
      this.success = success;
3247
    }
3248
 
3249
    public void unsetSuccess() {
3250
      this.success = null;
3251
    }
3252
 
3253
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3254
    public boolean isSetSuccess() {
3255
      return this.success != null;
3256
    }
3257
 
3258
    public void setSuccessIsSet(boolean value) {
3259
      if (!value) {
3260
        this.success = null;
3261
      }
3262
    }
3263
 
3264
    public PurchaseServiceException getE() {
3265
      return this.e;
3266
    }
3267
 
3268
    public void setE(PurchaseServiceException e) {
3269
      this.e = e;
3270
    }
3271
 
3272
    public void unsetE() {
3273
      this.e = null;
3274
    }
3275
 
3276
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3277
    public boolean isSetE() {
3278
      return this.e != null;
3279
    }
3280
 
3281
    public void setEIsSet(boolean value) {
3282
      if (!value) {
3283
        this.e = null;
3284
      }
3285
    }
3286
 
3287
    public void setFieldValue(_Fields field, Object value) {
3288
      switch (field) {
3289
      case SUCCESS:
3290
        if (value == null) {
3291
          unsetSuccess();
3292
        } else {
3293
          setSuccess((PurchaseOrder)value);
3294
        }
3295
        break;
3296
 
3297
      case E:
3298
        if (value == null) {
3299
          unsetE();
3300
        } else {
3301
          setE((PurchaseServiceException)value);
3302
        }
3303
        break;
3304
 
3305
      }
3306
    }
3307
 
3308
    public Object getFieldValue(_Fields field) {
3309
      switch (field) {
3310
      case SUCCESS:
3311
        return getSuccess();
3312
 
3313
      case E:
3314
        return getE();
3315
 
3316
      }
3317
      throw new IllegalStateException();
3318
    }
3319
 
3320
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3321
    public boolean isSet(_Fields field) {
3322
      if (field == null) {
3323
        throw new IllegalArgumentException();
3324
      }
3325
 
3326
      switch (field) {
3327
      case SUCCESS:
3328
        return isSetSuccess();
3329
      case E:
3330
        return isSetE();
3331
      }
3332
      throw new IllegalStateException();
3333
    }
3334
 
3335
    @Override
3336
    public boolean equals(Object that) {
3337
      if (that == null)
3338
        return false;
3339
      if (that instanceof getPurchaseOrder_result)
3340
        return this.equals((getPurchaseOrder_result)that);
3341
      return false;
3342
    }
3343
 
3344
    public boolean equals(getPurchaseOrder_result that) {
3345
      if (that == null)
3346
        return false;
3347
 
3348
      boolean this_present_success = true && this.isSetSuccess();
3349
      boolean that_present_success = true && that.isSetSuccess();
3350
      if (this_present_success || that_present_success) {
3351
        if (!(this_present_success && that_present_success))
3352
          return false;
3353
        if (!this.success.equals(that.success))
3354
          return false;
3355
      }
3356
 
3357
      boolean this_present_e = true && this.isSetE();
3358
      boolean that_present_e = true && that.isSetE();
3359
      if (this_present_e || that_present_e) {
3360
        if (!(this_present_e && that_present_e))
3361
          return false;
3362
        if (!this.e.equals(that.e))
3363
          return false;
3364
      }
3365
 
3366
      return true;
3367
    }
3368
 
3369
    @Override
3370
    public int hashCode() {
3371
      return 0;
3372
    }
3373
 
3374
    public int compareTo(getPurchaseOrder_result other) {
3375
      if (!getClass().equals(other.getClass())) {
3376
        return getClass().getName().compareTo(other.getClass().getName());
3377
      }
3378
 
3379
      int lastComparison = 0;
3380
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3381
 
3382
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3383
      if (lastComparison != 0) {
3384
        return lastComparison;
3385
      }
3386
      if (isSetSuccess()) {
3387
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3388
        if (lastComparison != 0) {
3389
          return lastComparison;
3390
        }
3391
      }
3392
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3393
      if (lastComparison != 0) {
3394
        return lastComparison;
3395
      }
3396
      if (isSetE()) {
3397
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3398
        if (lastComparison != 0) {
3399
          return lastComparison;
3400
        }
3401
      }
3402
      return 0;
3403
    }
3404
 
3405
    public _Fields fieldForId(int fieldId) {
3406
      return _Fields.findByThriftId(fieldId);
3407
    }
3408
 
3409
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3410
      org.apache.thrift.protocol.TField field;
3411
      iprot.readStructBegin();
3412
      while (true)
3413
      {
3414
        field = iprot.readFieldBegin();
3415
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3416
          break;
3417
        }
3418
        switch (field.id) {
3419
          case 0: // SUCCESS
3420
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3421
              this.success = new PurchaseOrder();
3422
              this.success.read(iprot);
3423
            } else { 
3424
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3425
            }
3426
            break;
3427
          case 1: // E
3428
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3429
              this.e = new PurchaseServiceException();
3430
              this.e.read(iprot);
3431
            } else { 
3432
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3433
            }
3434
            break;
3435
          default:
3436
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3437
        }
3438
        iprot.readFieldEnd();
3439
      }
3440
      iprot.readStructEnd();
3441
      validate();
3442
    }
3443
 
3444
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3445
      oprot.writeStructBegin(STRUCT_DESC);
3446
 
3447
      if (this.isSetSuccess()) {
3448
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3449
        this.success.write(oprot);
3450
        oprot.writeFieldEnd();
3451
      } else if (this.isSetE()) {
3452
        oprot.writeFieldBegin(E_FIELD_DESC);
3453
        this.e.write(oprot);
3454
        oprot.writeFieldEnd();
3455
      }
3456
      oprot.writeFieldStop();
3457
      oprot.writeStructEnd();
3458
    }
3459
 
3460
    @Override
3461
    public String toString() {
3462
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3463
      boolean first = true;
3464
 
3465
      sb.append("success:");
3466
      if (this.success == null) {
3467
        sb.append("null");
3468
      } else {
3469
        sb.append(this.success);
3470
      }
3471
      first = false;
3472
      if (!first) sb.append(", ");
3473
      sb.append("e:");
3474
      if (this.e == null) {
3475
        sb.append("null");
3476
      } else {
3477
        sb.append(this.e);
3478
      }
3479
      first = false;
3480
      sb.append(")");
3481
      return sb.toString();
3482
    }
3483
 
3484
    public void validate() throws org.apache.thrift.TException {
3485
      // check for required fields
3486
    }
3487
 
3488
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3489
      try {
3490
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3491
      } catch (org.apache.thrift.TException te) {
3492
        throw new java.io.IOException(te);
3493
      }
3494
    }
3495
 
3496
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3497
      try {
3498
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3499
      } catch (org.apache.thrift.TException te) {
3500
        throw new java.io.IOException(te);
3501
      }
3502
    }
3503
 
3504
  }
3505
 
3506
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3507
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3508
 
3509
    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);
3510
 
3511
    private POStatus status; // required
3512
 
3513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3514
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3515
      /**
3516
       * 
3517
       * @see POStatus
3518
       */
3519
      STATUS((short)1, "status");
3520
 
3521
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3522
 
3523
      static {
3524
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3525
          byName.put(field.getFieldName(), field);
3526
        }
3527
      }
3528
 
3529
      /**
3530
       * Find the _Fields constant that matches fieldId, or null if its not found.
3531
       */
3532
      public static _Fields findByThriftId(int fieldId) {
3533
        switch(fieldId) {
3534
          case 1: // STATUS
3535
            return STATUS;
3536
          default:
3537
            return null;
3538
        }
3539
      }
3540
 
3541
      /**
3542
       * Find the _Fields constant that matches fieldId, throwing an exception
3543
       * if it is not found.
3544
       */
3545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3546
        _Fields fields = findByThriftId(fieldId);
3547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3548
        return fields;
3549
      }
3550
 
3551
      /**
3552
       * Find the _Fields constant that matches name, or null if its not found.
3553
       */
3554
      public static _Fields findByName(String name) {
3555
        return byName.get(name);
3556
      }
3557
 
3558
      private final short _thriftId;
3559
      private final String _fieldName;
3560
 
3561
      _Fields(short thriftId, String fieldName) {
3562
        _thriftId = thriftId;
3563
        _fieldName = fieldName;
3564
      }
3565
 
3566
      public short getThriftFieldId() {
3567
        return _thriftId;
3568
      }
3569
 
3570
      public String getFieldName() {
3571
        return _fieldName;
3572
      }
3573
    }
3574
 
3575
    // isset id assignments
3576
 
3577
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3578
    static {
3579
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3580
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3581
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3582
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3583
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3584
    }
3585
 
3586
    public getAllPurchaseOrders_args() {
3587
    }
3588
 
3589
    public getAllPurchaseOrders_args(
3590
      POStatus status)
3591
    {
3592
      this();
3593
      this.status = status;
3594
    }
3595
 
3596
    /**
3597
     * Performs a deep copy on <i>other</i>.
3598
     */
3599
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3600
      if (other.isSetStatus()) {
3601
        this.status = other.status;
3602
      }
3603
    }
3604
 
3605
    public getAllPurchaseOrders_args deepCopy() {
3606
      return new getAllPurchaseOrders_args(this);
3607
    }
3608
 
3609
    @Override
3610
    public void clear() {
3611
      this.status = null;
3612
    }
3613
 
3614
    /**
3615
     * 
3616
     * @see POStatus
3617
     */
3618
    public POStatus getStatus() {
3619
      return this.status;
3620
    }
3621
 
3622
    /**
3623
     * 
3624
     * @see POStatus
3625
     */
3626
    public void setStatus(POStatus status) {
3627
      this.status = status;
3628
    }
3629
 
3630
    public void unsetStatus() {
3631
      this.status = null;
3632
    }
3633
 
3634
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3635
    public boolean isSetStatus() {
3636
      return this.status != null;
3637
    }
3638
 
3639
    public void setStatusIsSet(boolean value) {
3640
      if (!value) {
3641
        this.status = null;
3642
      }
3643
    }
3644
 
3645
    public void setFieldValue(_Fields field, Object value) {
3646
      switch (field) {
3647
      case STATUS:
3648
        if (value == null) {
3649
          unsetStatus();
3650
        } else {
3651
          setStatus((POStatus)value);
3652
        }
3653
        break;
3654
 
3655
      }
3656
    }
3657
 
3658
    public Object getFieldValue(_Fields field) {
3659
      switch (field) {
3660
      case STATUS:
3661
        return getStatus();
3662
 
3663
      }
3664
      throw new IllegalStateException();
3665
    }
3666
 
3667
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3668
    public boolean isSet(_Fields field) {
3669
      if (field == null) {
3670
        throw new IllegalArgumentException();
3671
      }
3672
 
3673
      switch (field) {
3674
      case STATUS:
3675
        return isSetStatus();
3676
      }
3677
      throw new IllegalStateException();
3678
    }
3679
 
3680
    @Override
3681
    public boolean equals(Object that) {
3682
      if (that == null)
3683
        return false;
3684
      if (that instanceof getAllPurchaseOrders_args)
3685
        return this.equals((getAllPurchaseOrders_args)that);
3686
      return false;
3687
    }
3688
 
3689
    public boolean equals(getAllPurchaseOrders_args that) {
3690
      if (that == null)
3691
        return false;
3692
 
3693
      boolean this_present_status = true && this.isSetStatus();
3694
      boolean that_present_status = true && that.isSetStatus();
3695
      if (this_present_status || that_present_status) {
3696
        if (!(this_present_status && that_present_status))
3697
          return false;
3698
        if (!this.status.equals(that.status))
3699
          return false;
3700
      }
3701
 
3702
      return true;
3703
    }
3704
 
3705
    @Override
3706
    public int hashCode() {
3707
      return 0;
3708
    }
3709
 
3710
    public int compareTo(getAllPurchaseOrders_args other) {
3711
      if (!getClass().equals(other.getClass())) {
3712
        return getClass().getName().compareTo(other.getClass().getName());
3713
      }
3714
 
3715
      int lastComparison = 0;
3716
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
3717
 
3718
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
3719
      if (lastComparison != 0) {
3720
        return lastComparison;
3721
      }
3722
      if (isSetStatus()) {
3723
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3724
        if (lastComparison != 0) {
3725
          return lastComparison;
3726
        }
3727
      }
3728
      return 0;
3729
    }
3730
 
3731
    public _Fields fieldForId(int fieldId) {
3732
      return _Fields.findByThriftId(fieldId);
3733
    }
3734
 
3735
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3736
      org.apache.thrift.protocol.TField field;
3737
      iprot.readStructBegin();
3738
      while (true)
3739
      {
3740
        field = iprot.readFieldBegin();
3741
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3742
          break;
3743
        }
3744
        switch (field.id) {
3745
          case 1: // STATUS
3746
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3747
              this.status = POStatus.findByValue(iprot.readI32());
3748
            } else { 
3749
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3750
            }
3751
            break;
3752
          default:
3753
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3754
        }
3755
        iprot.readFieldEnd();
3756
      }
3757
      iprot.readStructEnd();
3758
      validate();
3759
    }
3760
 
3761
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3762
      validate();
3763
 
3764
      oprot.writeStructBegin(STRUCT_DESC);
3765
      if (this.status != null) {
3766
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3767
        oprot.writeI32(this.status.getValue());
3768
        oprot.writeFieldEnd();
3769
      }
3770
      oprot.writeFieldStop();
3771
      oprot.writeStructEnd();
3772
    }
3773
 
3774
    @Override
3775
    public String toString() {
3776
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
3777
      boolean first = true;
3778
 
3779
      sb.append("status:");
3780
      if (this.status == null) {
3781
        sb.append("null");
3782
      } else {
3783
        sb.append(this.status);
3784
      }
3785
      first = false;
3786
      sb.append(")");
3787
      return sb.toString();
3788
    }
3789
 
3790
    public void validate() throws org.apache.thrift.TException {
3791
      // check for required fields
3792
    }
3793
 
3794
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3795
      try {
3796
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3797
      } catch (org.apache.thrift.TException te) {
3798
        throw new java.io.IOException(te);
3799
      }
3800
    }
3801
 
3802
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3803
      try {
3804
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3805
      } catch (org.apache.thrift.TException te) {
3806
        throw new java.io.IOException(te);
3807
      }
3808
    }
3809
 
3810
  }
3811
 
3812
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
3813
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
3814
 
3815
    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);
3816
    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);
3817
 
3818
    private List<PurchaseOrder> success; // required
3819
    private PurchaseServiceException e; // required
3820
 
3821
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3822
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3823
      SUCCESS((short)0, "success"),
3824
      E((short)1, "e");
3825
 
3826
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3827
 
3828
      static {
3829
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3830
          byName.put(field.getFieldName(), field);
3831
        }
3832
      }
3833
 
3834
      /**
3835
       * Find the _Fields constant that matches fieldId, or null if its not found.
3836
       */
3837
      public static _Fields findByThriftId(int fieldId) {
3838
        switch(fieldId) {
3839
          case 0: // SUCCESS
3840
            return SUCCESS;
3841
          case 1: // E
3842
            return E;
3843
          default:
3844
            return null;
3845
        }
3846
      }
3847
 
3848
      /**
3849
       * Find the _Fields constant that matches fieldId, throwing an exception
3850
       * if it is not found.
3851
       */
3852
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3853
        _Fields fields = findByThriftId(fieldId);
3854
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3855
        return fields;
3856
      }
3857
 
3858
      /**
3859
       * Find the _Fields constant that matches name, or null if its not found.
3860
       */
3861
      public static _Fields findByName(String name) {
3862
        return byName.get(name);
3863
      }
3864
 
3865
      private final short _thriftId;
3866
      private final String _fieldName;
3867
 
3868
      _Fields(short thriftId, String fieldName) {
3869
        _thriftId = thriftId;
3870
        _fieldName = fieldName;
3871
      }
3872
 
3873
      public short getThriftFieldId() {
3874
        return _thriftId;
3875
      }
3876
 
3877
      public String getFieldName() {
3878
        return _fieldName;
3879
      }
3880
    }
3881
 
3882
    // isset id assignments
3883
 
3884
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3885
    static {
3886
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3887
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3888
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3889
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
3890
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3891
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3892
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3893
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
3894
    }
3895
 
3896
    public getAllPurchaseOrders_result() {
3897
    }
3898
 
3899
    public getAllPurchaseOrders_result(
3900
      List<PurchaseOrder> success,
3901
      PurchaseServiceException e)
3902
    {
3903
      this();
3904
      this.success = success;
3905
      this.e = e;
3906
    }
3907
 
3908
    /**
3909
     * Performs a deep copy on <i>other</i>.
3910
     */
3911
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
3912
      if (other.isSetSuccess()) {
3913
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
3914
        for (PurchaseOrder other_element : other.success) {
3915
          __this__success.add(new PurchaseOrder(other_element));
3916
        }
3917
        this.success = __this__success;
3918
      }
3919
      if (other.isSetE()) {
3920
        this.e = new PurchaseServiceException(other.e);
3921
      }
3922
    }
3923
 
3924
    public getAllPurchaseOrders_result deepCopy() {
3925
      return new getAllPurchaseOrders_result(this);
3926
    }
3927
 
3928
    @Override
3929
    public void clear() {
3930
      this.success = null;
3931
      this.e = null;
3932
    }
3933
 
3934
    public int getSuccessSize() {
3935
      return (this.success == null) ? 0 : this.success.size();
3936
    }
3937
 
3938
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
3939
      return (this.success == null) ? null : this.success.iterator();
3940
    }
3941
 
3942
    public void addToSuccess(PurchaseOrder elem) {
3943
      if (this.success == null) {
3944
        this.success = new ArrayList<PurchaseOrder>();
3945
      }
3946
      this.success.add(elem);
3947
    }
3948
 
3949
    public List<PurchaseOrder> getSuccess() {
3950
      return this.success;
3951
    }
3952
 
3953
    public void setSuccess(List<PurchaseOrder> success) {
3954
      this.success = success;
3955
    }
3956
 
3957
    public void unsetSuccess() {
3958
      this.success = null;
3959
    }
3960
 
3961
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3962
    public boolean isSetSuccess() {
3963
      return this.success != null;
3964
    }
3965
 
3966
    public void setSuccessIsSet(boolean value) {
3967
      if (!value) {
3968
        this.success = null;
3969
      }
3970
    }
3971
 
3972
    public PurchaseServiceException getE() {
3973
      return this.e;
3974
    }
3975
 
3976
    public void setE(PurchaseServiceException e) {
3977
      this.e = e;
3978
    }
3979
 
3980
    public void unsetE() {
3981
      this.e = null;
3982
    }
3983
 
3984
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3985
    public boolean isSetE() {
3986
      return this.e != null;
3987
    }
3988
 
3989
    public void setEIsSet(boolean value) {
3990
      if (!value) {
3991
        this.e = null;
3992
      }
3993
    }
3994
 
3995
    public void setFieldValue(_Fields field, Object value) {
3996
      switch (field) {
3997
      case SUCCESS:
3998
        if (value == null) {
3999
          unsetSuccess();
4000
        } else {
4001
          setSuccess((List<PurchaseOrder>)value);
4002
        }
4003
        break;
4004
 
4005
      case E:
4006
        if (value == null) {
4007
          unsetE();
4008
        } else {
4009
          setE((PurchaseServiceException)value);
4010
        }
4011
        break;
4012
 
4013
      }
4014
    }
4015
 
4016
    public Object getFieldValue(_Fields field) {
4017
      switch (field) {
4018
      case SUCCESS:
4019
        return getSuccess();
4020
 
4021
      case E:
4022
        return getE();
4023
 
4024
      }
4025
      throw new IllegalStateException();
4026
    }
4027
 
4028
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4029
    public boolean isSet(_Fields field) {
4030
      if (field == null) {
4031
        throw new IllegalArgumentException();
4032
      }
4033
 
4034
      switch (field) {
4035
      case SUCCESS:
4036
        return isSetSuccess();
4037
      case E:
4038
        return isSetE();
4039
      }
4040
      throw new IllegalStateException();
4041
    }
4042
 
4043
    @Override
4044
    public boolean equals(Object that) {
4045
      if (that == null)
4046
        return false;
4047
      if (that instanceof getAllPurchaseOrders_result)
4048
        return this.equals((getAllPurchaseOrders_result)that);
4049
      return false;
4050
    }
4051
 
4052
    public boolean equals(getAllPurchaseOrders_result that) {
4053
      if (that == null)
4054
        return false;
4055
 
4056
      boolean this_present_success = true && this.isSetSuccess();
4057
      boolean that_present_success = true && that.isSetSuccess();
4058
      if (this_present_success || that_present_success) {
4059
        if (!(this_present_success && that_present_success))
4060
          return false;
4061
        if (!this.success.equals(that.success))
4062
          return false;
4063
      }
4064
 
4065
      boolean this_present_e = true && this.isSetE();
4066
      boolean that_present_e = true && that.isSetE();
4067
      if (this_present_e || that_present_e) {
4068
        if (!(this_present_e && that_present_e))
4069
          return false;
4070
        if (!this.e.equals(that.e))
4071
          return false;
4072
      }
4073
 
4074
      return true;
4075
    }
4076
 
4077
    @Override
4078
    public int hashCode() {
4079
      return 0;
4080
    }
4081
 
4082
    public int compareTo(getAllPurchaseOrders_result other) {
4083
      if (!getClass().equals(other.getClass())) {
4084
        return getClass().getName().compareTo(other.getClass().getName());
4085
      }
4086
 
4087
      int lastComparison = 0;
4088
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
4089
 
4090
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4091
      if (lastComparison != 0) {
4092
        return lastComparison;
4093
      }
4094
      if (isSetSuccess()) {
4095
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4096
        if (lastComparison != 0) {
4097
          return lastComparison;
4098
        }
4099
      }
4100
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4101
      if (lastComparison != 0) {
4102
        return lastComparison;
4103
      }
4104
      if (isSetE()) {
4105
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4106
        if (lastComparison != 0) {
4107
          return lastComparison;
4108
        }
4109
      }
4110
      return 0;
4111
    }
4112
 
4113
    public _Fields fieldForId(int fieldId) {
4114
      return _Fields.findByThriftId(fieldId);
4115
    }
4116
 
4117
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4118
      org.apache.thrift.protocol.TField field;
4119
      iprot.readStructBegin();
4120
      while (true)
4121
      {
4122
        field = iprot.readFieldBegin();
4123
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4124
          break;
4125
        }
4126
        switch (field.id) {
4127
          case 0: // SUCCESS
4128
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4129
              {
4130
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
4131
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
4132
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
4133
                {
4134
                  PurchaseOrder _elem6; // required
4135
                  _elem6 = new PurchaseOrder();
4136
                  _elem6.read(iprot);
4137
                  this.success.add(_elem6);
4138
                }
4139
                iprot.readListEnd();
4140
              }
4141
            } else { 
4142
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4143
            }
4144
            break;
4145
          case 1: // E
4146
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4147
              this.e = new PurchaseServiceException();
4148
              this.e.read(iprot);
4149
            } else { 
4150
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4151
            }
4152
            break;
4153
          default:
4154
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4155
        }
4156
        iprot.readFieldEnd();
4157
      }
4158
      iprot.readStructEnd();
4159
      validate();
4160
    }
4161
 
4162
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4163
      oprot.writeStructBegin(STRUCT_DESC);
4164
 
4165
      if (this.isSetSuccess()) {
4166
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4167
        {
4168
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4169
          for (PurchaseOrder _iter7 : this.success)
4170
          {
4171
            _iter7.write(oprot);
4172
          }
4173
          oprot.writeListEnd();
4174
        }
4175
        oprot.writeFieldEnd();
4176
      } else if (this.isSetE()) {
4177
        oprot.writeFieldBegin(E_FIELD_DESC);
4178
        this.e.write(oprot);
4179
        oprot.writeFieldEnd();
4180
      }
4181
      oprot.writeFieldStop();
4182
      oprot.writeStructEnd();
4183
    }
4184
 
4185
    @Override
4186
    public String toString() {
4187
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4188
      boolean first = true;
4189
 
4190
      sb.append("success:");
4191
      if (this.success == null) {
4192
        sb.append("null");
4193
      } else {
4194
        sb.append(this.success);
4195
      }
4196
      first = false;
4197
      if (!first) sb.append(", ");
4198
      sb.append("e:");
4199
      if (this.e == null) {
4200
        sb.append("null");
4201
      } else {
4202
        sb.append(this.e);
4203
      }
4204
      first = false;
4205
      sb.append(")");
4206
      return sb.toString();
4207
    }
4208
 
4209
    public void validate() throws org.apache.thrift.TException {
4210
      // check for required fields
4211
    }
4212
 
4213
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4214
      try {
4215
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4216
      } catch (org.apache.thrift.TException te) {
4217
        throw new java.io.IOException(te);
4218
      }
4219
    }
4220
 
4221
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4222
      try {
4223
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4224
      } catch (org.apache.thrift.TException te) {
4225
        throw new java.io.IOException(te);
4226
      }
4227
    }
4228
 
4229
  }
4230
 
4231
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4232
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4233
 
4234
    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);
4235
 
4236
    private long id; // required
4237
 
4238
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4239
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4240
      ID((short)1, "id");
4241
 
4242
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4243
 
4244
      static {
4245
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4246
          byName.put(field.getFieldName(), field);
4247
        }
4248
      }
4249
 
4250
      /**
4251
       * Find the _Fields constant that matches fieldId, or null if its not found.
4252
       */
4253
      public static _Fields findByThriftId(int fieldId) {
4254
        switch(fieldId) {
4255
          case 1: // ID
4256
            return ID;
4257
          default:
4258
            return null;
4259
        }
4260
      }
4261
 
4262
      /**
4263
       * Find the _Fields constant that matches fieldId, throwing an exception
4264
       * if it is not found.
4265
       */
4266
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4267
        _Fields fields = findByThriftId(fieldId);
4268
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4269
        return fields;
4270
      }
4271
 
4272
      /**
4273
       * Find the _Fields constant that matches name, or null if its not found.
4274
       */
4275
      public static _Fields findByName(String name) {
4276
        return byName.get(name);
4277
      }
4278
 
4279
      private final short _thriftId;
4280
      private final String _fieldName;
4281
 
4282
      _Fields(short thriftId, String fieldName) {
4283
        _thriftId = thriftId;
4284
        _fieldName = fieldName;
4285
      }
4286
 
4287
      public short getThriftFieldId() {
4288
        return _thriftId;
4289
      }
4290
 
4291
      public String getFieldName() {
4292
        return _fieldName;
4293
      }
4294
    }
4295
 
4296
    // isset id assignments
4297
    private static final int __ID_ISSET_ID = 0;
4298
    private BitSet __isset_bit_vector = new BitSet(1);
4299
 
4300
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4301
    static {
4302
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4303
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4304
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4305
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4306
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4307
    }
4308
 
4309
    public getSupplier_args() {
4310
    }
4311
 
4312
    public getSupplier_args(
4313
      long id)
4314
    {
4315
      this();
4316
      this.id = id;
4317
      setIdIsSet(true);
4318
    }
4319
 
4320
    /**
4321
     * Performs a deep copy on <i>other</i>.
4322
     */
4323
    public getSupplier_args(getSupplier_args other) {
4324
      __isset_bit_vector.clear();
4325
      __isset_bit_vector.or(other.__isset_bit_vector);
4326
      this.id = other.id;
4327
    }
4328
 
4329
    public getSupplier_args deepCopy() {
4330
      return new getSupplier_args(this);
4331
    }
4332
 
4333
    @Override
4334
    public void clear() {
4335
      setIdIsSet(false);
4336
      this.id = 0;
4337
    }
4338
 
4339
    public long getId() {
4340
      return this.id;
4341
    }
4342
 
4343
    public void setId(long id) {
4344
      this.id = id;
4345
      setIdIsSet(true);
4346
    }
4347
 
4348
    public void unsetId() {
4349
      __isset_bit_vector.clear(__ID_ISSET_ID);
4350
    }
4351
 
4352
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4353
    public boolean isSetId() {
4354
      return __isset_bit_vector.get(__ID_ISSET_ID);
4355
    }
4356
 
4357
    public void setIdIsSet(boolean value) {
4358
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4359
    }
4360
 
4361
    public void setFieldValue(_Fields field, Object value) {
4362
      switch (field) {
4363
      case ID:
4364
        if (value == null) {
4365
          unsetId();
4366
        } else {
4367
          setId((Long)value);
4368
        }
4369
        break;
4370
 
4371
      }
4372
    }
4373
 
4374
    public Object getFieldValue(_Fields field) {
4375
      switch (field) {
4376
      case ID:
4377
        return Long.valueOf(getId());
4378
 
4379
      }
4380
      throw new IllegalStateException();
4381
    }
4382
 
4383
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4384
    public boolean isSet(_Fields field) {
4385
      if (field == null) {
4386
        throw new IllegalArgumentException();
4387
      }
4388
 
4389
      switch (field) {
4390
      case ID:
4391
        return isSetId();
4392
      }
4393
      throw new IllegalStateException();
4394
    }
4395
 
4396
    @Override
4397
    public boolean equals(Object that) {
4398
      if (that == null)
4399
        return false;
4400
      if (that instanceof getSupplier_args)
4401
        return this.equals((getSupplier_args)that);
4402
      return false;
4403
    }
4404
 
4405
    public boolean equals(getSupplier_args that) {
4406
      if (that == null)
4407
        return false;
4408
 
4409
      boolean this_present_id = true;
4410
      boolean that_present_id = true;
4411
      if (this_present_id || that_present_id) {
4412
        if (!(this_present_id && that_present_id))
4413
          return false;
4414
        if (this.id != that.id)
4415
          return false;
4416
      }
4417
 
4418
      return true;
4419
    }
4420
 
4421
    @Override
4422
    public int hashCode() {
4423
      return 0;
4424
    }
4425
 
4426
    public int compareTo(getSupplier_args other) {
4427
      if (!getClass().equals(other.getClass())) {
4428
        return getClass().getName().compareTo(other.getClass().getName());
4429
      }
4430
 
4431
      int lastComparison = 0;
4432
      getSupplier_args typedOther = (getSupplier_args)other;
4433
 
4434
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4435
      if (lastComparison != 0) {
4436
        return lastComparison;
4437
      }
4438
      if (isSetId()) {
4439
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4440
        if (lastComparison != 0) {
4441
          return lastComparison;
4442
        }
4443
      }
4444
      return 0;
4445
    }
4446
 
4447
    public _Fields fieldForId(int fieldId) {
4448
      return _Fields.findByThriftId(fieldId);
4449
    }
4450
 
4451
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4452
      org.apache.thrift.protocol.TField field;
4453
      iprot.readStructBegin();
4454
      while (true)
4455
      {
4456
        field = iprot.readFieldBegin();
4457
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4458
          break;
4459
        }
4460
        switch (field.id) {
4461
          case 1: // ID
4462
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4463
              this.id = iprot.readI64();
4464
              setIdIsSet(true);
4465
            } else { 
4466
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4467
            }
4468
            break;
4469
          default:
4470
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4471
        }
4472
        iprot.readFieldEnd();
4473
      }
4474
      iprot.readStructEnd();
4475
      validate();
4476
    }
4477
 
4478
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4479
      validate();
4480
 
4481
      oprot.writeStructBegin(STRUCT_DESC);
4482
      oprot.writeFieldBegin(ID_FIELD_DESC);
4483
      oprot.writeI64(this.id);
4484
      oprot.writeFieldEnd();
4485
      oprot.writeFieldStop();
4486
      oprot.writeStructEnd();
4487
    }
4488
 
4489
    @Override
4490
    public String toString() {
4491
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4492
      boolean first = true;
4493
 
4494
      sb.append("id:");
4495
      sb.append(this.id);
4496
      first = false;
4497
      sb.append(")");
4498
      return sb.toString();
4499
    }
4500
 
4501
    public void validate() throws org.apache.thrift.TException {
4502
      // check for required fields
4503
    }
4504
 
4505
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4506
      try {
4507
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4508
      } catch (org.apache.thrift.TException te) {
4509
        throw new java.io.IOException(te);
4510
      }
4511
    }
4512
 
4513
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4514
      try {
4515
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4516
        __isset_bit_vector = new BitSet(1);
4517
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4518
      } catch (org.apache.thrift.TException te) {
4519
        throw new java.io.IOException(te);
4520
      }
4521
    }
4522
 
4523
  }
4524
 
4525
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4526
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4527
 
4528
    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);
4529
    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);
4530
 
4531
    private Supplier success; // required
4532
    private PurchaseServiceException e; // required
4533
 
4534
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4535
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4536
      SUCCESS((short)0, "success"),
4537
      E((short)1, "e");
4538
 
4539
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4540
 
4541
      static {
4542
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4543
          byName.put(field.getFieldName(), field);
4544
        }
4545
      }
4546
 
4547
      /**
4548
       * Find the _Fields constant that matches fieldId, or null if its not found.
4549
       */
4550
      public static _Fields findByThriftId(int fieldId) {
4551
        switch(fieldId) {
4552
          case 0: // SUCCESS
4553
            return SUCCESS;
4554
          case 1: // E
4555
            return E;
4556
          default:
4557
            return null;
4558
        }
4559
      }
4560
 
4561
      /**
4562
       * Find the _Fields constant that matches fieldId, throwing an exception
4563
       * if it is not found.
4564
       */
4565
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4566
        _Fields fields = findByThriftId(fieldId);
4567
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4568
        return fields;
4569
      }
4570
 
4571
      /**
4572
       * Find the _Fields constant that matches name, or null if its not found.
4573
       */
4574
      public static _Fields findByName(String name) {
4575
        return byName.get(name);
4576
      }
4577
 
4578
      private final short _thriftId;
4579
      private final String _fieldName;
4580
 
4581
      _Fields(short thriftId, String fieldName) {
4582
        _thriftId = thriftId;
4583
        _fieldName = fieldName;
4584
      }
4585
 
4586
      public short getThriftFieldId() {
4587
        return _thriftId;
4588
      }
4589
 
4590
      public String getFieldName() {
4591
        return _fieldName;
4592
      }
4593
    }
4594
 
4595
    // isset id assignments
4596
 
4597
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4598
    static {
4599
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4600
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4601
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4602
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4603
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4604
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4605
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4606
    }
4607
 
4608
    public getSupplier_result() {
4609
    }
4610
 
4611
    public getSupplier_result(
4612
      Supplier success,
4613
      PurchaseServiceException e)
4614
    {
4615
      this();
4616
      this.success = success;
4617
      this.e = e;
4618
    }
4619
 
4620
    /**
4621
     * Performs a deep copy on <i>other</i>.
4622
     */
4623
    public getSupplier_result(getSupplier_result other) {
4624
      if (other.isSetSuccess()) {
4625
        this.success = new Supplier(other.success);
4626
      }
4627
      if (other.isSetE()) {
4628
        this.e = new PurchaseServiceException(other.e);
4629
      }
4630
    }
4631
 
4632
    public getSupplier_result deepCopy() {
4633
      return new getSupplier_result(this);
4634
    }
4635
 
4636
    @Override
4637
    public void clear() {
4638
      this.success = null;
4639
      this.e = null;
4640
    }
4641
 
4642
    public Supplier getSuccess() {
4643
      return this.success;
4644
    }
4645
 
4646
    public void setSuccess(Supplier success) {
4647
      this.success = success;
4648
    }
4649
 
4650
    public void unsetSuccess() {
4651
      this.success = null;
4652
    }
4653
 
4654
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4655
    public boolean isSetSuccess() {
4656
      return this.success != null;
4657
    }
4658
 
4659
    public void setSuccessIsSet(boolean value) {
4660
      if (!value) {
4661
        this.success = null;
4662
      }
4663
    }
4664
 
4665
    public PurchaseServiceException getE() {
4666
      return this.e;
4667
    }
4668
 
4669
    public void setE(PurchaseServiceException e) {
4670
      this.e = e;
4671
    }
4672
 
4673
    public void unsetE() {
4674
      this.e = null;
4675
    }
4676
 
4677
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4678
    public boolean isSetE() {
4679
      return this.e != null;
4680
    }
4681
 
4682
    public void setEIsSet(boolean value) {
4683
      if (!value) {
4684
        this.e = null;
4685
      }
4686
    }
4687
 
4688
    public void setFieldValue(_Fields field, Object value) {
4689
      switch (field) {
4690
      case SUCCESS:
4691
        if (value == null) {
4692
          unsetSuccess();
4693
        } else {
4694
          setSuccess((Supplier)value);
4695
        }
4696
        break;
4697
 
4698
      case E:
4699
        if (value == null) {
4700
          unsetE();
4701
        } else {
4702
          setE((PurchaseServiceException)value);
4703
        }
4704
        break;
4705
 
4706
      }
4707
    }
4708
 
4709
    public Object getFieldValue(_Fields field) {
4710
      switch (field) {
4711
      case SUCCESS:
4712
        return getSuccess();
4713
 
4714
      case E:
4715
        return getE();
4716
 
4717
      }
4718
      throw new IllegalStateException();
4719
    }
4720
 
4721
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4722
    public boolean isSet(_Fields field) {
4723
      if (field == null) {
4724
        throw new IllegalArgumentException();
4725
      }
4726
 
4727
      switch (field) {
4728
      case SUCCESS:
4729
        return isSetSuccess();
4730
      case E:
4731
        return isSetE();
4732
      }
4733
      throw new IllegalStateException();
4734
    }
4735
 
4736
    @Override
4737
    public boolean equals(Object that) {
4738
      if (that == null)
4739
        return false;
4740
      if (that instanceof getSupplier_result)
4741
        return this.equals((getSupplier_result)that);
4742
      return false;
4743
    }
4744
 
4745
    public boolean equals(getSupplier_result that) {
4746
      if (that == null)
4747
        return false;
4748
 
4749
      boolean this_present_success = true && this.isSetSuccess();
4750
      boolean that_present_success = true && that.isSetSuccess();
4751
      if (this_present_success || that_present_success) {
4752
        if (!(this_present_success && that_present_success))
4753
          return false;
4754
        if (!this.success.equals(that.success))
4755
          return false;
4756
      }
4757
 
4758
      boolean this_present_e = true && this.isSetE();
4759
      boolean that_present_e = true && that.isSetE();
4760
      if (this_present_e || that_present_e) {
4761
        if (!(this_present_e && that_present_e))
4762
          return false;
4763
        if (!this.e.equals(that.e))
4764
          return false;
4765
      }
4766
 
4767
      return true;
4768
    }
4769
 
4770
    @Override
4771
    public int hashCode() {
4772
      return 0;
4773
    }
4774
 
4775
    public int compareTo(getSupplier_result other) {
4776
      if (!getClass().equals(other.getClass())) {
4777
        return getClass().getName().compareTo(other.getClass().getName());
4778
      }
4779
 
4780
      int lastComparison = 0;
4781
      getSupplier_result typedOther = (getSupplier_result)other;
4782
 
4783
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4784
      if (lastComparison != 0) {
4785
        return lastComparison;
4786
      }
4787
      if (isSetSuccess()) {
4788
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4789
        if (lastComparison != 0) {
4790
          return lastComparison;
4791
        }
4792
      }
4793
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4794
      if (lastComparison != 0) {
4795
        return lastComparison;
4796
      }
4797
      if (isSetE()) {
4798
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4799
        if (lastComparison != 0) {
4800
          return lastComparison;
4801
        }
4802
      }
4803
      return 0;
4804
    }
4805
 
4806
    public _Fields fieldForId(int fieldId) {
4807
      return _Fields.findByThriftId(fieldId);
4808
    }
4809
 
4810
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4811
      org.apache.thrift.protocol.TField field;
4812
      iprot.readStructBegin();
4813
      while (true)
4814
      {
4815
        field = iprot.readFieldBegin();
4816
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4817
          break;
4818
        }
4819
        switch (field.id) {
4820
          case 0: // SUCCESS
4821
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4822
              this.success = new Supplier();
4823
              this.success.read(iprot);
4824
            } else { 
4825
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4826
            }
4827
            break;
4828
          case 1: // E
4829
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4830
              this.e = new PurchaseServiceException();
4831
              this.e.read(iprot);
4832
            } else { 
4833
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4834
            }
4835
            break;
4836
          default:
4837
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4838
        }
4839
        iprot.readFieldEnd();
4840
      }
4841
      iprot.readStructEnd();
4842
      validate();
4843
    }
4844
 
4845
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4846
      oprot.writeStructBegin(STRUCT_DESC);
4847
 
4848
      if (this.isSetSuccess()) {
4849
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4850
        this.success.write(oprot);
4851
        oprot.writeFieldEnd();
4852
      } else if (this.isSetE()) {
4853
        oprot.writeFieldBegin(E_FIELD_DESC);
4854
        this.e.write(oprot);
4855
        oprot.writeFieldEnd();
4856
      }
4857
      oprot.writeFieldStop();
4858
      oprot.writeStructEnd();
4859
    }
4860
 
4861
    @Override
4862
    public String toString() {
4863
      StringBuilder sb = new StringBuilder("getSupplier_result(");
4864
      boolean first = true;
4865
 
4866
      sb.append("success:");
4867
      if (this.success == null) {
4868
        sb.append("null");
4869
      } else {
4870
        sb.append(this.success);
4871
      }
4872
      first = false;
4873
      if (!first) sb.append(", ");
4874
      sb.append("e:");
4875
      if (this.e == null) {
4876
        sb.append("null");
4877
      } else {
4878
        sb.append(this.e);
4879
      }
4880
      first = false;
4881
      sb.append(")");
4882
      return sb.toString();
4883
    }
4884
 
4885
    public void validate() throws org.apache.thrift.TException {
4886
      // check for required fields
4887
    }
4888
 
4889
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4890
      try {
4891
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4892
      } catch (org.apache.thrift.TException te) {
4893
        throw new java.io.IOException(te);
4894
      }
4895
    }
4896
 
4897
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4898
      try {
4899
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4900
      } catch (org.apache.thrift.TException te) {
4901
        throw new java.io.IOException(te);
4902
      }
4903
    }
4904
 
4905
  }
4906
 
4907
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
4908
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
4909
 
4910
    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);
4911
    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);
4912
    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);
4913
 
4914
    private long purchaseOrderId; // required
4915
    private String invoiceNumber; // required
4916
    private double freightCharges; // required
4917
 
4918
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4919
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4920
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
4921
      INVOICE_NUMBER((short)2, "invoiceNumber"),
4922
      FREIGHT_CHARGES((short)3, "freightCharges");
4923
 
4924
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4925
 
4926
      static {
4927
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4928
          byName.put(field.getFieldName(), field);
4929
        }
4930
      }
4931
 
4932
      /**
4933
       * Find the _Fields constant that matches fieldId, or null if its not found.
4934
       */
4935
      public static _Fields findByThriftId(int fieldId) {
4936
        switch(fieldId) {
4937
          case 1: // PURCHASE_ORDER_ID
4938
            return PURCHASE_ORDER_ID;
4939
          case 2: // INVOICE_NUMBER
4940
            return INVOICE_NUMBER;
4941
          case 3: // FREIGHT_CHARGES
4942
            return FREIGHT_CHARGES;
4943
          default:
4944
            return null;
4945
        }
4946
      }
4947
 
4948
      /**
4949
       * Find the _Fields constant that matches fieldId, throwing an exception
4950
       * if it is not found.
4951
       */
4952
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4953
        _Fields fields = findByThriftId(fieldId);
4954
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4955
        return fields;
4956
      }
4957
 
4958
      /**
4959
       * Find the _Fields constant that matches name, or null if its not found.
4960
       */
4961
      public static _Fields findByName(String name) {
4962
        return byName.get(name);
4963
      }
4964
 
4965
      private final short _thriftId;
4966
      private final String _fieldName;
4967
 
4968
      _Fields(short thriftId, String fieldName) {
4969
        _thriftId = thriftId;
4970
        _fieldName = fieldName;
4971
      }
4972
 
4973
      public short getThriftFieldId() {
4974
        return _thriftId;
4975
      }
4976
 
4977
      public String getFieldName() {
4978
        return _fieldName;
4979
      }
4980
    }
4981
 
4982
    // isset id assignments
4983
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
4984
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
4985
    private BitSet __isset_bit_vector = new BitSet(2);
4986
 
4987
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4988
    static {
4989
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4990
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4991
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4992
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4993
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4994
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4995
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4996
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4997
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
4998
    }
4999
 
5000
    public startPurchase_args() {
5001
    }
5002
 
5003
    public startPurchase_args(
5004
      long purchaseOrderId,
5005
      String invoiceNumber,
5006
      double freightCharges)
5007
    {
5008
      this();
5009
      this.purchaseOrderId = purchaseOrderId;
5010
      setPurchaseOrderIdIsSet(true);
5011
      this.invoiceNumber = invoiceNumber;
5012
      this.freightCharges = freightCharges;
5013
      setFreightChargesIsSet(true);
5014
    }
5015
 
5016
    /**
5017
     * Performs a deep copy on <i>other</i>.
5018
     */
5019
    public startPurchase_args(startPurchase_args other) {
5020
      __isset_bit_vector.clear();
5021
      __isset_bit_vector.or(other.__isset_bit_vector);
5022
      this.purchaseOrderId = other.purchaseOrderId;
5023
      if (other.isSetInvoiceNumber()) {
5024
        this.invoiceNumber = other.invoiceNumber;
5025
      }
5026
      this.freightCharges = other.freightCharges;
5027
    }
5028
 
5029
    public startPurchase_args deepCopy() {
5030
      return new startPurchase_args(this);
5031
    }
5032
 
5033
    @Override
5034
    public void clear() {
5035
      setPurchaseOrderIdIsSet(false);
5036
      this.purchaseOrderId = 0;
5037
      this.invoiceNumber = null;
5038
      setFreightChargesIsSet(false);
5039
      this.freightCharges = 0.0;
5040
    }
5041
 
5042
    public long getPurchaseOrderId() {
5043
      return this.purchaseOrderId;
5044
    }
5045
 
5046
    public void setPurchaseOrderId(long purchaseOrderId) {
5047
      this.purchaseOrderId = purchaseOrderId;
5048
      setPurchaseOrderIdIsSet(true);
5049
    }
5050
 
5051
    public void unsetPurchaseOrderId() {
5052
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5053
    }
5054
 
5055
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5056
    public boolean isSetPurchaseOrderId() {
5057
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5058
    }
5059
 
5060
    public void setPurchaseOrderIdIsSet(boolean value) {
5061
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5062
    }
5063
 
5064
    public String getInvoiceNumber() {
5065
      return this.invoiceNumber;
5066
    }
5067
 
5068
    public void setInvoiceNumber(String invoiceNumber) {
5069
      this.invoiceNumber = invoiceNumber;
5070
    }
5071
 
5072
    public void unsetInvoiceNumber() {
5073
      this.invoiceNumber = null;
5074
    }
5075
 
5076
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
5077
    public boolean isSetInvoiceNumber() {
5078
      return this.invoiceNumber != null;
5079
    }
5080
 
5081
    public void setInvoiceNumberIsSet(boolean value) {
5082
      if (!value) {
5083
        this.invoiceNumber = null;
5084
      }
5085
    }
5086
 
5087
    public double getFreightCharges() {
5088
      return this.freightCharges;
5089
    }
5090
 
5091
    public void setFreightCharges(double freightCharges) {
5092
      this.freightCharges = freightCharges;
5093
      setFreightChargesIsSet(true);
5094
    }
5095
 
5096
    public void unsetFreightCharges() {
5097
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
5098
    }
5099
 
5100
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
5101
    public boolean isSetFreightCharges() {
5102
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
5103
    }
5104
 
5105
    public void setFreightChargesIsSet(boolean value) {
5106
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5107
    }
5108
 
5109
    public void setFieldValue(_Fields field, Object value) {
5110
      switch (field) {
5111
      case PURCHASE_ORDER_ID:
5112
        if (value == null) {
5113
          unsetPurchaseOrderId();
5114
        } else {
5115
          setPurchaseOrderId((Long)value);
5116
        }
5117
        break;
5118
 
5119
      case INVOICE_NUMBER:
5120
        if (value == null) {
5121
          unsetInvoiceNumber();
5122
        } else {
5123
          setInvoiceNumber((String)value);
5124
        }
5125
        break;
5126
 
5127
      case FREIGHT_CHARGES:
5128
        if (value == null) {
5129
          unsetFreightCharges();
5130
        } else {
5131
          setFreightCharges((Double)value);
5132
        }
5133
        break;
5134
 
5135
      }
5136
    }
5137
 
5138
    public Object getFieldValue(_Fields field) {
5139
      switch (field) {
5140
      case PURCHASE_ORDER_ID:
5141
        return Long.valueOf(getPurchaseOrderId());
5142
 
5143
      case INVOICE_NUMBER:
5144
        return getInvoiceNumber();
5145
 
5146
      case FREIGHT_CHARGES:
5147
        return Double.valueOf(getFreightCharges());
5148
 
5149
      }
5150
      throw new IllegalStateException();
5151
    }
5152
 
5153
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5154
    public boolean isSet(_Fields field) {
5155
      if (field == null) {
5156
        throw new IllegalArgumentException();
5157
      }
5158
 
5159
      switch (field) {
5160
      case PURCHASE_ORDER_ID:
5161
        return isSetPurchaseOrderId();
5162
      case INVOICE_NUMBER:
5163
        return isSetInvoiceNumber();
5164
      case FREIGHT_CHARGES:
5165
        return isSetFreightCharges();
5166
      }
5167
      throw new IllegalStateException();
5168
    }
5169
 
5170
    @Override
5171
    public boolean equals(Object that) {
5172
      if (that == null)
5173
        return false;
5174
      if (that instanceof startPurchase_args)
5175
        return this.equals((startPurchase_args)that);
5176
      return false;
5177
    }
5178
 
5179
    public boolean equals(startPurchase_args that) {
5180
      if (that == null)
5181
        return false;
5182
 
5183
      boolean this_present_purchaseOrderId = true;
5184
      boolean that_present_purchaseOrderId = true;
5185
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5186
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5187
          return false;
5188
        if (this.purchaseOrderId != that.purchaseOrderId)
5189
          return false;
5190
      }
5191
 
5192
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5193
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5194
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5195
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5196
          return false;
5197
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5198
          return false;
5199
      }
5200
 
5201
      boolean this_present_freightCharges = true;
5202
      boolean that_present_freightCharges = true;
5203
      if (this_present_freightCharges || that_present_freightCharges) {
5204
        if (!(this_present_freightCharges && that_present_freightCharges))
5205
          return false;
5206
        if (this.freightCharges != that.freightCharges)
5207
          return false;
5208
      }
5209
 
5210
      return true;
5211
    }
5212
 
5213
    @Override
5214
    public int hashCode() {
5215
      return 0;
5216
    }
5217
 
5218
    public int compareTo(startPurchase_args other) {
5219
      if (!getClass().equals(other.getClass())) {
5220
        return getClass().getName().compareTo(other.getClass().getName());
5221
      }
5222
 
5223
      int lastComparison = 0;
5224
      startPurchase_args typedOther = (startPurchase_args)other;
5225
 
5226
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5227
      if (lastComparison != 0) {
5228
        return lastComparison;
5229
      }
5230
      if (isSetPurchaseOrderId()) {
5231
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5232
        if (lastComparison != 0) {
5233
          return lastComparison;
5234
        }
5235
      }
5236
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5237
      if (lastComparison != 0) {
5238
        return lastComparison;
5239
      }
5240
      if (isSetInvoiceNumber()) {
5241
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5242
        if (lastComparison != 0) {
5243
          return lastComparison;
5244
        }
5245
      }
5246
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5247
      if (lastComparison != 0) {
5248
        return lastComparison;
5249
      }
5250
      if (isSetFreightCharges()) {
5251
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5252
        if (lastComparison != 0) {
5253
          return lastComparison;
5254
        }
5255
      }
5256
      return 0;
5257
    }
5258
 
5259
    public _Fields fieldForId(int fieldId) {
5260
      return _Fields.findByThriftId(fieldId);
5261
    }
5262
 
5263
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5264
      org.apache.thrift.protocol.TField field;
5265
      iprot.readStructBegin();
5266
      while (true)
5267
      {
5268
        field = iprot.readFieldBegin();
5269
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5270
          break;
5271
        }
5272
        switch (field.id) {
5273
          case 1: // PURCHASE_ORDER_ID
5274
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5275
              this.purchaseOrderId = iprot.readI64();
5276
              setPurchaseOrderIdIsSet(true);
5277
            } else { 
5278
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5279
            }
5280
            break;
5281
          case 2: // INVOICE_NUMBER
5282
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5283
              this.invoiceNumber = iprot.readString();
5284
            } else { 
5285
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5286
            }
5287
            break;
5288
          case 3: // FREIGHT_CHARGES
5289
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5290
              this.freightCharges = iprot.readDouble();
5291
              setFreightChargesIsSet(true);
5292
            } else { 
5293
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5294
            }
5295
            break;
5296
          default:
5297
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5298
        }
5299
        iprot.readFieldEnd();
5300
      }
5301
      iprot.readStructEnd();
5302
      validate();
5303
    }
5304
 
5305
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5306
      validate();
5307
 
5308
      oprot.writeStructBegin(STRUCT_DESC);
5309
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5310
      oprot.writeI64(this.purchaseOrderId);
5311
      oprot.writeFieldEnd();
5312
      if (this.invoiceNumber != null) {
5313
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5314
        oprot.writeString(this.invoiceNumber);
5315
        oprot.writeFieldEnd();
5316
      }
5317
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5318
      oprot.writeDouble(this.freightCharges);
5319
      oprot.writeFieldEnd();
5320
      oprot.writeFieldStop();
5321
      oprot.writeStructEnd();
5322
    }
5323
 
5324
    @Override
5325
    public String toString() {
5326
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5327
      boolean first = true;
5328
 
5329
      sb.append("purchaseOrderId:");
5330
      sb.append(this.purchaseOrderId);
5331
      first = false;
5332
      if (!first) sb.append(", ");
5333
      sb.append("invoiceNumber:");
5334
      if (this.invoiceNumber == null) {
5335
        sb.append("null");
5336
      } else {
5337
        sb.append(this.invoiceNumber);
5338
      }
5339
      first = false;
5340
      if (!first) sb.append(", ");
5341
      sb.append("freightCharges:");
5342
      sb.append(this.freightCharges);
5343
      first = false;
5344
      sb.append(")");
5345
      return sb.toString();
5346
    }
5347
 
5348
    public void validate() throws org.apache.thrift.TException {
5349
      // check for required fields
5350
    }
5351
 
5352
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5353
      try {
5354
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5355
      } catch (org.apache.thrift.TException te) {
5356
        throw new java.io.IOException(te);
5357
      }
5358
    }
5359
 
5360
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5361
      try {
5362
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5363
      } catch (org.apache.thrift.TException te) {
5364
        throw new java.io.IOException(te);
5365
      }
5366
    }
5367
 
5368
  }
5369
 
5370
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5371
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5372
 
5373
    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);
5374
    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);
5375
 
5376
    private long success; // required
5377
    private PurchaseServiceException e; // required
5378
 
5379
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5380
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5381
      SUCCESS((short)0, "success"),
5382
      E((short)1, "e");
5383
 
5384
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5385
 
5386
      static {
5387
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5388
          byName.put(field.getFieldName(), field);
5389
        }
5390
      }
5391
 
5392
      /**
5393
       * Find the _Fields constant that matches fieldId, or null if its not found.
5394
       */
5395
      public static _Fields findByThriftId(int fieldId) {
5396
        switch(fieldId) {
5397
          case 0: // SUCCESS
5398
            return SUCCESS;
5399
          case 1: // E
5400
            return E;
5401
          default:
5402
            return null;
5403
        }
5404
      }
5405
 
5406
      /**
5407
       * Find the _Fields constant that matches fieldId, throwing an exception
5408
       * if it is not found.
5409
       */
5410
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5411
        _Fields fields = findByThriftId(fieldId);
5412
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5413
        return fields;
5414
      }
5415
 
5416
      /**
5417
       * Find the _Fields constant that matches name, or null if its not found.
5418
       */
5419
      public static _Fields findByName(String name) {
5420
        return byName.get(name);
5421
      }
5422
 
5423
      private final short _thriftId;
5424
      private final String _fieldName;
5425
 
5426
      _Fields(short thriftId, String fieldName) {
5427
        _thriftId = thriftId;
5428
        _fieldName = fieldName;
5429
      }
5430
 
5431
      public short getThriftFieldId() {
5432
        return _thriftId;
5433
      }
5434
 
5435
      public String getFieldName() {
5436
        return _fieldName;
5437
      }
5438
    }
5439
 
5440
    // isset id assignments
5441
    private static final int __SUCCESS_ISSET_ID = 0;
5442
    private BitSet __isset_bit_vector = new BitSet(1);
5443
 
5444
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5445
    static {
5446
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5447
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5448
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5449
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5450
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5451
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5452
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5453
    }
5454
 
5455
    public startPurchase_result() {
5456
    }
5457
 
5458
    public startPurchase_result(
5459
      long success,
5460
      PurchaseServiceException e)
5461
    {
5462
      this();
5463
      this.success = success;
5464
      setSuccessIsSet(true);
5465
      this.e = e;
5466
    }
5467
 
5468
    /**
5469
     * Performs a deep copy on <i>other</i>.
5470
     */
5471
    public startPurchase_result(startPurchase_result other) {
5472
      __isset_bit_vector.clear();
5473
      __isset_bit_vector.or(other.__isset_bit_vector);
5474
      this.success = other.success;
5475
      if (other.isSetE()) {
5476
        this.e = new PurchaseServiceException(other.e);
5477
      }
5478
    }
5479
 
5480
    public startPurchase_result deepCopy() {
5481
      return new startPurchase_result(this);
5482
    }
5483
 
5484
    @Override
5485
    public void clear() {
5486
      setSuccessIsSet(false);
5487
      this.success = 0;
5488
      this.e = null;
5489
    }
5490
 
5491
    public long getSuccess() {
5492
      return this.success;
5493
    }
5494
 
5495
    public void setSuccess(long success) {
5496
      this.success = success;
5497
      setSuccessIsSet(true);
5498
    }
5499
 
5500
    public void unsetSuccess() {
5501
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5502
    }
5503
 
5504
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5505
    public boolean isSetSuccess() {
5506
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5507
    }
5508
 
5509
    public void setSuccessIsSet(boolean value) {
5510
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5511
    }
5512
 
5513
    public PurchaseServiceException getE() {
5514
      return this.e;
5515
    }
5516
 
5517
    public void setE(PurchaseServiceException e) {
5518
      this.e = e;
5519
    }
5520
 
5521
    public void unsetE() {
5522
      this.e = null;
5523
    }
5524
 
5525
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5526
    public boolean isSetE() {
5527
      return this.e != null;
5528
    }
5529
 
5530
    public void setEIsSet(boolean value) {
5531
      if (!value) {
5532
        this.e = null;
5533
      }
5534
    }
5535
 
5536
    public void setFieldValue(_Fields field, Object value) {
5537
      switch (field) {
5538
      case SUCCESS:
5539
        if (value == null) {
5540
          unsetSuccess();
5541
        } else {
5542
          setSuccess((Long)value);
5543
        }
5544
        break;
5545
 
5546
      case E:
5547
        if (value == null) {
5548
          unsetE();
5549
        } else {
5550
          setE((PurchaseServiceException)value);
5551
        }
5552
        break;
5553
 
5554
      }
5555
    }
5556
 
5557
    public Object getFieldValue(_Fields field) {
5558
      switch (field) {
5559
      case SUCCESS:
5560
        return Long.valueOf(getSuccess());
5561
 
5562
      case E:
5563
        return getE();
5564
 
5565
      }
5566
      throw new IllegalStateException();
5567
    }
5568
 
5569
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5570
    public boolean isSet(_Fields field) {
5571
      if (field == null) {
5572
        throw new IllegalArgumentException();
5573
      }
5574
 
5575
      switch (field) {
5576
      case SUCCESS:
5577
        return isSetSuccess();
5578
      case E:
5579
        return isSetE();
5580
      }
5581
      throw new IllegalStateException();
5582
    }
5583
 
5584
    @Override
5585
    public boolean equals(Object that) {
5586
      if (that == null)
5587
        return false;
5588
      if (that instanceof startPurchase_result)
5589
        return this.equals((startPurchase_result)that);
5590
      return false;
5591
    }
5592
 
5593
    public boolean equals(startPurchase_result that) {
5594
      if (that == null)
5595
        return false;
5596
 
5597
      boolean this_present_success = true;
5598
      boolean that_present_success = true;
5599
      if (this_present_success || that_present_success) {
5600
        if (!(this_present_success && that_present_success))
5601
          return false;
5602
        if (this.success != that.success)
5603
          return false;
5604
      }
5605
 
5606
      boolean this_present_e = true && this.isSetE();
5607
      boolean that_present_e = true && that.isSetE();
5608
      if (this_present_e || that_present_e) {
5609
        if (!(this_present_e && that_present_e))
5610
          return false;
5611
        if (!this.e.equals(that.e))
5612
          return false;
5613
      }
5614
 
5615
      return true;
5616
    }
5617
 
5618
    @Override
5619
    public int hashCode() {
5620
      return 0;
5621
    }
5622
 
5623
    public int compareTo(startPurchase_result other) {
5624
      if (!getClass().equals(other.getClass())) {
5625
        return getClass().getName().compareTo(other.getClass().getName());
5626
      }
5627
 
5628
      int lastComparison = 0;
5629
      startPurchase_result typedOther = (startPurchase_result)other;
5630
 
5631
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5632
      if (lastComparison != 0) {
5633
        return lastComparison;
5634
      }
5635
      if (isSetSuccess()) {
5636
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5637
        if (lastComparison != 0) {
5638
          return lastComparison;
5639
        }
5640
      }
5641
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5642
      if (lastComparison != 0) {
5643
        return lastComparison;
5644
      }
5645
      if (isSetE()) {
5646
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5647
        if (lastComparison != 0) {
5648
          return lastComparison;
5649
        }
5650
      }
5651
      return 0;
5652
    }
5653
 
5654
    public _Fields fieldForId(int fieldId) {
5655
      return _Fields.findByThriftId(fieldId);
5656
    }
5657
 
5658
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5659
      org.apache.thrift.protocol.TField field;
5660
      iprot.readStructBegin();
5661
      while (true)
5662
      {
5663
        field = iprot.readFieldBegin();
5664
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5665
          break;
5666
        }
5667
        switch (field.id) {
5668
          case 0: // SUCCESS
5669
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5670
              this.success = iprot.readI64();
5671
              setSuccessIsSet(true);
5672
            } else { 
5673
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5674
            }
5675
            break;
5676
          case 1: // E
5677
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5678
              this.e = new PurchaseServiceException();
5679
              this.e.read(iprot);
5680
            } else { 
5681
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5682
            }
5683
            break;
5684
          default:
5685
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5686
        }
5687
        iprot.readFieldEnd();
5688
      }
5689
      iprot.readStructEnd();
5690
      validate();
5691
    }
5692
 
5693
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5694
      oprot.writeStructBegin(STRUCT_DESC);
5695
 
5696
      if (this.isSetSuccess()) {
5697
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5698
        oprot.writeI64(this.success);
5699
        oprot.writeFieldEnd();
5700
      } else if (this.isSetE()) {
5701
        oprot.writeFieldBegin(E_FIELD_DESC);
5702
        this.e.write(oprot);
5703
        oprot.writeFieldEnd();
5704
      }
5705
      oprot.writeFieldStop();
5706
      oprot.writeStructEnd();
5707
    }
5708
 
5709
    @Override
5710
    public String toString() {
5711
      StringBuilder sb = new StringBuilder("startPurchase_result(");
5712
      boolean first = true;
5713
 
5714
      sb.append("success:");
5715
      sb.append(this.success);
5716
      first = false;
5717
      if (!first) sb.append(", ");
5718
      sb.append("e:");
5719
      if (this.e == null) {
5720
        sb.append("null");
5721
      } else {
5722
        sb.append(this.e);
5723
      }
5724
      first = false;
5725
      sb.append(")");
5726
      return sb.toString();
5727
    }
5728
 
5729
    public void validate() throws org.apache.thrift.TException {
5730
      // check for required fields
5731
    }
5732
 
5733
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5734
      try {
5735
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5736
      } catch (org.apache.thrift.TException te) {
5737
        throw new java.io.IOException(te);
5738
      }
5739
    }
5740
 
5741
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5742
      try {
5743
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5744
      } catch (org.apache.thrift.TException te) {
5745
        throw new java.io.IOException(te);
5746
      }
5747
    }
5748
 
5749
  }
5750
 
5751
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
5752
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
5753
 
5754
    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);
5755
 
5756
    private long purchaseId; // required
5757
 
5758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5759
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5760
      PURCHASE_ID((short)1, "purchaseId");
5761
 
5762
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5763
 
5764
      static {
5765
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5766
          byName.put(field.getFieldName(), field);
5767
        }
5768
      }
5769
 
5770
      /**
5771
       * Find the _Fields constant that matches fieldId, or null if its not found.
5772
       */
5773
      public static _Fields findByThriftId(int fieldId) {
5774
        switch(fieldId) {
5775
          case 1: // PURCHASE_ID
5776
            return PURCHASE_ID;
5777
          default:
5778
            return null;
5779
        }
5780
      }
5781
 
5782
      /**
5783
       * Find the _Fields constant that matches fieldId, throwing an exception
5784
       * if it is not found.
5785
       */
5786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5787
        _Fields fields = findByThriftId(fieldId);
5788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5789
        return fields;
5790
      }
5791
 
5792
      /**
5793
       * Find the _Fields constant that matches name, or null if its not found.
5794
       */
5795
      public static _Fields findByName(String name) {
5796
        return byName.get(name);
5797
      }
5798
 
5799
      private final short _thriftId;
5800
      private final String _fieldName;
5801
 
5802
      _Fields(short thriftId, String fieldName) {
5803
        _thriftId = thriftId;
5804
        _fieldName = fieldName;
5805
      }
5806
 
5807
      public short getThriftFieldId() {
5808
        return _thriftId;
5809
      }
5810
 
5811
      public String getFieldName() {
5812
        return _fieldName;
5813
      }
5814
    }
5815
 
5816
    // isset id assignments
5817
    private static final int __PURCHASEID_ISSET_ID = 0;
5818
    private BitSet __isset_bit_vector = new BitSet(1);
5819
 
5820
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5821
    static {
5822
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5823
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5824
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5825
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5826
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
5827
    }
5828
 
5829
    public closePurchase_args() {
5830
    }
5831
 
5832
    public closePurchase_args(
5833
      long purchaseId)
5834
    {
5835
      this();
5836
      this.purchaseId = purchaseId;
5837
      setPurchaseIdIsSet(true);
5838
    }
5839
 
5840
    /**
5841
     * Performs a deep copy on <i>other</i>.
5842
     */
5843
    public closePurchase_args(closePurchase_args other) {
5844
      __isset_bit_vector.clear();
5845
      __isset_bit_vector.or(other.__isset_bit_vector);
5846
      this.purchaseId = other.purchaseId;
5847
    }
5848
 
5849
    public closePurchase_args deepCopy() {
5850
      return new closePurchase_args(this);
5851
    }
5852
 
5853
    @Override
5854
    public void clear() {
5855
      setPurchaseIdIsSet(false);
5856
      this.purchaseId = 0;
5857
    }
5858
 
5859
    public long getPurchaseId() {
5860
      return this.purchaseId;
5861
    }
5862
 
5863
    public void setPurchaseId(long purchaseId) {
5864
      this.purchaseId = purchaseId;
5865
      setPurchaseIdIsSet(true);
5866
    }
5867
 
5868
    public void unsetPurchaseId() {
5869
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
5870
    }
5871
 
5872
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
5873
    public boolean isSetPurchaseId() {
5874
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
5875
    }
5876
 
5877
    public void setPurchaseIdIsSet(boolean value) {
5878
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
5879
    }
5880
 
5881
    public void setFieldValue(_Fields field, Object value) {
5882
      switch (field) {
5883
      case PURCHASE_ID:
5884
        if (value == null) {
5885
          unsetPurchaseId();
5886
        } else {
5887
          setPurchaseId((Long)value);
5888
        }
5889
        break;
5890
 
5891
      }
5892
    }
5893
 
5894
    public Object getFieldValue(_Fields field) {
5895
      switch (field) {
5896
      case PURCHASE_ID:
5897
        return Long.valueOf(getPurchaseId());
5898
 
5899
      }
5900
      throw new IllegalStateException();
5901
    }
5902
 
5903
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5904
    public boolean isSet(_Fields field) {
5905
      if (field == null) {
5906
        throw new IllegalArgumentException();
5907
      }
5908
 
5909
      switch (field) {
5910
      case PURCHASE_ID:
5911
        return isSetPurchaseId();
5912
      }
5913
      throw new IllegalStateException();
5914
    }
5915
 
5916
    @Override
5917
    public boolean equals(Object that) {
5918
      if (that == null)
5919
        return false;
5920
      if (that instanceof closePurchase_args)
5921
        return this.equals((closePurchase_args)that);
5922
      return false;
5923
    }
5924
 
5925
    public boolean equals(closePurchase_args that) {
5926
      if (that == null)
5927
        return false;
5928
 
5929
      boolean this_present_purchaseId = true;
5930
      boolean that_present_purchaseId = true;
5931
      if (this_present_purchaseId || that_present_purchaseId) {
5932
        if (!(this_present_purchaseId && that_present_purchaseId))
5933
          return false;
5934
        if (this.purchaseId != that.purchaseId)
5935
          return false;
5936
      }
5937
 
5938
      return true;
5939
    }
5940
 
5941
    @Override
5942
    public int hashCode() {
5943
      return 0;
5944
    }
5945
 
5946
    public int compareTo(closePurchase_args other) {
5947
      if (!getClass().equals(other.getClass())) {
5948
        return getClass().getName().compareTo(other.getClass().getName());
5949
      }
5950
 
5951
      int lastComparison = 0;
5952
      closePurchase_args typedOther = (closePurchase_args)other;
5953
 
5954
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
5955
      if (lastComparison != 0) {
5956
        return lastComparison;
5957
      }
5958
      if (isSetPurchaseId()) {
5959
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
5960
        if (lastComparison != 0) {
5961
          return lastComparison;
5962
        }
5963
      }
5964
      return 0;
5965
    }
5966
 
5967
    public _Fields fieldForId(int fieldId) {
5968
      return _Fields.findByThriftId(fieldId);
5969
    }
5970
 
5971
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5972
      org.apache.thrift.protocol.TField field;
5973
      iprot.readStructBegin();
5974
      while (true)
5975
      {
5976
        field = iprot.readFieldBegin();
5977
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5978
          break;
5979
        }
5980
        switch (field.id) {
5981
          case 1: // PURCHASE_ID
5982
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5983
              this.purchaseId = iprot.readI64();
5984
              setPurchaseIdIsSet(true);
5985
            } else { 
5986
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5987
            }
5988
            break;
5989
          default:
5990
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5991
        }
5992
        iprot.readFieldEnd();
5993
      }
5994
      iprot.readStructEnd();
5995
      validate();
5996
    }
5997
 
5998
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5999
      validate();
6000
 
6001
      oprot.writeStructBegin(STRUCT_DESC);
6002
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6003
      oprot.writeI64(this.purchaseId);
6004
      oprot.writeFieldEnd();
6005
      oprot.writeFieldStop();
6006
      oprot.writeStructEnd();
6007
    }
6008
 
6009
    @Override
6010
    public String toString() {
6011
      StringBuilder sb = new StringBuilder("closePurchase_args(");
6012
      boolean first = true;
6013
 
6014
      sb.append("purchaseId:");
6015
      sb.append(this.purchaseId);
6016
      first = false;
6017
      sb.append(")");
6018
      return sb.toString();
6019
    }
6020
 
6021
    public void validate() throws org.apache.thrift.TException {
6022
      // check for required fields
6023
    }
6024
 
6025
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6026
      try {
6027
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6028
      } catch (org.apache.thrift.TException te) {
6029
        throw new java.io.IOException(te);
6030
      }
6031
    }
6032
 
6033
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6034
      try {
6035
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6036
      } catch (org.apache.thrift.TException te) {
6037
        throw new java.io.IOException(te);
6038
      }
6039
    }
6040
 
6041
  }
6042
 
6043
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
6044
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
6045
 
6046
    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);
6047
    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);
6048
 
6049
    private long success; // required
6050
    private PurchaseServiceException e; // required
6051
 
6052
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6053
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6054
      SUCCESS((short)0, "success"),
6055
      E((short)1, "e");
6056
 
6057
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6058
 
6059
      static {
6060
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6061
          byName.put(field.getFieldName(), field);
6062
        }
6063
      }
6064
 
6065
      /**
6066
       * Find the _Fields constant that matches fieldId, or null if its not found.
6067
       */
6068
      public static _Fields findByThriftId(int fieldId) {
6069
        switch(fieldId) {
6070
          case 0: // SUCCESS
6071
            return SUCCESS;
6072
          case 1: // E
6073
            return E;
6074
          default:
6075
            return null;
6076
        }
6077
      }
6078
 
6079
      /**
6080
       * Find the _Fields constant that matches fieldId, throwing an exception
6081
       * if it is not found.
6082
       */
6083
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6084
        _Fields fields = findByThriftId(fieldId);
6085
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6086
        return fields;
6087
      }
6088
 
6089
      /**
6090
       * Find the _Fields constant that matches name, or null if its not found.
6091
       */
6092
      public static _Fields findByName(String name) {
6093
        return byName.get(name);
6094
      }
6095
 
6096
      private final short _thriftId;
6097
      private final String _fieldName;
6098
 
6099
      _Fields(short thriftId, String fieldName) {
6100
        _thriftId = thriftId;
6101
        _fieldName = fieldName;
6102
      }
6103
 
6104
      public short getThriftFieldId() {
6105
        return _thriftId;
6106
      }
6107
 
6108
      public String getFieldName() {
6109
        return _fieldName;
6110
      }
6111
    }
6112
 
6113
    // isset id assignments
6114
    private static final int __SUCCESS_ISSET_ID = 0;
6115
    private BitSet __isset_bit_vector = new BitSet(1);
6116
 
6117
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6118
    static {
6119
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6120
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6121
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6122
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6123
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6124
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6125
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
6126
    }
6127
 
6128
    public closePurchase_result() {
6129
    }
6130
 
6131
    public closePurchase_result(
6132
      long success,
6133
      PurchaseServiceException e)
6134
    {
6135
      this();
6136
      this.success = success;
6137
      setSuccessIsSet(true);
6138
      this.e = e;
6139
    }
6140
 
6141
    /**
6142
     * Performs a deep copy on <i>other</i>.
6143
     */
6144
    public closePurchase_result(closePurchase_result other) {
6145
      __isset_bit_vector.clear();
6146
      __isset_bit_vector.or(other.__isset_bit_vector);
6147
      this.success = other.success;
6148
      if (other.isSetE()) {
6149
        this.e = new PurchaseServiceException(other.e);
6150
      }
6151
    }
6152
 
6153
    public closePurchase_result deepCopy() {
6154
      return new closePurchase_result(this);
6155
    }
6156
 
6157
    @Override
6158
    public void clear() {
6159
      setSuccessIsSet(false);
6160
      this.success = 0;
6161
      this.e = null;
6162
    }
6163
 
6164
    public long getSuccess() {
6165
      return this.success;
6166
    }
6167
 
6168
    public void setSuccess(long success) {
6169
      this.success = success;
6170
      setSuccessIsSet(true);
6171
    }
6172
 
6173
    public void unsetSuccess() {
6174
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6175
    }
6176
 
6177
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6178
    public boolean isSetSuccess() {
6179
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6180
    }
6181
 
6182
    public void setSuccessIsSet(boolean value) {
6183
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6184
    }
6185
 
6186
    public PurchaseServiceException getE() {
6187
      return this.e;
6188
    }
6189
 
6190
    public void setE(PurchaseServiceException e) {
6191
      this.e = e;
6192
    }
6193
 
6194
    public void unsetE() {
6195
      this.e = null;
6196
    }
6197
 
6198
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6199
    public boolean isSetE() {
6200
      return this.e != null;
6201
    }
6202
 
6203
    public void setEIsSet(boolean value) {
6204
      if (!value) {
6205
        this.e = null;
6206
      }
6207
    }
6208
 
6209
    public void setFieldValue(_Fields field, Object value) {
6210
      switch (field) {
6211
      case SUCCESS:
6212
        if (value == null) {
6213
          unsetSuccess();
6214
        } else {
6215
          setSuccess((Long)value);
6216
        }
6217
        break;
6218
 
6219
      case E:
6220
        if (value == null) {
6221
          unsetE();
6222
        } else {
6223
          setE((PurchaseServiceException)value);
6224
        }
6225
        break;
6226
 
6227
      }
6228
    }
6229
 
6230
    public Object getFieldValue(_Fields field) {
6231
      switch (field) {
6232
      case SUCCESS:
6233
        return Long.valueOf(getSuccess());
6234
 
6235
      case E:
6236
        return getE();
6237
 
6238
      }
6239
      throw new IllegalStateException();
6240
    }
6241
 
6242
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6243
    public boolean isSet(_Fields field) {
6244
      if (field == null) {
6245
        throw new IllegalArgumentException();
6246
      }
6247
 
6248
      switch (field) {
6249
      case SUCCESS:
6250
        return isSetSuccess();
6251
      case E:
6252
        return isSetE();
6253
      }
6254
      throw new IllegalStateException();
6255
    }
6256
 
6257
    @Override
6258
    public boolean equals(Object that) {
6259
      if (that == null)
6260
        return false;
6261
      if (that instanceof closePurchase_result)
6262
        return this.equals((closePurchase_result)that);
6263
      return false;
6264
    }
6265
 
6266
    public boolean equals(closePurchase_result that) {
6267
      if (that == null)
6268
        return false;
6269
 
6270
      boolean this_present_success = true;
6271
      boolean that_present_success = true;
6272
      if (this_present_success || that_present_success) {
6273
        if (!(this_present_success && that_present_success))
6274
          return false;
6275
        if (this.success != that.success)
6276
          return false;
6277
      }
6278
 
6279
      boolean this_present_e = true && this.isSetE();
6280
      boolean that_present_e = true && that.isSetE();
6281
      if (this_present_e || that_present_e) {
6282
        if (!(this_present_e && that_present_e))
6283
          return false;
6284
        if (!this.e.equals(that.e))
6285
          return false;
6286
      }
6287
 
6288
      return true;
6289
    }
6290
 
6291
    @Override
6292
    public int hashCode() {
6293
      return 0;
6294
    }
6295
 
6296
    public int compareTo(closePurchase_result other) {
6297
      if (!getClass().equals(other.getClass())) {
6298
        return getClass().getName().compareTo(other.getClass().getName());
6299
      }
6300
 
6301
      int lastComparison = 0;
6302
      closePurchase_result typedOther = (closePurchase_result)other;
6303
 
6304
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6305
      if (lastComparison != 0) {
6306
        return lastComparison;
6307
      }
6308
      if (isSetSuccess()) {
6309
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6310
        if (lastComparison != 0) {
6311
          return lastComparison;
6312
        }
6313
      }
6314
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6315
      if (lastComparison != 0) {
6316
        return lastComparison;
6317
      }
6318
      if (isSetE()) {
6319
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6320
        if (lastComparison != 0) {
6321
          return lastComparison;
6322
        }
6323
      }
6324
      return 0;
6325
    }
6326
 
6327
    public _Fields fieldForId(int fieldId) {
6328
      return _Fields.findByThriftId(fieldId);
6329
    }
6330
 
6331
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6332
      org.apache.thrift.protocol.TField field;
6333
      iprot.readStructBegin();
6334
      while (true)
6335
      {
6336
        field = iprot.readFieldBegin();
6337
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6338
          break;
6339
        }
6340
        switch (field.id) {
6341
          case 0: // SUCCESS
6342
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6343
              this.success = iprot.readI64();
6344
              setSuccessIsSet(true);
6345
            } else { 
6346
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6347
            }
6348
            break;
6349
          case 1: // E
6350
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6351
              this.e = new PurchaseServiceException();
6352
              this.e.read(iprot);
6353
            } else { 
6354
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6355
            }
6356
            break;
6357
          default:
6358
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6359
        }
6360
        iprot.readFieldEnd();
6361
      }
6362
      iprot.readStructEnd();
6363
      validate();
6364
    }
6365
 
6366
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6367
      oprot.writeStructBegin(STRUCT_DESC);
6368
 
6369
      if (this.isSetSuccess()) {
6370
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6371
        oprot.writeI64(this.success);
6372
        oprot.writeFieldEnd();
6373
      } else if (this.isSetE()) {
6374
        oprot.writeFieldBegin(E_FIELD_DESC);
6375
        this.e.write(oprot);
6376
        oprot.writeFieldEnd();
6377
      }
6378
      oprot.writeFieldStop();
6379
      oprot.writeStructEnd();
6380
    }
6381
 
6382
    @Override
6383
    public String toString() {
6384
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6385
      boolean first = true;
6386
 
6387
      sb.append("success:");
6388
      sb.append(this.success);
6389
      first = false;
6390
      if (!first) sb.append(", ");
6391
      sb.append("e:");
6392
      if (this.e == null) {
6393
        sb.append("null");
6394
      } else {
6395
        sb.append(this.e);
6396
      }
6397
      first = false;
6398
      sb.append(")");
6399
      return sb.toString();
6400
    }
6401
 
6402
    public void validate() throws org.apache.thrift.TException {
6403
      // check for required fields
6404
    }
6405
 
6406
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6407
      try {
6408
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6409
      } catch (org.apache.thrift.TException te) {
6410
        throw new java.io.IOException(te);
6411
      }
6412
    }
6413
 
6414
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6415
      try {
6416
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6417
      } catch (org.apache.thrift.TException te) {
6418
        throw new java.io.IOException(te);
6419
      }
6420
    }
6421
 
6422
  }
6423
 
6424
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6425
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6426
 
6427
    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);
6428
    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);
6429
 
6430
    private long purchaseOrderId; // required
6431
    private boolean open; // required
6432
 
6433
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6434
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6435
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6436
      OPEN((short)2, "open");
6437
 
6438
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6439
 
6440
      static {
6441
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6442
          byName.put(field.getFieldName(), field);
6443
        }
6444
      }
6445
 
6446
      /**
6447
       * Find the _Fields constant that matches fieldId, or null if its not found.
6448
       */
6449
      public static _Fields findByThriftId(int fieldId) {
6450
        switch(fieldId) {
6451
          case 1: // PURCHASE_ORDER_ID
6452
            return PURCHASE_ORDER_ID;
6453
          case 2: // OPEN
6454
            return OPEN;
6455
          default:
6456
            return null;
6457
        }
6458
      }
6459
 
6460
      /**
6461
       * Find the _Fields constant that matches fieldId, throwing an exception
6462
       * if it is not found.
6463
       */
6464
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6465
        _Fields fields = findByThriftId(fieldId);
6466
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6467
        return fields;
6468
      }
6469
 
6470
      /**
6471
       * Find the _Fields constant that matches name, or null if its not found.
6472
       */
6473
      public static _Fields findByName(String name) {
6474
        return byName.get(name);
6475
      }
6476
 
6477
      private final short _thriftId;
6478
      private final String _fieldName;
6479
 
6480
      _Fields(short thriftId, String fieldName) {
6481
        _thriftId = thriftId;
6482
        _fieldName = fieldName;
6483
      }
6484
 
6485
      public short getThriftFieldId() {
6486
        return _thriftId;
6487
      }
6488
 
6489
      public String getFieldName() {
6490
        return _fieldName;
6491
      }
6492
    }
6493
 
6494
    // isset id assignments
6495
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6496
    private static final int __OPEN_ISSET_ID = 1;
6497
    private BitSet __isset_bit_vector = new BitSet(2);
6498
 
6499
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6500
    static {
6501
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6502
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6503
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6504
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6505
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6506
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6507
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6508
    }
6509
 
6510
    public getAllPurchases_args() {
6511
    }
6512
 
6513
    public getAllPurchases_args(
6514
      long purchaseOrderId,
6515
      boolean open)
6516
    {
6517
      this();
6518
      this.purchaseOrderId = purchaseOrderId;
6519
      setPurchaseOrderIdIsSet(true);
6520
      this.open = open;
6521
      setOpenIsSet(true);
6522
    }
6523
 
6524
    /**
6525
     * Performs a deep copy on <i>other</i>.
6526
     */
6527
    public getAllPurchases_args(getAllPurchases_args other) {
6528
      __isset_bit_vector.clear();
6529
      __isset_bit_vector.or(other.__isset_bit_vector);
6530
      this.purchaseOrderId = other.purchaseOrderId;
6531
      this.open = other.open;
6532
    }
6533
 
6534
    public getAllPurchases_args deepCopy() {
6535
      return new getAllPurchases_args(this);
6536
    }
6537
 
6538
    @Override
6539
    public void clear() {
6540
      setPurchaseOrderIdIsSet(false);
6541
      this.purchaseOrderId = 0;
6542
      setOpenIsSet(false);
6543
      this.open = false;
6544
    }
6545
 
6546
    public long getPurchaseOrderId() {
6547
      return this.purchaseOrderId;
6548
    }
6549
 
6550
    public void setPurchaseOrderId(long purchaseOrderId) {
6551
      this.purchaseOrderId = purchaseOrderId;
6552
      setPurchaseOrderIdIsSet(true);
6553
    }
6554
 
6555
    public void unsetPurchaseOrderId() {
6556
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
6557
    }
6558
 
6559
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
6560
    public boolean isSetPurchaseOrderId() {
6561
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
6562
    }
6563
 
6564
    public void setPurchaseOrderIdIsSet(boolean value) {
6565
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
6566
    }
6567
 
6568
    public boolean isOpen() {
6569
      return this.open;
6570
    }
6571
 
6572
    public void setOpen(boolean open) {
6573
      this.open = open;
6574
      setOpenIsSet(true);
6575
    }
6576
 
6577
    public void unsetOpen() {
6578
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6579
    }
6580
 
6581
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6582
    public boolean isSetOpen() {
6583
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6584
    }
6585
 
6586
    public void setOpenIsSet(boolean value) {
6587
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6588
    }
6589
 
6590
    public void setFieldValue(_Fields field, Object value) {
6591
      switch (field) {
6592
      case PURCHASE_ORDER_ID:
6593
        if (value == null) {
6594
          unsetPurchaseOrderId();
6595
        } else {
6596
          setPurchaseOrderId((Long)value);
6597
        }
6598
        break;
6599
 
6600
      case OPEN:
6601
        if (value == null) {
6602
          unsetOpen();
6603
        } else {
6604
          setOpen((Boolean)value);
6605
        }
6606
        break;
6607
 
6608
      }
6609
    }
6610
 
6611
    public Object getFieldValue(_Fields field) {
6612
      switch (field) {
6613
      case PURCHASE_ORDER_ID:
6614
        return Long.valueOf(getPurchaseOrderId());
6615
 
6616
      case OPEN:
6617
        return Boolean.valueOf(isOpen());
6618
 
6619
      }
6620
      throw new IllegalStateException();
6621
    }
6622
 
6623
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6624
    public boolean isSet(_Fields field) {
6625
      if (field == null) {
6626
        throw new IllegalArgumentException();
6627
      }
6628
 
6629
      switch (field) {
6630
      case PURCHASE_ORDER_ID:
6631
        return isSetPurchaseOrderId();
6632
      case OPEN:
6633
        return isSetOpen();
6634
      }
6635
      throw new IllegalStateException();
6636
    }
6637
 
6638
    @Override
6639
    public boolean equals(Object that) {
6640
      if (that == null)
6641
        return false;
6642
      if (that instanceof getAllPurchases_args)
6643
        return this.equals((getAllPurchases_args)that);
6644
      return false;
6645
    }
6646
 
6647
    public boolean equals(getAllPurchases_args that) {
6648
      if (that == null)
6649
        return false;
6650
 
6651
      boolean this_present_purchaseOrderId = true;
6652
      boolean that_present_purchaseOrderId = true;
6653
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6654
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6655
          return false;
6656
        if (this.purchaseOrderId != that.purchaseOrderId)
6657
          return false;
6658
      }
6659
 
6660
      boolean this_present_open = true;
6661
      boolean that_present_open = true;
6662
      if (this_present_open || that_present_open) {
6663
        if (!(this_present_open && that_present_open))
6664
          return false;
6665
        if (this.open != that.open)
6666
          return false;
6667
      }
6668
 
6669
      return true;
6670
    }
6671
 
6672
    @Override
6673
    public int hashCode() {
6674
      return 0;
6675
    }
6676
 
6677
    public int compareTo(getAllPurchases_args other) {
6678
      if (!getClass().equals(other.getClass())) {
6679
        return getClass().getName().compareTo(other.getClass().getName());
6680
      }
6681
 
6682
      int lastComparison = 0;
6683
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
6684
 
6685
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6686
      if (lastComparison != 0) {
6687
        return lastComparison;
6688
      }
6689
      if (isSetPurchaseOrderId()) {
6690
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6691
        if (lastComparison != 0) {
6692
          return lastComparison;
6693
        }
6694
      }
6695
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
6696
      if (lastComparison != 0) {
6697
        return lastComparison;
6698
      }
6699
      if (isSetOpen()) {
6700
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
6701
        if (lastComparison != 0) {
6702
          return lastComparison;
6703
        }
6704
      }
6705
      return 0;
6706
    }
6707
 
6708
    public _Fields fieldForId(int fieldId) {
6709
      return _Fields.findByThriftId(fieldId);
6710
    }
6711
 
6712
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6713
      org.apache.thrift.protocol.TField field;
6714
      iprot.readStructBegin();
6715
      while (true)
6716
      {
6717
        field = iprot.readFieldBegin();
6718
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6719
          break;
6720
        }
6721
        switch (field.id) {
6722
          case 1: // PURCHASE_ORDER_ID
6723
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6724
              this.purchaseOrderId = iprot.readI64();
6725
              setPurchaseOrderIdIsSet(true);
6726
            } else { 
6727
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6728
            }
6729
            break;
6730
          case 2: // OPEN
6731
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
6732
              this.open = iprot.readBool();
6733
              setOpenIsSet(true);
6734
            } else { 
6735
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6736
            }
6737
            break;
6738
          default:
6739
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6740
        }
6741
        iprot.readFieldEnd();
6742
      }
6743
      iprot.readStructEnd();
6744
      validate();
6745
    }
6746
 
6747
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6748
      validate();
6749
 
6750
      oprot.writeStructBegin(STRUCT_DESC);
6751
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6752
      oprot.writeI64(this.purchaseOrderId);
6753
      oprot.writeFieldEnd();
6754
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
6755
      oprot.writeBool(this.open);
6756
      oprot.writeFieldEnd();
6757
      oprot.writeFieldStop();
6758
      oprot.writeStructEnd();
6759
    }
6760
 
6761
    @Override
6762
    public String toString() {
6763
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
6764
      boolean first = true;
6765
 
6766
      sb.append("purchaseOrderId:");
6767
      sb.append(this.purchaseOrderId);
6768
      first = false;
6769
      if (!first) sb.append(", ");
6770
      sb.append("open:");
6771
      sb.append(this.open);
6772
      first = false;
6773
      sb.append(")");
6774
      return sb.toString();
6775
    }
6776
 
6777
    public void validate() throws org.apache.thrift.TException {
6778
      // check for required fields
6779
    }
6780
 
6781
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6782
      try {
6783
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6784
      } catch (org.apache.thrift.TException te) {
6785
        throw new java.io.IOException(te);
6786
      }
6787
    }
6788
 
6789
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6790
      try {
6791
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6792
      } catch (org.apache.thrift.TException te) {
6793
        throw new java.io.IOException(te);
6794
      }
6795
    }
6796
 
6797
  }
6798
 
6799
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
6800
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
6801
 
6802
    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);
6803
    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);
6804
 
6805
    private List<Purchase> success; // required
6806
    private PurchaseServiceException e; // required
6807
 
6808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6809
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6810
      SUCCESS((short)0, "success"),
6811
      E((short)1, "e");
6812
 
6813
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6814
 
6815
      static {
6816
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6817
          byName.put(field.getFieldName(), field);
6818
        }
6819
      }
6820
 
6821
      /**
6822
       * Find the _Fields constant that matches fieldId, or null if its not found.
6823
       */
6824
      public static _Fields findByThriftId(int fieldId) {
6825
        switch(fieldId) {
6826
          case 0: // SUCCESS
6827
            return SUCCESS;
6828
          case 1: // E
6829
            return E;
6830
          default:
6831
            return null;
6832
        }
6833
      }
6834
 
6835
      /**
6836
       * Find the _Fields constant that matches fieldId, throwing an exception
6837
       * if it is not found.
6838
       */
6839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6840
        _Fields fields = findByThriftId(fieldId);
6841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6842
        return fields;
6843
      }
6844
 
6845
      /**
6846
       * Find the _Fields constant that matches name, or null if its not found.
6847
       */
6848
      public static _Fields findByName(String name) {
6849
        return byName.get(name);
6850
      }
6851
 
6852
      private final short _thriftId;
6853
      private final String _fieldName;
6854
 
6855
      _Fields(short thriftId, String fieldName) {
6856
        _thriftId = thriftId;
6857
        _fieldName = fieldName;
6858
      }
6859
 
6860
      public short getThriftFieldId() {
6861
        return _thriftId;
6862
      }
6863
 
6864
      public String getFieldName() {
6865
        return _fieldName;
6866
      }
6867
    }
6868
 
6869
    // isset id assignments
6870
 
6871
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6872
    static {
6873
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6874
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6875
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6876
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
6877
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6878
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6879
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6880
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
6881
    }
6882
 
6883
    public getAllPurchases_result() {
6884
    }
6885
 
6886
    public getAllPurchases_result(
6887
      List<Purchase> success,
6888
      PurchaseServiceException e)
6889
    {
6890
      this();
6891
      this.success = success;
6892
      this.e = e;
6893
    }
6894
 
6895
    /**
6896
     * Performs a deep copy on <i>other</i>.
6897
     */
6898
    public getAllPurchases_result(getAllPurchases_result other) {
6899
      if (other.isSetSuccess()) {
6900
        List<Purchase> __this__success = new ArrayList<Purchase>();
6901
        for (Purchase other_element : other.success) {
6902
          __this__success.add(new Purchase(other_element));
6903
        }
6904
        this.success = __this__success;
6905
      }
6906
      if (other.isSetE()) {
6907
        this.e = new PurchaseServiceException(other.e);
6908
      }
6909
    }
6910
 
6911
    public getAllPurchases_result deepCopy() {
6912
      return new getAllPurchases_result(this);
6913
    }
6914
 
6915
    @Override
6916
    public void clear() {
6917
      this.success = null;
6918
      this.e = null;
6919
    }
6920
 
6921
    public int getSuccessSize() {
6922
      return (this.success == null) ? 0 : this.success.size();
6923
    }
6924
 
6925
    public java.util.Iterator<Purchase> getSuccessIterator() {
6926
      return (this.success == null) ? null : this.success.iterator();
6927
    }
6928
 
6929
    public void addToSuccess(Purchase elem) {
6930
      if (this.success == null) {
6931
        this.success = new ArrayList<Purchase>();
6932
      }
6933
      this.success.add(elem);
6934
    }
6935
 
6936
    public List<Purchase> getSuccess() {
6937
      return this.success;
6938
    }
6939
 
6940
    public void setSuccess(List<Purchase> success) {
6941
      this.success = success;
6942
    }
6943
 
6944
    public void unsetSuccess() {
6945
      this.success = null;
6946
    }
6947
 
6948
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6949
    public boolean isSetSuccess() {
6950
      return this.success != null;
6951
    }
6952
 
6953
    public void setSuccessIsSet(boolean value) {
6954
      if (!value) {
6955
        this.success = null;
6956
      }
6957
    }
6958
 
6959
    public PurchaseServiceException getE() {
6960
      return this.e;
6961
    }
6962
 
6963
    public void setE(PurchaseServiceException e) {
6964
      this.e = e;
6965
    }
6966
 
6967
    public void unsetE() {
6968
      this.e = null;
6969
    }
6970
 
6971
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6972
    public boolean isSetE() {
6973
      return this.e != null;
6974
    }
6975
 
6976
    public void setEIsSet(boolean value) {
6977
      if (!value) {
6978
        this.e = null;
6979
      }
6980
    }
6981
 
6982
    public void setFieldValue(_Fields field, Object value) {
6983
      switch (field) {
6984
      case SUCCESS:
6985
        if (value == null) {
6986
          unsetSuccess();
6987
        } else {
6988
          setSuccess((List<Purchase>)value);
6989
        }
6990
        break;
6991
 
6992
      case E:
6993
        if (value == null) {
6994
          unsetE();
6995
        } else {
6996
          setE((PurchaseServiceException)value);
6997
        }
6998
        break;
6999
 
7000
      }
7001
    }
7002
 
7003
    public Object getFieldValue(_Fields field) {
7004
      switch (field) {
7005
      case SUCCESS:
7006
        return getSuccess();
7007
 
7008
      case E:
7009
        return getE();
7010
 
7011
      }
7012
      throw new IllegalStateException();
7013
    }
7014
 
7015
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7016
    public boolean isSet(_Fields field) {
7017
      if (field == null) {
7018
        throw new IllegalArgumentException();
7019
      }
7020
 
7021
      switch (field) {
7022
      case SUCCESS:
7023
        return isSetSuccess();
7024
      case E:
7025
        return isSetE();
7026
      }
7027
      throw new IllegalStateException();
7028
    }
7029
 
7030
    @Override
7031
    public boolean equals(Object that) {
7032
      if (that == null)
7033
        return false;
7034
      if (that instanceof getAllPurchases_result)
7035
        return this.equals((getAllPurchases_result)that);
7036
      return false;
7037
    }
7038
 
7039
    public boolean equals(getAllPurchases_result that) {
7040
      if (that == null)
7041
        return false;
7042
 
7043
      boolean this_present_success = true && this.isSetSuccess();
7044
      boolean that_present_success = true && that.isSetSuccess();
7045
      if (this_present_success || that_present_success) {
7046
        if (!(this_present_success && that_present_success))
7047
          return false;
7048
        if (!this.success.equals(that.success))
7049
          return false;
7050
      }
7051
 
7052
      boolean this_present_e = true && this.isSetE();
7053
      boolean that_present_e = true && that.isSetE();
7054
      if (this_present_e || that_present_e) {
7055
        if (!(this_present_e && that_present_e))
7056
          return false;
7057
        if (!this.e.equals(that.e))
7058
          return false;
7059
      }
7060
 
7061
      return true;
7062
    }
7063
 
7064
    @Override
7065
    public int hashCode() {
7066
      return 0;
7067
    }
7068
 
7069
    public int compareTo(getAllPurchases_result other) {
7070
      if (!getClass().equals(other.getClass())) {
7071
        return getClass().getName().compareTo(other.getClass().getName());
7072
      }
7073
 
7074
      int lastComparison = 0;
7075
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
7076
 
7077
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7078
      if (lastComparison != 0) {
7079
        return lastComparison;
7080
      }
7081
      if (isSetSuccess()) {
7082
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7083
        if (lastComparison != 0) {
7084
          return lastComparison;
7085
        }
7086
      }
7087
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7088
      if (lastComparison != 0) {
7089
        return lastComparison;
7090
      }
7091
      if (isSetE()) {
7092
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7093
        if (lastComparison != 0) {
7094
          return lastComparison;
7095
        }
7096
      }
7097
      return 0;
7098
    }
7099
 
7100
    public _Fields fieldForId(int fieldId) {
7101
      return _Fields.findByThriftId(fieldId);
7102
    }
7103
 
7104
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7105
      org.apache.thrift.protocol.TField field;
7106
      iprot.readStructBegin();
7107
      while (true)
7108
      {
7109
        field = iprot.readFieldBegin();
7110
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7111
          break;
7112
        }
7113
        switch (field.id) {
7114
          case 0: // SUCCESS
7115
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7116
              {
7117
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
7118
                this.success = new ArrayList<Purchase>(_list8.size);
7119
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7120
                {
7121
                  Purchase _elem10; // required
7122
                  _elem10 = new Purchase();
7123
                  _elem10.read(iprot);
7124
                  this.success.add(_elem10);
7125
                }
7126
                iprot.readListEnd();
7127
              }
7128
            } else { 
7129
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7130
            }
7131
            break;
7132
          case 1: // E
7133
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7134
              this.e = new PurchaseServiceException();
7135
              this.e.read(iprot);
7136
            } else { 
7137
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7138
            }
7139
            break;
7140
          default:
7141
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7142
        }
7143
        iprot.readFieldEnd();
7144
      }
7145
      iprot.readStructEnd();
7146
      validate();
7147
    }
7148
 
7149
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7150
      oprot.writeStructBegin(STRUCT_DESC);
7151
 
7152
      if (this.isSetSuccess()) {
7153
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7154
        {
7155
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7156
          for (Purchase _iter11 : this.success)
7157
          {
7158
            _iter11.write(oprot);
7159
          }
7160
          oprot.writeListEnd();
7161
        }
7162
        oprot.writeFieldEnd();
7163
      } else if (this.isSetE()) {
7164
        oprot.writeFieldBegin(E_FIELD_DESC);
7165
        this.e.write(oprot);
7166
        oprot.writeFieldEnd();
7167
      }
7168
      oprot.writeFieldStop();
7169
      oprot.writeStructEnd();
7170
    }
7171
 
7172
    @Override
7173
    public String toString() {
7174
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7175
      boolean first = true;
7176
 
7177
      sb.append("success:");
7178
      if (this.success == null) {
7179
        sb.append("null");
7180
      } else {
7181
        sb.append(this.success);
7182
      }
7183
      first = false;
7184
      if (!first) sb.append(", ");
7185
      sb.append("e:");
7186
      if (this.e == null) {
7187
        sb.append("null");
7188
      } else {
7189
        sb.append(this.e);
7190
      }
7191
      first = false;
7192
      sb.append(")");
7193
      return sb.toString();
7194
    }
7195
 
7196
    public void validate() throws org.apache.thrift.TException {
7197
      // check for required fields
7198
    }
7199
 
7200
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7201
      try {
7202
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7203
      } catch (org.apache.thrift.TException te) {
7204
        throw new java.io.IOException(te);
7205
      }
7206
    }
7207
 
7208
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7209
      try {
7210
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7211
      } catch (org.apache.thrift.TException te) {
7212
        throw new java.io.IOException(te);
7213
      }
7214
    }
7215
 
7216
  }
7217
 
6385 amar.kumar 7218
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7219
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7220
 
7221
    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);
7222
 
7223
    private long purchaseOrderId; // required
7224
 
7225
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7226
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7227
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7228
 
7229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7230
 
7231
      static {
7232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7233
          byName.put(field.getFieldName(), field);
7234
        }
7235
      }
7236
 
7237
      /**
7238
       * Find the _Fields constant that matches fieldId, or null if its not found.
7239
       */
7240
      public static _Fields findByThriftId(int fieldId) {
7241
        switch(fieldId) {
7242
          case 1: // PURCHASE_ORDER_ID
7243
            return PURCHASE_ORDER_ID;
7244
          default:
7245
            return null;
7246
        }
7247
      }
7248
 
7249
      /**
7250
       * Find the _Fields constant that matches fieldId, throwing an exception
7251
       * if it is not found.
7252
       */
7253
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7254
        _Fields fields = findByThriftId(fieldId);
7255
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7256
        return fields;
7257
      }
7258
 
7259
      /**
7260
       * Find the _Fields constant that matches name, or null if its not found.
7261
       */
7262
      public static _Fields findByName(String name) {
7263
        return byName.get(name);
7264
      }
7265
 
7266
      private final short _thriftId;
7267
      private final String _fieldName;
7268
 
7269
      _Fields(short thriftId, String fieldName) {
7270
        _thriftId = thriftId;
7271
        _fieldName = fieldName;
7272
      }
7273
 
7274
      public short getThriftFieldId() {
7275
        return _thriftId;
7276
      }
7277
 
7278
      public String getFieldName() {
7279
        return _fieldName;
7280
      }
7281
    }
7282
 
7283
    // isset id assignments
7284
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7285
    private BitSet __isset_bit_vector = new BitSet(1);
7286
 
7287
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7288
    static {
7289
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7290
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7291
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7292
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7293
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7294
    }
7295
 
7296
    public getPurchasesForPO_args() {
7297
    }
7298
 
7299
    public getPurchasesForPO_args(
7300
      long purchaseOrderId)
7301
    {
7302
      this();
7303
      this.purchaseOrderId = purchaseOrderId;
7304
      setPurchaseOrderIdIsSet(true);
7305
    }
7306
 
7307
    /**
7308
     * Performs a deep copy on <i>other</i>.
7309
     */
7310
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7311
      __isset_bit_vector.clear();
7312
      __isset_bit_vector.or(other.__isset_bit_vector);
7313
      this.purchaseOrderId = other.purchaseOrderId;
7314
    }
7315
 
7316
    public getPurchasesForPO_args deepCopy() {
7317
      return new getPurchasesForPO_args(this);
7318
    }
7319
 
7320
    @Override
7321
    public void clear() {
7322
      setPurchaseOrderIdIsSet(false);
7323
      this.purchaseOrderId = 0;
7324
    }
7325
 
7326
    public long getPurchaseOrderId() {
7327
      return this.purchaseOrderId;
7328
    }
7329
 
7330
    public void setPurchaseOrderId(long purchaseOrderId) {
7331
      this.purchaseOrderId = purchaseOrderId;
7332
      setPurchaseOrderIdIsSet(true);
7333
    }
7334
 
7335
    public void unsetPurchaseOrderId() {
7336
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7337
    }
7338
 
7339
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7340
    public boolean isSetPurchaseOrderId() {
7341
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7342
    }
7343
 
7344
    public void setPurchaseOrderIdIsSet(boolean value) {
7345
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7346
    }
7347
 
7348
    public void setFieldValue(_Fields field, Object value) {
7349
      switch (field) {
7350
      case PURCHASE_ORDER_ID:
7351
        if (value == null) {
7352
          unsetPurchaseOrderId();
7353
        } else {
7354
          setPurchaseOrderId((Long)value);
7355
        }
7356
        break;
7357
 
7358
      }
7359
    }
7360
 
7361
    public Object getFieldValue(_Fields field) {
7362
      switch (field) {
7363
      case PURCHASE_ORDER_ID:
7364
        return Long.valueOf(getPurchaseOrderId());
7365
 
7366
      }
7367
      throw new IllegalStateException();
7368
    }
7369
 
7370
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7371
    public boolean isSet(_Fields field) {
7372
      if (field == null) {
7373
        throw new IllegalArgumentException();
7374
      }
7375
 
7376
      switch (field) {
7377
      case PURCHASE_ORDER_ID:
7378
        return isSetPurchaseOrderId();
7379
      }
7380
      throw new IllegalStateException();
7381
    }
7382
 
7383
    @Override
7384
    public boolean equals(Object that) {
7385
      if (that == null)
7386
        return false;
7387
      if (that instanceof getPurchasesForPO_args)
7388
        return this.equals((getPurchasesForPO_args)that);
7389
      return false;
7390
    }
7391
 
7392
    public boolean equals(getPurchasesForPO_args that) {
7393
      if (that == null)
7394
        return false;
7395
 
7396
      boolean this_present_purchaseOrderId = true;
7397
      boolean that_present_purchaseOrderId = true;
7398
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7399
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7400
          return false;
7401
        if (this.purchaseOrderId != that.purchaseOrderId)
7402
          return false;
7403
      }
7404
 
7405
      return true;
7406
    }
7407
 
7408
    @Override
7409
    public int hashCode() {
7410
      return 0;
7411
    }
7412
 
7413
    public int compareTo(getPurchasesForPO_args other) {
7414
      if (!getClass().equals(other.getClass())) {
7415
        return getClass().getName().compareTo(other.getClass().getName());
7416
      }
7417
 
7418
      int lastComparison = 0;
7419
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7420
 
7421
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7422
      if (lastComparison != 0) {
7423
        return lastComparison;
7424
      }
7425
      if (isSetPurchaseOrderId()) {
7426
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7427
        if (lastComparison != 0) {
7428
          return lastComparison;
7429
        }
7430
      }
7431
      return 0;
7432
    }
7433
 
7434
    public _Fields fieldForId(int fieldId) {
7435
      return _Fields.findByThriftId(fieldId);
7436
    }
7437
 
7438
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7439
      org.apache.thrift.protocol.TField field;
7440
      iprot.readStructBegin();
7441
      while (true)
7442
      {
7443
        field = iprot.readFieldBegin();
7444
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7445
          break;
7446
        }
7447
        switch (field.id) {
7448
          case 1: // PURCHASE_ORDER_ID
7449
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7450
              this.purchaseOrderId = iprot.readI64();
7451
              setPurchaseOrderIdIsSet(true);
7452
            } else { 
7453
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7454
            }
7455
            break;
7456
          default:
7457
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7458
        }
7459
        iprot.readFieldEnd();
7460
      }
7461
      iprot.readStructEnd();
7462
      validate();
7463
    }
7464
 
7465
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7466
      validate();
7467
 
7468
      oprot.writeStructBegin(STRUCT_DESC);
7469
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7470
      oprot.writeI64(this.purchaseOrderId);
7471
      oprot.writeFieldEnd();
7472
      oprot.writeFieldStop();
7473
      oprot.writeStructEnd();
7474
    }
7475
 
7476
    @Override
7477
    public String toString() {
7478
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7479
      boolean first = true;
7480
 
7481
      sb.append("purchaseOrderId:");
7482
      sb.append(this.purchaseOrderId);
7483
      first = false;
7484
      sb.append(")");
7485
      return sb.toString();
7486
    }
7487
 
7488
    public void validate() throws org.apache.thrift.TException {
7489
      // check for required fields
7490
    }
7491
 
7492
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7493
      try {
7494
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7495
      } catch (org.apache.thrift.TException te) {
7496
        throw new java.io.IOException(te);
7497
      }
7498
    }
7499
 
7500
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7501
      try {
7502
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7503
        __isset_bit_vector = new BitSet(1);
7504
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7505
      } catch (org.apache.thrift.TException te) {
7506
        throw new java.io.IOException(te);
7507
      }
7508
    }
7509
 
7510
  }
7511
 
7512
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7513
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7514
 
7515
    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);
7516
    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);
7517
 
7518
    private List<Purchase> success; // required
7519
    private PurchaseServiceException e; // required
7520
 
7521
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7522
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7523
      SUCCESS((short)0, "success"),
7524
      E((short)1, "e");
7525
 
7526
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7527
 
7528
      static {
7529
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7530
          byName.put(field.getFieldName(), field);
7531
        }
7532
      }
7533
 
7534
      /**
7535
       * Find the _Fields constant that matches fieldId, or null if its not found.
7536
       */
7537
      public static _Fields findByThriftId(int fieldId) {
7538
        switch(fieldId) {
7539
          case 0: // SUCCESS
7540
            return SUCCESS;
7541
          case 1: // E
7542
            return E;
7543
          default:
7544
            return null;
7545
        }
7546
      }
7547
 
7548
      /**
7549
       * Find the _Fields constant that matches fieldId, throwing an exception
7550
       * if it is not found.
7551
       */
7552
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7553
        _Fields fields = findByThriftId(fieldId);
7554
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7555
        return fields;
7556
      }
7557
 
7558
      /**
7559
       * Find the _Fields constant that matches name, or null if its not found.
7560
       */
7561
      public static _Fields findByName(String name) {
7562
        return byName.get(name);
7563
      }
7564
 
7565
      private final short _thriftId;
7566
      private final String _fieldName;
7567
 
7568
      _Fields(short thriftId, String fieldName) {
7569
        _thriftId = thriftId;
7570
        _fieldName = fieldName;
7571
      }
7572
 
7573
      public short getThriftFieldId() {
7574
        return _thriftId;
7575
      }
7576
 
7577
      public String getFieldName() {
7578
        return _fieldName;
7579
      }
7580
    }
7581
 
7582
    // isset id assignments
7583
 
7584
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7585
    static {
7586
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7587
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7588
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7589
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7590
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7591
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7592
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7593
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
7594
    }
7595
 
7596
    public getPurchasesForPO_result() {
7597
    }
7598
 
7599
    public getPurchasesForPO_result(
7600
      List<Purchase> success,
7601
      PurchaseServiceException e)
7602
    {
7603
      this();
7604
      this.success = success;
7605
      this.e = e;
7606
    }
7607
 
7608
    /**
7609
     * Performs a deep copy on <i>other</i>.
7610
     */
7611
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
7612
      if (other.isSetSuccess()) {
7613
        List<Purchase> __this__success = new ArrayList<Purchase>();
7614
        for (Purchase other_element : other.success) {
7615
          __this__success.add(new Purchase(other_element));
7616
        }
7617
        this.success = __this__success;
7618
      }
7619
      if (other.isSetE()) {
7620
        this.e = new PurchaseServiceException(other.e);
7621
      }
7622
    }
7623
 
7624
    public getPurchasesForPO_result deepCopy() {
7625
      return new getPurchasesForPO_result(this);
7626
    }
7627
 
7628
    @Override
7629
    public void clear() {
7630
      this.success = null;
7631
      this.e = null;
7632
    }
7633
 
7634
    public int getSuccessSize() {
7635
      return (this.success == null) ? 0 : this.success.size();
7636
    }
7637
 
7638
    public java.util.Iterator<Purchase> getSuccessIterator() {
7639
      return (this.success == null) ? null : this.success.iterator();
7640
    }
7641
 
7642
    public void addToSuccess(Purchase elem) {
7643
      if (this.success == null) {
7644
        this.success = new ArrayList<Purchase>();
7645
      }
7646
      this.success.add(elem);
7647
    }
7648
 
7649
    public List<Purchase> getSuccess() {
7650
      return this.success;
7651
    }
7652
 
7653
    public void setSuccess(List<Purchase> success) {
7654
      this.success = success;
7655
    }
7656
 
7657
    public void unsetSuccess() {
7658
      this.success = null;
7659
    }
7660
 
7661
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7662
    public boolean isSetSuccess() {
7663
      return this.success != null;
7664
    }
7665
 
7666
    public void setSuccessIsSet(boolean value) {
7667
      if (!value) {
7668
        this.success = null;
7669
      }
7670
    }
7671
 
7672
    public PurchaseServiceException getE() {
7673
      return this.e;
7674
    }
7675
 
7676
    public void setE(PurchaseServiceException e) {
7677
      this.e = e;
7678
    }
7679
 
7680
    public void unsetE() {
7681
      this.e = null;
7682
    }
7683
 
7684
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7685
    public boolean isSetE() {
7686
      return this.e != null;
7687
    }
7688
 
7689
    public void setEIsSet(boolean value) {
7690
      if (!value) {
7691
        this.e = null;
7692
      }
7693
    }
7694
 
7695
    public void setFieldValue(_Fields field, Object value) {
7696
      switch (field) {
7697
      case SUCCESS:
7698
        if (value == null) {
7699
          unsetSuccess();
7700
        } else {
7701
          setSuccess((List<Purchase>)value);
7702
        }
7703
        break;
7704
 
7705
      case E:
7706
        if (value == null) {
7707
          unsetE();
7708
        } else {
7709
          setE((PurchaseServiceException)value);
7710
        }
7711
        break;
7712
 
7713
      }
7714
    }
7715
 
7716
    public Object getFieldValue(_Fields field) {
7717
      switch (field) {
7718
      case SUCCESS:
7719
        return getSuccess();
7720
 
7721
      case E:
7722
        return getE();
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 SUCCESS:
7736
        return isSetSuccess();
7737
      case E:
7738
        return isSetE();
7739
      }
7740
      throw new IllegalStateException();
7741
    }
7742
 
7743
    @Override
7744
    public boolean equals(Object that) {
7745
      if (that == null)
7746
        return false;
7747
      if (that instanceof getPurchasesForPO_result)
7748
        return this.equals((getPurchasesForPO_result)that);
7749
      return false;
7750
    }
7751
 
7752
    public boolean equals(getPurchasesForPO_result that) {
7753
      if (that == null)
7754
        return false;
7755
 
7756
      boolean this_present_success = true && this.isSetSuccess();
7757
      boolean that_present_success = true && that.isSetSuccess();
7758
      if (this_present_success || that_present_success) {
7759
        if (!(this_present_success && that_present_success))
7760
          return false;
7761
        if (!this.success.equals(that.success))
7762
          return false;
7763
      }
7764
 
7765
      boolean this_present_e = true && this.isSetE();
7766
      boolean that_present_e = true && that.isSetE();
7767
      if (this_present_e || that_present_e) {
7768
        if (!(this_present_e && that_present_e))
7769
          return false;
7770
        if (!this.e.equals(that.e))
7771
          return false;
7772
      }
7773
 
7774
      return true;
7775
    }
7776
 
7777
    @Override
7778
    public int hashCode() {
7779
      return 0;
7780
    }
7781
 
7782
    public int compareTo(getPurchasesForPO_result other) {
7783
      if (!getClass().equals(other.getClass())) {
7784
        return getClass().getName().compareTo(other.getClass().getName());
7785
      }
7786
 
7787
      int lastComparison = 0;
7788
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
7789
 
7790
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7791
      if (lastComparison != 0) {
7792
        return lastComparison;
7793
      }
7794
      if (isSetSuccess()) {
7795
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7796
        if (lastComparison != 0) {
7797
          return lastComparison;
7798
        }
7799
      }
7800
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7801
      if (lastComparison != 0) {
7802
        return lastComparison;
7803
      }
7804
      if (isSetE()) {
7805
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7806
        if (lastComparison != 0) {
7807
          return lastComparison;
7808
        }
7809
      }
7810
      return 0;
7811
    }
7812
 
7813
    public _Fields fieldForId(int fieldId) {
7814
      return _Fields.findByThriftId(fieldId);
7815
    }
7816
 
7817
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7818
      org.apache.thrift.protocol.TField field;
7819
      iprot.readStructBegin();
7820
      while (true)
7821
      {
7822
        field = iprot.readFieldBegin();
7823
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7824
          break;
7825
        }
7826
        switch (field.id) {
7827
          case 0: // SUCCESS
7828
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7829
              {
7830
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
7831
                this.success = new ArrayList<Purchase>(_list12.size);
7832
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
7833
                {
7834
                  Purchase _elem14; // required
7835
                  _elem14 = new Purchase();
7836
                  _elem14.read(iprot);
7837
                  this.success.add(_elem14);
7838
                }
7839
                iprot.readListEnd();
7840
              }
7841
            } else { 
7842
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7843
            }
7844
            break;
7845
          case 1: // E
7846
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7847
              this.e = new PurchaseServiceException();
7848
              this.e.read(iprot);
7849
            } else { 
7850
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7851
            }
7852
            break;
7853
          default:
7854
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7855
        }
7856
        iprot.readFieldEnd();
7857
      }
7858
      iprot.readStructEnd();
7859
      validate();
7860
    }
7861
 
7862
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7863
      oprot.writeStructBegin(STRUCT_DESC);
7864
 
7865
      if (this.isSetSuccess()) {
7866
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7867
        {
7868
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7869
          for (Purchase _iter15 : this.success)
7870
          {
7871
            _iter15.write(oprot);
7872
          }
7873
          oprot.writeListEnd();
7874
        }
7875
        oprot.writeFieldEnd();
7876
      } else if (this.isSetE()) {
7877
        oprot.writeFieldBegin(E_FIELD_DESC);
7878
        this.e.write(oprot);
7879
        oprot.writeFieldEnd();
7880
      }
7881
      oprot.writeFieldStop();
7882
      oprot.writeStructEnd();
7883
    }
7884
 
7885
    @Override
7886
    public String toString() {
7887
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
7888
      boolean first = true;
7889
 
7890
      sb.append("success:");
7891
      if (this.success == null) {
7892
        sb.append("null");
7893
      } else {
7894
        sb.append(this.success);
7895
      }
7896
      first = false;
7897
      if (!first) sb.append(", ");
7898
      sb.append("e:");
7899
      if (this.e == null) {
7900
        sb.append("null");
7901
      } else {
7902
        sb.append(this.e);
7903
      }
7904
      first = false;
7905
      sb.append(")");
7906
      return sb.toString();
7907
    }
7908
 
7909
    public void validate() throws org.apache.thrift.TException {
7910
      // check for required fields
7911
    }
7912
 
7913
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7914
      try {
7915
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7916
      } catch (org.apache.thrift.TException te) {
7917
        throw new java.io.IOException(te);
7918
      }
7919
    }
7920
 
7921
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7922
      try {
7923
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7924
      } catch (org.apache.thrift.TException te) {
7925
        throw new java.io.IOException(te);
7926
      }
7927
    }
7928
 
7929
  }
7930
 
4555 mandeep.dh 7931
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
7932
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 7933
 
7934
    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);
7935
 
7936
    private long purchaseId; // required
7937
 
7938
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7939
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 7940
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 7941
 
7942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7943
 
7944
      static {
7945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7946
          byName.put(field.getFieldName(), field);
7947
        }
7948
      }
7949
 
7950
      /**
7951
       * Find the _Fields constant that matches fieldId, or null if its not found.
7952
       */
7953
      public static _Fields findByThriftId(int fieldId) {
7954
        switch(fieldId) {
7955
          case 1: // PURCHASE_ID
7956
            return PURCHASE_ID;
7957
          default:
7958
            return null;
7959
        }
7960
      }
7961
 
7962
      /**
7963
       * Find the _Fields constant that matches fieldId, throwing an exception
7964
       * if it is not found.
7965
       */
7966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7967
        _Fields fields = findByThriftId(fieldId);
7968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7969
        return fields;
7970
      }
7971
 
7972
      /**
7973
       * Find the _Fields constant that matches name, or null if its not found.
7974
       */
7975
      public static _Fields findByName(String name) {
7976
        return byName.get(name);
7977
      }
7978
 
7979
      private final short _thriftId;
7980
      private final String _fieldName;
7981
 
7982
      _Fields(short thriftId, String fieldName) {
7983
        _thriftId = thriftId;
7984
        _fieldName = fieldName;
7985
      }
7986
 
7987
      public short getThriftFieldId() {
7988
        return _thriftId;
7989
      }
7990
 
7991
      public String getFieldName() {
7992
        return _fieldName;
7993
      }
7994
    }
7995
 
7996
    // isset id assignments
7997
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 7998
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 7999
 
8000
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8001
    static {
8002
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8003
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8004
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8005
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8006
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 8007
    }
8008
 
4555 mandeep.dh 8009
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 8010
    }
8011
 
4555 mandeep.dh 8012
    public getPurchaseOrderForPurchase_args(
8013
      long purchaseId)
4496 mandeep.dh 8014
    {
8015
      this();
8016
      this.purchaseId = purchaseId;
8017
      setPurchaseIdIsSet(true);
8018
    }
8019
 
8020
    /**
8021
     * Performs a deep copy on <i>other</i>.
8022
     */
4555 mandeep.dh 8023
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8024
      __isset_bit_vector.clear();
8025
      __isset_bit_vector.or(other.__isset_bit_vector);
8026
      this.purchaseId = other.purchaseId;
8027
    }
8028
 
4555 mandeep.dh 8029
    public getPurchaseOrderForPurchase_args deepCopy() {
8030
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 8031
    }
8032
 
8033
    @Override
8034
    public void clear() {
8035
      setPurchaseIdIsSet(false);
8036
      this.purchaseId = 0;
8037
    }
8038
 
8039
    public long getPurchaseId() {
8040
      return this.purchaseId;
8041
    }
8042
 
8043
    public void setPurchaseId(long purchaseId) {
8044
      this.purchaseId = purchaseId;
8045
      setPurchaseIdIsSet(true);
8046
    }
8047
 
8048
    public void unsetPurchaseId() {
8049
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
8050
    }
8051
 
8052
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
8053
    public boolean isSetPurchaseId() {
8054
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
8055
    }
8056
 
8057
    public void setPurchaseIdIsSet(boolean value) {
8058
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
8059
    }
8060
 
8061
    public void setFieldValue(_Fields field, Object value) {
8062
      switch (field) {
8063
      case PURCHASE_ID:
8064
        if (value == null) {
8065
          unsetPurchaseId();
8066
        } else {
8067
          setPurchaseId((Long)value);
8068
        }
8069
        break;
8070
 
8071
      }
8072
    }
8073
 
8074
    public Object getFieldValue(_Fields field) {
8075
      switch (field) {
8076
      case PURCHASE_ID:
8077
        return Long.valueOf(getPurchaseId());
8078
 
8079
      }
8080
      throw new IllegalStateException();
8081
    }
8082
 
8083
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8084
    public boolean isSet(_Fields field) {
8085
      if (field == null) {
8086
        throw new IllegalArgumentException();
8087
      }
8088
 
8089
      switch (field) {
8090
      case PURCHASE_ID:
8091
        return isSetPurchaseId();
8092
      }
8093
      throw new IllegalStateException();
8094
    }
8095
 
8096
    @Override
8097
    public boolean equals(Object that) {
8098
      if (that == null)
8099
        return false;
4555 mandeep.dh 8100
      if (that instanceof getPurchaseOrderForPurchase_args)
8101
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 8102
      return false;
8103
    }
8104
 
4555 mandeep.dh 8105
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 8106
      if (that == null)
8107
        return false;
8108
 
8109
      boolean this_present_purchaseId = true;
8110
      boolean that_present_purchaseId = true;
8111
      if (this_present_purchaseId || that_present_purchaseId) {
8112
        if (!(this_present_purchaseId && that_present_purchaseId))
8113
          return false;
8114
        if (this.purchaseId != that.purchaseId)
8115
          return false;
8116
      }
8117
 
8118
      return true;
8119
    }
8120
 
8121
    @Override
8122
    public int hashCode() {
8123
      return 0;
8124
    }
8125
 
4555 mandeep.dh 8126
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 8127
      if (!getClass().equals(other.getClass())) {
8128
        return getClass().getName().compareTo(other.getClass().getName());
8129
      }
8130
 
8131
      int lastComparison = 0;
4555 mandeep.dh 8132
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 8133
 
8134
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
8135
      if (lastComparison != 0) {
8136
        return lastComparison;
8137
      }
8138
      if (isSetPurchaseId()) {
8139
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
8140
        if (lastComparison != 0) {
8141
          return lastComparison;
8142
        }
8143
      }
8144
      return 0;
8145
    }
8146
 
8147
    public _Fields fieldForId(int fieldId) {
8148
      return _Fields.findByThriftId(fieldId);
8149
    }
8150
 
8151
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8152
      org.apache.thrift.protocol.TField field;
8153
      iprot.readStructBegin();
8154
      while (true)
8155
      {
8156
        field = iprot.readFieldBegin();
8157
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8158
          break;
8159
        }
8160
        switch (field.id) {
8161
          case 1: // PURCHASE_ID
8162
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8163
              this.purchaseId = iprot.readI64();
8164
              setPurchaseIdIsSet(true);
8165
            } else { 
8166
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8167
            }
8168
            break;
8169
          default:
8170
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8171
        }
8172
        iprot.readFieldEnd();
8173
      }
8174
      iprot.readStructEnd();
8175
      validate();
8176
    }
8177
 
8178
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8179
      validate();
8180
 
8181
      oprot.writeStructBegin(STRUCT_DESC);
8182
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8183
      oprot.writeI64(this.purchaseId);
8184
      oprot.writeFieldEnd();
8185
      oprot.writeFieldStop();
8186
      oprot.writeStructEnd();
8187
    }
8188
 
8189
    @Override
8190
    public String toString() {
4555 mandeep.dh 8191
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8192
      boolean first = true;
8193
 
8194
      sb.append("purchaseId:");
8195
      sb.append(this.purchaseId);
8196
      first = false;
8197
      sb.append(")");
8198
      return sb.toString();
8199
    }
8200
 
8201
    public void validate() throws org.apache.thrift.TException {
8202
      // check for required fields
8203
    }
8204
 
8205
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8206
      try {
8207
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8208
      } catch (org.apache.thrift.TException te) {
8209
        throw new java.io.IOException(te);
8210
      }
8211
    }
8212
 
8213
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8214
      try {
4555 mandeep.dh 8215
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8216
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8217
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8218
      } catch (org.apache.thrift.TException te) {
8219
        throw new java.io.IOException(te);
8220
      }
8221
    }
8222
 
8223
  }
8224
 
4555 mandeep.dh 8225
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8226
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8227
 
4555 mandeep.dh 8228
    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 8229
 
4555 mandeep.dh 8230
    private PurchaseOrder success; // required
4496 mandeep.dh 8231
 
8232
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8233
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8234
      SUCCESS((short)0, "success");
8235
 
8236
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8237
 
8238
      static {
8239
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8240
          byName.put(field.getFieldName(), field);
8241
        }
8242
      }
8243
 
8244
      /**
8245
       * Find the _Fields constant that matches fieldId, or null if its not found.
8246
       */
8247
      public static _Fields findByThriftId(int fieldId) {
8248
        switch(fieldId) {
8249
          case 0: // SUCCESS
8250
            return SUCCESS;
8251
          default:
8252
            return null;
8253
        }
8254
      }
8255
 
8256
      /**
8257
       * Find the _Fields constant that matches fieldId, throwing an exception
8258
       * if it is not found.
8259
       */
8260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8261
        _Fields fields = findByThriftId(fieldId);
8262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8263
        return fields;
8264
      }
8265
 
8266
      /**
8267
       * Find the _Fields constant that matches name, or null if its not found.
8268
       */
8269
      public static _Fields findByName(String name) {
8270
        return byName.get(name);
8271
      }
8272
 
8273
      private final short _thriftId;
8274
      private final String _fieldName;
8275
 
8276
      _Fields(short thriftId, String fieldName) {
8277
        _thriftId = thriftId;
8278
        _fieldName = fieldName;
8279
      }
8280
 
8281
      public short getThriftFieldId() {
8282
        return _thriftId;
8283
      }
8284
 
8285
      public String getFieldName() {
8286
        return _fieldName;
8287
      }
8288
    }
8289
 
8290
    // isset id assignments
8291
 
8292
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8293
    static {
8294
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8295
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8296
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8297
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8298
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8299
    }
8300
 
4555 mandeep.dh 8301
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8302
    }
8303
 
4555 mandeep.dh 8304
    public getPurchaseOrderForPurchase_result(
8305
      PurchaseOrder success)
4496 mandeep.dh 8306
    {
8307
      this();
8308
      this.success = success;
8309
    }
8310
 
8311
    /**
8312
     * Performs a deep copy on <i>other</i>.
8313
     */
4555 mandeep.dh 8314
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8315
      if (other.isSetSuccess()) {
8316
        this.success = new PurchaseOrder(other.success);
8317
      }
4496 mandeep.dh 8318
    }
8319
 
4555 mandeep.dh 8320
    public getPurchaseOrderForPurchase_result deepCopy() {
8321
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8322
    }
8323
 
8324
    @Override
8325
    public void clear() {
4555 mandeep.dh 8326
      this.success = null;
4496 mandeep.dh 8327
    }
8328
 
4555 mandeep.dh 8329
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8330
      return this.success;
8331
    }
8332
 
4555 mandeep.dh 8333
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8334
      this.success = success;
8335
    }
8336
 
8337
    public void unsetSuccess() {
4555 mandeep.dh 8338
      this.success = null;
4496 mandeep.dh 8339
    }
8340
 
8341
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8342
    public boolean isSetSuccess() {
4555 mandeep.dh 8343
      return this.success != null;
4496 mandeep.dh 8344
    }
8345
 
8346
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8347
      if (!value) {
8348
        this.success = null;
8349
      }
4496 mandeep.dh 8350
    }
8351
 
8352
    public void setFieldValue(_Fields field, Object value) {
8353
      switch (field) {
8354
      case SUCCESS:
8355
        if (value == null) {
8356
          unsetSuccess();
8357
        } else {
4555 mandeep.dh 8358
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8359
        }
8360
        break;
8361
 
8362
      }
8363
    }
8364
 
8365
    public Object getFieldValue(_Fields field) {
8366
      switch (field) {
8367
      case SUCCESS:
4555 mandeep.dh 8368
        return getSuccess();
4496 mandeep.dh 8369
 
8370
      }
8371
      throw new IllegalStateException();
8372
    }
8373
 
8374
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8375
    public boolean isSet(_Fields field) {
8376
      if (field == null) {
8377
        throw new IllegalArgumentException();
8378
      }
8379
 
8380
      switch (field) {
8381
      case SUCCESS:
8382
        return isSetSuccess();
8383
      }
8384
      throw new IllegalStateException();
8385
    }
8386
 
8387
    @Override
8388
    public boolean equals(Object that) {
8389
      if (that == null)
8390
        return false;
4555 mandeep.dh 8391
      if (that instanceof getPurchaseOrderForPurchase_result)
8392
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8393
      return false;
8394
    }
8395
 
4555 mandeep.dh 8396
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8397
      if (that == null)
8398
        return false;
8399
 
4555 mandeep.dh 8400
      boolean this_present_success = true && this.isSetSuccess();
8401
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8402
      if (this_present_success || that_present_success) {
8403
        if (!(this_present_success && that_present_success))
8404
          return false;
4555 mandeep.dh 8405
        if (!this.success.equals(that.success))
4496 mandeep.dh 8406
          return false;
8407
      }
8408
 
8409
      return true;
8410
    }
8411
 
8412
    @Override
8413
    public int hashCode() {
8414
      return 0;
8415
    }
8416
 
4555 mandeep.dh 8417
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8418
      if (!getClass().equals(other.getClass())) {
8419
        return getClass().getName().compareTo(other.getClass().getName());
8420
      }
8421
 
8422
      int lastComparison = 0;
4555 mandeep.dh 8423
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8424
 
8425
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8426
      if (lastComparison != 0) {
8427
        return lastComparison;
8428
      }
8429
      if (isSetSuccess()) {
8430
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8431
        if (lastComparison != 0) {
8432
          return lastComparison;
8433
        }
8434
      }
8435
      return 0;
8436
    }
8437
 
8438
    public _Fields fieldForId(int fieldId) {
8439
      return _Fields.findByThriftId(fieldId);
8440
    }
8441
 
8442
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8443
      org.apache.thrift.protocol.TField field;
8444
      iprot.readStructBegin();
8445
      while (true)
8446
      {
8447
        field = iprot.readFieldBegin();
8448
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8449
          break;
8450
        }
8451
        switch (field.id) {
8452
          case 0: // SUCCESS
4555 mandeep.dh 8453
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8454
              this.success = new PurchaseOrder();
8455
              this.success.read(iprot);
4496 mandeep.dh 8456
            } else { 
8457
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8458
            }
8459
            break;
8460
          default:
8461
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8462
        }
8463
        iprot.readFieldEnd();
8464
      }
8465
      iprot.readStructEnd();
8466
      validate();
8467
    }
8468
 
8469
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8470
      oprot.writeStructBegin(STRUCT_DESC);
8471
 
8472
      if (this.isSetSuccess()) {
8473
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8474
        this.success.write(oprot);
4496 mandeep.dh 8475
        oprot.writeFieldEnd();
8476
      }
8477
      oprot.writeFieldStop();
8478
      oprot.writeStructEnd();
8479
    }
8480
 
8481
    @Override
8482
    public String toString() {
4555 mandeep.dh 8483
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8484
      boolean first = true;
8485
 
8486
      sb.append("success:");
4555 mandeep.dh 8487
      if (this.success == null) {
8488
        sb.append("null");
8489
      } else {
8490
        sb.append(this.success);
8491
      }
4496 mandeep.dh 8492
      first = false;
8493
      sb.append(")");
8494
      return sb.toString();
8495
    }
8496
 
8497
    public void validate() throws org.apache.thrift.TException {
8498
      // check for required fields
8499
    }
8500
 
8501
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8502
      try {
8503
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8504
      } catch (org.apache.thrift.TException te) {
8505
        throw new java.io.IOException(te);
8506
      }
8507
    }
8508
 
8509
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8510
      try {
8511
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8512
      } catch (org.apache.thrift.TException te) {
8513
        throw new java.io.IOException(te);
8514
      }
8515
    }
8516
 
8517
  }
8518
 
4754 mandeep.dh 8519
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8520
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8521
 
8522
    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);
8523
 
8524
    private long warehouseId; // required
8525
 
8526
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8527
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8528
      WAREHOUSE_ID((short)1, "warehouseId");
8529
 
8530
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8531
 
8532
      static {
8533
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8534
          byName.put(field.getFieldName(), field);
8535
        }
8536
      }
8537
 
8538
      /**
8539
       * Find the _Fields constant that matches fieldId, or null if its not found.
8540
       */
8541
      public static _Fields findByThriftId(int fieldId) {
8542
        switch(fieldId) {
8543
          case 1: // WAREHOUSE_ID
8544
            return WAREHOUSE_ID;
8545
          default:
8546
            return null;
8547
        }
8548
      }
8549
 
8550
      /**
8551
       * Find the _Fields constant that matches fieldId, throwing an exception
8552
       * if it is not found.
8553
       */
8554
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8555
        _Fields fields = findByThriftId(fieldId);
8556
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8557
        return fields;
8558
      }
8559
 
8560
      /**
8561
       * Find the _Fields constant that matches name, or null if its not found.
8562
       */
8563
      public static _Fields findByName(String name) {
8564
        return byName.get(name);
8565
      }
8566
 
8567
      private final short _thriftId;
8568
      private final String _fieldName;
8569
 
8570
      _Fields(short thriftId, String fieldName) {
8571
        _thriftId = thriftId;
8572
        _fieldName = fieldName;
8573
      }
8574
 
8575
      public short getThriftFieldId() {
8576
        return _thriftId;
8577
      }
8578
 
8579
      public String getFieldName() {
8580
        return _fieldName;
8581
      }
8582
    }
8583
 
8584
    // isset id assignments
8585
    private static final int __WAREHOUSEID_ISSET_ID = 0;
8586
    private BitSet __isset_bit_vector = new BitSet(1);
8587
 
8588
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8589
    static {
8590
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8591
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8592
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8593
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8594
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
8595
    }
8596
 
8597
    public getPendingPurchaseOrders_args() {
8598
    }
8599
 
8600
    public getPendingPurchaseOrders_args(
8601
      long warehouseId)
8602
    {
8603
      this();
8604
      this.warehouseId = warehouseId;
8605
      setWarehouseIdIsSet(true);
8606
    }
8607
 
8608
    /**
8609
     * Performs a deep copy on <i>other</i>.
8610
     */
8611
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
8612
      __isset_bit_vector.clear();
8613
      __isset_bit_vector.or(other.__isset_bit_vector);
8614
      this.warehouseId = other.warehouseId;
8615
    }
8616
 
8617
    public getPendingPurchaseOrders_args deepCopy() {
8618
      return new getPendingPurchaseOrders_args(this);
8619
    }
8620
 
8621
    @Override
8622
    public void clear() {
8623
      setWarehouseIdIsSet(false);
8624
      this.warehouseId = 0;
8625
    }
8626
 
8627
    public long getWarehouseId() {
8628
      return this.warehouseId;
8629
    }
8630
 
8631
    public void setWarehouseId(long warehouseId) {
8632
      this.warehouseId = warehouseId;
8633
      setWarehouseIdIsSet(true);
8634
    }
8635
 
8636
    public void unsetWarehouseId() {
8637
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8638
    }
8639
 
8640
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8641
    public boolean isSetWarehouseId() {
8642
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
8643
    }
8644
 
8645
    public void setWarehouseIdIsSet(boolean value) {
8646
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
8647
    }
8648
 
8649
    public void setFieldValue(_Fields field, Object value) {
8650
      switch (field) {
8651
      case WAREHOUSE_ID:
8652
        if (value == null) {
8653
          unsetWarehouseId();
8654
        } else {
8655
          setWarehouseId((Long)value);
8656
        }
8657
        break;
8658
 
8659
      }
8660
    }
8661
 
8662
    public Object getFieldValue(_Fields field) {
8663
      switch (field) {
8664
      case WAREHOUSE_ID:
8665
        return Long.valueOf(getWarehouseId());
8666
 
8667
      }
8668
      throw new IllegalStateException();
8669
    }
8670
 
8671
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8672
    public boolean isSet(_Fields field) {
8673
      if (field == null) {
8674
        throw new IllegalArgumentException();
8675
      }
8676
 
8677
      switch (field) {
8678
      case WAREHOUSE_ID:
8679
        return isSetWarehouseId();
8680
      }
8681
      throw new IllegalStateException();
8682
    }
8683
 
8684
    @Override
8685
    public boolean equals(Object that) {
8686
      if (that == null)
8687
        return false;
8688
      if (that instanceof getPendingPurchaseOrders_args)
8689
        return this.equals((getPendingPurchaseOrders_args)that);
8690
      return false;
8691
    }
8692
 
8693
    public boolean equals(getPendingPurchaseOrders_args that) {
8694
      if (that == null)
8695
        return false;
8696
 
8697
      boolean this_present_warehouseId = true;
8698
      boolean that_present_warehouseId = true;
8699
      if (this_present_warehouseId || that_present_warehouseId) {
8700
        if (!(this_present_warehouseId && that_present_warehouseId))
8701
          return false;
8702
        if (this.warehouseId != that.warehouseId)
8703
          return false;
8704
      }
8705
 
8706
      return true;
8707
    }
8708
 
8709
    @Override
8710
    public int hashCode() {
8711
      return 0;
8712
    }
8713
 
8714
    public int compareTo(getPendingPurchaseOrders_args other) {
8715
      if (!getClass().equals(other.getClass())) {
8716
        return getClass().getName().compareTo(other.getClass().getName());
8717
      }
8718
 
8719
      int lastComparison = 0;
8720
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
8721
 
8722
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
8723
      if (lastComparison != 0) {
8724
        return lastComparison;
8725
      }
8726
      if (isSetWarehouseId()) {
8727
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
8728
        if (lastComparison != 0) {
8729
          return lastComparison;
8730
        }
8731
      }
8732
      return 0;
8733
    }
8734
 
8735
    public _Fields fieldForId(int fieldId) {
8736
      return _Fields.findByThriftId(fieldId);
8737
    }
8738
 
8739
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8740
      org.apache.thrift.protocol.TField field;
8741
      iprot.readStructBegin();
8742
      while (true)
8743
      {
8744
        field = iprot.readFieldBegin();
8745
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8746
          break;
8747
        }
8748
        switch (field.id) {
8749
          case 1: // WAREHOUSE_ID
8750
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8751
              this.warehouseId = iprot.readI64();
8752
              setWarehouseIdIsSet(true);
8753
            } else { 
8754
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8755
            }
8756
            break;
8757
          default:
8758
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8759
        }
8760
        iprot.readFieldEnd();
8761
      }
8762
      iprot.readStructEnd();
8763
      validate();
8764
    }
8765
 
8766
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8767
      validate();
8768
 
8769
      oprot.writeStructBegin(STRUCT_DESC);
8770
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8771
      oprot.writeI64(this.warehouseId);
8772
      oprot.writeFieldEnd();
8773
      oprot.writeFieldStop();
8774
      oprot.writeStructEnd();
8775
    }
8776
 
8777
    @Override
8778
    public String toString() {
8779
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
8780
      boolean first = true;
8781
 
8782
      sb.append("warehouseId:");
8783
      sb.append(this.warehouseId);
8784
      first = false;
8785
      sb.append(")");
8786
      return sb.toString();
8787
    }
8788
 
8789
    public void validate() throws org.apache.thrift.TException {
8790
      // check for required fields
8791
    }
8792
 
8793
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8794
      try {
8795
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8796
      } catch (org.apache.thrift.TException te) {
8797
        throw new java.io.IOException(te);
8798
      }
8799
    }
8800
 
8801
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8802
      try {
8803
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8804
        __isset_bit_vector = new BitSet(1);
8805
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8806
      } catch (org.apache.thrift.TException te) {
8807
        throw new java.io.IOException(te);
8808
      }
8809
    }
8810
 
8811
  }
8812
 
8813
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
8814
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
8815
 
8816
    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);
8817
    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);
8818
 
8819
    private List<PurchaseOrder> success; // required
8820
    private PurchaseServiceException e; // required
8821
 
8822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8823
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8824
      SUCCESS((short)0, "success"),
8825
      E((short)1, "e");
8826
 
8827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8828
 
8829
      static {
8830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8831
          byName.put(field.getFieldName(), field);
8832
        }
8833
      }
8834
 
8835
      /**
8836
       * Find the _Fields constant that matches fieldId, or null if its not found.
8837
       */
8838
      public static _Fields findByThriftId(int fieldId) {
8839
        switch(fieldId) {
8840
          case 0: // SUCCESS
8841
            return SUCCESS;
8842
          case 1: // E
8843
            return E;
8844
          default:
8845
            return null;
8846
        }
8847
      }
8848
 
8849
      /**
8850
       * Find the _Fields constant that matches fieldId, throwing an exception
8851
       * if it is not found.
8852
       */
8853
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8854
        _Fields fields = findByThriftId(fieldId);
8855
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8856
        return fields;
8857
      }
8858
 
8859
      /**
8860
       * Find the _Fields constant that matches name, or null if its not found.
8861
       */
8862
      public static _Fields findByName(String name) {
8863
        return byName.get(name);
8864
      }
8865
 
8866
      private final short _thriftId;
8867
      private final String _fieldName;
8868
 
8869
      _Fields(short thriftId, String fieldName) {
8870
        _thriftId = thriftId;
8871
        _fieldName = fieldName;
8872
      }
8873
 
8874
      public short getThriftFieldId() {
8875
        return _thriftId;
8876
      }
8877
 
8878
      public String getFieldName() {
8879
        return _fieldName;
8880
      }
8881
    }
8882
 
8883
    // isset id assignments
8884
 
8885
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8886
    static {
8887
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8888
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8889
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8890
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
8891
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8892
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8893
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8894
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
8895
    }
8896
 
8897
    public getPendingPurchaseOrders_result() {
8898
    }
8899
 
8900
    public getPendingPurchaseOrders_result(
8901
      List<PurchaseOrder> success,
8902
      PurchaseServiceException e)
8903
    {
8904
      this();
8905
      this.success = success;
8906
      this.e = e;
8907
    }
8908
 
8909
    /**
8910
     * Performs a deep copy on <i>other</i>.
8911
     */
8912
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
8913
      if (other.isSetSuccess()) {
8914
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
8915
        for (PurchaseOrder other_element : other.success) {
8916
          __this__success.add(new PurchaseOrder(other_element));
8917
        }
8918
        this.success = __this__success;
8919
      }
8920
      if (other.isSetE()) {
8921
        this.e = new PurchaseServiceException(other.e);
8922
      }
8923
    }
8924
 
8925
    public getPendingPurchaseOrders_result deepCopy() {
8926
      return new getPendingPurchaseOrders_result(this);
8927
    }
8928
 
8929
    @Override
8930
    public void clear() {
8931
      this.success = null;
8932
      this.e = null;
8933
    }
8934
 
8935
    public int getSuccessSize() {
8936
      return (this.success == null) ? 0 : this.success.size();
8937
    }
8938
 
8939
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
8940
      return (this.success == null) ? null : this.success.iterator();
8941
    }
8942
 
8943
    public void addToSuccess(PurchaseOrder elem) {
8944
      if (this.success == null) {
8945
        this.success = new ArrayList<PurchaseOrder>();
8946
      }
8947
      this.success.add(elem);
8948
    }
8949
 
8950
    public List<PurchaseOrder> getSuccess() {
8951
      return this.success;
8952
    }
8953
 
8954
    public void setSuccess(List<PurchaseOrder> success) {
8955
      this.success = success;
8956
    }
8957
 
8958
    public void unsetSuccess() {
8959
      this.success = null;
8960
    }
8961
 
8962
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8963
    public boolean isSetSuccess() {
8964
      return this.success != null;
8965
    }
8966
 
8967
    public void setSuccessIsSet(boolean value) {
8968
      if (!value) {
8969
        this.success = null;
8970
      }
8971
    }
8972
 
8973
    public PurchaseServiceException getE() {
8974
      return this.e;
8975
    }
8976
 
8977
    public void setE(PurchaseServiceException e) {
8978
      this.e = e;
8979
    }
8980
 
8981
    public void unsetE() {
8982
      this.e = null;
8983
    }
8984
 
8985
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8986
    public boolean isSetE() {
8987
      return this.e != null;
8988
    }
8989
 
8990
    public void setEIsSet(boolean value) {
8991
      if (!value) {
8992
        this.e = null;
8993
      }
8994
    }
8995
 
8996
    public void setFieldValue(_Fields field, Object value) {
8997
      switch (field) {
8998
      case SUCCESS:
8999
        if (value == null) {
9000
          unsetSuccess();
9001
        } else {
9002
          setSuccess((List<PurchaseOrder>)value);
9003
        }
9004
        break;
9005
 
9006
      case E:
9007
        if (value == null) {
9008
          unsetE();
9009
        } else {
9010
          setE((PurchaseServiceException)value);
9011
        }
9012
        break;
9013
 
9014
      }
9015
    }
9016
 
9017
    public Object getFieldValue(_Fields field) {
9018
      switch (field) {
9019
      case SUCCESS:
9020
        return getSuccess();
9021
 
9022
      case E:
9023
        return getE();
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 SUCCESS:
9037
        return isSetSuccess();
9038
      case E:
9039
        return isSetE();
9040
      }
9041
      throw new IllegalStateException();
9042
    }
9043
 
9044
    @Override
9045
    public boolean equals(Object that) {
9046
      if (that == null)
9047
        return false;
9048
      if (that instanceof getPendingPurchaseOrders_result)
9049
        return this.equals((getPendingPurchaseOrders_result)that);
9050
      return false;
9051
    }
9052
 
9053
    public boolean equals(getPendingPurchaseOrders_result that) {
9054
      if (that == null)
9055
        return false;
9056
 
9057
      boolean this_present_success = true && this.isSetSuccess();
9058
      boolean that_present_success = true && that.isSetSuccess();
9059
      if (this_present_success || that_present_success) {
9060
        if (!(this_present_success && that_present_success))
9061
          return false;
9062
        if (!this.success.equals(that.success))
9063
          return false;
9064
      }
9065
 
9066
      boolean this_present_e = true && this.isSetE();
9067
      boolean that_present_e = true && that.isSetE();
9068
      if (this_present_e || that_present_e) {
9069
        if (!(this_present_e && that_present_e))
9070
          return false;
9071
        if (!this.e.equals(that.e))
9072
          return false;
9073
      }
9074
 
9075
      return true;
9076
    }
9077
 
9078
    @Override
9079
    public int hashCode() {
9080
      return 0;
9081
    }
9082
 
9083
    public int compareTo(getPendingPurchaseOrders_result other) {
9084
      if (!getClass().equals(other.getClass())) {
9085
        return getClass().getName().compareTo(other.getClass().getName());
9086
      }
9087
 
9088
      int lastComparison = 0;
9089
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
9090
 
9091
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9092
      if (lastComparison != 0) {
9093
        return lastComparison;
9094
      }
9095
      if (isSetSuccess()) {
9096
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9097
        if (lastComparison != 0) {
9098
          return lastComparison;
9099
        }
9100
      }
9101
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9102
      if (lastComparison != 0) {
9103
        return lastComparison;
9104
      }
9105
      if (isSetE()) {
9106
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9107
        if (lastComparison != 0) {
9108
          return lastComparison;
9109
        }
9110
      }
9111
      return 0;
9112
    }
9113
 
9114
    public _Fields fieldForId(int fieldId) {
9115
      return _Fields.findByThriftId(fieldId);
9116
    }
9117
 
9118
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9119
      org.apache.thrift.protocol.TField field;
9120
      iprot.readStructBegin();
9121
      while (true)
9122
      {
9123
        field = iprot.readFieldBegin();
9124
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9125
          break;
9126
        }
9127
        switch (field.id) {
9128
          case 0: // SUCCESS
9129
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9130
              {
6385 amar.kumar 9131
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
9132
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
9133
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 9134
                {
6385 amar.kumar 9135
                  PurchaseOrder _elem18; // required
9136
                  _elem18 = new PurchaseOrder();
9137
                  _elem18.read(iprot);
9138
                  this.success.add(_elem18);
4754 mandeep.dh 9139
                }
9140
                iprot.readListEnd();
9141
              }
9142
            } else { 
9143
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9144
            }
9145
            break;
9146
          case 1: // E
9147
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9148
              this.e = new PurchaseServiceException();
9149
              this.e.read(iprot);
9150
            } else { 
9151
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9152
            }
9153
            break;
9154
          default:
9155
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9156
        }
9157
        iprot.readFieldEnd();
9158
      }
9159
      iprot.readStructEnd();
9160
      validate();
9161
    }
9162
 
9163
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9164
      oprot.writeStructBegin(STRUCT_DESC);
9165
 
9166
      if (this.isSetSuccess()) {
9167
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9168
        {
9169
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9170
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9171
          {
6385 amar.kumar 9172
            _iter19.write(oprot);
4754 mandeep.dh 9173
          }
9174
          oprot.writeListEnd();
9175
        }
9176
        oprot.writeFieldEnd();
9177
      } else if (this.isSetE()) {
9178
        oprot.writeFieldBegin(E_FIELD_DESC);
9179
        this.e.write(oprot);
9180
        oprot.writeFieldEnd();
9181
      }
9182
      oprot.writeFieldStop();
9183
      oprot.writeStructEnd();
9184
    }
9185
 
9186
    @Override
9187
    public String toString() {
9188
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9189
      boolean first = true;
9190
 
9191
      sb.append("success:");
9192
      if (this.success == null) {
9193
        sb.append("null");
9194
      } else {
9195
        sb.append(this.success);
9196
      }
9197
      first = false;
9198
      if (!first) sb.append(", ");
9199
      sb.append("e:");
9200
      if (this.e == null) {
9201
        sb.append("null");
9202
      } else {
9203
        sb.append(this.e);
9204
      }
9205
      first = false;
9206
      sb.append(")");
9207
      return sb.toString();
9208
    }
9209
 
9210
    public void validate() throws org.apache.thrift.TException {
9211
      // check for required fields
9212
    }
9213
 
9214
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9215
      try {
9216
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9217
      } catch (org.apache.thrift.TException te) {
9218
        throw new java.io.IOException(te);
9219
      }
9220
    }
9221
 
9222
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9223
      try {
9224
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9225
      } catch (org.apache.thrift.TException te) {
9226
        throw new java.io.IOException(te);
9227
      }
9228
    }
9229
 
9230
  }
9231
 
9232
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9233
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9234
 
9235
 
9236
 
9237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9238
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9239
;
9240
 
9241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9242
 
9243
      static {
9244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9245
          byName.put(field.getFieldName(), field);
9246
        }
9247
      }
9248
 
9249
      /**
9250
       * Find the _Fields constant that matches fieldId, or null if its not found.
9251
       */
9252
      public static _Fields findByThriftId(int fieldId) {
9253
        switch(fieldId) {
9254
          default:
9255
            return null;
9256
        }
9257
      }
9258
 
9259
      /**
9260
       * Find the _Fields constant that matches fieldId, throwing an exception
9261
       * if it is not found.
9262
       */
9263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9264
        _Fields fields = findByThriftId(fieldId);
9265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9266
        return fields;
9267
      }
9268
 
9269
      /**
9270
       * Find the _Fields constant that matches name, or null if its not found.
9271
       */
9272
      public static _Fields findByName(String name) {
9273
        return byName.get(name);
9274
      }
9275
 
9276
      private final short _thriftId;
9277
      private final String _fieldName;
9278
 
9279
      _Fields(short thriftId, String fieldName) {
9280
        _thriftId = thriftId;
9281
        _fieldName = fieldName;
9282
      }
9283
 
9284
      public short getThriftFieldId() {
9285
        return _thriftId;
9286
      }
9287
 
9288
      public String getFieldName() {
9289
        return _fieldName;
9290
      }
9291
    }
9292
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9293
    static {
9294
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9295
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9296
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9297
    }
9298
 
9299
    public getSuppliers_args() {
9300
    }
9301
 
9302
    /**
9303
     * Performs a deep copy on <i>other</i>.
9304
     */
9305
    public getSuppliers_args(getSuppliers_args other) {
9306
    }
9307
 
9308
    public getSuppliers_args deepCopy() {
9309
      return new getSuppliers_args(this);
9310
    }
9311
 
9312
    @Override
9313
    public void clear() {
9314
    }
9315
 
9316
    public void setFieldValue(_Fields field, Object value) {
9317
      switch (field) {
9318
      }
9319
    }
9320
 
9321
    public Object getFieldValue(_Fields field) {
9322
      switch (field) {
9323
      }
9324
      throw new IllegalStateException();
9325
    }
9326
 
9327
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9328
    public boolean isSet(_Fields field) {
9329
      if (field == null) {
9330
        throw new IllegalArgumentException();
9331
      }
9332
 
9333
      switch (field) {
9334
      }
9335
      throw new IllegalStateException();
9336
    }
9337
 
9338
    @Override
9339
    public boolean equals(Object that) {
9340
      if (that == null)
9341
        return false;
9342
      if (that instanceof getSuppliers_args)
9343
        return this.equals((getSuppliers_args)that);
9344
      return false;
9345
    }
9346
 
9347
    public boolean equals(getSuppliers_args that) {
9348
      if (that == null)
9349
        return false;
9350
 
9351
      return true;
9352
    }
9353
 
9354
    @Override
9355
    public int hashCode() {
9356
      return 0;
9357
    }
9358
 
9359
    public int compareTo(getSuppliers_args other) {
9360
      if (!getClass().equals(other.getClass())) {
9361
        return getClass().getName().compareTo(other.getClass().getName());
9362
      }
9363
 
9364
      int lastComparison = 0;
9365
      getSuppliers_args typedOther = (getSuppliers_args)other;
9366
 
9367
      return 0;
9368
    }
9369
 
9370
    public _Fields fieldForId(int fieldId) {
9371
      return _Fields.findByThriftId(fieldId);
9372
    }
9373
 
9374
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9375
      org.apache.thrift.protocol.TField field;
9376
      iprot.readStructBegin();
9377
      while (true)
9378
      {
9379
        field = iprot.readFieldBegin();
9380
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9381
          break;
9382
        }
9383
        switch (field.id) {
9384
          default:
9385
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9386
        }
9387
        iprot.readFieldEnd();
9388
      }
9389
      iprot.readStructEnd();
9390
      validate();
9391
    }
9392
 
9393
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9394
      validate();
9395
 
9396
      oprot.writeStructBegin(STRUCT_DESC);
9397
      oprot.writeFieldStop();
9398
      oprot.writeStructEnd();
9399
    }
9400
 
9401
    @Override
9402
    public String toString() {
9403
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9404
      boolean first = true;
9405
 
9406
      sb.append(")");
9407
      return sb.toString();
9408
    }
9409
 
9410
    public void validate() throws org.apache.thrift.TException {
9411
      // check for required fields
9412
    }
9413
 
9414
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9415
      try {
9416
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9417
      } catch (org.apache.thrift.TException te) {
9418
        throw new java.io.IOException(te);
9419
      }
9420
    }
9421
 
9422
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9423
      try {
9424
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9425
      } catch (org.apache.thrift.TException te) {
9426
        throw new java.io.IOException(te);
9427
      }
9428
    }
9429
 
9430
  }
9431
 
9432
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9433
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9434
 
9435
    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);
9436
    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);
9437
 
9438
    private List<Supplier> success; // required
9439
    private PurchaseServiceException e; // required
9440
 
9441
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9442
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9443
      SUCCESS((short)0, "success"),
9444
      E((short)1, "e");
9445
 
9446
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9447
 
9448
      static {
9449
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9450
          byName.put(field.getFieldName(), field);
9451
        }
9452
      }
9453
 
9454
      /**
9455
       * Find the _Fields constant that matches fieldId, or null if its not found.
9456
       */
9457
      public static _Fields findByThriftId(int fieldId) {
9458
        switch(fieldId) {
9459
          case 0: // SUCCESS
9460
            return SUCCESS;
9461
          case 1: // E
9462
            return E;
9463
          default:
9464
            return null;
9465
        }
9466
      }
9467
 
9468
      /**
9469
       * Find the _Fields constant that matches fieldId, throwing an exception
9470
       * if it is not found.
9471
       */
9472
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9473
        _Fields fields = findByThriftId(fieldId);
9474
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9475
        return fields;
9476
      }
9477
 
9478
      /**
9479
       * Find the _Fields constant that matches name, or null if its not found.
9480
       */
9481
      public static _Fields findByName(String name) {
9482
        return byName.get(name);
9483
      }
9484
 
9485
      private final short _thriftId;
9486
      private final String _fieldName;
9487
 
9488
      _Fields(short thriftId, String fieldName) {
9489
        _thriftId = thriftId;
9490
        _fieldName = fieldName;
9491
      }
9492
 
9493
      public short getThriftFieldId() {
9494
        return _thriftId;
9495
      }
9496
 
9497
      public String getFieldName() {
9498
        return _fieldName;
9499
      }
9500
    }
9501
 
9502
    // isset id assignments
9503
 
9504
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9505
    static {
9506
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9507
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9508
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9509
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9510
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9511
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9512
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9513
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9514
    }
9515
 
9516
    public getSuppliers_result() {
9517
    }
9518
 
9519
    public getSuppliers_result(
9520
      List<Supplier> success,
9521
      PurchaseServiceException e)
9522
    {
9523
      this();
9524
      this.success = success;
9525
      this.e = e;
9526
    }
9527
 
9528
    /**
9529
     * Performs a deep copy on <i>other</i>.
9530
     */
9531
    public getSuppliers_result(getSuppliers_result other) {
9532
      if (other.isSetSuccess()) {
9533
        List<Supplier> __this__success = new ArrayList<Supplier>();
9534
        for (Supplier other_element : other.success) {
9535
          __this__success.add(new Supplier(other_element));
9536
        }
9537
        this.success = __this__success;
9538
      }
9539
      if (other.isSetE()) {
9540
        this.e = new PurchaseServiceException(other.e);
9541
      }
9542
    }
9543
 
9544
    public getSuppliers_result deepCopy() {
9545
      return new getSuppliers_result(this);
9546
    }
9547
 
9548
    @Override
9549
    public void clear() {
9550
      this.success = null;
9551
      this.e = null;
9552
    }
9553
 
9554
    public int getSuccessSize() {
9555
      return (this.success == null) ? 0 : this.success.size();
9556
    }
9557
 
9558
    public java.util.Iterator<Supplier> getSuccessIterator() {
9559
      return (this.success == null) ? null : this.success.iterator();
9560
    }
9561
 
9562
    public void addToSuccess(Supplier elem) {
9563
      if (this.success == null) {
9564
        this.success = new ArrayList<Supplier>();
9565
      }
9566
      this.success.add(elem);
9567
    }
9568
 
9569
    public List<Supplier> getSuccess() {
9570
      return this.success;
9571
    }
9572
 
9573
    public void setSuccess(List<Supplier> success) {
9574
      this.success = success;
9575
    }
9576
 
9577
    public void unsetSuccess() {
9578
      this.success = null;
9579
    }
9580
 
9581
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9582
    public boolean isSetSuccess() {
9583
      return this.success != null;
9584
    }
9585
 
9586
    public void setSuccessIsSet(boolean value) {
9587
      if (!value) {
9588
        this.success = null;
9589
      }
9590
    }
9591
 
9592
    public PurchaseServiceException getE() {
9593
      return this.e;
9594
    }
9595
 
9596
    public void setE(PurchaseServiceException e) {
9597
      this.e = e;
9598
    }
9599
 
9600
    public void unsetE() {
9601
      this.e = null;
9602
    }
9603
 
9604
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9605
    public boolean isSetE() {
9606
      return this.e != null;
9607
    }
9608
 
9609
    public void setEIsSet(boolean value) {
9610
      if (!value) {
9611
        this.e = null;
9612
      }
9613
    }
9614
 
9615
    public void setFieldValue(_Fields field, Object value) {
9616
      switch (field) {
9617
      case SUCCESS:
9618
        if (value == null) {
9619
          unsetSuccess();
9620
        } else {
9621
          setSuccess((List<Supplier>)value);
9622
        }
9623
        break;
9624
 
9625
      case E:
9626
        if (value == null) {
9627
          unsetE();
9628
        } else {
9629
          setE((PurchaseServiceException)value);
9630
        }
9631
        break;
9632
 
9633
      }
9634
    }
9635
 
9636
    public Object getFieldValue(_Fields field) {
9637
      switch (field) {
9638
      case SUCCESS:
9639
        return getSuccess();
9640
 
9641
      case E:
9642
        return getE();
9643
 
9644
      }
9645
      throw new IllegalStateException();
9646
    }
9647
 
9648
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9649
    public boolean isSet(_Fields field) {
9650
      if (field == null) {
9651
        throw new IllegalArgumentException();
9652
      }
9653
 
9654
      switch (field) {
9655
      case SUCCESS:
9656
        return isSetSuccess();
9657
      case E:
9658
        return isSetE();
9659
      }
9660
      throw new IllegalStateException();
9661
    }
9662
 
9663
    @Override
9664
    public boolean equals(Object that) {
9665
      if (that == null)
9666
        return false;
9667
      if (that instanceof getSuppliers_result)
9668
        return this.equals((getSuppliers_result)that);
9669
      return false;
9670
    }
9671
 
9672
    public boolean equals(getSuppliers_result that) {
9673
      if (that == null)
9674
        return false;
9675
 
9676
      boolean this_present_success = true && this.isSetSuccess();
9677
      boolean that_present_success = true && that.isSetSuccess();
9678
      if (this_present_success || that_present_success) {
9679
        if (!(this_present_success && that_present_success))
9680
          return false;
9681
        if (!this.success.equals(that.success))
9682
          return false;
9683
      }
9684
 
9685
      boolean this_present_e = true && this.isSetE();
9686
      boolean that_present_e = true && that.isSetE();
9687
      if (this_present_e || that_present_e) {
9688
        if (!(this_present_e && that_present_e))
9689
          return false;
9690
        if (!this.e.equals(that.e))
9691
          return false;
9692
      }
9693
 
9694
      return true;
9695
    }
9696
 
9697
    @Override
9698
    public int hashCode() {
9699
      return 0;
9700
    }
9701
 
9702
    public int compareTo(getSuppliers_result other) {
9703
      if (!getClass().equals(other.getClass())) {
9704
        return getClass().getName().compareTo(other.getClass().getName());
9705
      }
9706
 
9707
      int lastComparison = 0;
9708
      getSuppliers_result typedOther = (getSuppliers_result)other;
9709
 
9710
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9711
      if (lastComparison != 0) {
9712
        return lastComparison;
9713
      }
9714
      if (isSetSuccess()) {
9715
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9716
        if (lastComparison != 0) {
9717
          return lastComparison;
9718
        }
9719
      }
9720
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9721
      if (lastComparison != 0) {
9722
        return lastComparison;
9723
      }
9724
      if (isSetE()) {
9725
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9726
        if (lastComparison != 0) {
9727
          return lastComparison;
9728
        }
9729
      }
9730
      return 0;
9731
    }
9732
 
9733
    public _Fields fieldForId(int fieldId) {
9734
      return _Fields.findByThriftId(fieldId);
9735
    }
9736
 
9737
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9738
      org.apache.thrift.protocol.TField field;
9739
      iprot.readStructBegin();
9740
      while (true)
9741
      {
9742
        field = iprot.readFieldBegin();
9743
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9744
          break;
9745
        }
9746
        switch (field.id) {
9747
          case 0: // SUCCESS
9748
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9749
              {
6385 amar.kumar 9750
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
9751
                this.success = new ArrayList<Supplier>(_list20.size);
9752
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 9753
                {
6385 amar.kumar 9754
                  Supplier _elem22; // required
9755
                  _elem22 = new Supplier();
9756
                  _elem22.read(iprot);
9757
                  this.success.add(_elem22);
4754 mandeep.dh 9758
                }
9759
                iprot.readListEnd();
9760
              }
9761
            } else { 
9762
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9763
            }
9764
            break;
9765
          case 1: // E
9766
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9767
              this.e = new PurchaseServiceException();
9768
              this.e.read(iprot);
9769
            } else { 
9770
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9771
            }
9772
            break;
9773
          default:
9774
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9775
        }
9776
        iprot.readFieldEnd();
9777
      }
9778
      iprot.readStructEnd();
9779
      validate();
9780
    }
9781
 
9782
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9783
      oprot.writeStructBegin(STRUCT_DESC);
9784
 
9785
      if (this.isSetSuccess()) {
9786
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9787
        {
9788
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9789
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 9790
          {
6385 amar.kumar 9791
            _iter23.write(oprot);
4754 mandeep.dh 9792
          }
9793
          oprot.writeListEnd();
9794
        }
9795
        oprot.writeFieldEnd();
9796
      } else if (this.isSetE()) {
9797
        oprot.writeFieldBegin(E_FIELD_DESC);
9798
        this.e.write(oprot);
9799
        oprot.writeFieldEnd();
9800
      }
9801
      oprot.writeFieldStop();
9802
      oprot.writeStructEnd();
9803
    }
9804
 
9805
    @Override
9806
    public String toString() {
9807
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
9808
      boolean first = true;
9809
 
9810
      sb.append("success:");
9811
      if (this.success == null) {
9812
        sb.append("null");
9813
      } else {
9814
        sb.append(this.success);
9815
      }
9816
      first = false;
9817
      if (!first) sb.append(", ");
9818
      sb.append("e:");
9819
      if (this.e == null) {
9820
        sb.append("null");
9821
      } else {
9822
        sb.append(this.e);
9823
      }
9824
      first = false;
9825
      sb.append(")");
9826
      return sb.toString();
9827
    }
9828
 
9829
    public void validate() throws org.apache.thrift.TException {
9830
      // check for required fields
9831
    }
9832
 
9833
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9834
      try {
9835
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9836
      } catch (org.apache.thrift.TException te) {
9837
        throw new java.io.IOException(te);
9838
      }
9839
    }
9840
 
9841
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9842
      try {
9843
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9844
      } catch (org.apache.thrift.TException te) {
9845
        throw new java.io.IOException(te);
9846
      }
9847
    }
9848
 
9849
  }
9850
 
9851
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
9852
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
9853
 
9854
    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);
9855
    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);
9856
    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);
9857
 
9858
    private long purchaseOrderId; // required
9859
    private long itemId; // required
9860
    private long quantity; // required
9861
 
9862
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9863
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9864
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
9865
      ITEM_ID((short)2, "itemId"),
9866
      QUANTITY((short)3, "quantity");
9867
 
9868
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9869
 
9870
      static {
9871
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9872
          byName.put(field.getFieldName(), field);
9873
        }
9874
      }
9875
 
9876
      /**
9877
       * Find the _Fields constant that matches fieldId, or null if its not found.
9878
       */
9879
      public static _Fields findByThriftId(int fieldId) {
9880
        switch(fieldId) {
9881
          case 1: // PURCHASE_ORDER_ID
9882
            return PURCHASE_ORDER_ID;
9883
          case 2: // ITEM_ID
9884
            return ITEM_ID;
9885
          case 3: // QUANTITY
9886
            return QUANTITY;
9887
          default:
9888
            return null;
9889
        }
9890
      }
9891
 
9892
      /**
9893
       * Find the _Fields constant that matches fieldId, throwing an exception
9894
       * if it is not found.
9895
       */
9896
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9897
        _Fields fields = findByThriftId(fieldId);
9898
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9899
        return fields;
9900
      }
9901
 
9902
      /**
9903
       * Find the _Fields constant that matches name, or null if its not found.
9904
       */
9905
      public static _Fields findByName(String name) {
9906
        return byName.get(name);
9907
      }
9908
 
9909
      private final short _thriftId;
9910
      private final String _fieldName;
9911
 
9912
      _Fields(short thriftId, String fieldName) {
9913
        _thriftId = thriftId;
9914
        _fieldName = fieldName;
9915
      }
9916
 
9917
      public short getThriftFieldId() {
9918
        return _thriftId;
9919
      }
9920
 
9921
      public String getFieldName() {
9922
        return _fieldName;
9923
      }
9924
    }
9925
 
9926
    // isset id assignments
9927
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
9928
    private static final int __ITEMID_ISSET_ID = 1;
9929
    private static final int __QUANTITY_ISSET_ID = 2;
9930
    private BitSet __isset_bit_vector = new BitSet(3);
9931
 
9932
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9933
    static {
9934
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9935
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9936
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9937
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9938
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9939
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9940
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9941
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9942
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
9943
    }
9944
 
9945
    public fulfillPO_args() {
9946
    }
9947
 
9948
    public fulfillPO_args(
9949
      long purchaseOrderId,
9950
      long itemId,
9951
      long quantity)
9952
    {
9953
      this();
9954
      this.purchaseOrderId = purchaseOrderId;
9955
      setPurchaseOrderIdIsSet(true);
9956
      this.itemId = itemId;
9957
      setItemIdIsSet(true);
9958
      this.quantity = quantity;
9959
      setQuantityIsSet(true);
9960
    }
9961
 
9962
    /**
9963
     * Performs a deep copy on <i>other</i>.
9964
     */
9965
    public fulfillPO_args(fulfillPO_args other) {
9966
      __isset_bit_vector.clear();
9967
      __isset_bit_vector.or(other.__isset_bit_vector);
9968
      this.purchaseOrderId = other.purchaseOrderId;
9969
      this.itemId = other.itemId;
9970
      this.quantity = other.quantity;
9971
    }
9972
 
9973
    public fulfillPO_args deepCopy() {
9974
      return new fulfillPO_args(this);
9975
    }
9976
 
9977
    @Override
9978
    public void clear() {
9979
      setPurchaseOrderIdIsSet(false);
9980
      this.purchaseOrderId = 0;
9981
      setItemIdIsSet(false);
9982
      this.itemId = 0;
9983
      setQuantityIsSet(false);
9984
      this.quantity = 0;
9985
    }
9986
 
9987
    public long getPurchaseOrderId() {
9988
      return this.purchaseOrderId;
9989
    }
9990
 
9991
    public void setPurchaseOrderId(long purchaseOrderId) {
9992
      this.purchaseOrderId = purchaseOrderId;
9993
      setPurchaseOrderIdIsSet(true);
9994
    }
9995
 
9996
    public void unsetPurchaseOrderId() {
9997
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
9998
    }
9999
 
10000
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
10001
    public boolean isSetPurchaseOrderId() {
10002
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
10003
    }
10004
 
10005
    public void setPurchaseOrderIdIsSet(boolean value) {
10006
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
10007
    }
10008
 
10009
    public long getItemId() {
10010
      return this.itemId;
10011
    }
10012
 
10013
    public void setItemId(long itemId) {
10014
      this.itemId = itemId;
10015
      setItemIdIsSet(true);
10016
    }
10017
 
10018
    public void unsetItemId() {
10019
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10020
    }
10021
 
10022
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10023
    public boolean isSetItemId() {
10024
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10025
    }
10026
 
10027
    public void setItemIdIsSet(boolean value) {
10028
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10029
    }
10030
 
10031
    public long getQuantity() {
10032
      return this.quantity;
10033
    }
10034
 
10035
    public void setQuantity(long quantity) {
10036
      this.quantity = quantity;
10037
      setQuantityIsSet(true);
10038
    }
10039
 
10040
    public void unsetQuantity() {
10041
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10042
    }
10043
 
10044
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10045
    public boolean isSetQuantity() {
10046
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10047
    }
10048
 
10049
    public void setQuantityIsSet(boolean value) {
10050
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10051
    }
10052
 
10053
    public void setFieldValue(_Fields field, Object value) {
10054
      switch (field) {
10055
      case PURCHASE_ORDER_ID:
10056
        if (value == null) {
10057
          unsetPurchaseOrderId();
10058
        } else {
10059
          setPurchaseOrderId((Long)value);
10060
        }
10061
        break;
10062
 
10063
      case ITEM_ID:
10064
        if (value == null) {
10065
          unsetItemId();
10066
        } else {
10067
          setItemId((Long)value);
10068
        }
10069
        break;
10070
 
10071
      case QUANTITY:
10072
        if (value == null) {
10073
          unsetQuantity();
10074
        } else {
10075
          setQuantity((Long)value);
10076
        }
10077
        break;
10078
 
10079
      }
10080
    }
10081
 
10082
    public Object getFieldValue(_Fields field) {
10083
      switch (field) {
10084
      case PURCHASE_ORDER_ID:
10085
        return Long.valueOf(getPurchaseOrderId());
10086
 
10087
      case ITEM_ID:
10088
        return Long.valueOf(getItemId());
10089
 
10090
      case QUANTITY:
10091
        return Long.valueOf(getQuantity());
10092
 
10093
      }
10094
      throw new IllegalStateException();
10095
    }
10096
 
10097
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10098
    public boolean isSet(_Fields field) {
10099
      if (field == null) {
10100
        throw new IllegalArgumentException();
10101
      }
10102
 
10103
      switch (field) {
10104
      case PURCHASE_ORDER_ID:
10105
        return isSetPurchaseOrderId();
10106
      case ITEM_ID:
10107
        return isSetItemId();
10108
      case QUANTITY:
10109
        return isSetQuantity();
10110
      }
10111
      throw new IllegalStateException();
10112
    }
10113
 
10114
    @Override
10115
    public boolean equals(Object that) {
10116
      if (that == null)
10117
        return false;
10118
      if (that instanceof fulfillPO_args)
10119
        return this.equals((fulfillPO_args)that);
10120
      return false;
10121
    }
10122
 
10123
    public boolean equals(fulfillPO_args that) {
10124
      if (that == null)
10125
        return false;
10126
 
10127
      boolean this_present_purchaseOrderId = true;
10128
      boolean that_present_purchaseOrderId = true;
10129
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
10130
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
10131
          return false;
10132
        if (this.purchaseOrderId != that.purchaseOrderId)
10133
          return false;
10134
      }
10135
 
10136
      boolean this_present_itemId = true;
10137
      boolean that_present_itemId = true;
10138
      if (this_present_itemId || that_present_itemId) {
10139
        if (!(this_present_itemId && that_present_itemId))
10140
          return false;
10141
        if (this.itemId != that.itemId)
10142
          return false;
10143
      }
10144
 
10145
      boolean this_present_quantity = true;
10146
      boolean that_present_quantity = true;
10147
      if (this_present_quantity || that_present_quantity) {
10148
        if (!(this_present_quantity && that_present_quantity))
10149
          return false;
10150
        if (this.quantity != that.quantity)
10151
          return false;
10152
      }
10153
 
10154
      return true;
10155
    }
10156
 
10157
    @Override
10158
    public int hashCode() {
10159
      return 0;
10160
    }
10161
 
10162
    public int compareTo(fulfillPO_args other) {
10163
      if (!getClass().equals(other.getClass())) {
10164
        return getClass().getName().compareTo(other.getClass().getName());
10165
      }
10166
 
10167
      int lastComparison = 0;
10168
      fulfillPO_args typedOther = (fulfillPO_args)other;
10169
 
10170
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10171
      if (lastComparison != 0) {
10172
        return lastComparison;
10173
      }
10174
      if (isSetPurchaseOrderId()) {
10175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10176
        if (lastComparison != 0) {
10177
          return lastComparison;
10178
        }
10179
      }
10180
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10181
      if (lastComparison != 0) {
10182
        return lastComparison;
10183
      }
10184
      if (isSetItemId()) {
10185
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10186
        if (lastComparison != 0) {
10187
          return lastComparison;
10188
        }
10189
      }
10190
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10191
      if (lastComparison != 0) {
10192
        return lastComparison;
10193
      }
10194
      if (isSetQuantity()) {
10195
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10196
        if (lastComparison != 0) {
10197
          return lastComparison;
10198
        }
10199
      }
10200
      return 0;
10201
    }
10202
 
10203
    public _Fields fieldForId(int fieldId) {
10204
      return _Fields.findByThriftId(fieldId);
10205
    }
10206
 
10207
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10208
      org.apache.thrift.protocol.TField field;
10209
      iprot.readStructBegin();
10210
      while (true)
10211
      {
10212
        field = iprot.readFieldBegin();
10213
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10214
          break;
10215
        }
10216
        switch (field.id) {
10217
          case 1: // PURCHASE_ORDER_ID
10218
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10219
              this.purchaseOrderId = iprot.readI64();
10220
              setPurchaseOrderIdIsSet(true);
10221
            } else { 
10222
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10223
            }
10224
            break;
10225
          case 2: // ITEM_ID
10226
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10227
              this.itemId = iprot.readI64();
10228
              setItemIdIsSet(true);
10229
            } else { 
10230
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10231
            }
10232
            break;
10233
          case 3: // QUANTITY
10234
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10235
              this.quantity = iprot.readI64();
10236
              setQuantityIsSet(true);
10237
            } else { 
10238
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10239
            }
10240
            break;
10241
          default:
10242
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10243
        }
10244
        iprot.readFieldEnd();
10245
      }
10246
      iprot.readStructEnd();
10247
      validate();
10248
    }
10249
 
10250
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10251
      validate();
10252
 
10253
      oprot.writeStructBegin(STRUCT_DESC);
10254
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10255
      oprot.writeI64(this.purchaseOrderId);
10256
      oprot.writeFieldEnd();
10257
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10258
      oprot.writeI64(this.itemId);
10259
      oprot.writeFieldEnd();
10260
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10261
      oprot.writeI64(this.quantity);
10262
      oprot.writeFieldEnd();
10263
      oprot.writeFieldStop();
10264
      oprot.writeStructEnd();
10265
    }
10266
 
10267
    @Override
10268
    public String toString() {
10269
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10270
      boolean first = true;
10271
 
10272
      sb.append("purchaseOrderId:");
10273
      sb.append(this.purchaseOrderId);
10274
      first = false;
10275
      if (!first) sb.append(", ");
10276
      sb.append("itemId:");
10277
      sb.append(this.itemId);
10278
      first = false;
10279
      if (!first) sb.append(", ");
10280
      sb.append("quantity:");
10281
      sb.append(this.quantity);
10282
      first = false;
10283
      sb.append(")");
10284
      return sb.toString();
10285
    }
10286
 
10287
    public void validate() throws org.apache.thrift.TException {
10288
      // check for required fields
10289
    }
10290
 
10291
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10292
      try {
10293
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10294
      } catch (org.apache.thrift.TException te) {
10295
        throw new java.io.IOException(te);
10296
      }
10297
    }
10298
 
10299
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10300
      try {
10301
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10302
        __isset_bit_vector = new BitSet(1);
10303
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10304
      } catch (org.apache.thrift.TException te) {
10305
        throw new java.io.IOException(te);
10306
      }
10307
    }
10308
 
10309
  }
10310
 
10311
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10312
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10313
 
10314
    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);
10315
 
10316
    private PurchaseServiceException e; // required
10317
 
10318
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10319
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10320
      E((short)1, "e");
10321
 
10322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10323
 
10324
      static {
10325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10326
          byName.put(field.getFieldName(), field);
10327
        }
10328
      }
10329
 
10330
      /**
10331
       * Find the _Fields constant that matches fieldId, or null if its not found.
10332
       */
10333
      public static _Fields findByThriftId(int fieldId) {
10334
        switch(fieldId) {
10335
          case 1: // E
10336
            return E;
10337
          default:
10338
            return null;
10339
        }
10340
      }
10341
 
10342
      /**
10343
       * Find the _Fields constant that matches fieldId, throwing an exception
10344
       * if it is not found.
10345
       */
10346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10347
        _Fields fields = findByThriftId(fieldId);
10348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10349
        return fields;
10350
      }
10351
 
10352
      /**
10353
       * Find the _Fields constant that matches name, or null if its not found.
10354
       */
10355
      public static _Fields findByName(String name) {
10356
        return byName.get(name);
10357
      }
10358
 
10359
      private final short _thriftId;
10360
      private final String _fieldName;
10361
 
10362
      _Fields(short thriftId, String fieldName) {
10363
        _thriftId = thriftId;
10364
        _fieldName = fieldName;
10365
      }
10366
 
10367
      public short getThriftFieldId() {
10368
        return _thriftId;
10369
      }
10370
 
10371
      public String getFieldName() {
10372
        return _fieldName;
10373
      }
10374
    }
10375
 
10376
    // isset id assignments
10377
 
10378
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10379
    static {
10380
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10381
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10382
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10383
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10384
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10385
    }
10386
 
10387
    public fulfillPO_result() {
10388
    }
10389
 
10390
    public fulfillPO_result(
10391
      PurchaseServiceException e)
10392
    {
10393
      this();
10394
      this.e = e;
10395
    }
10396
 
10397
    /**
10398
     * Performs a deep copy on <i>other</i>.
10399
     */
10400
    public fulfillPO_result(fulfillPO_result other) {
10401
      if (other.isSetE()) {
10402
        this.e = new PurchaseServiceException(other.e);
10403
      }
10404
    }
10405
 
10406
    public fulfillPO_result deepCopy() {
10407
      return new fulfillPO_result(this);
10408
    }
10409
 
10410
    @Override
10411
    public void clear() {
10412
      this.e = null;
10413
    }
10414
 
10415
    public PurchaseServiceException getE() {
10416
      return this.e;
10417
    }
10418
 
10419
    public void setE(PurchaseServiceException e) {
10420
      this.e = e;
10421
    }
10422
 
10423
    public void unsetE() {
10424
      this.e = null;
10425
    }
10426
 
10427
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10428
    public boolean isSetE() {
10429
      return this.e != null;
10430
    }
10431
 
10432
    public void setEIsSet(boolean value) {
10433
      if (!value) {
10434
        this.e = null;
10435
      }
10436
    }
10437
 
10438
    public void setFieldValue(_Fields field, Object value) {
10439
      switch (field) {
10440
      case E:
10441
        if (value == null) {
10442
          unsetE();
10443
        } else {
10444
          setE((PurchaseServiceException)value);
10445
        }
10446
        break;
10447
 
10448
      }
10449
    }
10450
 
10451
    public Object getFieldValue(_Fields field) {
10452
      switch (field) {
10453
      case E:
10454
        return getE();
10455
 
10456
      }
10457
      throw new IllegalStateException();
10458
    }
10459
 
10460
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10461
    public boolean isSet(_Fields field) {
10462
      if (field == null) {
10463
        throw new IllegalArgumentException();
10464
      }
10465
 
10466
      switch (field) {
10467
      case E:
10468
        return isSetE();
10469
      }
10470
      throw new IllegalStateException();
10471
    }
10472
 
10473
    @Override
10474
    public boolean equals(Object that) {
10475
      if (that == null)
10476
        return false;
10477
      if (that instanceof fulfillPO_result)
10478
        return this.equals((fulfillPO_result)that);
10479
      return false;
10480
    }
10481
 
10482
    public boolean equals(fulfillPO_result that) {
10483
      if (that == null)
10484
        return false;
10485
 
10486
      boolean this_present_e = true && this.isSetE();
10487
      boolean that_present_e = true && that.isSetE();
10488
      if (this_present_e || that_present_e) {
10489
        if (!(this_present_e && that_present_e))
10490
          return false;
10491
        if (!this.e.equals(that.e))
10492
          return false;
10493
      }
10494
 
10495
      return true;
10496
    }
10497
 
10498
    @Override
10499
    public int hashCode() {
10500
      return 0;
10501
    }
10502
 
10503
    public int compareTo(fulfillPO_result other) {
10504
      if (!getClass().equals(other.getClass())) {
10505
        return getClass().getName().compareTo(other.getClass().getName());
10506
      }
10507
 
10508
      int lastComparison = 0;
10509
      fulfillPO_result typedOther = (fulfillPO_result)other;
10510
 
10511
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10512
      if (lastComparison != 0) {
10513
        return lastComparison;
10514
      }
10515
      if (isSetE()) {
10516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10517
        if (lastComparison != 0) {
10518
          return lastComparison;
10519
        }
10520
      }
10521
      return 0;
10522
    }
10523
 
10524
    public _Fields fieldForId(int fieldId) {
10525
      return _Fields.findByThriftId(fieldId);
10526
    }
10527
 
10528
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10529
      org.apache.thrift.protocol.TField field;
10530
      iprot.readStructBegin();
10531
      while (true)
10532
      {
10533
        field = iprot.readFieldBegin();
10534
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10535
          break;
10536
        }
10537
        switch (field.id) {
10538
          case 1: // E
10539
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10540
              this.e = new PurchaseServiceException();
10541
              this.e.read(iprot);
10542
            } else { 
10543
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10544
            }
10545
            break;
10546
          default:
10547
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10548
        }
10549
        iprot.readFieldEnd();
10550
      }
10551
      iprot.readStructEnd();
10552
      validate();
10553
    }
10554
 
10555
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10556
      oprot.writeStructBegin(STRUCT_DESC);
10557
 
10558
      if (this.isSetE()) {
10559
        oprot.writeFieldBegin(E_FIELD_DESC);
10560
        this.e.write(oprot);
10561
        oprot.writeFieldEnd();
10562
      }
10563
      oprot.writeFieldStop();
10564
      oprot.writeStructEnd();
10565
    }
10566
 
10567
    @Override
10568
    public String toString() {
10569
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
10570
      boolean first = true;
10571
 
10572
      sb.append("e:");
10573
      if (this.e == null) {
10574
        sb.append("null");
10575
      } else {
10576
        sb.append(this.e);
10577
      }
10578
      first = false;
10579
      sb.append(")");
10580
      return sb.toString();
10581
    }
10582
 
10583
    public void validate() throws org.apache.thrift.TException {
10584
      // check for required fields
10585
    }
10586
 
10587
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10588
      try {
10589
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10590
      } catch (org.apache.thrift.TException te) {
10591
        throw new java.io.IOException(te);
10592
      }
10593
    }
10594
 
10595
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10596
      try {
10597
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10598
      } catch (org.apache.thrift.TException te) {
10599
        throw new java.io.IOException(te);
10600
      }
10601
    }
10602
 
10603
  }
10604
 
10605
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
10606
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
10607
 
10608
    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);
10609
 
10610
    private PurchaseOrder purchaseOrder; // required
10611
 
10612
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10613
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10614
      PURCHASE_ORDER((short)1, "purchaseOrder");
10615
 
10616
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10617
 
10618
      static {
10619
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10620
          byName.put(field.getFieldName(), field);
10621
        }
10622
      }
10623
 
10624
      /**
10625
       * Find the _Fields constant that matches fieldId, or null if its not found.
10626
       */
10627
      public static _Fields findByThriftId(int fieldId) {
10628
        switch(fieldId) {
10629
          case 1: // PURCHASE_ORDER
10630
            return PURCHASE_ORDER;
10631
          default:
10632
            return null;
10633
        }
10634
      }
10635
 
10636
      /**
10637
       * Find the _Fields constant that matches fieldId, throwing an exception
10638
       * if it is not found.
10639
       */
10640
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10641
        _Fields fields = findByThriftId(fieldId);
10642
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10643
        return fields;
10644
      }
10645
 
10646
      /**
10647
       * Find the _Fields constant that matches name, or null if its not found.
10648
       */
10649
      public static _Fields findByName(String name) {
10650
        return byName.get(name);
10651
      }
10652
 
10653
      private final short _thriftId;
10654
      private final String _fieldName;
10655
 
10656
      _Fields(short thriftId, String fieldName) {
10657
        _thriftId = thriftId;
10658
        _fieldName = fieldName;
10659
      }
10660
 
10661
      public short getThriftFieldId() {
10662
        return _thriftId;
10663
      }
10664
 
10665
      public String getFieldName() {
10666
        return _fieldName;
10667
      }
10668
    }
10669
 
10670
    // isset id assignments
10671
 
10672
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10673
    static {
10674
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10675
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10676
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
10677
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10678
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
10679
    }
10680
 
10681
    public updatePurchaseOrder_args() {
10682
    }
10683
 
10684
    public updatePurchaseOrder_args(
10685
      PurchaseOrder purchaseOrder)
10686
    {
10687
      this();
10688
      this.purchaseOrder = purchaseOrder;
10689
    }
10690
 
10691
    /**
10692
     * Performs a deep copy on <i>other</i>.
10693
     */
10694
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
10695
      if (other.isSetPurchaseOrder()) {
10696
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
10697
      }
10698
    }
10699
 
10700
    public updatePurchaseOrder_args deepCopy() {
10701
      return new updatePurchaseOrder_args(this);
10702
    }
10703
 
10704
    @Override
10705
    public void clear() {
10706
      this.purchaseOrder = null;
10707
    }
10708
 
10709
    public PurchaseOrder getPurchaseOrder() {
10710
      return this.purchaseOrder;
10711
    }
10712
 
10713
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
10714
      this.purchaseOrder = purchaseOrder;
10715
    }
10716
 
10717
    public void unsetPurchaseOrder() {
10718
      this.purchaseOrder = null;
10719
    }
10720
 
10721
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
10722
    public boolean isSetPurchaseOrder() {
10723
      return this.purchaseOrder != null;
10724
    }
10725
 
10726
    public void setPurchaseOrderIsSet(boolean value) {
10727
      if (!value) {
10728
        this.purchaseOrder = null;
10729
      }
10730
    }
10731
 
10732
    public void setFieldValue(_Fields field, Object value) {
10733
      switch (field) {
10734
      case PURCHASE_ORDER:
10735
        if (value == null) {
10736
          unsetPurchaseOrder();
10737
        } else {
10738
          setPurchaseOrder((PurchaseOrder)value);
10739
        }
10740
        break;
10741
 
10742
      }
10743
    }
10744
 
10745
    public Object getFieldValue(_Fields field) {
10746
      switch (field) {
10747
      case PURCHASE_ORDER:
10748
        return getPurchaseOrder();
10749
 
10750
      }
10751
      throw new IllegalStateException();
10752
    }
10753
 
10754
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10755
    public boolean isSet(_Fields field) {
10756
      if (field == null) {
10757
        throw new IllegalArgumentException();
10758
      }
10759
 
10760
      switch (field) {
10761
      case PURCHASE_ORDER:
10762
        return isSetPurchaseOrder();
10763
      }
10764
      throw new IllegalStateException();
10765
    }
10766
 
10767
    @Override
10768
    public boolean equals(Object that) {
10769
      if (that == null)
10770
        return false;
10771
      if (that instanceof updatePurchaseOrder_args)
10772
        return this.equals((updatePurchaseOrder_args)that);
10773
      return false;
10774
    }
10775
 
10776
    public boolean equals(updatePurchaseOrder_args that) {
10777
      if (that == null)
10778
        return false;
10779
 
10780
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
10781
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
10782
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
10783
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
10784
          return false;
10785
        if (!this.purchaseOrder.equals(that.purchaseOrder))
10786
          return false;
10787
      }
10788
 
10789
      return true;
10790
    }
10791
 
10792
    @Override
10793
    public int hashCode() {
10794
      return 0;
10795
    }
10796
 
10797
    public int compareTo(updatePurchaseOrder_args other) {
10798
      if (!getClass().equals(other.getClass())) {
10799
        return getClass().getName().compareTo(other.getClass().getName());
10800
      }
10801
 
10802
      int lastComparison = 0;
10803
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
10804
 
10805
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
10806
      if (lastComparison != 0) {
10807
        return lastComparison;
10808
      }
10809
      if (isSetPurchaseOrder()) {
10810
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
10811
        if (lastComparison != 0) {
10812
          return lastComparison;
10813
        }
10814
      }
10815
      return 0;
10816
    }
10817
 
10818
    public _Fields fieldForId(int fieldId) {
10819
      return _Fields.findByThriftId(fieldId);
10820
    }
10821
 
10822
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10823
      org.apache.thrift.protocol.TField field;
10824
      iprot.readStructBegin();
10825
      while (true)
10826
      {
10827
        field = iprot.readFieldBegin();
10828
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10829
          break;
10830
        }
10831
        switch (field.id) {
10832
          case 1: // PURCHASE_ORDER
10833
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10834
              this.purchaseOrder = new PurchaseOrder();
10835
              this.purchaseOrder.read(iprot);
10836
            } else { 
10837
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10838
            }
10839
            break;
10840
          default:
10841
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10842
        }
10843
        iprot.readFieldEnd();
10844
      }
10845
      iprot.readStructEnd();
10846
      validate();
10847
    }
10848
 
10849
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10850
      validate();
10851
 
10852
      oprot.writeStructBegin(STRUCT_DESC);
10853
      if (this.purchaseOrder != null) {
10854
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
10855
        this.purchaseOrder.write(oprot);
10856
        oprot.writeFieldEnd();
10857
      }
10858
      oprot.writeFieldStop();
10859
      oprot.writeStructEnd();
10860
    }
10861
 
10862
    @Override
10863
    public String toString() {
10864
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
10865
      boolean first = true;
10866
 
10867
      sb.append("purchaseOrder:");
10868
      if (this.purchaseOrder == null) {
10869
        sb.append("null");
10870
      } else {
10871
        sb.append(this.purchaseOrder);
10872
      }
10873
      first = false;
10874
      sb.append(")");
10875
      return sb.toString();
10876
    }
10877
 
10878
    public void validate() throws org.apache.thrift.TException {
10879
      // check for required fields
10880
    }
10881
 
10882
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10883
      try {
10884
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10885
      } catch (org.apache.thrift.TException te) {
10886
        throw new java.io.IOException(te);
10887
      }
10888
    }
10889
 
10890
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10891
      try {
10892
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10893
      } catch (org.apache.thrift.TException te) {
10894
        throw new java.io.IOException(te);
10895
      }
10896
    }
10897
 
10898
  }
10899
 
10900
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
10901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
10902
 
10903
    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);
10904
 
10905
    private PurchaseServiceException e; // required
10906
 
10907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10908
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10909
      E((short)1, "e");
10910
 
10911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10912
 
10913
      static {
10914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10915
          byName.put(field.getFieldName(), field);
10916
        }
10917
      }
10918
 
10919
      /**
10920
       * Find the _Fields constant that matches fieldId, or null if its not found.
10921
       */
10922
      public static _Fields findByThriftId(int fieldId) {
10923
        switch(fieldId) {
10924
          case 1: // E
10925
            return E;
10926
          default:
10927
            return null;
10928
        }
10929
      }
10930
 
10931
      /**
10932
       * Find the _Fields constant that matches fieldId, throwing an exception
10933
       * if it is not found.
10934
       */
10935
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10936
        _Fields fields = findByThriftId(fieldId);
10937
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10938
        return fields;
10939
      }
10940
 
10941
      /**
10942
       * Find the _Fields constant that matches name, or null if its not found.
10943
       */
10944
      public static _Fields findByName(String name) {
10945
        return byName.get(name);
10946
      }
10947
 
10948
      private final short _thriftId;
10949
      private final String _fieldName;
10950
 
10951
      _Fields(short thriftId, String fieldName) {
10952
        _thriftId = thriftId;
10953
        _fieldName = fieldName;
10954
      }
10955
 
10956
      public short getThriftFieldId() {
10957
        return _thriftId;
10958
      }
10959
 
10960
      public String getFieldName() {
10961
        return _fieldName;
10962
      }
10963
    }
10964
 
10965
    // isset id assignments
10966
 
10967
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10968
    static {
10969
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10970
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10971
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10972
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10973
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
10974
    }
10975
 
10976
    public updatePurchaseOrder_result() {
10977
    }
10978
 
10979
    public updatePurchaseOrder_result(
10980
      PurchaseServiceException e)
10981
    {
10982
      this();
10983
      this.e = e;
10984
    }
10985
 
10986
    /**
10987
     * Performs a deep copy on <i>other</i>.
10988
     */
10989
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
10990
      if (other.isSetE()) {
10991
        this.e = new PurchaseServiceException(other.e);
10992
      }
10993
    }
10994
 
10995
    public updatePurchaseOrder_result deepCopy() {
10996
      return new updatePurchaseOrder_result(this);
10997
    }
10998
 
10999
    @Override
11000
    public void clear() {
11001
      this.e = null;
11002
    }
11003
 
11004
    public PurchaseServiceException getE() {
11005
      return this.e;
11006
    }
11007
 
11008
    public void setE(PurchaseServiceException e) {
11009
      this.e = e;
11010
    }
11011
 
11012
    public void unsetE() {
11013
      this.e = null;
11014
    }
11015
 
11016
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11017
    public boolean isSetE() {
11018
      return this.e != null;
11019
    }
11020
 
11021
    public void setEIsSet(boolean value) {
11022
      if (!value) {
11023
        this.e = null;
11024
      }
11025
    }
11026
 
11027
    public void setFieldValue(_Fields field, Object value) {
11028
      switch (field) {
11029
      case E:
11030
        if (value == null) {
11031
          unsetE();
11032
        } else {
11033
          setE((PurchaseServiceException)value);
11034
        }
11035
        break;
11036
 
11037
      }
11038
    }
11039
 
11040
    public Object getFieldValue(_Fields field) {
11041
      switch (field) {
11042
      case E:
11043
        return getE();
11044
 
11045
      }
11046
      throw new IllegalStateException();
11047
    }
11048
 
11049
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11050
    public boolean isSet(_Fields field) {
11051
      if (field == null) {
11052
        throw new IllegalArgumentException();
11053
      }
11054
 
11055
      switch (field) {
11056
      case E:
11057
        return isSetE();
11058
      }
11059
      throw new IllegalStateException();
11060
    }
11061
 
11062
    @Override
11063
    public boolean equals(Object that) {
11064
      if (that == null)
11065
        return false;
11066
      if (that instanceof updatePurchaseOrder_result)
11067
        return this.equals((updatePurchaseOrder_result)that);
11068
      return false;
11069
    }
11070
 
11071
    public boolean equals(updatePurchaseOrder_result that) {
11072
      if (that == null)
11073
        return false;
11074
 
11075
      boolean this_present_e = true && this.isSetE();
11076
      boolean that_present_e = true && that.isSetE();
11077
      if (this_present_e || that_present_e) {
11078
        if (!(this_present_e && that_present_e))
11079
          return false;
11080
        if (!this.e.equals(that.e))
11081
          return false;
11082
      }
11083
 
11084
      return true;
11085
    }
11086
 
11087
    @Override
11088
    public int hashCode() {
11089
      return 0;
11090
    }
11091
 
11092
    public int compareTo(updatePurchaseOrder_result other) {
11093
      if (!getClass().equals(other.getClass())) {
11094
        return getClass().getName().compareTo(other.getClass().getName());
11095
      }
11096
 
11097
      int lastComparison = 0;
11098
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
11099
 
11100
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11101
      if (lastComparison != 0) {
11102
        return lastComparison;
11103
      }
11104
      if (isSetE()) {
11105
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11106
        if (lastComparison != 0) {
11107
          return lastComparison;
11108
        }
11109
      }
11110
      return 0;
11111
    }
11112
 
11113
    public _Fields fieldForId(int fieldId) {
11114
      return _Fields.findByThriftId(fieldId);
11115
    }
11116
 
11117
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11118
      org.apache.thrift.protocol.TField field;
11119
      iprot.readStructBegin();
11120
      while (true)
11121
      {
11122
        field = iprot.readFieldBegin();
11123
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11124
          break;
11125
        }
11126
        switch (field.id) {
11127
          case 1: // E
11128
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11129
              this.e = new PurchaseServiceException();
11130
              this.e.read(iprot);
11131
            } else { 
11132
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11133
            }
11134
            break;
11135
          default:
11136
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11137
        }
11138
        iprot.readFieldEnd();
11139
      }
11140
      iprot.readStructEnd();
11141
      validate();
11142
    }
11143
 
11144
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11145
      oprot.writeStructBegin(STRUCT_DESC);
11146
 
11147
      if (this.isSetE()) {
11148
        oprot.writeFieldBegin(E_FIELD_DESC);
11149
        this.e.write(oprot);
11150
        oprot.writeFieldEnd();
11151
      }
11152
      oprot.writeFieldStop();
11153
      oprot.writeStructEnd();
11154
    }
11155
 
11156
    @Override
11157
    public String toString() {
11158
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
11159
      boolean first = true;
11160
 
11161
      sb.append("e:");
11162
      if (this.e == null) {
11163
        sb.append("null");
11164
      } else {
11165
        sb.append(this.e);
11166
      }
11167
      first = false;
11168
      sb.append(")");
11169
      return sb.toString();
11170
    }
11171
 
11172
    public void validate() throws org.apache.thrift.TException {
11173
      // check for required fields
11174
    }
11175
 
11176
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11177
      try {
11178
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11179
      } catch (org.apache.thrift.TException te) {
11180
        throw new java.io.IOException(te);
11181
      }
11182
    }
11183
 
11184
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11185
      try {
11186
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11187
      } catch (org.apache.thrift.TException te) {
11188
        throw new java.io.IOException(te);
11189
      }
11190
    }
11191
 
11192
  }
11193
 
5185 mandeep.dh 11194
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11195
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11196
 
11197
    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);
11198
    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);
11199
    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);
11200
 
11201
    private long purchaseId; // required
11202
    private long itemId; // required
11203
    private long quantity; // required
11204
 
11205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11206
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11207
      PURCHASE_ID((short)1, "purchaseId"),
11208
      ITEM_ID((short)2, "itemId"),
11209
      QUANTITY((short)3, "quantity");
11210
 
11211
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11212
 
11213
      static {
11214
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11215
          byName.put(field.getFieldName(), field);
11216
        }
11217
      }
11218
 
11219
      /**
11220
       * Find the _Fields constant that matches fieldId, or null if its not found.
11221
       */
11222
      public static _Fields findByThriftId(int fieldId) {
11223
        switch(fieldId) {
11224
          case 1: // PURCHASE_ID
11225
            return PURCHASE_ID;
11226
          case 2: // ITEM_ID
11227
            return ITEM_ID;
11228
          case 3: // QUANTITY
11229
            return QUANTITY;
11230
          default:
11231
            return null;
11232
        }
11233
      }
11234
 
11235
      /**
11236
       * Find the _Fields constant that matches fieldId, throwing an exception
11237
       * if it is not found.
11238
       */
11239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11240
        _Fields fields = findByThriftId(fieldId);
11241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11242
        return fields;
11243
      }
11244
 
11245
      /**
11246
       * Find the _Fields constant that matches name, or null if its not found.
11247
       */
11248
      public static _Fields findByName(String name) {
11249
        return byName.get(name);
11250
      }
11251
 
11252
      private final short _thriftId;
11253
      private final String _fieldName;
11254
 
11255
      _Fields(short thriftId, String fieldName) {
11256
        _thriftId = thriftId;
11257
        _fieldName = fieldName;
11258
      }
11259
 
11260
      public short getThriftFieldId() {
11261
        return _thriftId;
11262
      }
11263
 
11264
      public String getFieldName() {
11265
        return _fieldName;
11266
      }
11267
    }
11268
 
11269
    // isset id assignments
11270
    private static final int __PURCHASEID_ISSET_ID = 0;
11271
    private static final int __ITEMID_ISSET_ID = 1;
11272
    private static final int __QUANTITY_ISSET_ID = 2;
11273
    private BitSet __isset_bit_vector = new BitSet(3);
11274
 
11275
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11276
    static {
11277
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11278
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11279
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11280
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11281
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11282
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11283
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11284
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11285
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11286
    }
11287
 
11288
    public unFulfillPO_args() {
11289
    }
11290
 
11291
    public unFulfillPO_args(
11292
      long purchaseId,
11293
      long itemId,
11294
      long quantity)
11295
    {
11296
      this();
11297
      this.purchaseId = purchaseId;
11298
      setPurchaseIdIsSet(true);
11299
      this.itemId = itemId;
11300
      setItemIdIsSet(true);
11301
      this.quantity = quantity;
11302
      setQuantityIsSet(true);
11303
    }
11304
 
11305
    /**
11306
     * Performs a deep copy on <i>other</i>.
11307
     */
11308
    public unFulfillPO_args(unFulfillPO_args other) {
11309
      __isset_bit_vector.clear();
11310
      __isset_bit_vector.or(other.__isset_bit_vector);
11311
      this.purchaseId = other.purchaseId;
11312
      this.itemId = other.itemId;
11313
      this.quantity = other.quantity;
11314
    }
11315
 
11316
    public unFulfillPO_args deepCopy() {
11317
      return new unFulfillPO_args(this);
11318
    }
11319
 
11320
    @Override
11321
    public void clear() {
11322
      setPurchaseIdIsSet(false);
11323
      this.purchaseId = 0;
11324
      setItemIdIsSet(false);
11325
      this.itemId = 0;
11326
      setQuantityIsSet(false);
11327
      this.quantity = 0;
11328
    }
11329
 
11330
    public long getPurchaseId() {
11331
      return this.purchaseId;
11332
    }
11333
 
11334
    public void setPurchaseId(long purchaseId) {
11335
      this.purchaseId = purchaseId;
11336
      setPurchaseIdIsSet(true);
11337
    }
11338
 
11339
    public void unsetPurchaseId() {
11340
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11341
    }
11342
 
11343
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11344
    public boolean isSetPurchaseId() {
11345
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11346
    }
11347
 
11348
    public void setPurchaseIdIsSet(boolean value) {
11349
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11350
    }
11351
 
11352
    public long getItemId() {
11353
      return this.itemId;
11354
    }
11355
 
11356
    public void setItemId(long itemId) {
11357
      this.itemId = itemId;
11358
      setItemIdIsSet(true);
11359
    }
11360
 
11361
    public void unsetItemId() {
11362
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11363
    }
11364
 
11365
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11366
    public boolean isSetItemId() {
11367
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11368
    }
11369
 
11370
    public void setItemIdIsSet(boolean value) {
11371
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11372
    }
11373
 
11374
    public long getQuantity() {
11375
      return this.quantity;
11376
    }
11377
 
11378
    public void setQuantity(long quantity) {
11379
      this.quantity = quantity;
11380
      setQuantityIsSet(true);
11381
    }
11382
 
11383
    public void unsetQuantity() {
11384
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11385
    }
11386
 
11387
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11388
    public boolean isSetQuantity() {
11389
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11390
    }
11391
 
11392
    public void setQuantityIsSet(boolean value) {
11393
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11394
    }
11395
 
11396
    public void setFieldValue(_Fields field, Object value) {
11397
      switch (field) {
11398
      case PURCHASE_ID:
11399
        if (value == null) {
11400
          unsetPurchaseId();
11401
        } else {
11402
          setPurchaseId((Long)value);
11403
        }
11404
        break;
11405
 
11406
      case ITEM_ID:
11407
        if (value == null) {
11408
          unsetItemId();
11409
        } else {
11410
          setItemId((Long)value);
11411
        }
11412
        break;
11413
 
11414
      case QUANTITY:
11415
        if (value == null) {
11416
          unsetQuantity();
11417
        } else {
11418
          setQuantity((Long)value);
11419
        }
11420
        break;
11421
 
11422
      }
11423
    }
11424
 
11425
    public Object getFieldValue(_Fields field) {
11426
      switch (field) {
11427
      case PURCHASE_ID:
11428
        return Long.valueOf(getPurchaseId());
11429
 
11430
      case ITEM_ID:
11431
        return Long.valueOf(getItemId());
11432
 
11433
      case QUANTITY:
11434
        return Long.valueOf(getQuantity());
11435
 
11436
      }
11437
      throw new IllegalStateException();
11438
    }
11439
 
11440
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11441
    public boolean isSet(_Fields field) {
11442
      if (field == null) {
11443
        throw new IllegalArgumentException();
11444
      }
11445
 
11446
      switch (field) {
11447
      case PURCHASE_ID:
11448
        return isSetPurchaseId();
11449
      case ITEM_ID:
11450
        return isSetItemId();
11451
      case QUANTITY:
11452
        return isSetQuantity();
11453
      }
11454
      throw new IllegalStateException();
11455
    }
11456
 
11457
    @Override
11458
    public boolean equals(Object that) {
11459
      if (that == null)
11460
        return false;
11461
      if (that instanceof unFulfillPO_args)
11462
        return this.equals((unFulfillPO_args)that);
11463
      return false;
11464
    }
11465
 
11466
    public boolean equals(unFulfillPO_args that) {
11467
      if (that == null)
11468
        return false;
11469
 
11470
      boolean this_present_purchaseId = true;
11471
      boolean that_present_purchaseId = true;
11472
      if (this_present_purchaseId || that_present_purchaseId) {
11473
        if (!(this_present_purchaseId && that_present_purchaseId))
11474
          return false;
11475
        if (this.purchaseId != that.purchaseId)
11476
          return false;
11477
      }
11478
 
11479
      boolean this_present_itemId = true;
11480
      boolean that_present_itemId = true;
11481
      if (this_present_itemId || that_present_itemId) {
11482
        if (!(this_present_itemId && that_present_itemId))
11483
          return false;
11484
        if (this.itemId != that.itemId)
11485
          return false;
11486
      }
11487
 
11488
      boolean this_present_quantity = true;
11489
      boolean that_present_quantity = true;
11490
      if (this_present_quantity || that_present_quantity) {
11491
        if (!(this_present_quantity && that_present_quantity))
11492
          return false;
11493
        if (this.quantity != that.quantity)
11494
          return false;
11495
      }
11496
 
11497
      return true;
11498
    }
11499
 
11500
    @Override
11501
    public int hashCode() {
11502
      return 0;
11503
    }
11504
 
11505
    public int compareTo(unFulfillPO_args other) {
11506
      if (!getClass().equals(other.getClass())) {
11507
        return getClass().getName().compareTo(other.getClass().getName());
11508
      }
11509
 
11510
      int lastComparison = 0;
11511
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11512
 
11513
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11514
      if (lastComparison != 0) {
11515
        return lastComparison;
11516
      }
11517
      if (isSetPurchaseId()) {
11518
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11519
        if (lastComparison != 0) {
11520
          return lastComparison;
11521
        }
11522
      }
11523
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11524
      if (lastComparison != 0) {
11525
        return lastComparison;
11526
      }
11527
      if (isSetItemId()) {
11528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11529
        if (lastComparison != 0) {
11530
          return lastComparison;
11531
        }
11532
      }
11533
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11534
      if (lastComparison != 0) {
11535
        return lastComparison;
11536
      }
11537
      if (isSetQuantity()) {
11538
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11539
        if (lastComparison != 0) {
11540
          return lastComparison;
11541
        }
11542
      }
11543
      return 0;
11544
    }
11545
 
11546
    public _Fields fieldForId(int fieldId) {
11547
      return _Fields.findByThriftId(fieldId);
11548
    }
11549
 
11550
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11551
      org.apache.thrift.protocol.TField field;
11552
      iprot.readStructBegin();
11553
      while (true)
11554
      {
11555
        field = iprot.readFieldBegin();
11556
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11557
          break;
11558
        }
11559
        switch (field.id) {
11560
          case 1: // PURCHASE_ID
11561
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11562
              this.purchaseId = iprot.readI64();
11563
              setPurchaseIdIsSet(true);
11564
            } else { 
11565
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11566
            }
11567
            break;
11568
          case 2: // ITEM_ID
11569
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11570
              this.itemId = iprot.readI64();
11571
              setItemIdIsSet(true);
11572
            } else { 
11573
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11574
            }
11575
            break;
11576
          case 3: // QUANTITY
11577
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11578
              this.quantity = iprot.readI64();
11579
              setQuantityIsSet(true);
11580
            } else { 
11581
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11582
            }
11583
            break;
11584
          default:
11585
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11586
        }
11587
        iprot.readFieldEnd();
11588
      }
11589
      iprot.readStructEnd();
11590
      validate();
11591
    }
11592
 
11593
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11594
      validate();
11595
 
11596
      oprot.writeStructBegin(STRUCT_DESC);
11597
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
11598
      oprot.writeI64(this.purchaseId);
11599
      oprot.writeFieldEnd();
11600
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11601
      oprot.writeI64(this.itemId);
11602
      oprot.writeFieldEnd();
11603
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11604
      oprot.writeI64(this.quantity);
11605
      oprot.writeFieldEnd();
11606
      oprot.writeFieldStop();
11607
      oprot.writeStructEnd();
11608
    }
11609
 
11610
    @Override
11611
    public String toString() {
11612
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
11613
      boolean first = true;
11614
 
11615
      sb.append("purchaseId:");
11616
      sb.append(this.purchaseId);
11617
      first = false;
11618
      if (!first) sb.append(", ");
11619
      sb.append("itemId:");
11620
      sb.append(this.itemId);
11621
      first = false;
11622
      if (!first) sb.append(", ");
11623
      sb.append("quantity:");
11624
      sb.append(this.quantity);
11625
      first = false;
11626
      sb.append(")");
11627
      return sb.toString();
11628
    }
11629
 
11630
    public void validate() throws org.apache.thrift.TException {
11631
      // check for required fields
11632
    }
11633
 
11634
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11635
      try {
11636
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11637
      } catch (org.apache.thrift.TException te) {
11638
        throw new java.io.IOException(te);
11639
      }
11640
    }
11641
 
11642
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11643
      try {
11644
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11645
        __isset_bit_vector = new BitSet(1);
11646
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11647
      } catch (org.apache.thrift.TException te) {
11648
        throw new java.io.IOException(te);
11649
      }
11650
    }
11651
 
11652
  }
11653
 
11654
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11655
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
11656
 
11657
    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);
11658
 
11659
    private PurchaseServiceException e; // required
11660
 
11661
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11662
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11663
      E((short)1, "e");
11664
 
11665
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11666
 
11667
      static {
11668
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11669
          byName.put(field.getFieldName(), field);
11670
        }
11671
      }
11672
 
11673
      /**
11674
       * Find the _Fields constant that matches fieldId, or null if its not found.
11675
       */
11676
      public static _Fields findByThriftId(int fieldId) {
11677
        switch(fieldId) {
11678
          case 1: // E
11679
            return E;
11680
          default:
11681
            return null;
11682
        }
11683
      }
11684
 
11685
      /**
11686
       * Find the _Fields constant that matches fieldId, throwing an exception
11687
       * if it is not found.
11688
       */
11689
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11690
        _Fields fields = findByThriftId(fieldId);
11691
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11692
        return fields;
11693
      }
11694
 
11695
      /**
11696
       * Find the _Fields constant that matches name, or null if its not found.
11697
       */
11698
      public static _Fields findByName(String name) {
11699
        return byName.get(name);
11700
      }
11701
 
11702
      private final short _thriftId;
11703
      private final String _fieldName;
11704
 
11705
      _Fields(short thriftId, String fieldName) {
11706
        _thriftId = thriftId;
11707
        _fieldName = fieldName;
11708
      }
11709
 
11710
      public short getThriftFieldId() {
11711
        return _thriftId;
11712
      }
11713
 
11714
      public String getFieldName() {
11715
        return _fieldName;
11716
      }
11717
    }
11718
 
11719
    // isset id assignments
11720
 
11721
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11722
    static {
11723
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11724
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11725
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11726
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11727
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
11728
    }
11729
 
11730
    public unFulfillPO_result() {
11731
    }
11732
 
11733
    public unFulfillPO_result(
11734
      PurchaseServiceException e)
11735
    {
11736
      this();
11737
      this.e = e;
11738
    }
11739
 
11740
    /**
11741
     * Performs a deep copy on <i>other</i>.
11742
     */
11743
    public unFulfillPO_result(unFulfillPO_result other) {
11744
      if (other.isSetE()) {
11745
        this.e = new PurchaseServiceException(other.e);
11746
      }
11747
    }
11748
 
11749
    public unFulfillPO_result deepCopy() {
11750
      return new unFulfillPO_result(this);
11751
    }
11752
 
11753
    @Override
11754
    public void clear() {
11755
      this.e = null;
11756
    }
11757
 
11758
    public PurchaseServiceException getE() {
11759
      return this.e;
11760
    }
11761
 
11762
    public void setE(PurchaseServiceException e) {
11763
      this.e = e;
11764
    }
11765
 
11766
    public void unsetE() {
11767
      this.e = null;
11768
    }
11769
 
11770
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11771
    public boolean isSetE() {
11772
      return this.e != null;
11773
    }
11774
 
11775
    public void setEIsSet(boolean value) {
11776
      if (!value) {
11777
        this.e = null;
11778
      }
11779
    }
11780
 
11781
    public void setFieldValue(_Fields field, Object value) {
11782
      switch (field) {
11783
      case E:
11784
        if (value == null) {
11785
          unsetE();
11786
        } else {
11787
          setE((PurchaseServiceException)value);
11788
        }
11789
        break;
11790
 
11791
      }
11792
    }
11793
 
11794
    public Object getFieldValue(_Fields field) {
11795
      switch (field) {
11796
      case E:
11797
        return getE();
11798
 
11799
      }
11800
      throw new IllegalStateException();
11801
    }
11802
 
11803
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11804
    public boolean isSet(_Fields field) {
11805
      if (field == null) {
11806
        throw new IllegalArgumentException();
11807
      }
11808
 
11809
      switch (field) {
11810
      case E:
11811
        return isSetE();
11812
      }
11813
      throw new IllegalStateException();
11814
    }
11815
 
11816
    @Override
11817
    public boolean equals(Object that) {
11818
      if (that == null)
11819
        return false;
11820
      if (that instanceof unFulfillPO_result)
11821
        return this.equals((unFulfillPO_result)that);
11822
      return false;
11823
    }
11824
 
11825
    public boolean equals(unFulfillPO_result that) {
11826
      if (that == null)
11827
        return false;
11828
 
11829
      boolean this_present_e = true && this.isSetE();
11830
      boolean that_present_e = true && that.isSetE();
11831
      if (this_present_e || that_present_e) {
11832
        if (!(this_present_e && that_present_e))
11833
          return false;
11834
        if (!this.e.equals(that.e))
11835
          return false;
11836
      }
11837
 
11838
      return true;
11839
    }
11840
 
11841
    @Override
11842
    public int hashCode() {
11843
      return 0;
11844
    }
11845
 
11846
    public int compareTo(unFulfillPO_result other) {
11847
      if (!getClass().equals(other.getClass())) {
11848
        return getClass().getName().compareTo(other.getClass().getName());
11849
      }
11850
 
11851
      int lastComparison = 0;
11852
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
11853
 
11854
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11855
      if (lastComparison != 0) {
11856
        return lastComparison;
11857
      }
11858
      if (isSetE()) {
11859
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11860
        if (lastComparison != 0) {
11861
          return lastComparison;
11862
        }
11863
      }
11864
      return 0;
11865
    }
11866
 
11867
    public _Fields fieldForId(int fieldId) {
11868
      return _Fields.findByThriftId(fieldId);
11869
    }
11870
 
11871
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11872
      org.apache.thrift.protocol.TField field;
11873
      iprot.readStructBegin();
11874
      while (true)
11875
      {
11876
        field = iprot.readFieldBegin();
11877
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11878
          break;
11879
        }
11880
        switch (field.id) {
11881
          case 1: // E
11882
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11883
              this.e = new PurchaseServiceException();
11884
              this.e.read(iprot);
11885
            } else { 
11886
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11887
            }
11888
            break;
11889
          default:
11890
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11891
        }
11892
        iprot.readFieldEnd();
11893
      }
11894
      iprot.readStructEnd();
11895
      validate();
11896
    }
11897
 
11898
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11899
      oprot.writeStructBegin(STRUCT_DESC);
11900
 
11901
      if (this.isSetE()) {
11902
        oprot.writeFieldBegin(E_FIELD_DESC);
11903
        this.e.write(oprot);
11904
        oprot.writeFieldEnd();
11905
      }
11906
      oprot.writeFieldStop();
11907
      oprot.writeStructEnd();
11908
    }
11909
 
11910
    @Override
11911
    public String toString() {
11912
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
11913
      boolean first = true;
11914
 
11915
      sb.append("e:");
11916
      if (this.e == null) {
11917
        sb.append("null");
11918
      } else {
11919
        sb.append(this.e);
11920
      }
11921
      first = false;
11922
      sb.append(")");
11923
      return sb.toString();
11924
    }
11925
 
11926
    public void validate() throws org.apache.thrift.TException {
11927
      // check for required fields
11928
    }
11929
 
11930
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11931
      try {
11932
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11933
      } catch (org.apache.thrift.TException te) {
11934
        throw new java.io.IOException(te);
11935
      }
11936
    }
11937
 
11938
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11939
      try {
11940
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11941
      } catch (org.apache.thrift.TException te) {
11942
        throw new java.io.IOException(te);
11943
      }
11944
    }
11945
 
11946
  }
11947
 
5443 mandeep.dh 11948
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
11949
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
11950
 
11951
    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);
11952
 
11953
    private long date; // required
11954
 
11955
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11956
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11957
      DATE((short)1, "date");
11958
 
11959
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11960
 
11961
      static {
11962
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11963
          byName.put(field.getFieldName(), field);
11964
        }
11965
      }
11966
 
11967
      /**
11968
       * Find the _Fields constant that matches fieldId, or null if its not found.
11969
       */
11970
      public static _Fields findByThriftId(int fieldId) {
11971
        switch(fieldId) {
11972
          case 1: // DATE
11973
            return DATE;
11974
          default:
11975
            return null;
11976
        }
11977
      }
11978
 
11979
      /**
11980
       * Find the _Fields constant that matches fieldId, throwing an exception
11981
       * if it is not found.
11982
       */
11983
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11984
        _Fields fields = findByThriftId(fieldId);
11985
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11986
        return fields;
11987
      }
11988
 
11989
      /**
11990
       * Find the _Fields constant that matches name, or null if its not found.
11991
       */
11992
      public static _Fields findByName(String name) {
11993
        return byName.get(name);
11994
      }
11995
 
11996
      private final short _thriftId;
11997
      private final String _fieldName;
11998
 
11999
      _Fields(short thriftId, String fieldName) {
12000
        _thriftId = thriftId;
12001
        _fieldName = fieldName;
12002
      }
12003
 
12004
      public short getThriftFieldId() {
12005
        return _thriftId;
12006
      }
12007
 
12008
      public String getFieldName() {
12009
        return _fieldName;
12010
      }
12011
    }
12012
 
12013
    // isset id assignments
12014
    private static final int __DATE_ISSET_ID = 0;
12015
    private BitSet __isset_bit_vector = new BitSet(1);
12016
 
12017
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12018
    static {
12019
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12020
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12021
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12022
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12023
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
12024
    }
12025
 
12026
    public getInvoices_args() {
12027
    }
12028
 
12029
    public getInvoices_args(
12030
      long date)
12031
    {
12032
      this();
12033
      this.date = date;
12034
      setDateIsSet(true);
12035
    }
12036
 
12037
    /**
12038
     * Performs a deep copy on <i>other</i>.
12039
     */
12040
    public getInvoices_args(getInvoices_args other) {
12041
      __isset_bit_vector.clear();
12042
      __isset_bit_vector.or(other.__isset_bit_vector);
12043
      this.date = other.date;
12044
    }
12045
 
12046
    public getInvoices_args deepCopy() {
12047
      return new getInvoices_args(this);
12048
    }
12049
 
12050
    @Override
12051
    public void clear() {
12052
      setDateIsSet(false);
12053
      this.date = 0;
12054
    }
12055
 
12056
    public long getDate() {
12057
      return this.date;
12058
    }
12059
 
12060
    public void setDate(long date) {
12061
      this.date = date;
12062
      setDateIsSet(true);
12063
    }
12064
 
12065
    public void unsetDate() {
12066
      __isset_bit_vector.clear(__DATE_ISSET_ID);
12067
    }
12068
 
12069
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
12070
    public boolean isSetDate() {
12071
      return __isset_bit_vector.get(__DATE_ISSET_ID);
12072
    }
12073
 
12074
    public void setDateIsSet(boolean value) {
12075
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
12076
    }
12077
 
12078
    public void setFieldValue(_Fields field, Object value) {
12079
      switch (field) {
12080
      case DATE:
12081
        if (value == null) {
12082
          unsetDate();
12083
        } else {
12084
          setDate((Long)value);
12085
        }
12086
        break;
12087
 
12088
      }
12089
    }
12090
 
12091
    public Object getFieldValue(_Fields field) {
12092
      switch (field) {
12093
      case DATE:
12094
        return Long.valueOf(getDate());
12095
 
12096
      }
12097
      throw new IllegalStateException();
12098
    }
12099
 
12100
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12101
    public boolean isSet(_Fields field) {
12102
      if (field == null) {
12103
        throw new IllegalArgumentException();
12104
      }
12105
 
12106
      switch (field) {
12107
      case DATE:
12108
        return isSetDate();
12109
      }
12110
      throw new IllegalStateException();
12111
    }
12112
 
12113
    @Override
12114
    public boolean equals(Object that) {
12115
      if (that == null)
12116
        return false;
12117
      if (that instanceof getInvoices_args)
12118
        return this.equals((getInvoices_args)that);
12119
      return false;
12120
    }
12121
 
12122
    public boolean equals(getInvoices_args that) {
12123
      if (that == null)
12124
        return false;
12125
 
12126
      boolean this_present_date = true;
12127
      boolean that_present_date = true;
12128
      if (this_present_date || that_present_date) {
12129
        if (!(this_present_date && that_present_date))
12130
          return false;
12131
        if (this.date != that.date)
12132
          return false;
12133
      }
12134
 
12135
      return true;
12136
    }
12137
 
12138
    @Override
12139
    public int hashCode() {
12140
      return 0;
12141
    }
12142
 
12143
    public int compareTo(getInvoices_args other) {
12144
      if (!getClass().equals(other.getClass())) {
12145
        return getClass().getName().compareTo(other.getClass().getName());
12146
      }
12147
 
12148
      int lastComparison = 0;
12149
      getInvoices_args typedOther = (getInvoices_args)other;
12150
 
12151
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
12152
      if (lastComparison != 0) {
12153
        return lastComparison;
12154
      }
12155
      if (isSetDate()) {
12156
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
12157
        if (lastComparison != 0) {
12158
          return lastComparison;
12159
        }
12160
      }
12161
      return 0;
12162
    }
12163
 
12164
    public _Fields fieldForId(int fieldId) {
12165
      return _Fields.findByThriftId(fieldId);
12166
    }
12167
 
12168
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12169
      org.apache.thrift.protocol.TField field;
12170
      iprot.readStructBegin();
12171
      while (true)
12172
      {
12173
        field = iprot.readFieldBegin();
12174
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12175
          break;
12176
        }
12177
        switch (field.id) {
12178
          case 1: // DATE
12179
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12180
              this.date = iprot.readI64();
12181
              setDateIsSet(true);
12182
            } else { 
12183
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12184
            }
12185
            break;
12186
          default:
12187
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12188
        }
12189
        iprot.readFieldEnd();
12190
      }
12191
      iprot.readStructEnd();
12192
      validate();
12193
    }
12194
 
12195
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12196
      validate();
12197
 
12198
      oprot.writeStructBegin(STRUCT_DESC);
12199
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12200
      oprot.writeI64(this.date);
12201
      oprot.writeFieldEnd();
12202
      oprot.writeFieldStop();
12203
      oprot.writeStructEnd();
12204
    }
12205
 
12206
    @Override
12207
    public String toString() {
12208
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12209
      boolean first = true;
12210
 
12211
      sb.append("date:");
12212
      sb.append(this.date);
12213
      first = false;
12214
      sb.append(")");
12215
      return sb.toString();
12216
    }
12217
 
12218
    public void validate() throws org.apache.thrift.TException {
12219
      // check for required fields
12220
    }
12221
 
12222
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12223
      try {
12224
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12225
      } catch (org.apache.thrift.TException te) {
12226
        throw new java.io.IOException(te);
12227
      }
12228
    }
12229
 
12230
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12231
      try {
12232
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12233
        __isset_bit_vector = new BitSet(1);
12234
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12235
      } catch (org.apache.thrift.TException te) {
12236
        throw new java.io.IOException(te);
12237
      }
12238
    }
12239
 
12240
  }
12241
 
12242
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12243
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12244
 
12245
    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);
12246
 
12247
    private List<Invoice> success; // required
12248
 
12249
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12250
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12251
      SUCCESS((short)0, "success");
12252
 
12253
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12254
 
12255
      static {
12256
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12257
          byName.put(field.getFieldName(), field);
12258
        }
12259
      }
12260
 
12261
      /**
12262
       * Find the _Fields constant that matches fieldId, or null if its not found.
12263
       */
12264
      public static _Fields findByThriftId(int fieldId) {
12265
        switch(fieldId) {
12266
          case 0: // SUCCESS
12267
            return SUCCESS;
12268
          default:
12269
            return null;
12270
        }
12271
      }
12272
 
12273
      /**
12274
       * Find the _Fields constant that matches fieldId, throwing an exception
12275
       * if it is not found.
12276
       */
12277
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12278
        _Fields fields = findByThriftId(fieldId);
12279
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12280
        return fields;
12281
      }
12282
 
12283
      /**
12284
       * Find the _Fields constant that matches name, or null if its not found.
12285
       */
12286
      public static _Fields findByName(String name) {
12287
        return byName.get(name);
12288
      }
12289
 
12290
      private final short _thriftId;
12291
      private final String _fieldName;
12292
 
12293
      _Fields(short thriftId, String fieldName) {
12294
        _thriftId = thriftId;
12295
        _fieldName = fieldName;
12296
      }
12297
 
12298
      public short getThriftFieldId() {
12299
        return _thriftId;
12300
      }
12301
 
12302
      public String getFieldName() {
12303
        return _fieldName;
12304
      }
12305
    }
12306
 
12307
    // isset id assignments
12308
 
12309
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12310
    static {
12311
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12312
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12313
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12314
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12315
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12316
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12317
    }
12318
 
12319
    public getInvoices_result() {
12320
    }
12321
 
12322
    public getInvoices_result(
12323
      List<Invoice> success)
12324
    {
12325
      this();
12326
      this.success = success;
12327
    }
12328
 
12329
    /**
12330
     * Performs a deep copy on <i>other</i>.
12331
     */
12332
    public getInvoices_result(getInvoices_result other) {
12333
      if (other.isSetSuccess()) {
12334
        List<Invoice> __this__success = new ArrayList<Invoice>();
12335
        for (Invoice other_element : other.success) {
12336
          __this__success.add(new Invoice(other_element));
12337
        }
12338
        this.success = __this__success;
12339
      }
12340
    }
12341
 
12342
    public getInvoices_result deepCopy() {
12343
      return new getInvoices_result(this);
12344
    }
12345
 
12346
    @Override
12347
    public void clear() {
12348
      this.success = null;
12349
    }
12350
 
12351
    public int getSuccessSize() {
12352
      return (this.success == null) ? 0 : this.success.size();
12353
    }
12354
 
12355
    public java.util.Iterator<Invoice> getSuccessIterator() {
12356
      return (this.success == null) ? null : this.success.iterator();
12357
    }
12358
 
12359
    public void addToSuccess(Invoice elem) {
12360
      if (this.success == null) {
12361
        this.success = new ArrayList<Invoice>();
12362
      }
12363
      this.success.add(elem);
12364
    }
12365
 
12366
    public List<Invoice> getSuccess() {
12367
      return this.success;
12368
    }
12369
 
12370
    public void setSuccess(List<Invoice> success) {
12371
      this.success = success;
12372
    }
12373
 
12374
    public void unsetSuccess() {
12375
      this.success = null;
12376
    }
12377
 
12378
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12379
    public boolean isSetSuccess() {
12380
      return this.success != null;
12381
    }
12382
 
12383
    public void setSuccessIsSet(boolean value) {
12384
      if (!value) {
12385
        this.success = null;
12386
      }
12387
    }
12388
 
12389
    public void setFieldValue(_Fields field, Object value) {
12390
      switch (field) {
12391
      case SUCCESS:
12392
        if (value == null) {
12393
          unsetSuccess();
12394
        } else {
12395
          setSuccess((List<Invoice>)value);
12396
        }
12397
        break;
12398
 
12399
      }
12400
    }
12401
 
12402
    public Object getFieldValue(_Fields field) {
12403
      switch (field) {
12404
      case SUCCESS:
12405
        return getSuccess();
12406
 
12407
      }
12408
      throw new IllegalStateException();
12409
    }
12410
 
12411
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12412
    public boolean isSet(_Fields field) {
12413
      if (field == null) {
12414
        throw new IllegalArgumentException();
12415
      }
12416
 
12417
      switch (field) {
12418
      case SUCCESS:
12419
        return isSetSuccess();
12420
      }
12421
      throw new IllegalStateException();
12422
    }
12423
 
12424
    @Override
12425
    public boolean equals(Object that) {
12426
      if (that == null)
12427
        return false;
12428
      if (that instanceof getInvoices_result)
12429
        return this.equals((getInvoices_result)that);
12430
      return false;
12431
    }
12432
 
12433
    public boolean equals(getInvoices_result that) {
12434
      if (that == null)
12435
        return false;
12436
 
12437
      boolean this_present_success = true && this.isSetSuccess();
12438
      boolean that_present_success = true && that.isSetSuccess();
12439
      if (this_present_success || that_present_success) {
12440
        if (!(this_present_success && that_present_success))
12441
          return false;
12442
        if (!this.success.equals(that.success))
12443
          return false;
12444
      }
12445
 
12446
      return true;
12447
    }
12448
 
12449
    @Override
12450
    public int hashCode() {
12451
      return 0;
12452
    }
12453
 
12454
    public int compareTo(getInvoices_result other) {
12455
      if (!getClass().equals(other.getClass())) {
12456
        return getClass().getName().compareTo(other.getClass().getName());
12457
      }
12458
 
12459
      int lastComparison = 0;
12460
      getInvoices_result typedOther = (getInvoices_result)other;
12461
 
12462
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12463
      if (lastComparison != 0) {
12464
        return lastComparison;
12465
      }
12466
      if (isSetSuccess()) {
12467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12468
        if (lastComparison != 0) {
12469
          return lastComparison;
12470
        }
12471
      }
12472
      return 0;
12473
    }
12474
 
12475
    public _Fields fieldForId(int fieldId) {
12476
      return _Fields.findByThriftId(fieldId);
12477
    }
12478
 
12479
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12480
      org.apache.thrift.protocol.TField field;
12481
      iprot.readStructBegin();
12482
      while (true)
12483
      {
12484
        field = iprot.readFieldBegin();
12485
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12486
          break;
12487
        }
12488
        switch (field.id) {
12489
          case 0: // SUCCESS
12490
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12491
              {
6385 amar.kumar 12492
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12493
                this.success = new ArrayList<Invoice>(_list24.size);
12494
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12495
                {
6385 amar.kumar 12496
                  Invoice _elem26; // required
12497
                  _elem26 = new Invoice();
12498
                  _elem26.read(iprot);
12499
                  this.success.add(_elem26);
5443 mandeep.dh 12500
                }
12501
                iprot.readListEnd();
12502
              }
12503
            } else { 
12504
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12505
            }
12506
            break;
12507
          default:
12508
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12509
        }
12510
        iprot.readFieldEnd();
12511
      }
12512
      iprot.readStructEnd();
12513
      validate();
12514
    }
12515
 
12516
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12517
      oprot.writeStructBegin(STRUCT_DESC);
12518
 
12519
      if (this.isSetSuccess()) {
12520
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12521
        {
12522
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12523
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12524
          {
6385 amar.kumar 12525
            _iter27.write(oprot);
5443 mandeep.dh 12526
          }
12527
          oprot.writeListEnd();
12528
        }
12529
        oprot.writeFieldEnd();
12530
      }
12531
      oprot.writeFieldStop();
12532
      oprot.writeStructEnd();
12533
    }
12534
 
12535
    @Override
12536
    public String toString() {
12537
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12538
      boolean first = true;
12539
 
12540
      sb.append("success:");
12541
      if (this.success == null) {
12542
        sb.append("null");
12543
      } else {
12544
        sb.append(this.success);
12545
      }
12546
      first = false;
12547
      sb.append(")");
12548
      return sb.toString();
12549
    }
12550
 
12551
    public void validate() throws org.apache.thrift.TException {
12552
      // check for required fields
12553
    }
12554
 
12555
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12556
      try {
12557
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12558
      } catch (org.apache.thrift.TException te) {
12559
        throw new java.io.IOException(te);
12560
      }
12561
    }
12562
 
12563
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12564
      try {
12565
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12566
      } catch (org.apache.thrift.TException te) {
12567
        throw new java.io.IOException(te);
12568
      }
12569
    }
12570
 
12571
  }
12572
 
12573
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
12574
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
12575
 
12576
    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);
12577
 
12578
    private Invoice invoice; // required
12579
 
12580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12581
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12582
      INVOICE((short)1, "invoice");
12583
 
12584
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12585
 
12586
      static {
12587
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12588
          byName.put(field.getFieldName(), field);
12589
        }
12590
      }
12591
 
12592
      /**
12593
       * Find the _Fields constant that matches fieldId, or null if its not found.
12594
       */
12595
      public static _Fields findByThriftId(int fieldId) {
12596
        switch(fieldId) {
12597
          case 1: // INVOICE
12598
            return INVOICE;
12599
          default:
12600
            return null;
12601
        }
12602
      }
12603
 
12604
      /**
12605
       * Find the _Fields constant that matches fieldId, throwing an exception
12606
       * if it is not found.
12607
       */
12608
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12609
        _Fields fields = findByThriftId(fieldId);
12610
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12611
        return fields;
12612
      }
12613
 
12614
      /**
12615
       * Find the _Fields constant that matches name, or null if its not found.
12616
       */
12617
      public static _Fields findByName(String name) {
12618
        return byName.get(name);
12619
      }
12620
 
12621
      private final short _thriftId;
12622
      private final String _fieldName;
12623
 
12624
      _Fields(short thriftId, String fieldName) {
12625
        _thriftId = thriftId;
12626
        _fieldName = fieldName;
12627
      }
12628
 
12629
      public short getThriftFieldId() {
12630
        return _thriftId;
12631
      }
12632
 
12633
      public String getFieldName() {
12634
        return _fieldName;
12635
      }
12636
    }
12637
 
12638
    // isset id assignments
12639
 
12640
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12641
    static {
12642
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12643
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12644
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
12645
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12646
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
12647
    }
12648
 
12649
    public createInvoice_args() {
12650
    }
12651
 
12652
    public createInvoice_args(
12653
      Invoice invoice)
12654
    {
12655
      this();
12656
      this.invoice = invoice;
12657
    }
12658
 
12659
    /**
12660
     * Performs a deep copy on <i>other</i>.
12661
     */
12662
    public createInvoice_args(createInvoice_args other) {
12663
      if (other.isSetInvoice()) {
12664
        this.invoice = new Invoice(other.invoice);
12665
      }
12666
    }
12667
 
12668
    public createInvoice_args deepCopy() {
12669
      return new createInvoice_args(this);
12670
    }
12671
 
12672
    @Override
12673
    public void clear() {
12674
      this.invoice = null;
12675
    }
12676
 
12677
    public Invoice getInvoice() {
12678
      return this.invoice;
12679
    }
12680
 
12681
    public void setInvoice(Invoice invoice) {
12682
      this.invoice = invoice;
12683
    }
12684
 
12685
    public void unsetInvoice() {
12686
      this.invoice = null;
12687
    }
12688
 
12689
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
12690
    public boolean isSetInvoice() {
12691
      return this.invoice != null;
12692
    }
12693
 
12694
    public void setInvoiceIsSet(boolean value) {
12695
      if (!value) {
12696
        this.invoice = null;
12697
      }
12698
    }
12699
 
12700
    public void setFieldValue(_Fields field, Object value) {
12701
      switch (field) {
12702
      case INVOICE:
12703
        if (value == null) {
12704
          unsetInvoice();
12705
        } else {
12706
          setInvoice((Invoice)value);
12707
        }
12708
        break;
12709
 
12710
      }
12711
    }
12712
 
12713
    public Object getFieldValue(_Fields field) {
12714
      switch (field) {
12715
      case INVOICE:
12716
        return getInvoice();
12717
 
12718
      }
12719
      throw new IllegalStateException();
12720
    }
12721
 
12722
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12723
    public boolean isSet(_Fields field) {
12724
      if (field == null) {
12725
        throw new IllegalArgumentException();
12726
      }
12727
 
12728
      switch (field) {
12729
      case INVOICE:
12730
        return isSetInvoice();
12731
      }
12732
      throw new IllegalStateException();
12733
    }
12734
 
12735
    @Override
12736
    public boolean equals(Object that) {
12737
      if (that == null)
12738
        return false;
12739
      if (that instanceof createInvoice_args)
12740
        return this.equals((createInvoice_args)that);
12741
      return false;
12742
    }
12743
 
12744
    public boolean equals(createInvoice_args that) {
12745
      if (that == null)
12746
        return false;
12747
 
12748
      boolean this_present_invoice = true && this.isSetInvoice();
12749
      boolean that_present_invoice = true && that.isSetInvoice();
12750
      if (this_present_invoice || that_present_invoice) {
12751
        if (!(this_present_invoice && that_present_invoice))
12752
          return false;
12753
        if (!this.invoice.equals(that.invoice))
12754
          return false;
12755
      }
12756
 
12757
      return true;
12758
    }
12759
 
12760
    @Override
12761
    public int hashCode() {
12762
      return 0;
12763
    }
12764
 
12765
    public int compareTo(createInvoice_args other) {
12766
      if (!getClass().equals(other.getClass())) {
12767
        return getClass().getName().compareTo(other.getClass().getName());
12768
      }
12769
 
12770
      int lastComparison = 0;
12771
      createInvoice_args typedOther = (createInvoice_args)other;
12772
 
12773
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
12774
      if (lastComparison != 0) {
12775
        return lastComparison;
12776
      }
12777
      if (isSetInvoice()) {
12778
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
12779
        if (lastComparison != 0) {
12780
          return lastComparison;
12781
        }
12782
      }
12783
      return 0;
12784
    }
12785
 
12786
    public _Fields fieldForId(int fieldId) {
12787
      return _Fields.findByThriftId(fieldId);
12788
    }
12789
 
12790
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12791
      org.apache.thrift.protocol.TField field;
12792
      iprot.readStructBegin();
12793
      while (true)
12794
      {
12795
        field = iprot.readFieldBegin();
12796
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12797
          break;
12798
        }
12799
        switch (field.id) {
12800
          case 1: // INVOICE
12801
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12802
              this.invoice = new Invoice();
12803
              this.invoice.read(iprot);
12804
            } else { 
12805
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12806
            }
12807
            break;
12808
          default:
12809
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12810
        }
12811
        iprot.readFieldEnd();
12812
      }
12813
      iprot.readStructEnd();
12814
      validate();
12815
    }
12816
 
12817
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12818
      validate();
12819
 
12820
      oprot.writeStructBegin(STRUCT_DESC);
12821
      if (this.invoice != null) {
12822
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
12823
        this.invoice.write(oprot);
12824
        oprot.writeFieldEnd();
12825
      }
12826
      oprot.writeFieldStop();
12827
      oprot.writeStructEnd();
12828
    }
12829
 
12830
    @Override
12831
    public String toString() {
12832
      StringBuilder sb = new StringBuilder("createInvoice_args(");
12833
      boolean first = true;
12834
 
12835
      sb.append("invoice:");
12836
      if (this.invoice == null) {
12837
        sb.append("null");
12838
      } else {
12839
        sb.append(this.invoice);
12840
      }
12841
      first = false;
12842
      sb.append(")");
12843
      return sb.toString();
12844
    }
12845
 
12846
    public void validate() throws org.apache.thrift.TException {
12847
      // check for required fields
12848
    }
12849
 
12850
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12851
      try {
12852
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12853
      } catch (org.apache.thrift.TException te) {
12854
        throw new java.io.IOException(te);
12855
      }
12856
    }
12857
 
12858
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12859
      try {
12860
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12861
      } catch (org.apache.thrift.TException te) {
12862
        throw new java.io.IOException(te);
12863
      }
12864
    }
12865
 
12866
  }
12867
 
12868
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
12869
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
12870
 
12871
    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);
12872
 
12873
    private PurchaseServiceException e; // required
12874
 
12875
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12876
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12877
      E((short)1, "e");
12878
 
12879
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12880
 
12881
      static {
12882
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12883
          byName.put(field.getFieldName(), field);
12884
        }
12885
      }
12886
 
12887
      /**
12888
       * Find the _Fields constant that matches fieldId, or null if its not found.
12889
       */
12890
      public static _Fields findByThriftId(int fieldId) {
12891
        switch(fieldId) {
12892
          case 1: // E
12893
            return E;
12894
          default:
12895
            return null;
12896
        }
12897
      }
12898
 
12899
      /**
12900
       * Find the _Fields constant that matches fieldId, throwing an exception
12901
       * if it is not found.
12902
       */
12903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12904
        _Fields fields = findByThriftId(fieldId);
12905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12906
        return fields;
12907
      }
12908
 
12909
      /**
12910
       * Find the _Fields constant that matches name, or null if its not found.
12911
       */
12912
      public static _Fields findByName(String name) {
12913
        return byName.get(name);
12914
      }
12915
 
12916
      private final short _thriftId;
12917
      private final String _fieldName;
12918
 
12919
      _Fields(short thriftId, String fieldName) {
12920
        _thriftId = thriftId;
12921
        _fieldName = fieldName;
12922
      }
12923
 
12924
      public short getThriftFieldId() {
12925
        return _thriftId;
12926
      }
12927
 
12928
      public String getFieldName() {
12929
        return _fieldName;
12930
      }
12931
    }
12932
 
12933
    // isset id assignments
12934
 
12935
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12936
    static {
12937
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12938
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12939
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12940
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12941
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
12942
    }
12943
 
12944
    public createInvoice_result() {
12945
    }
12946
 
12947
    public createInvoice_result(
12948
      PurchaseServiceException e)
12949
    {
12950
      this();
12951
      this.e = e;
12952
    }
12953
 
12954
    /**
12955
     * Performs a deep copy on <i>other</i>.
12956
     */
12957
    public createInvoice_result(createInvoice_result other) {
12958
      if (other.isSetE()) {
12959
        this.e = new PurchaseServiceException(other.e);
12960
      }
12961
    }
12962
 
12963
    public createInvoice_result deepCopy() {
12964
      return new createInvoice_result(this);
12965
    }
12966
 
12967
    @Override
12968
    public void clear() {
12969
      this.e = null;
12970
    }
12971
 
12972
    public PurchaseServiceException getE() {
12973
      return this.e;
12974
    }
12975
 
12976
    public void setE(PurchaseServiceException e) {
12977
      this.e = e;
12978
    }
12979
 
12980
    public void unsetE() {
12981
      this.e = null;
12982
    }
12983
 
12984
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12985
    public boolean isSetE() {
12986
      return this.e != null;
12987
    }
12988
 
12989
    public void setEIsSet(boolean value) {
12990
      if (!value) {
12991
        this.e = null;
12992
      }
12993
    }
12994
 
12995
    public void setFieldValue(_Fields field, Object value) {
12996
      switch (field) {
12997
      case E:
12998
        if (value == null) {
12999
          unsetE();
13000
        } else {
13001
          setE((PurchaseServiceException)value);
13002
        }
13003
        break;
13004
 
13005
      }
13006
    }
13007
 
13008
    public Object getFieldValue(_Fields field) {
13009
      switch (field) {
13010
      case E:
13011
        return getE();
13012
 
13013
      }
13014
      throw new IllegalStateException();
13015
    }
13016
 
13017
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13018
    public boolean isSet(_Fields field) {
13019
      if (field == null) {
13020
        throw new IllegalArgumentException();
13021
      }
13022
 
13023
      switch (field) {
13024
      case E:
13025
        return isSetE();
13026
      }
13027
      throw new IllegalStateException();
13028
    }
13029
 
13030
    @Override
13031
    public boolean equals(Object that) {
13032
      if (that == null)
13033
        return false;
13034
      if (that instanceof createInvoice_result)
13035
        return this.equals((createInvoice_result)that);
13036
      return false;
13037
    }
13038
 
13039
    public boolean equals(createInvoice_result that) {
13040
      if (that == null)
13041
        return false;
13042
 
13043
      boolean this_present_e = true && this.isSetE();
13044
      boolean that_present_e = true && that.isSetE();
13045
      if (this_present_e || that_present_e) {
13046
        if (!(this_present_e && that_present_e))
13047
          return false;
13048
        if (!this.e.equals(that.e))
13049
          return false;
13050
      }
13051
 
13052
      return true;
13053
    }
13054
 
13055
    @Override
13056
    public int hashCode() {
13057
      return 0;
13058
    }
13059
 
13060
    public int compareTo(createInvoice_result other) {
13061
      if (!getClass().equals(other.getClass())) {
13062
        return getClass().getName().compareTo(other.getClass().getName());
13063
      }
13064
 
13065
      int lastComparison = 0;
13066
      createInvoice_result typedOther = (createInvoice_result)other;
13067
 
13068
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
13069
      if (lastComparison != 0) {
13070
        return lastComparison;
13071
      }
13072
      if (isSetE()) {
13073
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
13074
        if (lastComparison != 0) {
13075
          return lastComparison;
13076
        }
13077
      }
13078
      return 0;
13079
    }
13080
 
13081
    public _Fields fieldForId(int fieldId) {
13082
      return _Fields.findByThriftId(fieldId);
13083
    }
13084
 
13085
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13086
      org.apache.thrift.protocol.TField field;
13087
      iprot.readStructBegin();
13088
      while (true)
13089
      {
13090
        field = iprot.readFieldBegin();
13091
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13092
          break;
13093
        }
13094
        switch (field.id) {
13095
          case 1: // E
13096
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13097
              this.e = new PurchaseServiceException();
13098
              this.e.read(iprot);
13099
            } else { 
13100
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13101
            }
13102
            break;
13103
          default:
13104
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13105
        }
13106
        iprot.readFieldEnd();
13107
      }
13108
      iprot.readStructEnd();
13109
      validate();
13110
    }
13111
 
13112
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13113
      oprot.writeStructBegin(STRUCT_DESC);
13114
 
13115
      if (this.isSetE()) {
13116
        oprot.writeFieldBegin(E_FIELD_DESC);
13117
        this.e.write(oprot);
13118
        oprot.writeFieldEnd();
13119
      }
13120
      oprot.writeFieldStop();
13121
      oprot.writeStructEnd();
13122
    }
13123
 
13124
    @Override
13125
    public String toString() {
13126
      StringBuilder sb = new StringBuilder("createInvoice_result(");
13127
      boolean first = true;
13128
 
13129
      sb.append("e:");
13130
      if (this.e == null) {
13131
        sb.append("null");
13132
      } else {
13133
        sb.append(this.e);
13134
      }
13135
      first = false;
13136
      sb.append(")");
13137
      return sb.toString();
13138
    }
13139
 
13140
    public void validate() throws org.apache.thrift.TException {
13141
      // check for required fields
13142
    }
13143
 
13144
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13145
      try {
13146
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13147
      } catch (org.apache.thrift.TException te) {
13148
        throw new java.io.IOException(te);
13149
      }
13150
    }
13151
 
13152
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13153
      try {
13154
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13155
      } catch (org.apache.thrift.TException te) {
13156
        throw new java.io.IOException(te);
13157
      }
13158
    }
13159
 
13160
  }
13161
 
5591 mandeep.dh 13162
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
13163
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
13164
 
13165
    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);
13166
 
13167
    private Supplier supplier; // required
13168
 
13169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13170
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13171
      SUPPLIER((short)1, "supplier");
13172
 
13173
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13174
 
13175
      static {
13176
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13177
          byName.put(field.getFieldName(), field);
13178
        }
13179
      }
13180
 
13181
      /**
13182
       * Find the _Fields constant that matches fieldId, or null if its not found.
13183
       */
13184
      public static _Fields findByThriftId(int fieldId) {
13185
        switch(fieldId) {
13186
          case 1: // SUPPLIER
13187
            return SUPPLIER;
13188
          default:
13189
            return null;
13190
        }
13191
      }
13192
 
13193
      /**
13194
       * Find the _Fields constant that matches fieldId, throwing an exception
13195
       * if it is not found.
13196
       */
13197
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13198
        _Fields fields = findByThriftId(fieldId);
13199
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13200
        return fields;
13201
      }
13202
 
13203
      /**
13204
       * Find the _Fields constant that matches name, or null if its not found.
13205
       */
13206
      public static _Fields findByName(String name) {
13207
        return byName.get(name);
13208
      }
13209
 
13210
      private final short _thriftId;
13211
      private final String _fieldName;
13212
 
13213
      _Fields(short thriftId, String fieldName) {
13214
        _thriftId = thriftId;
13215
        _fieldName = fieldName;
13216
      }
13217
 
13218
      public short getThriftFieldId() {
13219
        return _thriftId;
13220
      }
13221
 
13222
      public String getFieldName() {
13223
        return _fieldName;
13224
      }
13225
    }
13226
 
13227
    // isset id assignments
13228
 
13229
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13230
    static {
13231
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13232
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13233
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13234
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13235
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
13236
    }
13237
 
13238
    public addSupplier_args() {
13239
    }
13240
 
13241
    public addSupplier_args(
13242
      Supplier supplier)
13243
    {
13244
      this();
13245
      this.supplier = supplier;
13246
    }
13247
 
13248
    /**
13249
     * Performs a deep copy on <i>other</i>.
13250
     */
13251
    public addSupplier_args(addSupplier_args other) {
13252
      if (other.isSetSupplier()) {
13253
        this.supplier = new Supplier(other.supplier);
13254
      }
13255
    }
13256
 
13257
    public addSupplier_args deepCopy() {
13258
      return new addSupplier_args(this);
13259
    }
13260
 
13261
    @Override
13262
    public void clear() {
13263
      this.supplier = null;
13264
    }
13265
 
13266
    public Supplier getSupplier() {
13267
      return this.supplier;
13268
    }
13269
 
13270
    public void setSupplier(Supplier supplier) {
13271
      this.supplier = supplier;
13272
    }
13273
 
13274
    public void unsetSupplier() {
13275
      this.supplier = null;
13276
    }
13277
 
13278
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
13279
    public boolean isSetSupplier() {
13280
      return this.supplier != null;
13281
    }
13282
 
13283
    public void setSupplierIsSet(boolean value) {
13284
      if (!value) {
13285
        this.supplier = null;
13286
      }
13287
    }
13288
 
13289
    public void setFieldValue(_Fields field, Object value) {
13290
      switch (field) {
13291
      case SUPPLIER:
13292
        if (value == null) {
13293
          unsetSupplier();
13294
        } else {
13295
          setSupplier((Supplier)value);
13296
        }
13297
        break;
13298
 
13299
      }
13300
    }
13301
 
13302
    public Object getFieldValue(_Fields field) {
13303
      switch (field) {
13304
      case SUPPLIER:
13305
        return getSupplier();
13306
 
13307
      }
13308
      throw new IllegalStateException();
13309
    }
13310
 
13311
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13312
    public boolean isSet(_Fields field) {
13313
      if (field == null) {
13314
        throw new IllegalArgumentException();
13315
      }
13316
 
13317
      switch (field) {
13318
      case SUPPLIER:
13319
        return isSetSupplier();
13320
      }
13321
      throw new IllegalStateException();
13322
    }
13323
 
13324
    @Override
13325
    public boolean equals(Object that) {
13326
      if (that == null)
13327
        return false;
13328
      if (that instanceof addSupplier_args)
13329
        return this.equals((addSupplier_args)that);
13330
      return false;
13331
    }
13332
 
13333
    public boolean equals(addSupplier_args that) {
13334
      if (that == null)
13335
        return false;
13336
 
13337
      boolean this_present_supplier = true && this.isSetSupplier();
13338
      boolean that_present_supplier = true && that.isSetSupplier();
13339
      if (this_present_supplier || that_present_supplier) {
13340
        if (!(this_present_supplier && that_present_supplier))
13341
          return false;
13342
        if (!this.supplier.equals(that.supplier))
13343
          return false;
13344
      }
13345
 
13346
      return true;
13347
    }
13348
 
13349
    @Override
13350
    public int hashCode() {
13351
      return 0;
13352
    }
13353
 
13354
    public int compareTo(addSupplier_args other) {
13355
      if (!getClass().equals(other.getClass())) {
13356
        return getClass().getName().compareTo(other.getClass().getName());
13357
      }
13358
 
13359
      int lastComparison = 0;
13360
      addSupplier_args typedOther = (addSupplier_args)other;
13361
 
13362
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
13363
      if (lastComparison != 0) {
13364
        return lastComparison;
13365
      }
13366
      if (isSetSupplier()) {
13367
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
13368
        if (lastComparison != 0) {
13369
          return lastComparison;
13370
        }
13371
      }
13372
      return 0;
13373
    }
13374
 
13375
    public _Fields fieldForId(int fieldId) {
13376
      return _Fields.findByThriftId(fieldId);
13377
    }
13378
 
13379
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13380
      org.apache.thrift.protocol.TField field;
13381
      iprot.readStructBegin();
13382
      while (true)
13383
      {
13384
        field = iprot.readFieldBegin();
13385
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13386
          break;
13387
        }
13388
        switch (field.id) {
13389
          case 1: // SUPPLIER
13390
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13391
              this.supplier = new Supplier();
13392
              this.supplier.read(iprot);
13393
            } else { 
13394
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13395
            }
13396
            break;
13397
          default:
13398
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13399
        }
13400
        iprot.readFieldEnd();
13401
      }
13402
      iprot.readStructEnd();
13403
      validate();
13404
    }
13405
 
13406
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13407
      validate();
13408
 
13409
      oprot.writeStructBegin(STRUCT_DESC);
13410
      if (this.supplier != null) {
13411
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
13412
        this.supplier.write(oprot);
13413
        oprot.writeFieldEnd();
13414
      }
13415
      oprot.writeFieldStop();
13416
      oprot.writeStructEnd();
13417
    }
13418
 
13419
    @Override
13420
    public String toString() {
13421
      StringBuilder sb = new StringBuilder("addSupplier_args(");
13422
      boolean first = true;
13423
 
13424
      sb.append("supplier:");
13425
      if (this.supplier == null) {
13426
        sb.append("null");
13427
      } else {
13428
        sb.append(this.supplier);
13429
      }
13430
      first = false;
13431
      sb.append(")");
13432
      return sb.toString();
13433
    }
13434
 
13435
    public void validate() throws org.apache.thrift.TException {
13436
      // check for required fields
13437
    }
13438
 
13439
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13440
      try {
13441
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13442
      } catch (org.apache.thrift.TException te) {
13443
        throw new java.io.IOException(te);
13444
      }
13445
    }
13446
 
13447
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13448
      try {
13449
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13450
      } catch (org.apache.thrift.TException te) {
13451
        throw new java.io.IOException(te);
13452
      }
13453
    }
13454
 
13455
  }
13456
 
13457
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
13458
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
13459
 
13460
    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);
13461
 
13462
    private Supplier success; // required
13463
 
13464
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13465
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13466
      SUCCESS((short)0, "success");
13467
 
13468
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13469
 
13470
      static {
13471
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13472
          byName.put(field.getFieldName(), field);
13473
        }
13474
      }
13475
 
13476
      /**
13477
       * Find the _Fields constant that matches fieldId, or null if its not found.
13478
       */
13479
      public static _Fields findByThriftId(int fieldId) {
13480
        switch(fieldId) {
13481
          case 0: // SUCCESS
13482
            return SUCCESS;
13483
          default:
13484
            return null;
13485
        }
13486
      }
13487
 
13488
      /**
13489
       * Find the _Fields constant that matches fieldId, throwing an exception
13490
       * if it is not found.
13491
       */
13492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13493
        _Fields fields = findByThriftId(fieldId);
13494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13495
        return fields;
13496
      }
13497
 
13498
      /**
13499
       * Find the _Fields constant that matches name, or null if its not found.
13500
       */
13501
      public static _Fields findByName(String name) {
13502
        return byName.get(name);
13503
      }
13504
 
13505
      private final short _thriftId;
13506
      private final String _fieldName;
13507
 
13508
      _Fields(short thriftId, String fieldName) {
13509
        _thriftId = thriftId;
13510
        _fieldName = fieldName;
13511
      }
13512
 
13513
      public short getThriftFieldId() {
13514
        return _thriftId;
13515
      }
13516
 
13517
      public String getFieldName() {
13518
        return _fieldName;
13519
      }
13520
    }
13521
 
13522
    // isset id assignments
13523
 
13524
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13525
    static {
13526
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13527
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13528
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13529
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13530
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
13531
    }
13532
 
13533
    public addSupplier_result() {
13534
    }
13535
 
13536
    public addSupplier_result(
13537
      Supplier success)
13538
    {
13539
      this();
13540
      this.success = success;
13541
    }
13542
 
13543
    /**
13544
     * Performs a deep copy on <i>other</i>.
13545
     */
13546
    public addSupplier_result(addSupplier_result other) {
13547
      if (other.isSetSuccess()) {
13548
        this.success = new Supplier(other.success);
13549
      }
13550
    }
13551
 
13552
    public addSupplier_result deepCopy() {
13553
      return new addSupplier_result(this);
13554
    }
13555
 
13556
    @Override
13557
    public void clear() {
13558
      this.success = null;
13559
    }
13560
 
13561
    public Supplier getSuccess() {
13562
      return this.success;
13563
    }
13564
 
13565
    public void setSuccess(Supplier success) {
13566
      this.success = success;
13567
    }
13568
 
13569
    public void unsetSuccess() {
13570
      this.success = null;
13571
    }
13572
 
13573
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13574
    public boolean isSetSuccess() {
13575
      return this.success != null;
13576
    }
13577
 
13578
    public void setSuccessIsSet(boolean value) {
13579
      if (!value) {
13580
        this.success = null;
13581
      }
13582
    }
13583
 
13584
    public void setFieldValue(_Fields field, Object value) {
13585
      switch (field) {
13586
      case SUCCESS:
13587
        if (value == null) {
13588
          unsetSuccess();
13589
        } else {
13590
          setSuccess((Supplier)value);
13591
        }
13592
        break;
13593
 
13594
      }
13595
    }
13596
 
13597
    public Object getFieldValue(_Fields field) {
13598
      switch (field) {
13599
      case SUCCESS:
13600
        return getSuccess();
13601
 
13602
      }
13603
      throw new IllegalStateException();
13604
    }
13605
 
13606
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13607
    public boolean isSet(_Fields field) {
13608
      if (field == null) {
13609
        throw new IllegalArgumentException();
13610
      }
13611
 
13612
      switch (field) {
13613
      case SUCCESS:
13614
        return isSetSuccess();
13615
      }
13616
      throw new IllegalStateException();
13617
    }
13618
 
13619
    @Override
13620
    public boolean equals(Object that) {
13621
      if (that == null)
13622
        return false;
13623
      if (that instanceof addSupplier_result)
13624
        return this.equals((addSupplier_result)that);
13625
      return false;
13626
    }
13627
 
13628
    public boolean equals(addSupplier_result that) {
13629
      if (that == null)
13630
        return false;
13631
 
13632
      boolean this_present_success = true && this.isSetSuccess();
13633
      boolean that_present_success = true && that.isSetSuccess();
13634
      if (this_present_success || that_present_success) {
13635
        if (!(this_present_success && that_present_success))
13636
          return false;
13637
        if (!this.success.equals(that.success))
13638
          return false;
13639
      }
13640
 
13641
      return true;
13642
    }
13643
 
13644
    @Override
13645
    public int hashCode() {
13646
      return 0;
13647
    }
13648
 
13649
    public int compareTo(addSupplier_result other) {
13650
      if (!getClass().equals(other.getClass())) {
13651
        return getClass().getName().compareTo(other.getClass().getName());
13652
      }
13653
 
13654
      int lastComparison = 0;
13655
      addSupplier_result typedOther = (addSupplier_result)other;
13656
 
13657
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13658
      if (lastComparison != 0) {
13659
        return lastComparison;
13660
      }
13661
      if (isSetSuccess()) {
13662
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13663
        if (lastComparison != 0) {
13664
          return lastComparison;
13665
        }
13666
      }
13667
      return 0;
13668
    }
13669
 
13670
    public _Fields fieldForId(int fieldId) {
13671
      return _Fields.findByThriftId(fieldId);
13672
    }
13673
 
13674
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13675
      org.apache.thrift.protocol.TField field;
13676
      iprot.readStructBegin();
13677
      while (true)
13678
      {
13679
        field = iprot.readFieldBegin();
13680
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13681
          break;
13682
        }
13683
        switch (field.id) {
13684
          case 0: // SUCCESS
13685
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13686
              this.success = new Supplier();
13687
              this.success.read(iprot);
13688
            } else { 
13689
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13690
            }
13691
            break;
13692
          default:
13693
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13694
        }
13695
        iprot.readFieldEnd();
13696
      }
13697
      iprot.readStructEnd();
13698
      validate();
13699
    }
13700
 
13701
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13702
      oprot.writeStructBegin(STRUCT_DESC);
13703
 
13704
      if (this.isSetSuccess()) {
13705
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13706
        this.success.write(oprot);
13707
        oprot.writeFieldEnd();
13708
      }
13709
      oprot.writeFieldStop();
13710
      oprot.writeStructEnd();
13711
    }
13712
 
13713
    @Override
13714
    public String toString() {
13715
      StringBuilder sb = new StringBuilder("addSupplier_result(");
13716
      boolean first = true;
13717
 
13718
      sb.append("success:");
13719
      if (this.success == null) {
13720
        sb.append("null");
13721
      } else {
13722
        sb.append(this.success);
13723
      }
13724
      first = false;
13725
      sb.append(")");
13726
      return sb.toString();
13727
    }
13728
 
13729
    public void validate() throws org.apache.thrift.TException {
13730
      // check for required fields
13731
    }
13732
 
13733
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13734
      try {
13735
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13736
      } catch (org.apache.thrift.TException te) {
13737
        throw new java.io.IOException(te);
13738
      }
13739
    }
13740
 
13741
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13742
      try {
13743
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13744
      } catch (org.apache.thrift.TException te) {
13745
        throw new java.io.IOException(te);
13746
      }
13747
    }
13748
 
13749
  }
13750
 
13751
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
13752
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
13753
 
13754
    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);
13755
 
13756
    private Supplier supplier; // required
13757
 
13758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13759
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13760
      SUPPLIER((short)1, "supplier");
13761
 
13762
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13763
 
13764
      static {
13765
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13766
          byName.put(field.getFieldName(), field);
13767
        }
13768
      }
13769
 
13770
      /**
13771
       * Find the _Fields constant that matches fieldId, or null if its not found.
13772
       */
13773
      public static _Fields findByThriftId(int fieldId) {
13774
        switch(fieldId) {
13775
          case 1: // SUPPLIER
13776
            return SUPPLIER;
13777
          default:
13778
            return null;
13779
        }
13780
      }
13781
 
13782
      /**
13783
       * Find the _Fields constant that matches fieldId, throwing an exception
13784
       * if it is not found.
13785
       */
13786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13787
        _Fields fields = findByThriftId(fieldId);
13788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13789
        return fields;
13790
      }
13791
 
13792
      /**
13793
       * Find the _Fields constant that matches name, or null if its not found.
13794
       */
13795
      public static _Fields findByName(String name) {
13796
        return byName.get(name);
13797
      }
13798
 
13799
      private final short _thriftId;
13800
      private final String _fieldName;
13801
 
13802
      _Fields(short thriftId, String fieldName) {
13803
        _thriftId = thriftId;
13804
        _fieldName = fieldName;
13805
      }
13806
 
13807
      public short getThriftFieldId() {
13808
        return _thriftId;
13809
      }
13810
 
13811
      public String getFieldName() {
13812
        return _fieldName;
13813
      }
13814
    }
13815
 
13816
    // isset id assignments
13817
 
13818
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13819
    static {
13820
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13821
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13822
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13823
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13824
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
13825
    }
13826
 
13827
    public updateSupplier_args() {
13828
    }
13829
 
13830
    public updateSupplier_args(
13831
      Supplier supplier)
13832
    {
13833
      this();
13834
      this.supplier = supplier;
13835
    }
13836
 
13837
    /**
13838
     * Performs a deep copy on <i>other</i>.
13839
     */
13840
    public updateSupplier_args(updateSupplier_args other) {
13841
      if (other.isSetSupplier()) {
13842
        this.supplier = new Supplier(other.supplier);
13843
      }
13844
    }
13845
 
13846
    public updateSupplier_args deepCopy() {
13847
      return new updateSupplier_args(this);
13848
    }
13849
 
13850
    @Override
13851
    public void clear() {
13852
      this.supplier = null;
13853
    }
13854
 
13855
    public Supplier getSupplier() {
13856
      return this.supplier;
13857
    }
13858
 
13859
    public void setSupplier(Supplier supplier) {
13860
      this.supplier = supplier;
13861
    }
13862
 
13863
    public void unsetSupplier() {
13864
      this.supplier = null;
13865
    }
13866
 
13867
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
13868
    public boolean isSetSupplier() {
13869
      return this.supplier != null;
13870
    }
13871
 
13872
    public void setSupplierIsSet(boolean value) {
13873
      if (!value) {
13874
        this.supplier = null;
13875
      }
13876
    }
13877
 
13878
    public void setFieldValue(_Fields field, Object value) {
13879
      switch (field) {
13880
      case SUPPLIER:
13881
        if (value == null) {
13882
          unsetSupplier();
13883
        } else {
13884
          setSupplier((Supplier)value);
13885
        }
13886
        break;
13887
 
13888
      }
13889
    }
13890
 
13891
    public Object getFieldValue(_Fields field) {
13892
      switch (field) {
13893
      case SUPPLIER:
13894
        return getSupplier();
13895
 
13896
      }
13897
      throw new IllegalStateException();
13898
    }
13899
 
13900
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13901
    public boolean isSet(_Fields field) {
13902
      if (field == null) {
13903
        throw new IllegalArgumentException();
13904
      }
13905
 
13906
      switch (field) {
13907
      case SUPPLIER:
13908
        return isSetSupplier();
13909
      }
13910
      throw new IllegalStateException();
13911
    }
13912
 
13913
    @Override
13914
    public boolean equals(Object that) {
13915
      if (that == null)
13916
        return false;
13917
      if (that instanceof updateSupplier_args)
13918
        return this.equals((updateSupplier_args)that);
13919
      return false;
13920
    }
13921
 
13922
    public boolean equals(updateSupplier_args that) {
13923
      if (that == null)
13924
        return false;
13925
 
13926
      boolean this_present_supplier = true && this.isSetSupplier();
13927
      boolean that_present_supplier = true && that.isSetSupplier();
13928
      if (this_present_supplier || that_present_supplier) {
13929
        if (!(this_present_supplier && that_present_supplier))
13930
          return false;
13931
        if (!this.supplier.equals(that.supplier))
13932
          return false;
13933
      }
13934
 
13935
      return true;
13936
    }
13937
 
13938
    @Override
13939
    public int hashCode() {
13940
      return 0;
13941
    }
13942
 
13943
    public int compareTo(updateSupplier_args other) {
13944
      if (!getClass().equals(other.getClass())) {
13945
        return getClass().getName().compareTo(other.getClass().getName());
13946
      }
13947
 
13948
      int lastComparison = 0;
13949
      updateSupplier_args typedOther = (updateSupplier_args)other;
13950
 
13951
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
13952
      if (lastComparison != 0) {
13953
        return lastComparison;
13954
      }
13955
      if (isSetSupplier()) {
13956
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
13957
        if (lastComparison != 0) {
13958
          return lastComparison;
13959
        }
13960
      }
13961
      return 0;
13962
    }
13963
 
13964
    public _Fields fieldForId(int fieldId) {
13965
      return _Fields.findByThriftId(fieldId);
13966
    }
13967
 
13968
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13969
      org.apache.thrift.protocol.TField field;
13970
      iprot.readStructBegin();
13971
      while (true)
13972
      {
13973
        field = iprot.readFieldBegin();
13974
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13975
          break;
13976
        }
13977
        switch (field.id) {
13978
          case 1: // SUPPLIER
13979
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13980
              this.supplier = new Supplier();
13981
              this.supplier.read(iprot);
13982
            } else { 
13983
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13984
            }
13985
            break;
13986
          default:
13987
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13988
        }
13989
        iprot.readFieldEnd();
13990
      }
13991
      iprot.readStructEnd();
13992
      validate();
13993
    }
13994
 
13995
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13996
      validate();
13997
 
13998
      oprot.writeStructBegin(STRUCT_DESC);
13999
      if (this.supplier != null) {
14000
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
14001
        this.supplier.write(oprot);
14002
        oprot.writeFieldEnd();
14003
      }
14004
      oprot.writeFieldStop();
14005
      oprot.writeStructEnd();
14006
    }
14007
 
14008
    @Override
14009
    public String toString() {
14010
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
14011
      boolean first = true;
14012
 
14013
      sb.append("supplier:");
14014
      if (this.supplier == null) {
14015
        sb.append("null");
14016
      } else {
14017
        sb.append(this.supplier);
14018
      }
14019
      first = false;
14020
      sb.append(")");
14021
      return sb.toString();
14022
    }
14023
 
14024
    public void validate() throws org.apache.thrift.TException {
14025
      // check for required fields
14026
    }
14027
 
14028
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14029
      try {
14030
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14031
      } catch (org.apache.thrift.TException te) {
14032
        throw new java.io.IOException(te);
14033
      }
14034
    }
14035
 
14036
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14037
      try {
14038
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14039
      } catch (org.apache.thrift.TException te) {
14040
        throw new java.io.IOException(te);
14041
      }
14042
    }
14043
 
14044
  }
14045
 
14046
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
14047
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
14048
 
14049
 
14050
 
14051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14052
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14053
;
14054
 
14055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14056
 
14057
      static {
14058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14059
          byName.put(field.getFieldName(), field);
14060
        }
14061
      }
14062
 
14063
      /**
14064
       * Find the _Fields constant that matches fieldId, or null if its not found.
14065
       */
14066
      public static _Fields findByThriftId(int fieldId) {
14067
        switch(fieldId) {
14068
          default:
14069
            return null;
14070
        }
14071
      }
14072
 
14073
      /**
14074
       * Find the _Fields constant that matches fieldId, throwing an exception
14075
       * if it is not found.
14076
       */
14077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14078
        _Fields fields = findByThriftId(fieldId);
14079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14080
        return fields;
14081
      }
14082
 
14083
      /**
14084
       * Find the _Fields constant that matches name, or null if its not found.
14085
       */
14086
      public static _Fields findByName(String name) {
14087
        return byName.get(name);
14088
      }
14089
 
14090
      private final short _thriftId;
14091
      private final String _fieldName;
14092
 
14093
      _Fields(short thriftId, String fieldName) {
14094
        _thriftId = thriftId;
14095
        _fieldName = fieldName;
14096
      }
14097
 
14098
      public short getThriftFieldId() {
14099
        return _thriftId;
14100
      }
14101
 
14102
      public String getFieldName() {
14103
        return _fieldName;
14104
      }
14105
    }
14106
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14107
    static {
14108
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14109
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14110
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
14111
    }
14112
 
14113
    public updateSupplier_result() {
14114
    }
14115
 
14116
    /**
14117
     * Performs a deep copy on <i>other</i>.
14118
     */
14119
    public updateSupplier_result(updateSupplier_result other) {
14120
    }
14121
 
14122
    public updateSupplier_result deepCopy() {
14123
      return new updateSupplier_result(this);
14124
    }
14125
 
14126
    @Override
14127
    public void clear() {
14128
    }
14129
 
14130
    public void setFieldValue(_Fields field, Object value) {
14131
      switch (field) {
14132
      }
14133
    }
14134
 
14135
    public Object getFieldValue(_Fields field) {
14136
      switch (field) {
14137
      }
14138
      throw new IllegalStateException();
14139
    }
14140
 
14141
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14142
    public boolean isSet(_Fields field) {
14143
      if (field == null) {
14144
        throw new IllegalArgumentException();
14145
      }
14146
 
14147
      switch (field) {
14148
      }
14149
      throw new IllegalStateException();
14150
    }
14151
 
14152
    @Override
14153
    public boolean equals(Object that) {
14154
      if (that == null)
14155
        return false;
14156
      if (that instanceof updateSupplier_result)
14157
        return this.equals((updateSupplier_result)that);
14158
      return false;
14159
    }
14160
 
14161
    public boolean equals(updateSupplier_result that) {
14162
      if (that == null)
14163
        return false;
14164
 
14165
      return true;
14166
    }
14167
 
14168
    @Override
14169
    public int hashCode() {
14170
      return 0;
14171
    }
14172
 
14173
    public int compareTo(updateSupplier_result other) {
14174
      if (!getClass().equals(other.getClass())) {
14175
        return getClass().getName().compareTo(other.getClass().getName());
14176
      }
14177
 
14178
      int lastComparison = 0;
14179
      updateSupplier_result typedOther = (updateSupplier_result)other;
14180
 
14181
      return 0;
14182
    }
14183
 
14184
    public _Fields fieldForId(int fieldId) {
14185
      return _Fields.findByThriftId(fieldId);
14186
    }
14187
 
14188
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14189
      org.apache.thrift.protocol.TField field;
14190
      iprot.readStructBegin();
14191
      while (true)
14192
      {
14193
        field = iprot.readFieldBegin();
14194
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14195
          break;
14196
        }
14197
        switch (field.id) {
14198
          default:
14199
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14200
        }
14201
        iprot.readFieldEnd();
14202
      }
14203
      iprot.readStructEnd();
14204
      validate();
14205
    }
14206
 
14207
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14208
      oprot.writeStructBegin(STRUCT_DESC);
14209
 
14210
      oprot.writeFieldStop();
14211
      oprot.writeStructEnd();
14212
    }
14213
 
14214
    @Override
14215
    public String toString() {
14216
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
14217
      boolean first = true;
14218
 
14219
      sb.append(")");
14220
      return sb.toString();
14221
    }
14222
 
14223
    public void validate() throws org.apache.thrift.TException {
14224
      // check for required fields
14225
    }
14226
 
14227
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14228
      try {
14229
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14230
      } catch (org.apache.thrift.TException te) {
14231
        throw new java.io.IOException(te);
14232
      }
14233
    }
14234
 
14235
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14236
      try {
14237
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14238
      } catch (org.apache.thrift.TException te) {
14239
        throw new java.io.IOException(te);
14240
      }
14241
    }
14242
 
14243
  }
14244
 
6467 amar.kumar 14245
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14246
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
14247
 
14248
    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);
14249
 
14250
    private PurchaseReturn purchaseReturn; // required
14251
 
14252
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14253
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14254
      PURCHASE_RETURN((short)1, "purchaseReturn");
14255
 
14256
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14257
 
14258
      static {
14259
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14260
          byName.put(field.getFieldName(), field);
14261
        }
14262
      }
14263
 
14264
      /**
14265
       * Find the _Fields constant that matches fieldId, or null if its not found.
14266
       */
14267
      public static _Fields findByThriftId(int fieldId) {
14268
        switch(fieldId) {
14269
          case 1: // PURCHASE_RETURN
14270
            return PURCHASE_RETURN;
14271
          default:
14272
            return null;
14273
        }
14274
      }
14275
 
14276
      /**
14277
       * Find the _Fields constant that matches fieldId, throwing an exception
14278
       * if it is not found.
14279
       */
14280
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14281
        _Fields fields = findByThriftId(fieldId);
14282
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14283
        return fields;
14284
      }
14285
 
14286
      /**
14287
       * Find the _Fields constant that matches name, or null if its not found.
14288
       */
14289
      public static _Fields findByName(String name) {
14290
        return byName.get(name);
14291
      }
14292
 
14293
      private final short _thriftId;
14294
      private final String _fieldName;
14295
 
14296
      _Fields(short thriftId, String fieldName) {
14297
        _thriftId = thriftId;
14298
        _fieldName = fieldName;
14299
      }
14300
 
14301
      public short getThriftFieldId() {
14302
        return _thriftId;
14303
      }
14304
 
14305
      public String getFieldName() {
14306
        return _fieldName;
14307
      }
14308
    }
14309
 
14310
    // isset id assignments
14311
 
14312
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14313
    static {
14314
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14315
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14316
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
14317
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14318
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
14319
    }
14320
 
14321
    public createPurchaseReturn_args() {
14322
    }
14323
 
14324
    public createPurchaseReturn_args(
14325
      PurchaseReturn purchaseReturn)
14326
    {
14327
      this();
14328
      this.purchaseReturn = purchaseReturn;
14329
    }
14330
 
14331
    /**
14332
     * Performs a deep copy on <i>other</i>.
14333
     */
14334
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
14335
      if (other.isSetPurchaseReturn()) {
14336
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
14337
      }
14338
    }
14339
 
14340
    public createPurchaseReturn_args deepCopy() {
14341
      return new createPurchaseReturn_args(this);
14342
    }
14343
 
14344
    @Override
14345
    public void clear() {
14346
      this.purchaseReturn = null;
14347
    }
14348
 
14349
    public PurchaseReturn getPurchaseReturn() {
14350
      return this.purchaseReturn;
14351
    }
14352
 
14353
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
14354
      this.purchaseReturn = purchaseReturn;
14355
    }
14356
 
14357
    public void unsetPurchaseReturn() {
14358
      this.purchaseReturn = null;
14359
    }
14360
 
14361
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
14362
    public boolean isSetPurchaseReturn() {
14363
      return this.purchaseReturn != null;
14364
    }
14365
 
14366
    public void setPurchaseReturnIsSet(boolean value) {
14367
      if (!value) {
14368
        this.purchaseReturn = null;
14369
      }
14370
    }
14371
 
14372
    public void setFieldValue(_Fields field, Object value) {
14373
      switch (field) {
14374
      case PURCHASE_RETURN:
14375
        if (value == null) {
14376
          unsetPurchaseReturn();
14377
        } else {
14378
          setPurchaseReturn((PurchaseReturn)value);
14379
        }
14380
        break;
14381
 
14382
      }
14383
    }
14384
 
14385
    public Object getFieldValue(_Fields field) {
14386
      switch (field) {
14387
      case PURCHASE_RETURN:
14388
        return getPurchaseReturn();
14389
 
14390
      }
14391
      throw new IllegalStateException();
14392
    }
14393
 
14394
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14395
    public boolean isSet(_Fields field) {
14396
      if (field == null) {
14397
        throw new IllegalArgumentException();
14398
      }
14399
 
14400
      switch (field) {
14401
      case PURCHASE_RETURN:
14402
        return isSetPurchaseReturn();
14403
      }
14404
      throw new IllegalStateException();
14405
    }
14406
 
14407
    @Override
14408
    public boolean equals(Object that) {
14409
      if (that == null)
14410
        return false;
14411
      if (that instanceof createPurchaseReturn_args)
14412
        return this.equals((createPurchaseReturn_args)that);
14413
      return false;
14414
    }
14415
 
14416
    public boolean equals(createPurchaseReturn_args that) {
14417
      if (that == null)
14418
        return false;
14419
 
14420
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
14421
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
14422
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
14423
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
14424
          return false;
14425
        if (!this.purchaseReturn.equals(that.purchaseReturn))
14426
          return false;
14427
      }
14428
 
14429
      return true;
14430
    }
14431
 
14432
    @Override
14433
    public int hashCode() {
14434
      return 0;
14435
    }
14436
 
14437
    public int compareTo(createPurchaseReturn_args other) {
14438
      if (!getClass().equals(other.getClass())) {
14439
        return getClass().getName().compareTo(other.getClass().getName());
14440
      }
14441
 
14442
      int lastComparison = 0;
14443
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
14444
 
14445
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
14446
      if (lastComparison != 0) {
14447
        return lastComparison;
14448
      }
14449
      if (isSetPurchaseReturn()) {
14450
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
14451
        if (lastComparison != 0) {
14452
          return lastComparison;
14453
        }
14454
      }
14455
      return 0;
14456
    }
14457
 
14458
    public _Fields fieldForId(int fieldId) {
14459
      return _Fields.findByThriftId(fieldId);
14460
    }
14461
 
14462
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14463
      org.apache.thrift.protocol.TField field;
14464
      iprot.readStructBegin();
14465
      while (true)
14466
      {
14467
        field = iprot.readFieldBegin();
14468
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14469
          break;
14470
        }
14471
        switch (field.id) {
14472
          case 1: // PURCHASE_RETURN
14473
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14474
              this.purchaseReturn = new PurchaseReturn();
14475
              this.purchaseReturn.read(iprot);
14476
            } else { 
14477
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14478
            }
14479
            break;
14480
          default:
14481
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14482
        }
14483
        iprot.readFieldEnd();
14484
      }
14485
      iprot.readStructEnd();
14486
      validate();
14487
    }
14488
 
14489
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14490
      validate();
14491
 
14492
      oprot.writeStructBegin(STRUCT_DESC);
14493
      if (this.purchaseReturn != null) {
14494
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
14495
        this.purchaseReturn.write(oprot);
14496
        oprot.writeFieldEnd();
14497
      }
14498
      oprot.writeFieldStop();
14499
      oprot.writeStructEnd();
14500
    }
14501
 
14502
    @Override
14503
    public String toString() {
14504
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
14505
      boolean first = true;
14506
 
14507
      sb.append("purchaseReturn:");
14508
      if (this.purchaseReturn == null) {
14509
        sb.append("null");
14510
      } else {
14511
        sb.append(this.purchaseReturn);
14512
      }
14513
      first = false;
14514
      sb.append(")");
14515
      return sb.toString();
14516
    }
14517
 
14518
    public void validate() throws org.apache.thrift.TException {
14519
      // check for required fields
14520
    }
14521
 
14522
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14523
      try {
14524
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14525
      } catch (org.apache.thrift.TException te) {
14526
        throw new java.io.IOException(te);
14527
      }
14528
    }
14529
 
14530
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14531
      try {
14532
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14533
      } catch (org.apache.thrift.TException te) {
14534
        throw new java.io.IOException(te);
14535
      }
14536
    }
14537
 
14538
  }
14539
 
14540
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14541
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
14542
 
14543
    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);
14544
 
14545
    private long success; // required
14546
 
14547
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14548
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14549
      SUCCESS((short)0, "success");
14550
 
14551
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14552
 
14553
      static {
14554
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14555
          byName.put(field.getFieldName(), field);
14556
        }
14557
      }
14558
 
14559
      /**
14560
       * Find the _Fields constant that matches fieldId, or null if its not found.
14561
       */
14562
      public static _Fields findByThriftId(int fieldId) {
14563
        switch(fieldId) {
14564
          case 0: // SUCCESS
14565
            return SUCCESS;
14566
          default:
14567
            return null;
14568
        }
14569
      }
14570
 
14571
      /**
14572
       * Find the _Fields constant that matches fieldId, throwing an exception
14573
       * if it is not found.
14574
       */
14575
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14576
        _Fields fields = findByThriftId(fieldId);
14577
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14578
        return fields;
14579
      }
14580
 
14581
      /**
14582
       * Find the _Fields constant that matches name, or null if its not found.
14583
       */
14584
      public static _Fields findByName(String name) {
14585
        return byName.get(name);
14586
      }
14587
 
14588
      private final short _thriftId;
14589
      private final String _fieldName;
14590
 
14591
      _Fields(short thriftId, String fieldName) {
14592
        _thriftId = thriftId;
14593
        _fieldName = fieldName;
14594
      }
14595
 
14596
      public short getThriftFieldId() {
14597
        return _thriftId;
14598
      }
14599
 
14600
      public String getFieldName() {
14601
        return _fieldName;
14602
      }
14603
    }
14604
 
14605
    // isset id assignments
14606
    private static final int __SUCCESS_ISSET_ID = 0;
14607
    private BitSet __isset_bit_vector = new BitSet(1);
14608
 
14609
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14610
    static {
14611
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14612
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14613
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14614
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14615
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
14616
    }
14617
 
14618
    public createPurchaseReturn_result() {
14619
    }
14620
 
14621
    public createPurchaseReturn_result(
14622
      long success)
14623
    {
14624
      this();
14625
      this.success = success;
14626
      setSuccessIsSet(true);
14627
    }
14628
 
14629
    /**
14630
     * Performs a deep copy on <i>other</i>.
14631
     */
14632
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
14633
      __isset_bit_vector.clear();
14634
      __isset_bit_vector.or(other.__isset_bit_vector);
14635
      this.success = other.success;
14636
    }
14637
 
14638
    public createPurchaseReturn_result deepCopy() {
14639
      return new createPurchaseReturn_result(this);
14640
    }
14641
 
14642
    @Override
14643
    public void clear() {
14644
      setSuccessIsSet(false);
14645
      this.success = 0;
14646
    }
14647
 
14648
    public long getSuccess() {
14649
      return this.success;
14650
    }
14651
 
14652
    public void setSuccess(long success) {
14653
      this.success = success;
14654
      setSuccessIsSet(true);
14655
    }
14656
 
14657
    public void unsetSuccess() {
14658
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14659
    }
14660
 
14661
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14662
    public boolean isSetSuccess() {
14663
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14664
    }
14665
 
14666
    public void setSuccessIsSet(boolean value) {
14667
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14668
    }
14669
 
14670
    public void setFieldValue(_Fields field, Object value) {
14671
      switch (field) {
14672
      case SUCCESS:
14673
        if (value == null) {
14674
          unsetSuccess();
14675
        } else {
14676
          setSuccess((Long)value);
14677
        }
14678
        break;
14679
 
14680
      }
14681
    }
14682
 
14683
    public Object getFieldValue(_Fields field) {
14684
      switch (field) {
14685
      case SUCCESS:
14686
        return Long.valueOf(getSuccess());
14687
 
14688
      }
14689
      throw new IllegalStateException();
14690
    }
14691
 
14692
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14693
    public boolean isSet(_Fields field) {
14694
      if (field == null) {
14695
        throw new IllegalArgumentException();
14696
      }
14697
 
14698
      switch (field) {
14699
      case SUCCESS:
14700
        return isSetSuccess();
14701
      }
14702
      throw new IllegalStateException();
14703
    }
14704
 
14705
    @Override
14706
    public boolean equals(Object that) {
14707
      if (that == null)
14708
        return false;
14709
      if (that instanceof createPurchaseReturn_result)
14710
        return this.equals((createPurchaseReturn_result)that);
14711
      return false;
14712
    }
14713
 
14714
    public boolean equals(createPurchaseReturn_result that) {
14715
      if (that == null)
14716
        return false;
14717
 
14718
      boolean this_present_success = true;
14719
      boolean that_present_success = true;
14720
      if (this_present_success || that_present_success) {
14721
        if (!(this_present_success && that_present_success))
14722
          return false;
14723
        if (this.success != that.success)
14724
          return false;
14725
      }
14726
 
14727
      return true;
14728
    }
14729
 
14730
    @Override
14731
    public int hashCode() {
14732
      return 0;
14733
    }
14734
 
14735
    public int compareTo(createPurchaseReturn_result other) {
14736
      if (!getClass().equals(other.getClass())) {
14737
        return getClass().getName().compareTo(other.getClass().getName());
14738
      }
14739
 
14740
      int lastComparison = 0;
14741
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
14742
 
14743
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14744
      if (lastComparison != 0) {
14745
        return lastComparison;
14746
      }
14747
      if (isSetSuccess()) {
14748
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14749
        if (lastComparison != 0) {
14750
          return lastComparison;
14751
        }
14752
      }
14753
      return 0;
14754
    }
14755
 
14756
    public _Fields fieldForId(int fieldId) {
14757
      return _Fields.findByThriftId(fieldId);
14758
    }
14759
 
14760
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14761
      org.apache.thrift.protocol.TField field;
14762
      iprot.readStructBegin();
14763
      while (true)
14764
      {
14765
        field = iprot.readFieldBegin();
14766
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14767
          break;
14768
        }
14769
        switch (field.id) {
14770
          case 0: // SUCCESS
14771
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14772
              this.success = iprot.readI64();
14773
              setSuccessIsSet(true);
14774
            } else { 
14775
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14776
            }
14777
            break;
14778
          default:
14779
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14780
        }
14781
        iprot.readFieldEnd();
14782
      }
14783
      iprot.readStructEnd();
14784
      validate();
14785
    }
14786
 
14787
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14788
      oprot.writeStructBegin(STRUCT_DESC);
14789
 
14790
      if (this.isSetSuccess()) {
14791
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14792
        oprot.writeI64(this.success);
14793
        oprot.writeFieldEnd();
14794
      }
14795
      oprot.writeFieldStop();
14796
      oprot.writeStructEnd();
14797
    }
14798
 
14799
    @Override
14800
    public String toString() {
14801
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
14802
      boolean first = true;
14803
 
14804
      sb.append("success:");
14805
      sb.append(this.success);
14806
      first = false;
14807
      sb.append(")");
14808
      return sb.toString();
14809
    }
14810
 
14811
    public void validate() throws org.apache.thrift.TException {
14812
      // check for required fields
14813
    }
14814
 
14815
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14816
      try {
14817
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14818
      } catch (org.apache.thrift.TException te) {
14819
        throw new java.io.IOException(te);
14820
      }
14821
    }
14822
 
14823
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14824
      try {
14825
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14826
      } catch (org.apache.thrift.TException te) {
14827
        throw new java.io.IOException(te);
14828
      }
14829
    }
14830
 
14831
  }
14832
 
14833
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14834
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
14835
 
14836
    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);
14837
 
14838
    private long id; // required
14839
 
14840
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14841
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14842
      ID((short)1, "id");
14843
 
14844
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14845
 
14846
      static {
14847
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14848
          byName.put(field.getFieldName(), field);
14849
        }
14850
      }
14851
 
14852
      /**
14853
       * Find the _Fields constant that matches fieldId, or null if its not found.
14854
       */
14855
      public static _Fields findByThriftId(int fieldId) {
14856
        switch(fieldId) {
14857
          case 1: // ID
14858
            return ID;
14859
          default:
14860
            return null;
14861
        }
14862
      }
14863
 
14864
      /**
14865
       * Find the _Fields constant that matches fieldId, throwing an exception
14866
       * if it is not found.
14867
       */
14868
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14869
        _Fields fields = findByThriftId(fieldId);
14870
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14871
        return fields;
14872
      }
14873
 
14874
      /**
14875
       * Find the _Fields constant that matches name, or null if its not found.
14876
       */
14877
      public static _Fields findByName(String name) {
14878
        return byName.get(name);
14879
      }
14880
 
14881
      private final short _thriftId;
14882
      private final String _fieldName;
14883
 
14884
      _Fields(short thriftId, String fieldName) {
14885
        _thriftId = thriftId;
14886
        _fieldName = fieldName;
14887
      }
14888
 
14889
      public short getThriftFieldId() {
14890
        return _thriftId;
14891
      }
14892
 
14893
      public String getFieldName() {
14894
        return _fieldName;
14895
      }
14896
    }
14897
 
14898
    // isset id assignments
14899
    private static final int __ID_ISSET_ID = 0;
14900
    private BitSet __isset_bit_vector = new BitSet(1);
14901
 
14902
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14903
    static {
14904
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14905
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14906
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14907
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14908
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
14909
    }
14910
 
14911
    public settlePurchaseReturn_args() {
14912
    }
14913
 
14914
    public settlePurchaseReturn_args(
14915
      long id)
14916
    {
14917
      this();
14918
      this.id = id;
14919
      setIdIsSet(true);
14920
    }
14921
 
14922
    /**
14923
     * Performs a deep copy on <i>other</i>.
14924
     */
14925
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
14926
      __isset_bit_vector.clear();
14927
      __isset_bit_vector.or(other.__isset_bit_vector);
14928
      this.id = other.id;
14929
    }
14930
 
14931
    public settlePurchaseReturn_args deepCopy() {
14932
      return new settlePurchaseReturn_args(this);
14933
    }
14934
 
14935
    @Override
14936
    public void clear() {
14937
      setIdIsSet(false);
14938
      this.id = 0;
14939
    }
14940
 
14941
    public long getId() {
14942
      return this.id;
14943
    }
14944
 
14945
    public void setId(long id) {
14946
      this.id = id;
14947
      setIdIsSet(true);
14948
    }
14949
 
14950
    public void unsetId() {
14951
      __isset_bit_vector.clear(__ID_ISSET_ID);
14952
    }
14953
 
14954
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
14955
    public boolean isSetId() {
14956
      return __isset_bit_vector.get(__ID_ISSET_ID);
14957
    }
14958
 
14959
    public void setIdIsSet(boolean value) {
14960
      __isset_bit_vector.set(__ID_ISSET_ID, value);
14961
    }
14962
 
14963
    public void setFieldValue(_Fields field, Object value) {
14964
      switch (field) {
14965
      case ID:
14966
        if (value == null) {
14967
          unsetId();
14968
        } else {
14969
          setId((Long)value);
14970
        }
14971
        break;
14972
 
14973
      }
14974
    }
14975
 
14976
    public Object getFieldValue(_Fields field) {
14977
      switch (field) {
14978
      case ID:
14979
        return Long.valueOf(getId());
14980
 
14981
      }
14982
      throw new IllegalStateException();
14983
    }
14984
 
14985
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14986
    public boolean isSet(_Fields field) {
14987
      if (field == null) {
14988
        throw new IllegalArgumentException();
14989
      }
14990
 
14991
      switch (field) {
14992
      case ID:
14993
        return isSetId();
14994
      }
14995
      throw new IllegalStateException();
14996
    }
14997
 
14998
    @Override
14999
    public boolean equals(Object that) {
15000
      if (that == null)
15001
        return false;
15002
      if (that instanceof settlePurchaseReturn_args)
15003
        return this.equals((settlePurchaseReturn_args)that);
15004
      return false;
15005
    }
15006
 
15007
    public boolean equals(settlePurchaseReturn_args that) {
15008
      if (that == null)
15009
        return false;
15010
 
15011
      boolean this_present_id = true;
15012
      boolean that_present_id = true;
15013
      if (this_present_id || that_present_id) {
15014
        if (!(this_present_id && that_present_id))
15015
          return false;
15016
        if (this.id != that.id)
15017
          return false;
15018
      }
15019
 
15020
      return true;
15021
    }
15022
 
15023
    @Override
15024
    public int hashCode() {
15025
      return 0;
15026
    }
15027
 
15028
    public int compareTo(settlePurchaseReturn_args other) {
15029
      if (!getClass().equals(other.getClass())) {
15030
        return getClass().getName().compareTo(other.getClass().getName());
15031
      }
15032
 
15033
      int lastComparison = 0;
15034
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
15035
 
15036
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
15037
      if (lastComparison != 0) {
15038
        return lastComparison;
15039
      }
15040
      if (isSetId()) {
15041
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
15042
        if (lastComparison != 0) {
15043
          return lastComparison;
15044
        }
15045
      }
15046
      return 0;
15047
    }
15048
 
15049
    public _Fields fieldForId(int fieldId) {
15050
      return _Fields.findByThriftId(fieldId);
15051
    }
15052
 
15053
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15054
      org.apache.thrift.protocol.TField field;
15055
      iprot.readStructBegin();
15056
      while (true)
15057
      {
15058
        field = iprot.readFieldBegin();
15059
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15060
          break;
15061
        }
15062
        switch (field.id) {
15063
          case 1: // ID
15064
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15065
              this.id = iprot.readI64();
15066
              setIdIsSet(true);
15067
            } else { 
15068
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15069
            }
15070
            break;
15071
          default:
15072
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15073
        }
15074
        iprot.readFieldEnd();
15075
      }
15076
      iprot.readStructEnd();
15077
      validate();
15078
    }
15079
 
15080
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15081
      validate();
15082
 
15083
      oprot.writeStructBegin(STRUCT_DESC);
15084
      oprot.writeFieldBegin(ID_FIELD_DESC);
15085
      oprot.writeI64(this.id);
15086
      oprot.writeFieldEnd();
15087
      oprot.writeFieldStop();
15088
      oprot.writeStructEnd();
15089
    }
15090
 
15091
    @Override
15092
    public String toString() {
15093
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
15094
      boolean first = true;
15095
 
15096
      sb.append("id:");
15097
      sb.append(this.id);
15098
      first = false;
15099
      sb.append(")");
15100
      return sb.toString();
15101
    }
15102
 
15103
    public void validate() throws org.apache.thrift.TException {
15104
      // check for required fields
15105
    }
15106
 
15107
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15108
      try {
15109
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15110
      } catch (org.apache.thrift.TException te) {
15111
        throw new java.io.IOException(te);
15112
      }
15113
    }
15114
 
15115
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15116
      try {
15117
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
15118
        __isset_bit_vector = new BitSet(1);
15119
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15120
      } catch (org.apache.thrift.TException te) {
15121
        throw new java.io.IOException(te);
15122
      }
15123
    }
15124
 
15125
  }
15126
 
15127
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
15128
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
15129
 
15130
 
15131
 
15132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15133
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15134
;
15135
 
15136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15137
 
15138
      static {
15139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15140
          byName.put(field.getFieldName(), field);
15141
        }
15142
      }
15143
 
15144
      /**
15145
       * Find the _Fields constant that matches fieldId, or null if its not found.
15146
       */
15147
      public static _Fields findByThriftId(int fieldId) {
15148
        switch(fieldId) {
15149
          default:
15150
            return null;
15151
        }
15152
      }
15153
 
15154
      /**
15155
       * Find the _Fields constant that matches fieldId, throwing an exception
15156
       * if it is not found.
15157
       */
15158
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15159
        _Fields fields = findByThriftId(fieldId);
15160
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15161
        return fields;
15162
      }
15163
 
15164
      /**
15165
       * Find the _Fields constant that matches name, or null if its not found.
15166
       */
15167
      public static _Fields findByName(String name) {
15168
        return byName.get(name);
15169
      }
15170
 
15171
      private final short _thriftId;
15172
      private final String _fieldName;
15173
 
15174
      _Fields(short thriftId, String fieldName) {
15175
        _thriftId = thriftId;
15176
        _fieldName = fieldName;
15177
      }
15178
 
15179
      public short getThriftFieldId() {
15180
        return _thriftId;
15181
      }
15182
 
15183
      public String getFieldName() {
15184
        return _fieldName;
15185
      }
15186
    }
15187
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15188
    static {
15189
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15190
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15191
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
15192
    }
15193
 
15194
    public settlePurchaseReturn_result() {
15195
    }
15196
 
15197
    /**
15198
     * Performs a deep copy on <i>other</i>.
15199
     */
15200
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
15201
    }
15202
 
15203
    public settlePurchaseReturn_result deepCopy() {
15204
      return new settlePurchaseReturn_result(this);
15205
    }
15206
 
15207
    @Override
15208
    public void clear() {
15209
    }
15210
 
15211
    public void setFieldValue(_Fields field, Object value) {
15212
      switch (field) {
15213
      }
15214
    }
15215
 
15216
    public Object getFieldValue(_Fields field) {
15217
      switch (field) {
15218
      }
15219
      throw new IllegalStateException();
15220
    }
15221
 
15222
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15223
    public boolean isSet(_Fields field) {
15224
      if (field == null) {
15225
        throw new IllegalArgumentException();
15226
      }
15227
 
15228
      switch (field) {
15229
      }
15230
      throw new IllegalStateException();
15231
    }
15232
 
15233
    @Override
15234
    public boolean equals(Object that) {
15235
      if (that == null)
15236
        return false;
15237
      if (that instanceof settlePurchaseReturn_result)
15238
        return this.equals((settlePurchaseReturn_result)that);
15239
      return false;
15240
    }
15241
 
15242
    public boolean equals(settlePurchaseReturn_result that) {
15243
      if (that == null)
15244
        return false;
15245
 
15246
      return true;
15247
    }
15248
 
15249
    @Override
15250
    public int hashCode() {
15251
      return 0;
15252
    }
15253
 
15254
    public int compareTo(settlePurchaseReturn_result other) {
15255
      if (!getClass().equals(other.getClass())) {
15256
        return getClass().getName().compareTo(other.getClass().getName());
15257
      }
15258
 
15259
      int lastComparison = 0;
15260
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
15261
 
15262
      return 0;
15263
    }
15264
 
15265
    public _Fields fieldForId(int fieldId) {
15266
      return _Fields.findByThriftId(fieldId);
15267
    }
15268
 
15269
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15270
      org.apache.thrift.protocol.TField field;
15271
      iprot.readStructBegin();
15272
      while (true)
15273
      {
15274
        field = iprot.readFieldBegin();
15275
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15276
          break;
15277
        }
15278
        switch (field.id) {
15279
          default:
15280
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15281
        }
15282
        iprot.readFieldEnd();
15283
      }
15284
      iprot.readStructEnd();
15285
      validate();
15286
    }
15287
 
15288
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15289
      oprot.writeStructBegin(STRUCT_DESC);
15290
 
15291
      oprot.writeFieldStop();
15292
      oprot.writeStructEnd();
15293
    }
15294
 
15295
    @Override
15296
    public String toString() {
15297
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
15298
      boolean first = true;
15299
 
15300
      sb.append(")");
15301
      return sb.toString();
15302
    }
15303
 
15304
    public void validate() throws org.apache.thrift.TException {
15305
      // check for required fields
15306
    }
15307
 
15308
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15309
      try {
15310
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15311
      } catch (org.apache.thrift.TException te) {
15312
        throw new java.io.IOException(te);
15313
      }
15314
    }
15315
 
15316
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15317
      try {
15318
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15319
      } catch (org.apache.thrift.TException te) {
15320
        throw new java.io.IOException(te);
15321
      }
15322
    }
15323
 
15324
  }
15325
 
15326
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
15327
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
15328
 
15329
 
15330
 
15331
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15332
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15333
;
15334
 
15335
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15336
 
15337
      static {
15338
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15339
          byName.put(field.getFieldName(), field);
15340
        }
15341
      }
15342
 
15343
      /**
15344
       * Find the _Fields constant that matches fieldId, or null if its not found.
15345
       */
15346
      public static _Fields findByThriftId(int fieldId) {
15347
        switch(fieldId) {
15348
          default:
15349
            return null;
15350
        }
15351
      }
15352
 
15353
      /**
15354
       * Find the _Fields constant that matches fieldId, throwing an exception
15355
       * if it is not found.
15356
       */
15357
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15358
        _Fields fields = findByThriftId(fieldId);
15359
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15360
        return fields;
15361
      }
15362
 
15363
      /**
15364
       * Find the _Fields constant that matches name, or null if its not found.
15365
       */
15366
      public static _Fields findByName(String name) {
15367
        return byName.get(name);
15368
      }
15369
 
15370
      private final short _thriftId;
15371
      private final String _fieldName;
15372
 
15373
      _Fields(short thriftId, String fieldName) {
15374
        _thriftId = thriftId;
15375
        _fieldName = fieldName;
15376
      }
15377
 
15378
      public short getThriftFieldId() {
15379
        return _thriftId;
15380
      }
15381
 
15382
      public String getFieldName() {
15383
        return _fieldName;
15384
      }
15385
    }
15386
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15387
    static {
15388
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15389
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15390
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
15391
    }
15392
 
15393
    public getUnsettledPurchaseReturns_args() {
15394
    }
15395
 
15396
    /**
15397
     * Performs a deep copy on <i>other</i>.
15398
     */
15399
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
15400
    }
15401
 
15402
    public getUnsettledPurchaseReturns_args deepCopy() {
15403
      return new getUnsettledPurchaseReturns_args(this);
15404
    }
15405
 
15406
    @Override
15407
    public void clear() {
15408
    }
15409
 
15410
    public void setFieldValue(_Fields field, Object value) {
15411
      switch (field) {
15412
      }
15413
    }
15414
 
15415
    public Object getFieldValue(_Fields field) {
15416
      switch (field) {
15417
      }
15418
      throw new IllegalStateException();
15419
    }
15420
 
15421
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15422
    public boolean isSet(_Fields field) {
15423
      if (field == null) {
15424
        throw new IllegalArgumentException();
15425
      }
15426
 
15427
      switch (field) {
15428
      }
15429
      throw new IllegalStateException();
15430
    }
15431
 
15432
    @Override
15433
    public boolean equals(Object that) {
15434
      if (that == null)
15435
        return false;
15436
      if (that instanceof getUnsettledPurchaseReturns_args)
15437
        return this.equals((getUnsettledPurchaseReturns_args)that);
15438
      return false;
15439
    }
15440
 
15441
    public boolean equals(getUnsettledPurchaseReturns_args that) {
15442
      if (that == null)
15443
        return false;
15444
 
15445
      return true;
15446
    }
15447
 
15448
    @Override
15449
    public int hashCode() {
15450
      return 0;
15451
    }
15452
 
15453
    public int compareTo(getUnsettledPurchaseReturns_args other) {
15454
      if (!getClass().equals(other.getClass())) {
15455
        return getClass().getName().compareTo(other.getClass().getName());
15456
      }
15457
 
15458
      int lastComparison = 0;
15459
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
15460
 
15461
      return 0;
15462
    }
15463
 
15464
    public _Fields fieldForId(int fieldId) {
15465
      return _Fields.findByThriftId(fieldId);
15466
    }
15467
 
15468
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15469
      org.apache.thrift.protocol.TField field;
15470
      iprot.readStructBegin();
15471
      while (true)
15472
      {
15473
        field = iprot.readFieldBegin();
15474
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15475
          break;
15476
        }
15477
        switch (field.id) {
15478
          default:
15479
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15480
        }
15481
        iprot.readFieldEnd();
15482
      }
15483
      iprot.readStructEnd();
15484
      validate();
15485
    }
15486
 
15487
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15488
      validate();
15489
 
15490
      oprot.writeStructBegin(STRUCT_DESC);
15491
      oprot.writeFieldStop();
15492
      oprot.writeStructEnd();
15493
    }
15494
 
15495
    @Override
15496
    public String toString() {
15497
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
15498
      boolean first = true;
15499
 
15500
      sb.append(")");
15501
      return sb.toString();
15502
    }
15503
 
15504
    public void validate() throws org.apache.thrift.TException {
15505
      // check for required fields
15506
    }
15507
 
15508
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15509
      try {
15510
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15511
      } catch (org.apache.thrift.TException te) {
15512
        throw new java.io.IOException(te);
15513
      }
15514
    }
15515
 
15516
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15517
      try {
15518
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15519
      } catch (org.apache.thrift.TException te) {
15520
        throw new java.io.IOException(te);
15521
      }
15522
    }
15523
 
15524
  }
15525
 
15526
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
15527
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
15528
 
15529
    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);
15530
 
15531
    private List<PurchaseReturn> success; // required
15532
 
15533
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15534
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15535
      SUCCESS((short)0, "success");
15536
 
15537
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15538
 
15539
      static {
15540
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15541
          byName.put(field.getFieldName(), field);
15542
        }
15543
      }
15544
 
15545
      /**
15546
       * Find the _Fields constant that matches fieldId, or null if its not found.
15547
       */
15548
      public static _Fields findByThriftId(int fieldId) {
15549
        switch(fieldId) {
15550
          case 0: // SUCCESS
15551
            return SUCCESS;
15552
          default:
15553
            return null;
15554
        }
15555
      }
15556
 
15557
      /**
15558
       * Find the _Fields constant that matches fieldId, throwing an exception
15559
       * if it is not found.
15560
       */
15561
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15562
        _Fields fields = findByThriftId(fieldId);
15563
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15564
        return fields;
15565
      }
15566
 
15567
      /**
15568
       * Find the _Fields constant that matches name, or null if its not found.
15569
       */
15570
      public static _Fields findByName(String name) {
15571
        return byName.get(name);
15572
      }
15573
 
15574
      private final short _thriftId;
15575
      private final String _fieldName;
15576
 
15577
      _Fields(short thriftId, String fieldName) {
15578
        _thriftId = thriftId;
15579
        _fieldName = fieldName;
15580
      }
15581
 
15582
      public short getThriftFieldId() {
15583
        return _thriftId;
15584
      }
15585
 
15586
      public String getFieldName() {
15587
        return _fieldName;
15588
      }
15589
    }
15590
 
15591
    // isset id assignments
15592
 
15593
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15594
    static {
15595
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15596
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15597
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15598
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
15599
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15600
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
15601
    }
15602
 
15603
    public getUnsettledPurchaseReturns_result() {
15604
    }
15605
 
15606
    public getUnsettledPurchaseReturns_result(
15607
      List<PurchaseReturn> success)
15608
    {
15609
      this();
15610
      this.success = success;
15611
    }
15612
 
15613
    /**
15614
     * Performs a deep copy on <i>other</i>.
15615
     */
15616
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
15617
      if (other.isSetSuccess()) {
15618
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
15619
        for (PurchaseReturn other_element : other.success) {
15620
          __this__success.add(new PurchaseReturn(other_element));
15621
        }
15622
        this.success = __this__success;
15623
      }
15624
    }
15625
 
15626
    public getUnsettledPurchaseReturns_result deepCopy() {
15627
      return new getUnsettledPurchaseReturns_result(this);
15628
    }
15629
 
15630
    @Override
15631
    public void clear() {
15632
      this.success = null;
15633
    }
15634
 
15635
    public int getSuccessSize() {
15636
      return (this.success == null) ? 0 : this.success.size();
15637
    }
15638
 
15639
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
15640
      return (this.success == null) ? null : this.success.iterator();
15641
    }
15642
 
15643
    public void addToSuccess(PurchaseReturn elem) {
15644
      if (this.success == null) {
15645
        this.success = new ArrayList<PurchaseReturn>();
15646
      }
15647
      this.success.add(elem);
15648
    }
15649
 
15650
    public List<PurchaseReturn> getSuccess() {
15651
      return this.success;
15652
    }
15653
 
15654
    public void setSuccess(List<PurchaseReturn> success) {
15655
      this.success = success;
15656
    }
15657
 
15658
    public void unsetSuccess() {
15659
      this.success = null;
15660
    }
15661
 
15662
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15663
    public boolean isSetSuccess() {
15664
      return this.success != null;
15665
    }
15666
 
15667
    public void setSuccessIsSet(boolean value) {
15668
      if (!value) {
15669
        this.success = null;
15670
      }
15671
    }
15672
 
15673
    public void setFieldValue(_Fields field, Object value) {
15674
      switch (field) {
15675
      case SUCCESS:
15676
        if (value == null) {
15677
          unsetSuccess();
15678
        } else {
15679
          setSuccess((List<PurchaseReturn>)value);
15680
        }
15681
        break;
15682
 
15683
      }
15684
    }
15685
 
15686
    public Object getFieldValue(_Fields field) {
15687
      switch (field) {
15688
      case SUCCESS:
15689
        return getSuccess();
15690
 
15691
      }
15692
      throw new IllegalStateException();
15693
    }
15694
 
15695
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15696
    public boolean isSet(_Fields field) {
15697
      if (field == null) {
15698
        throw new IllegalArgumentException();
15699
      }
15700
 
15701
      switch (field) {
15702
      case SUCCESS:
15703
        return isSetSuccess();
15704
      }
15705
      throw new IllegalStateException();
15706
    }
15707
 
15708
    @Override
15709
    public boolean equals(Object that) {
15710
      if (that == null)
15711
        return false;
15712
      if (that instanceof getUnsettledPurchaseReturns_result)
15713
        return this.equals((getUnsettledPurchaseReturns_result)that);
15714
      return false;
15715
    }
15716
 
15717
    public boolean equals(getUnsettledPurchaseReturns_result that) {
15718
      if (that == null)
15719
        return false;
15720
 
15721
      boolean this_present_success = true && this.isSetSuccess();
15722
      boolean that_present_success = true && that.isSetSuccess();
15723
      if (this_present_success || that_present_success) {
15724
        if (!(this_present_success && that_present_success))
15725
          return false;
15726
        if (!this.success.equals(that.success))
15727
          return false;
15728
      }
15729
 
15730
      return true;
15731
    }
15732
 
15733
    @Override
15734
    public int hashCode() {
15735
      return 0;
15736
    }
15737
 
15738
    public int compareTo(getUnsettledPurchaseReturns_result other) {
15739
      if (!getClass().equals(other.getClass())) {
15740
        return getClass().getName().compareTo(other.getClass().getName());
15741
      }
15742
 
15743
      int lastComparison = 0;
15744
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
15745
 
15746
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15747
      if (lastComparison != 0) {
15748
        return lastComparison;
15749
      }
15750
      if (isSetSuccess()) {
15751
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15752
        if (lastComparison != 0) {
15753
          return lastComparison;
15754
        }
15755
      }
15756
      return 0;
15757
    }
15758
 
15759
    public _Fields fieldForId(int fieldId) {
15760
      return _Fields.findByThriftId(fieldId);
15761
    }
15762
 
15763
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15764
      org.apache.thrift.protocol.TField field;
15765
      iprot.readStructBegin();
15766
      while (true)
15767
      {
15768
        field = iprot.readFieldBegin();
15769
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15770
          break;
15771
        }
15772
        switch (field.id) {
15773
          case 0: // SUCCESS
15774
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15775
              {
15776
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
15777
                this.success = new ArrayList<PurchaseReturn>(_list28.size);
15778
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
15779
                {
15780
                  PurchaseReturn _elem30; // required
15781
                  _elem30 = new PurchaseReturn();
15782
                  _elem30.read(iprot);
15783
                  this.success.add(_elem30);
15784
                }
15785
                iprot.readListEnd();
15786
              }
15787
            } else { 
15788
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15789
            }
15790
            break;
15791
          default:
15792
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15793
        }
15794
        iprot.readFieldEnd();
15795
      }
15796
      iprot.readStructEnd();
15797
      validate();
15798
    }
15799
 
15800
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15801
      oprot.writeStructBegin(STRUCT_DESC);
15802
 
15803
      if (this.isSetSuccess()) {
15804
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15805
        {
15806
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
15807
          for (PurchaseReturn _iter31 : this.success)
15808
          {
15809
            _iter31.write(oprot);
15810
          }
15811
          oprot.writeListEnd();
15812
        }
15813
        oprot.writeFieldEnd();
15814
      }
15815
      oprot.writeFieldStop();
15816
      oprot.writeStructEnd();
15817
    }
15818
 
15819
    @Override
15820
    public String toString() {
15821
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
15822
      boolean first = true;
15823
 
15824
      sb.append("success:");
15825
      if (this.success == null) {
15826
        sb.append("null");
15827
      } else {
15828
        sb.append(this.success);
15829
      }
15830
      first = false;
15831
      sb.append(")");
15832
      return sb.toString();
15833
    }
15834
 
15835
    public void validate() throws org.apache.thrift.TException {
15836
      // check for required fields
15837
    }
15838
 
15839
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15840
      try {
15841
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15842
      } catch (org.apache.thrift.TException te) {
15843
        throw new java.io.IOException(te);
15844
      }
15845
    }
15846
 
15847
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15848
      try {
15849
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15850
      } catch (org.apache.thrift.TException te) {
15851
        throw new java.io.IOException(te);
15852
      }
15853
    }
15854
 
15855
  }
15856
 
6630 amar.kumar 15857
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
15858
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
15859
 
15860
    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);
15861
    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);
15862
 
15863
    private String invoiceNumber; // required
15864
    private long supplierId; // required
15865
 
15866
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15867
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15868
      INVOICE_NUMBER((short)1, "invoiceNumber"),
15869
      SUPPLIER_ID((short)2, "supplierId");
15870
 
15871
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15872
 
15873
      static {
15874
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15875
          byName.put(field.getFieldName(), field);
15876
        }
15877
      }
15878
 
15879
      /**
15880
       * Find the _Fields constant that matches fieldId, or null if its not found.
15881
       */
15882
      public static _Fields findByThriftId(int fieldId) {
15883
        switch(fieldId) {
15884
          case 1: // INVOICE_NUMBER
15885
            return INVOICE_NUMBER;
15886
          case 2: // SUPPLIER_ID
15887
            return SUPPLIER_ID;
15888
          default:
15889
            return null;
15890
        }
15891
      }
15892
 
15893
      /**
15894
       * Find the _Fields constant that matches fieldId, throwing an exception
15895
       * if it is not found.
15896
       */
15897
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15898
        _Fields fields = findByThriftId(fieldId);
15899
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15900
        return fields;
15901
      }
15902
 
15903
      /**
15904
       * Find the _Fields constant that matches name, or null if its not found.
15905
       */
15906
      public static _Fields findByName(String name) {
15907
        return byName.get(name);
15908
      }
15909
 
15910
      private final short _thriftId;
15911
      private final String _fieldName;
15912
 
15913
      _Fields(short thriftId, String fieldName) {
15914
        _thriftId = thriftId;
15915
        _fieldName = fieldName;
15916
      }
15917
 
15918
      public short getThriftFieldId() {
15919
        return _thriftId;
15920
      }
15921
 
15922
      public String getFieldName() {
15923
        return _fieldName;
15924
      }
15925
    }
15926
 
15927
    // isset id assignments
15928
    private static final int __SUPPLIERID_ISSET_ID = 0;
15929
    private BitSet __isset_bit_vector = new BitSet(1);
15930
 
15931
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15932
    static {
15933
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15934
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15935
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
15936
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15937
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15938
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15939
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
15940
    }
15941
 
15942
    public getInvoice_args() {
15943
    }
15944
 
15945
    public getInvoice_args(
15946
      String invoiceNumber,
15947
      long supplierId)
15948
    {
15949
      this();
15950
      this.invoiceNumber = invoiceNumber;
15951
      this.supplierId = supplierId;
15952
      setSupplierIdIsSet(true);
15953
    }
15954
 
15955
    /**
15956
     * Performs a deep copy on <i>other</i>.
15957
     */
15958
    public getInvoice_args(getInvoice_args other) {
15959
      __isset_bit_vector.clear();
15960
      __isset_bit_vector.or(other.__isset_bit_vector);
15961
      if (other.isSetInvoiceNumber()) {
15962
        this.invoiceNumber = other.invoiceNumber;
15963
      }
15964
      this.supplierId = other.supplierId;
15965
    }
15966
 
15967
    public getInvoice_args deepCopy() {
15968
      return new getInvoice_args(this);
15969
    }
15970
 
15971
    @Override
15972
    public void clear() {
15973
      this.invoiceNumber = null;
15974
      setSupplierIdIsSet(false);
15975
      this.supplierId = 0;
15976
    }
15977
 
15978
    public String getInvoiceNumber() {
15979
      return this.invoiceNumber;
15980
    }
15981
 
15982
    public void setInvoiceNumber(String invoiceNumber) {
15983
      this.invoiceNumber = invoiceNumber;
15984
    }
15985
 
15986
    public void unsetInvoiceNumber() {
15987
      this.invoiceNumber = null;
15988
    }
15989
 
15990
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
15991
    public boolean isSetInvoiceNumber() {
15992
      return this.invoiceNumber != null;
15993
    }
15994
 
15995
    public void setInvoiceNumberIsSet(boolean value) {
15996
      if (!value) {
15997
        this.invoiceNumber = null;
15998
      }
15999
    }
16000
 
16001
    public long getSupplierId() {
16002
      return this.supplierId;
16003
    }
16004
 
16005
    public void setSupplierId(long supplierId) {
16006
      this.supplierId = supplierId;
16007
      setSupplierIdIsSet(true);
16008
    }
16009
 
16010
    public void unsetSupplierId() {
16011
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
16012
    }
16013
 
16014
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
16015
    public boolean isSetSupplierId() {
16016
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
16017
    }
16018
 
16019
    public void setSupplierIdIsSet(boolean value) {
16020
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
16021
    }
16022
 
16023
    public void setFieldValue(_Fields field, Object value) {
16024
      switch (field) {
16025
      case INVOICE_NUMBER:
16026
        if (value == null) {
16027
          unsetInvoiceNumber();
16028
        } else {
16029
          setInvoiceNumber((String)value);
16030
        }
16031
        break;
16032
 
16033
      case SUPPLIER_ID:
16034
        if (value == null) {
16035
          unsetSupplierId();
16036
        } else {
16037
          setSupplierId((Long)value);
16038
        }
16039
        break;
16040
 
16041
      }
16042
    }
16043
 
16044
    public Object getFieldValue(_Fields field) {
16045
      switch (field) {
16046
      case INVOICE_NUMBER:
16047
        return getInvoiceNumber();
16048
 
16049
      case SUPPLIER_ID:
16050
        return Long.valueOf(getSupplierId());
16051
 
16052
      }
16053
      throw new IllegalStateException();
16054
    }
16055
 
16056
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16057
    public boolean isSet(_Fields field) {
16058
      if (field == null) {
16059
        throw new IllegalArgumentException();
16060
      }
16061
 
16062
      switch (field) {
16063
      case INVOICE_NUMBER:
16064
        return isSetInvoiceNumber();
16065
      case SUPPLIER_ID:
16066
        return isSetSupplierId();
16067
      }
16068
      throw new IllegalStateException();
16069
    }
16070
 
16071
    @Override
16072
    public boolean equals(Object that) {
16073
      if (that == null)
16074
        return false;
16075
      if (that instanceof getInvoice_args)
16076
        return this.equals((getInvoice_args)that);
16077
      return false;
16078
    }
16079
 
16080
    public boolean equals(getInvoice_args that) {
16081
      if (that == null)
16082
        return false;
16083
 
16084
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
16085
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
16086
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
16087
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
16088
          return false;
16089
        if (!this.invoiceNumber.equals(that.invoiceNumber))
16090
          return false;
16091
      }
16092
 
16093
      boolean this_present_supplierId = true;
16094
      boolean that_present_supplierId = true;
16095
      if (this_present_supplierId || that_present_supplierId) {
16096
        if (!(this_present_supplierId && that_present_supplierId))
16097
          return false;
16098
        if (this.supplierId != that.supplierId)
16099
          return false;
16100
      }
16101
 
16102
      return true;
16103
    }
16104
 
16105
    @Override
16106
    public int hashCode() {
16107
      return 0;
16108
    }
16109
 
16110
    public int compareTo(getInvoice_args other) {
16111
      if (!getClass().equals(other.getClass())) {
16112
        return getClass().getName().compareTo(other.getClass().getName());
16113
      }
16114
 
16115
      int lastComparison = 0;
16116
      getInvoice_args typedOther = (getInvoice_args)other;
16117
 
16118
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
16119
      if (lastComparison != 0) {
16120
        return lastComparison;
16121
      }
16122
      if (isSetInvoiceNumber()) {
16123
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
16124
        if (lastComparison != 0) {
16125
          return lastComparison;
16126
        }
16127
      }
16128
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
16129
      if (lastComparison != 0) {
16130
        return lastComparison;
16131
      }
16132
      if (isSetSupplierId()) {
16133
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
16134
        if (lastComparison != 0) {
16135
          return lastComparison;
16136
        }
16137
      }
16138
      return 0;
16139
    }
16140
 
16141
    public _Fields fieldForId(int fieldId) {
16142
      return _Fields.findByThriftId(fieldId);
16143
    }
16144
 
16145
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16146
      org.apache.thrift.protocol.TField field;
16147
      iprot.readStructBegin();
16148
      while (true)
16149
      {
16150
        field = iprot.readFieldBegin();
16151
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16152
          break;
16153
        }
16154
        switch (field.id) {
16155
          case 1: // INVOICE_NUMBER
16156
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
16157
              this.invoiceNumber = iprot.readString();
16158
            } else { 
16159
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16160
            }
16161
            break;
16162
          case 2: // SUPPLIER_ID
16163
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16164
              this.supplierId = iprot.readI64();
16165
              setSupplierIdIsSet(true);
16166
            } else { 
16167
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16168
            }
16169
            break;
16170
          default:
16171
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16172
        }
16173
        iprot.readFieldEnd();
16174
      }
16175
      iprot.readStructEnd();
16176
      validate();
16177
    }
16178
 
16179
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16180
      validate();
16181
 
16182
      oprot.writeStructBegin(STRUCT_DESC);
16183
      if (this.invoiceNumber != null) {
16184
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
16185
        oprot.writeString(this.invoiceNumber);
16186
        oprot.writeFieldEnd();
16187
      }
16188
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
16189
      oprot.writeI64(this.supplierId);
16190
      oprot.writeFieldEnd();
16191
      oprot.writeFieldStop();
16192
      oprot.writeStructEnd();
16193
    }
16194
 
16195
    @Override
16196
    public String toString() {
16197
      StringBuilder sb = new StringBuilder("getInvoice_args(");
16198
      boolean first = true;
16199
 
16200
      sb.append("invoiceNumber:");
16201
      if (this.invoiceNumber == null) {
16202
        sb.append("null");
16203
      } else {
16204
        sb.append(this.invoiceNumber);
16205
      }
16206
      first = false;
16207
      if (!first) sb.append(", ");
16208
      sb.append("supplierId:");
16209
      sb.append(this.supplierId);
16210
      first = false;
16211
      sb.append(")");
16212
      return sb.toString();
16213
    }
16214
 
16215
    public void validate() throws org.apache.thrift.TException {
16216
      // check for required fields
16217
    }
16218
 
16219
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16220
      try {
16221
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16222
      } catch (org.apache.thrift.TException te) {
16223
        throw new java.io.IOException(te);
16224
      }
16225
    }
16226
 
16227
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16228
      try {
16229
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16230
      } catch (org.apache.thrift.TException te) {
16231
        throw new java.io.IOException(te);
16232
      }
16233
    }
16234
 
16235
  }
16236
 
16237
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
16238
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
16239
 
16240
    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);
16241
 
16242
    private List<PurchaseReturn> success; // required
16243
 
16244
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16245
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16246
      SUCCESS((short)0, "success");
16247
 
16248
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16249
 
16250
      static {
16251
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16252
          byName.put(field.getFieldName(), field);
16253
        }
16254
      }
16255
 
16256
      /**
16257
       * Find the _Fields constant that matches fieldId, or null if its not found.
16258
       */
16259
      public static _Fields findByThriftId(int fieldId) {
16260
        switch(fieldId) {
16261
          case 0: // SUCCESS
16262
            return SUCCESS;
16263
          default:
16264
            return null;
16265
        }
16266
      }
16267
 
16268
      /**
16269
       * Find the _Fields constant that matches fieldId, throwing an exception
16270
       * if it is not found.
16271
       */
16272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16273
        _Fields fields = findByThriftId(fieldId);
16274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16275
        return fields;
16276
      }
16277
 
16278
      /**
16279
       * Find the _Fields constant that matches name, or null if its not found.
16280
       */
16281
      public static _Fields findByName(String name) {
16282
        return byName.get(name);
16283
      }
16284
 
16285
      private final short _thriftId;
16286
      private final String _fieldName;
16287
 
16288
      _Fields(short thriftId, String fieldName) {
16289
        _thriftId = thriftId;
16290
        _fieldName = fieldName;
16291
      }
16292
 
16293
      public short getThriftFieldId() {
16294
        return _thriftId;
16295
      }
16296
 
16297
      public String getFieldName() {
16298
        return _fieldName;
16299
      }
16300
    }
16301
 
16302
    // isset id assignments
16303
 
16304
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16305
    static {
16306
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16307
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16308
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16309
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16310
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16311
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
16312
    }
16313
 
16314
    public getInvoice_result() {
16315
    }
16316
 
16317
    public getInvoice_result(
16318
      List<PurchaseReturn> success)
16319
    {
16320
      this();
16321
      this.success = success;
16322
    }
16323
 
16324
    /**
16325
     * Performs a deep copy on <i>other</i>.
16326
     */
16327
    public getInvoice_result(getInvoice_result other) {
16328
      if (other.isSetSuccess()) {
16329
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16330
        for (PurchaseReturn other_element : other.success) {
16331
          __this__success.add(new PurchaseReturn(other_element));
16332
        }
16333
        this.success = __this__success;
16334
      }
16335
    }
16336
 
16337
    public getInvoice_result deepCopy() {
16338
      return new getInvoice_result(this);
16339
    }
16340
 
16341
    @Override
16342
    public void clear() {
16343
      this.success = null;
16344
    }
16345
 
16346
    public int getSuccessSize() {
16347
      return (this.success == null) ? 0 : this.success.size();
16348
    }
16349
 
16350
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16351
      return (this.success == null) ? null : this.success.iterator();
16352
    }
16353
 
16354
    public void addToSuccess(PurchaseReturn elem) {
16355
      if (this.success == null) {
16356
        this.success = new ArrayList<PurchaseReturn>();
16357
      }
16358
      this.success.add(elem);
16359
    }
16360
 
16361
    public List<PurchaseReturn> getSuccess() {
16362
      return this.success;
16363
    }
16364
 
16365
    public void setSuccess(List<PurchaseReturn> success) {
16366
      this.success = success;
16367
    }
16368
 
16369
    public void unsetSuccess() {
16370
      this.success = null;
16371
    }
16372
 
16373
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16374
    public boolean isSetSuccess() {
16375
      return this.success != null;
16376
    }
16377
 
16378
    public void setSuccessIsSet(boolean value) {
16379
      if (!value) {
16380
        this.success = null;
16381
      }
16382
    }
16383
 
16384
    public void setFieldValue(_Fields field, Object value) {
16385
      switch (field) {
16386
      case SUCCESS:
16387
        if (value == null) {
16388
          unsetSuccess();
16389
        } else {
16390
          setSuccess((List<PurchaseReturn>)value);
16391
        }
16392
        break;
16393
 
16394
      }
16395
    }
16396
 
16397
    public Object getFieldValue(_Fields field) {
16398
      switch (field) {
16399
      case SUCCESS:
16400
        return getSuccess();
16401
 
16402
      }
16403
      throw new IllegalStateException();
16404
    }
16405
 
16406
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16407
    public boolean isSet(_Fields field) {
16408
      if (field == null) {
16409
        throw new IllegalArgumentException();
16410
      }
16411
 
16412
      switch (field) {
16413
      case SUCCESS:
16414
        return isSetSuccess();
16415
      }
16416
      throw new IllegalStateException();
16417
    }
16418
 
16419
    @Override
16420
    public boolean equals(Object that) {
16421
      if (that == null)
16422
        return false;
16423
      if (that instanceof getInvoice_result)
16424
        return this.equals((getInvoice_result)that);
16425
      return false;
16426
    }
16427
 
16428
    public boolean equals(getInvoice_result that) {
16429
      if (that == null)
16430
        return false;
16431
 
16432
      boolean this_present_success = true && this.isSetSuccess();
16433
      boolean that_present_success = true && that.isSetSuccess();
16434
      if (this_present_success || that_present_success) {
16435
        if (!(this_present_success && that_present_success))
16436
          return false;
16437
        if (!this.success.equals(that.success))
16438
          return false;
16439
      }
16440
 
16441
      return true;
16442
    }
16443
 
16444
    @Override
16445
    public int hashCode() {
16446
      return 0;
16447
    }
16448
 
16449
    public int compareTo(getInvoice_result other) {
16450
      if (!getClass().equals(other.getClass())) {
16451
        return getClass().getName().compareTo(other.getClass().getName());
16452
      }
16453
 
16454
      int lastComparison = 0;
16455
      getInvoice_result typedOther = (getInvoice_result)other;
16456
 
16457
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16458
      if (lastComparison != 0) {
16459
        return lastComparison;
16460
      }
16461
      if (isSetSuccess()) {
16462
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16463
        if (lastComparison != 0) {
16464
          return lastComparison;
16465
        }
16466
      }
16467
      return 0;
16468
    }
16469
 
16470
    public _Fields fieldForId(int fieldId) {
16471
      return _Fields.findByThriftId(fieldId);
16472
    }
16473
 
16474
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16475
      org.apache.thrift.protocol.TField field;
16476
      iprot.readStructBegin();
16477
      while (true)
16478
      {
16479
        field = iprot.readFieldBegin();
16480
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16481
          break;
16482
        }
16483
        switch (field.id) {
16484
          case 0: // SUCCESS
16485
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16486
              {
16487
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
16488
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
16489
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
16490
                {
16491
                  PurchaseReturn _elem34; // required
16492
                  _elem34 = new PurchaseReturn();
16493
                  _elem34.read(iprot);
16494
                  this.success.add(_elem34);
16495
                }
16496
                iprot.readListEnd();
16497
              }
16498
            } else { 
16499
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16500
            }
16501
            break;
16502
          default:
16503
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16504
        }
16505
        iprot.readFieldEnd();
16506
      }
16507
      iprot.readStructEnd();
16508
      validate();
16509
    }
16510
 
16511
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16512
      oprot.writeStructBegin(STRUCT_DESC);
16513
 
16514
      if (this.isSetSuccess()) {
16515
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16516
        {
16517
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16518
          for (PurchaseReturn _iter35 : this.success)
16519
          {
16520
            _iter35.write(oprot);
16521
          }
16522
          oprot.writeListEnd();
16523
        }
16524
        oprot.writeFieldEnd();
16525
      }
16526
      oprot.writeFieldStop();
16527
      oprot.writeStructEnd();
16528
    }
16529
 
16530
    @Override
16531
    public String toString() {
16532
      StringBuilder sb = new StringBuilder("getInvoice_result(");
16533
      boolean first = true;
16534
 
16535
      sb.append("success:");
16536
      if (this.success == null) {
16537
        sb.append("null");
16538
      } else {
16539
        sb.append(this.success);
16540
      }
16541
      first = false;
16542
      sb.append(")");
16543
      return sb.toString();
16544
    }
16545
 
16546
    public void validate() throws org.apache.thrift.TException {
16547
      // check for required fields
16548
    }
16549
 
16550
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16551
      try {
16552
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16553
      } catch (org.apache.thrift.TException te) {
16554
        throw new java.io.IOException(te);
16555
      }
16556
    }
16557
 
16558
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16559
      try {
16560
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16561
      } catch (org.apache.thrift.TException te) {
16562
        throw new java.io.IOException(te);
16563
      }
16564
    }
16565
 
16566
  }
16567
 
6762 amar.kumar 16568
  public static class createPurchaseForOurExtBilling_args implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_args, createPurchaseForOurExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
16569
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_args");
16570
 
16571
    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);
16572
    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);
16573
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)3);
16574
 
16575
    private String invoiceNumber; // required
16576
    private double unitPrice; // required
16577
    private long itemId; // required
16578
 
16579
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16580
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16581
      INVOICE_NUMBER((short)1, "invoiceNumber"),
16582
      UNIT_PRICE((short)2, "unitPrice"),
16583
      ITEM_ID((short)3, "itemId");
16584
 
16585
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16586
 
16587
      static {
16588
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16589
          byName.put(field.getFieldName(), field);
16590
        }
16591
      }
16592
 
16593
      /**
16594
       * Find the _Fields constant that matches fieldId, or null if its not found.
16595
       */
16596
      public static _Fields findByThriftId(int fieldId) {
16597
        switch(fieldId) {
16598
          case 1: // INVOICE_NUMBER
16599
            return INVOICE_NUMBER;
16600
          case 2: // UNIT_PRICE
16601
            return UNIT_PRICE;
16602
          case 3: // ITEM_ID
16603
            return ITEM_ID;
16604
          default:
16605
            return null;
16606
        }
16607
      }
16608
 
16609
      /**
16610
       * Find the _Fields constant that matches fieldId, throwing an exception
16611
       * if it is not found.
16612
       */
16613
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16614
        _Fields fields = findByThriftId(fieldId);
16615
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16616
        return fields;
16617
      }
16618
 
16619
      /**
16620
       * Find the _Fields constant that matches name, or null if its not found.
16621
       */
16622
      public static _Fields findByName(String name) {
16623
        return byName.get(name);
16624
      }
16625
 
16626
      private final short _thriftId;
16627
      private final String _fieldName;
16628
 
16629
      _Fields(short thriftId, String fieldName) {
16630
        _thriftId = thriftId;
16631
        _fieldName = fieldName;
16632
      }
16633
 
16634
      public short getThriftFieldId() {
16635
        return _thriftId;
16636
      }
16637
 
16638
      public String getFieldName() {
16639
        return _fieldName;
16640
      }
16641
    }
16642
 
16643
    // isset id assignments
16644
    private static final int __UNITPRICE_ISSET_ID = 0;
16645
    private static final int __ITEMID_ISSET_ID = 1;
16646
    private BitSet __isset_bit_vector = new BitSet(2);
16647
 
16648
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16649
    static {
16650
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16651
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16652
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
16653
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16654
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
16655
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16656
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16657
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16658
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_args.class, metaDataMap);
16659
    }
16660
 
16661
    public createPurchaseForOurExtBilling_args() {
16662
    }
16663
 
16664
    public createPurchaseForOurExtBilling_args(
16665
      String invoiceNumber,
16666
      double unitPrice,
16667
      long itemId)
16668
    {
16669
      this();
16670
      this.invoiceNumber = invoiceNumber;
16671
      this.unitPrice = unitPrice;
16672
      setUnitPriceIsSet(true);
16673
      this.itemId = itemId;
16674
      setItemIdIsSet(true);
16675
    }
16676
 
16677
    /**
16678
     * Performs a deep copy on <i>other</i>.
16679
     */
16680
    public createPurchaseForOurExtBilling_args(createPurchaseForOurExtBilling_args other) {
16681
      __isset_bit_vector.clear();
16682
      __isset_bit_vector.or(other.__isset_bit_vector);
16683
      if (other.isSetInvoiceNumber()) {
16684
        this.invoiceNumber = other.invoiceNumber;
16685
      }
16686
      this.unitPrice = other.unitPrice;
16687
      this.itemId = other.itemId;
16688
    }
16689
 
16690
    public createPurchaseForOurExtBilling_args deepCopy() {
16691
      return new createPurchaseForOurExtBilling_args(this);
16692
    }
16693
 
16694
    @Override
16695
    public void clear() {
16696
      this.invoiceNumber = null;
16697
      setUnitPriceIsSet(false);
16698
      this.unitPrice = 0.0;
16699
      setItemIdIsSet(false);
16700
      this.itemId = 0;
16701
    }
16702
 
16703
    public String getInvoiceNumber() {
16704
      return this.invoiceNumber;
16705
    }
16706
 
16707
    public void setInvoiceNumber(String invoiceNumber) {
16708
      this.invoiceNumber = invoiceNumber;
16709
    }
16710
 
16711
    public void unsetInvoiceNumber() {
16712
      this.invoiceNumber = null;
16713
    }
16714
 
16715
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
16716
    public boolean isSetInvoiceNumber() {
16717
      return this.invoiceNumber != null;
16718
    }
16719
 
16720
    public void setInvoiceNumberIsSet(boolean value) {
16721
      if (!value) {
16722
        this.invoiceNumber = null;
16723
      }
16724
    }
16725
 
16726
    public double getUnitPrice() {
16727
      return this.unitPrice;
16728
    }
16729
 
16730
    public void setUnitPrice(double unitPrice) {
16731
      this.unitPrice = unitPrice;
16732
      setUnitPriceIsSet(true);
16733
    }
16734
 
16735
    public void unsetUnitPrice() {
16736
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
16737
    }
16738
 
16739
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
16740
    public boolean isSetUnitPrice() {
16741
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
16742
    }
16743
 
16744
    public void setUnitPriceIsSet(boolean value) {
16745
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
16746
    }
16747
 
16748
    public long getItemId() {
16749
      return this.itemId;
16750
    }
16751
 
16752
    public void setItemId(long itemId) {
16753
      this.itemId = itemId;
16754
      setItemIdIsSet(true);
16755
    }
16756
 
16757
    public void unsetItemId() {
16758
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
16759
    }
16760
 
16761
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
16762
    public boolean isSetItemId() {
16763
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
16764
    }
16765
 
16766
    public void setItemIdIsSet(boolean value) {
16767
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
16768
    }
16769
 
16770
    public void setFieldValue(_Fields field, Object value) {
16771
      switch (field) {
16772
      case INVOICE_NUMBER:
16773
        if (value == null) {
16774
          unsetInvoiceNumber();
16775
        } else {
16776
          setInvoiceNumber((String)value);
16777
        }
16778
        break;
16779
 
16780
      case UNIT_PRICE:
16781
        if (value == null) {
16782
          unsetUnitPrice();
16783
        } else {
16784
          setUnitPrice((Double)value);
16785
        }
16786
        break;
16787
 
16788
      case ITEM_ID:
16789
        if (value == null) {
16790
          unsetItemId();
16791
        } else {
16792
          setItemId((Long)value);
16793
        }
16794
        break;
16795
 
16796
      }
16797
    }
16798
 
16799
    public Object getFieldValue(_Fields field) {
16800
      switch (field) {
16801
      case INVOICE_NUMBER:
16802
        return getInvoiceNumber();
16803
 
16804
      case UNIT_PRICE:
16805
        return Double.valueOf(getUnitPrice());
16806
 
16807
      case ITEM_ID:
16808
        return Long.valueOf(getItemId());
16809
 
16810
      }
16811
      throw new IllegalStateException();
16812
    }
16813
 
16814
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16815
    public boolean isSet(_Fields field) {
16816
      if (field == null) {
16817
        throw new IllegalArgumentException();
16818
      }
16819
 
16820
      switch (field) {
16821
      case INVOICE_NUMBER:
16822
        return isSetInvoiceNumber();
16823
      case UNIT_PRICE:
16824
        return isSetUnitPrice();
16825
      case ITEM_ID:
16826
        return isSetItemId();
16827
      }
16828
      throw new IllegalStateException();
16829
    }
16830
 
16831
    @Override
16832
    public boolean equals(Object that) {
16833
      if (that == null)
16834
        return false;
16835
      if (that instanceof createPurchaseForOurExtBilling_args)
16836
        return this.equals((createPurchaseForOurExtBilling_args)that);
16837
      return false;
16838
    }
16839
 
16840
    public boolean equals(createPurchaseForOurExtBilling_args that) {
16841
      if (that == null)
16842
        return false;
16843
 
16844
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
16845
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
16846
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
16847
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
16848
          return false;
16849
        if (!this.invoiceNumber.equals(that.invoiceNumber))
16850
          return false;
16851
      }
16852
 
16853
      boolean this_present_unitPrice = true;
16854
      boolean that_present_unitPrice = true;
16855
      if (this_present_unitPrice || that_present_unitPrice) {
16856
        if (!(this_present_unitPrice && that_present_unitPrice))
16857
          return false;
16858
        if (this.unitPrice != that.unitPrice)
16859
          return false;
16860
      }
16861
 
16862
      boolean this_present_itemId = true;
16863
      boolean that_present_itemId = true;
16864
      if (this_present_itemId || that_present_itemId) {
16865
        if (!(this_present_itemId && that_present_itemId))
16866
          return false;
16867
        if (this.itemId != that.itemId)
16868
          return false;
16869
      }
16870
 
16871
      return true;
16872
    }
16873
 
16874
    @Override
16875
    public int hashCode() {
16876
      return 0;
16877
    }
16878
 
16879
    public int compareTo(createPurchaseForOurExtBilling_args other) {
16880
      if (!getClass().equals(other.getClass())) {
16881
        return getClass().getName().compareTo(other.getClass().getName());
16882
      }
16883
 
16884
      int lastComparison = 0;
16885
      createPurchaseForOurExtBilling_args typedOther = (createPurchaseForOurExtBilling_args)other;
16886
 
16887
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
16888
      if (lastComparison != 0) {
16889
        return lastComparison;
16890
      }
16891
      if (isSetInvoiceNumber()) {
16892
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
16893
        if (lastComparison != 0) {
16894
          return lastComparison;
16895
        }
16896
      }
16897
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
16898
      if (lastComparison != 0) {
16899
        return lastComparison;
16900
      }
16901
      if (isSetUnitPrice()) {
16902
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
16903
        if (lastComparison != 0) {
16904
          return lastComparison;
16905
        }
16906
      }
16907
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
16908
      if (lastComparison != 0) {
16909
        return lastComparison;
16910
      }
16911
      if (isSetItemId()) {
16912
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
16913
        if (lastComparison != 0) {
16914
          return lastComparison;
16915
        }
16916
      }
16917
      return 0;
16918
    }
16919
 
16920
    public _Fields fieldForId(int fieldId) {
16921
      return _Fields.findByThriftId(fieldId);
16922
    }
16923
 
16924
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16925
      org.apache.thrift.protocol.TField field;
16926
      iprot.readStructBegin();
16927
      while (true)
16928
      {
16929
        field = iprot.readFieldBegin();
16930
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16931
          break;
16932
        }
16933
        switch (field.id) {
16934
          case 1: // INVOICE_NUMBER
16935
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
16936
              this.invoiceNumber = iprot.readString();
16937
            } else { 
16938
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16939
            }
16940
            break;
16941
          case 2: // UNIT_PRICE
16942
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
16943
              this.unitPrice = iprot.readDouble();
16944
              setUnitPriceIsSet(true);
16945
            } else { 
16946
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16947
            }
16948
            break;
16949
          case 3: // ITEM_ID
16950
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16951
              this.itemId = iprot.readI64();
16952
              setItemIdIsSet(true);
16953
            } else { 
16954
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16955
            }
16956
            break;
16957
          default:
16958
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16959
        }
16960
        iprot.readFieldEnd();
16961
      }
16962
      iprot.readStructEnd();
16963
      validate();
16964
    }
16965
 
16966
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16967
      validate();
16968
 
16969
      oprot.writeStructBegin(STRUCT_DESC);
16970
      if (this.invoiceNumber != null) {
16971
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
16972
        oprot.writeString(this.invoiceNumber);
16973
        oprot.writeFieldEnd();
16974
      }
16975
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
16976
      oprot.writeDouble(this.unitPrice);
16977
      oprot.writeFieldEnd();
16978
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
16979
      oprot.writeI64(this.itemId);
16980
      oprot.writeFieldEnd();
16981
      oprot.writeFieldStop();
16982
      oprot.writeStructEnd();
16983
    }
16984
 
16985
    @Override
16986
    public String toString() {
16987
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_args(");
16988
      boolean first = true;
16989
 
16990
      sb.append("invoiceNumber:");
16991
      if (this.invoiceNumber == null) {
16992
        sb.append("null");
16993
      } else {
16994
        sb.append(this.invoiceNumber);
16995
      }
16996
      first = false;
16997
      if (!first) sb.append(", ");
16998
      sb.append("unitPrice:");
16999
      sb.append(this.unitPrice);
17000
      first = false;
17001
      if (!first) sb.append(", ");
17002
      sb.append("itemId:");
17003
      sb.append(this.itemId);
17004
      first = false;
17005
      sb.append(")");
17006
      return sb.toString();
17007
    }
17008
 
17009
    public void validate() throws org.apache.thrift.TException {
17010
      // check for required fields
17011
    }
17012
 
17013
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17014
      try {
17015
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17016
      } catch (org.apache.thrift.TException te) {
17017
        throw new java.io.IOException(te);
17018
      }
17019
    }
17020
 
17021
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17022
      try {
17023
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17024
        __isset_bit_vector = new BitSet(1);
17025
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17026
      } catch (org.apache.thrift.TException te) {
17027
        throw new java.io.IOException(te);
17028
      }
17029
    }
17030
 
17031
  }
17032
 
17033
  public static class createPurchaseForOurExtBilling_result implements org.apache.thrift.TBase<createPurchaseForOurExtBilling_result, createPurchaseForOurExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
17034
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseForOurExtBilling_result");
17035
 
17036
    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);
17037
 
17038
    private long success; // required
17039
 
17040
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17041
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17042
      SUCCESS((short)0, "success");
17043
 
17044
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17045
 
17046
      static {
17047
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17048
          byName.put(field.getFieldName(), field);
17049
        }
17050
      }
17051
 
17052
      /**
17053
       * Find the _Fields constant that matches fieldId, or null if its not found.
17054
       */
17055
      public static _Fields findByThriftId(int fieldId) {
17056
        switch(fieldId) {
17057
          case 0: // SUCCESS
17058
            return SUCCESS;
17059
          default:
17060
            return null;
17061
        }
17062
      }
17063
 
17064
      /**
17065
       * Find the _Fields constant that matches fieldId, throwing an exception
17066
       * if it is not found.
17067
       */
17068
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17069
        _Fields fields = findByThriftId(fieldId);
17070
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17071
        return fields;
17072
      }
17073
 
17074
      /**
17075
       * Find the _Fields constant that matches name, or null if its not found.
17076
       */
17077
      public static _Fields findByName(String name) {
17078
        return byName.get(name);
17079
      }
17080
 
17081
      private final short _thriftId;
17082
      private final String _fieldName;
17083
 
17084
      _Fields(short thriftId, String fieldName) {
17085
        _thriftId = thriftId;
17086
        _fieldName = fieldName;
17087
      }
17088
 
17089
      public short getThriftFieldId() {
17090
        return _thriftId;
17091
      }
17092
 
17093
      public String getFieldName() {
17094
        return _fieldName;
17095
      }
17096
    }
17097
 
17098
    // isset id assignments
17099
    private static final int __SUCCESS_ISSET_ID = 0;
17100
    private BitSet __isset_bit_vector = new BitSet(1);
17101
 
17102
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17103
    static {
17104
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17105
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17106
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17107
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17108
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseForOurExtBilling_result.class, metaDataMap);
17109
    }
17110
 
17111
    public createPurchaseForOurExtBilling_result() {
17112
    }
17113
 
17114
    public createPurchaseForOurExtBilling_result(
17115
      long success)
17116
    {
17117
      this();
17118
      this.success = success;
17119
      setSuccessIsSet(true);
17120
    }
17121
 
17122
    /**
17123
     * Performs a deep copy on <i>other</i>.
17124
     */
17125
    public createPurchaseForOurExtBilling_result(createPurchaseForOurExtBilling_result other) {
17126
      __isset_bit_vector.clear();
17127
      __isset_bit_vector.or(other.__isset_bit_vector);
17128
      this.success = other.success;
17129
    }
17130
 
17131
    public createPurchaseForOurExtBilling_result deepCopy() {
17132
      return new createPurchaseForOurExtBilling_result(this);
17133
    }
17134
 
17135
    @Override
17136
    public void clear() {
17137
      setSuccessIsSet(false);
17138
      this.success = 0;
17139
    }
17140
 
17141
    public long getSuccess() {
17142
      return this.success;
17143
    }
17144
 
17145
    public void setSuccess(long success) {
17146
      this.success = success;
17147
      setSuccessIsSet(true);
17148
    }
17149
 
17150
    public void unsetSuccess() {
17151
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17152
    }
17153
 
17154
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17155
    public boolean isSetSuccess() {
17156
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17157
    }
17158
 
17159
    public void setSuccessIsSet(boolean value) {
17160
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17161
    }
17162
 
17163
    public void setFieldValue(_Fields field, Object value) {
17164
      switch (field) {
17165
      case SUCCESS:
17166
        if (value == null) {
17167
          unsetSuccess();
17168
        } else {
17169
          setSuccess((Long)value);
17170
        }
17171
        break;
17172
 
17173
      }
17174
    }
17175
 
17176
    public Object getFieldValue(_Fields field) {
17177
      switch (field) {
17178
      case SUCCESS:
17179
        return Long.valueOf(getSuccess());
17180
 
17181
      }
17182
      throw new IllegalStateException();
17183
    }
17184
 
17185
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17186
    public boolean isSet(_Fields field) {
17187
      if (field == null) {
17188
        throw new IllegalArgumentException();
17189
      }
17190
 
17191
      switch (field) {
17192
      case SUCCESS:
17193
        return isSetSuccess();
17194
      }
17195
      throw new IllegalStateException();
17196
    }
17197
 
17198
    @Override
17199
    public boolean equals(Object that) {
17200
      if (that == null)
17201
        return false;
17202
      if (that instanceof createPurchaseForOurExtBilling_result)
17203
        return this.equals((createPurchaseForOurExtBilling_result)that);
17204
      return false;
17205
    }
17206
 
17207
    public boolean equals(createPurchaseForOurExtBilling_result that) {
17208
      if (that == null)
17209
        return false;
17210
 
17211
      boolean this_present_success = true;
17212
      boolean that_present_success = true;
17213
      if (this_present_success || that_present_success) {
17214
        if (!(this_present_success && that_present_success))
17215
          return false;
17216
        if (this.success != that.success)
17217
          return false;
17218
      }
17219
 
17220
      return true;
17221
    }
17222
 
17223
    @Override
17224
    public int hashCode() {
17225
      return 0;
17226
    }
17227
 
17228
    public int compareTo(createPurchaseForOurExtBilling_result other) {
17229
      if (!getClass().equals(other.getClass())) {
17230
        return getClass().getName().compareTo(other.getClass().getName());
17231
      }
17232
 
17233
      int lastComparison = 0;
17234
      createPurchaseForOurExtBilling_result typedOther = (createPurchaseForOurExtBilling_result)other;
17235
 
17236
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17237
      if (lastComparison != 0) {
17238
        return lastComparison;
17239
      }
17240
      if (isSetSuccess()) {
17241
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17242
        if (lastComparison != 0) {
17243
          return lastComparison;
17244
        }
17245
      }
17246
      return 0;
17247
    }
17248
 
17249
    public _Fields fieldForId(int fieldId) {
17250
      return _Fields.findByThriftId(fieldId);
17251
    }
17252
 
17253
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17254
      org.apache.thrift.protocol.TField field;
17255
      iprot.readStructBegin();
17256
      while (true)
17257
      {
17258
        field = iprot.readFieldBegin();
17259
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17260
          break;
17261
        }
17262
        switch (field.id) {
17263
          case 0: // SUCCESS
17264
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17265
              this.success = iprot.readI64();
17266
              setSuccessIsSet(true);
17267
            } else { 
17268
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17269
            }
17270
            break;
17271
          default:
17272
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17273
        }
17274
        iprot.readFieldEnd();
17275
      }
17276
      iprot.readStructEnd();
17277
      validate();
17278
    }
17279
 
17280
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17281
      oprot.writeStructBegin(STRUCT_DESC);
17282
 
17283
      if (this.isSetSuccess()) {
17284
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17285
        oprot.writeI64(this.success);
17286
        oprot.writeFieldEnd();
17287
      }
17288
      oprot.writeFieldStop();
17289
      oprot.writeStructEnd();
17290
    }
17291
 
17292
    @Override
17293
    public String toString() {
17294
      StringBuilder sb = new StringBuilder("createPurchaseForOurExtBilling_result(");
17295
      boolean first = true;
17296
 
17297
      sb.append("success:");
17298
      sb.append(this.success);
17299
      first = false;
17300
      sb.append(")");
17301
      return sb.toString();
17302
    }
17303
 
17304
    public void validate() throws org.apache.thrift.TException {
17305
      // check for required fields
17306
    }
17307
 
17308
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17309
      try {
17310
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17311
      } catch (org.apache.thrift.TException te) {
17312
        throw new java.io.IOException(te);
17313
      }
17314
    }
17315
 
17316
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17317
      try {
17318
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17319
      } catch (org.apache.thrift.TException te) {
17320
        throw new java.io.IOException(te);
17321
      }
17322
    }
17323
 
17324
  }
17325
 
17326
  public static class fulfillPOForExtBilling_args implements org.apache.thrift.TBase<fulfillPOForExtBilling_args, fulfillPOForExtBilling_args._Fields>, java.io.Serializable, Cloneable   {
17327
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_args");
17328
 
17329
    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);
17330
    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);
17331
 
17332
    private long itemId; // required
17333
    private long quantity; // required
17334
 
17335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17336
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17337
      ITEM_ID((short)1, "itemId"),
17338
      QUANTITY((short)2, "quantity");
17339
 
17340
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17341
 
17342
      static {
17343
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17344
          byName.put(field.getFieldName(), field);
17345
        }
17346
      }
17347
 
17348
      /**
17349
       * Find the _Fields constant that matches fieldId, or null if its not found.
17350
       */
17351
      public static _Fields findByThriftId(int fieldId) {
17352
        switch(fieldId) {
17353
          case 1: // ITEM_ID
17354
            return ITEM_ID;
17355
          case 2: // QUANTITY
17356
            return QUANTITY;
17357
          default:
17358
            return null;
17359
        }
17360
      }
17361
 
17362
      /**
17363
       * Find the _Fields constant that matches fieldId, throwing an exception
17364
       * if it is not found.
17365
       */
17366
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17367
        _Fields fields = findByThriftId(fieldId);
17368
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17369
        return fields;
17370
      }
17371
 
17372
      /**
17373
       * Find the _Fields constant that matches name, or null if its not found.
17374
       */
17375
      public static _Fields findByName(String name) {
17376
        return byName.get(name);
17377
      }
17378
 
17379
      private final short _thriftId;
17380
      private final String _fieldName;
17381
 
17382
      _Fields(short thriftId, String fieldName) {
17383
        _thriftId = thriftId;
17384
        _fieldName = fieldName;
17385
      }
17386
 
17387
      public short getThriftFieldId() {
17388
        return _thriftId;
17389
      }
17390
 
17391
      public String getFieldName() {
17392
        return _fieldName;
17393
      }
17394
    }
17395
 
17396
    // isset id assignments
17397
    private static final int __ITEMID_ISSET_ID = 0;
17398
    private static final int __QUANTITY_ISSET_ID = 1;
17399
    private BitSet __isset_bit_vector = new BitSet(2);
17400
 
17401
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17402
    static {
17403
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17404
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17405
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17406
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17407
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17408
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17409
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_args.class, metaDataMap);
17410
    }
17411
 
17412
    public fulfillPOForExtBilling_args() {
17413
    }
17414
 
17415
    public fulfillPOForExtBilling_args(
17416
      long itemId,
17417
      long quantity)
17418
    {
17419
      this();
17420
      this.itemId = itemId;
17421
      setItemIdIsSet(true);
17422
      this.quantity = quantity;
17423
      setQuantityIsSet(true);
17424
    }
17425
 
17426
    /**
17427
     * Performs a deep copy on <i>other</i>.
17428
     */
17429
    public fulfillPOForExtBilling_args(fulfillPOForExtBilling_args other) {
17430
      __isset_bit_vector.clear();
17431
      __isset_bit_vector.or(other.__isset_bit_vector);
17432
      this.itemId = other.itemId;
17433
      this.quantity = other.quantity;
17434
    }
17435
 
17436
    public fulfillPOForExtBilling_args deepCopy() {
17437
      return new fulfillPOForExtBilling_args(this);
17438
    }
17439
 
17440
    @Override
17441
    public void clear() {
17442
      setItemIdIsSet(false);
17443
      this.itemId = 0;
17444
      setQuantityIsSet(false);
17445
      this.quantity = 0;
17446
    }
17447
 
17448
    public long getItemId() {
17449
      return this.itemId;
17450
    }
17451
 
17452
    public void setItemId(long itemId) {
17453
      this.itemId = itemId;
17454
      setItemIdIsSet(true);
17455
    }
17456
 
17457
    public void unsetItemId() {
17458
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
17459
    }
17460
 
17461
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
17462
    public boolean isSetItemId() {
17463
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
17464
    }
17465
 
17466
    public void setItemIdIsSet(boolean value) {
17467
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
17468
    }
17469
 
17470
    public long getQuantity() {
17471
      return this.quantity;
17472
    }
17473
 
17474
    public void setQuantity(long quantity) {
17475
      this.quantity = quantity;
17476
      setQuantityIsSet(true);
17477
    }
17478
 
17479
    public void unsetQuantity() {
17480
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
17481
    }
17482
 
17483
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
17484
    public boolean isSetQuantity() {
17485
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
17486
    }
17487
 
17488
    public void setQuantityIsSet(boolean value) {
17489
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
17490
    }
17491
 
17492
    public void setFieldValue(_Fields field, Object value) {
17493
      switch (field) {
17494
      case ITEM_ID:
17495
        if (value == null) {
17496
          unsetItemId();
17497
        } else {
17498
          setItemId((Long)value);
17499
        }
17500
        break;
17501
 
17502
      case QUANTITY:
17503
        if (value == null) {
17504
          unsetQuantity();
17505
        } else {
17506
          setQuantity((Long)value);
17507
        }
17508
        break;
17509
 
17510
      }
17511
    }
17512
 
17513
    public Object getFieldValue(_Fields field) {
17514
      switch (field) {
17515
      case ITEM_ID:
17516
        return Long.valueOf(getItemId());
17517
 
17518
      case QUANTITY:
17519
        return Long.valueOf(getQuantity());
17520
 
17521
      }
17522
      throw new IllegalStateException();
17523
    }
17524
 
17525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17526
    public boolean isSet(_Fields field) {
17527
      if (field == null) {
17528
        throw new IllegalArgumentException();
17529
      }
17530
 
17531
      switch (field) {
17532
      case ITEM_ID:
17533
        return isSetItemId();
17534
      case QUANTITY:
17535
        return isSetQuantity();
17536
      }
17537
      throw new IllegalStateException();
17538
    }
17539
 
17540
    @Override
17541
    public boolean equals(Object that) {
17542
      if (that == null)
17543
        return false;
17544
      if (that instanceof fulfillPOForExtBilling_args)
17545
        return this.equals((fulfillPOForExtBilling_args)that);
17546
      return false;
17547
    }
17548
 
17549
    public boolean equals(fulfillPOForExtBilling_args that) {
17550
      if (that == null)
17551
        return false;
17552
 
17553
      boolean this_present_itemId = true;
17554
      boolean that_present_itemId = true;
17555
      if (this_present_itemId || that_present_itemId) {
17556
        if (!(this_present_itemId && that_present_itemId))
17557
          return false;
17558
        if (this.itemId != that.itemId)
17559
          return false;
17560
      }
17561
 
17562
      boolean this_present_quantity = true;
17563
      boolean that_present_quantity = true;
17564
      if (this_present_quantity || that_present_quantity) {
17565
        if (!(this_present_quantity && that_present_quantity))
17566
          return false;
17567
        if (this.quantity != that.quantity)
17568
          return false;
17569
      }
17570
 
17571
      return true;
17572
    }
17573
 
17574
    @Override
17575
    public int hashCode() {
17576
      return 0;
17577
    }
17578
 
17579
    public int compareTo(fulfillPOForExtBilling_args other) {
17580
      if (!getClass().equals(other.getClass())) {
17581
        return getClass().getName().compareTo(other.getClass().getName());
17582
      }
17583
 
17584
      int lastComparison = 0;
17585
      fulfillPOForExtBilling_args typedOther = (fulfillPOForExtBilling_args)other;
17586
 
17587
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
17588
      if (lastComparison != 0) {
17589
        return lastComparison;
17590
      }
17591
      if (isSetItemId()) {
17592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
17593
        if (lastComparison != 0) {
17594
          return lastComparison;
17595
        }
17596
      }
17597
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
17598
      if (lastComparison != 0) {
17599
        return lastComparison;
17600
      }
17601
      if (isSetQuantity()) {
17602
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
17603
        if (lastComparison != 0) {
17604
          return lastComparison;
17605
        }
17606
      }
17607
      return 0;
17608
    }
17609
 
17610
    public _Fields fieldForId(int fieldId) {
17611
      return _Fields.findByThriftId(fieldId);
17612
    }
17613
 
17614
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17615
      org.apache.thrift.protocol.TField field;
17616
      iprot.readStructBegin();
17617
      while (true)
17618
      {
17619
        field = iprot.readFieldBegin();
17620
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17621
          break;
17622
        }
17623
        switch (field.id) {
17624
          case 1: // ITEM_ID
17625
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17626
              this.itemId = iprot.readI64();
17627
              setItemIdIsSet(true);
17628
            } else { 
17629
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17630
            }
17631
            break;
17632
          case 2: // QUANTITY
17633
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17634
              this.quantity = iprot.readI64();
17635
              setQuantityIsSet(true);
17636
            } else { 
17637
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17638
            }
17639
            break;
17640
          default:
17641
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17642
        }
17643
        iprot.readFieldEnd();
17644
      }
17645
      iprot.readStructEnd();
17646
      validate();
17647
    }
17648
 
17649
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17650
      validate();
17651
 
17652
      oprot.writeStructBegin(STRUCT_DESC);
17653
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
17654
      oprot.writeI64(this.itemId);
17655
      oprot.writeFieldEnd();
17656
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
17657
      oprot.writeI64(this.quantity);
17658
      oprot.writeFieldEnd();
17659
      oprot.writeFieldStop();
17660
      oprot.writeStructEnd();
17661
    }
17662
 
17663
    @Override
17664
    public String toString() {
17665
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_args(");
17666
      boolean first = true;
17667
 
17668
      sb.append("itemId:");
17669
      sb.append(this.itemId);
17670
      first = false;
17671
      if (!first) sb.append(", ");
17672
      sb.append("quantity:");
17673
      sb.append(this.quantity);
17674
      first = false;
17675
      sb.append(")");
17676
      return sb.toString();
17677
    }
17678
 
17679
    public void validate() throws org.apache.thrift.TException {
17680
      // check for required fields
17681
    }
17682
 
17683
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17684
      try {
17685
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17686
      } catch (org.apache.thrift.TException te) {
17687
        throw new java.io.IOException(te);
17688
      }
17689
    }
17690
 
17691
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17692
      try {
17693
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17694
        __isset_bit_vector = new BitSet(1);
17695
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17696
      } catch (org.apache.thrift.TException te) {
17697
        throw new java.io.IOException(te);
17698
      }
17699
    }
17700
 
17701
  }
17702
 
17703
  public static class fulfillPOForExtBilling_result implements org.apache.thrift.TBase<fulfillPOForExtBilling_result, fulfillPOForExtBilling_result._Fields>, java.io.Serializable, Cloneable   {
17704
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPOForExtBilling_result");
17705
 
17706
 
17707
 
17708
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17709
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17710
;
17711
 
17712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17713
 
17714
      static {
17715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17716
          byName.put(field.getFieldName(), field);
17717
        }
17718
      }
17719
 
17720
      /**
17721
       * Find the _Fields constant that matches fieldId, or null if its not found.
17722
       */
17723
      public static _Fields findByThriftId(int fieldId) {
17724
        switch(fieldId) {
17725
          default:
17726
            return null;
17727
        }
17728
      }
17729
 
17730
      /**
17731
       * Find the _Fields constant that matches fieldId, throwing an exception
17732
       * if it is not found.
17733
       */
17734
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17735
        _Fields fields = findByThriftId(fieldId);
17736
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17737
        return fields;
17738
      }
17739
 
17740
      /**
17741
       * Find the _Fields constant that matches name, or null if its not found.
17742
       */
17743
      public static _Fields findByName(String name) {
17744
        return byName.get(name);
17745
      }
17746
 
17747
      private final short _thriftId;
17748
      private final String _fieldName;
17749
 
17750
      _Fields(short thriftId, String fieldName) {
17751
        _thriftId = thriftId;
17752
        _fieldName = fieldName;
17753
      }
17754
 
17755
      public short getThriftFieldId() {
17756
        return _thriftId;
17757
      }
17758
 
17759
      public String getFieldName() {
17760
        return _fieldName;
17761
      }
17762
    }
17763
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17764
    static {
17765
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17766
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17767
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPOForExtBilling_result.class, metaDataMap);
17768
    }
17769
 
17770
    public fulfillPOForExtBilling_result() {
17771
    }
17772
 
17773
    /**
17774
     * Performs a deep copy on <i>other</i>.
17775
     */
17776
    public fulfillPOForExtBilling_result(fulfillPOForExtBilling_result other) {
17777
    }
17778
 
17779
    public fulfillPOForExtBilling_result deepCopy() {
17780
      return new fulfillPOForExtBilling_result(this);
17781
    }
17782
 
17783
    @Override
17784
    public void clear() {
17785
    }
17786
 
17787
    public void setFieldValue(_Fields field, Object value) {
17788
      switch (field) {
17789
      }
17790
    }
17791
 
17792
    public Object getFieldValue(_Fields field) {
17793
      switch (field) {
17794
      }
17795
      throw new IllegalStateException();
17796
    }
17797
 
17798
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17799
    public boolean isSet(_Fields field) {
17800
      if (field == null) {
17801
        throw new IllegalArgumentException();
17802
      }
17803
 
17804
      switch (field) {
17805
      }
17806
      throw new IllegalStateException();
17807
    }
17808
 
17809
    @Override
17810
    public boolean equals(Object that) {
17811
      if (that == null)
17812
        return false;
17813
      if (that instanceof fulfillPOForExtBilling_result)
17814
        return this.equals((fulfillPOForExtBilling_result)that);
17815
      return false;
17816
    }
17817
 
17818
    public boolean equals(fulfillPOForExtBilling_result that) {
17819
      if (that == null)
17820
        return false;
17821
 
17822
      return true;
17823
    }
17824
 
17825
    @Override
17826
    public int hashCode() {
17827
      return 0;
17828
    }
17829
 
17830
    public int compareTo(fulfillPOForExtBilling_result other) {
17831
      if (!getClass().equals(other.getClass())) {
17832
        return getClass().getName().compareTo(other.getClass().getName());
17833
      }
17834
 
17835
      int lastComparison = 0;
17836
      fulfillPOForExtBilling_result typedOther = (fulfillPOForExtBilling_result)other;
17837
 
17838
      return 0;
17839
    }
17840
 
17841
    public _Fields fieldForId(int fieldId) {
17842
      return _Fields.findByThriftId(fieldId);
17843
    }
17844
 
17845
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17846
      org.apache.thrift.protocol.TField field;
17847
      iprot.readStructBegin();
17848
      while (true)
17849
      {
17850
        field = iprot.readFieldBegin();
17851
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17852
          break;
17853
        }
17854
        switch (field.id) {
17855
          default:
17856
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17857
        }
17858
        iprot.readFieldEnd();
17859
      }
17860
      iprot.readStructEnd();
17861
      validate();
17862
    }
17863
 
17864
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17865
      oprot.writeStructBegin(STRUCT_DESC);
17866
 
17867
      oprot.writeFieldStop();
17868
      oprot.writeStructEnd();
17869
    }
17870
 
17871
    @Override
17872
    public String toString() {
17873
      StringBuilder sb = new StringBuilder("fulfillPOForExtBilling_result(");
17874
      boolean first = true;
17875
 
17876
      sb.append(")");
17877
      return sb.toString();
17878
    }
17879
 
17880
    public void validate() throws org.apache.thrift.TException {
17881
      // check for required fields
17882
    }
17883
 
17884
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17885
      try {
17886
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17887
      } catch (org.apache.thrift.TException te) {
17888
        throw new java.io.IOException(te);
17889
      }
17890
    }
17891
 
17892
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17893
      try {
17894
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17895
      } catch (org.apache.thrift.TException te) {
17896
        throw new java.io.IOException(te);
17897
      }
17898
    }
17899
 
17900
  }
17901
 
4496 mandeep.dh 17902
}