Subversion Repositories SmartDukaan

Rev

Rev 6467 | Rev 6762 | 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
 
4496 mandeep.dh 188
  }
189
 
190
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
191
 
192
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
193
 
194
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
195
 
196
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
197
 
198
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
199
 
200
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
201
 
202
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
203
 
204
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
205
 
6385 amar.kumar 206
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
207
 
4555 mandeep.dh 208
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 209
 
4754 mandeep.dh 210
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
211
 
212
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
213
 
214
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
215
 
216
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
217
 
5185 mandeep.dh 218
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
219
 
5443 mandeep.dh 220
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
221
 
222
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
223
 
5591 mandeep.dh 224
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
225
 
226
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
227
 
6467 amar.kumar 228
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
229
 
230
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
231
 
232
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
233
 
6630 amar.kumar 234
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
235
 
4496 mandeep.dh 236
  }
237
 
238
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
239
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
240
      public Factory() {}
241
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
242
        return new Client(prot);
243
      }
244
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
245
        return new Client(iprot, oprot);
246
      }
247
    }
248
 
249
    public Client(org.apache.thrift.protocol.TProtocol prot)
250
    {
251
      super(prot, prot);
252
    }
253
 
254
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
255
      super(iprot, oprot);
256
    }
257
 
258
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
259
    {
260
      send_createPurchaseOrder(purchaseOrder);
261
      return recv_createPurchaseOrder();
262
    }
263
 
264
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
265
    {
266
      createPurchaseOrder_args args = new createPurchaseOrder_args();
267
      args.setPurchaseOrder(purchaseOrder);
268
      sendBase("createPurchaseOrder", args);
269
    }
270
 
271
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
272
    {
273
      createPurchaseOrder_result result = new createPurchaseOrder_result();
274
      receiveBase(result, "createPurchaseOrder");
275
      if (result.isSetSuccess()) {
276
        return result.success;
277
      }
278
      if (result.e != null) {
279
        throw result.e;
280
      }
281
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
282
    }
283
 
284
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
285
    {
286
      send_getPurchaseOrder(id);
287
      return recv_getPurchaseOrder();
288
    }
289
 
290
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
291
    {
292
      getPurchaseOrder_args args = new getPurchaseOrder_args();
293
      args.setId(id);
294
      sendBase("getPurchaseOrder", args);
295
    }
296
 
297
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
298
    {
299
      getPurchaseOrder_result result = new getPurchaseOrder_result();
300
      receiveBase(result, "getPurchaseOrder");
301
      if (result.isSetSuccess()) {
302
        return result.success;
303
      }
304
      if (result.e != null) {
305
        throw result.e;
306
      }
307
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
308
    }
309
 
310
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
311
    {
312
      send_getAllPurchaseOrders(status);
313
      return recv_getAllPurchaseOrders();
314
    }
315
 
316
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
317
    {
318
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
319
      args.setStatus(status);
320
      sendBase("getAllPurchaseOrders", args);
321
    }
322
 
323
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
324
    {
325
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
326
      receiveBase(result, "getAllPurchaseOrders");
327
      if (result.isSetSuccess()) {
328
        return result.success;
329
      }
330
      if (result.e != null) {
331
        throw result.e;
332
      }
333
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
334
    }
335
 
336
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
337
    {
338
      send_getSupplier(id);
339
      return recv_getSupplier();
340
    }
341
 
342
    public void send_getSupplier(long id) throws org.apache.thrift.TException
343
    {
344
      getSupplier_args args = new getSupplier_args();
345
      args.setId(id);
346
      sendBase("getSupplier", args);
347
    }
348
 
349
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
350
    {
351
      getSupplier_result result = new getSupplier_result();
352
      receiveBase(result, "getSupplier");
353
      if (result.isSetSuccess()) {
354
        return result.success;
355
      }
356
      if (result.e != null) {
357
        throw result.e;
358
      }
359
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
360
    }
361
 
362
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
363
    {
364
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
365
      return recv_startPurchase();
366
    }
367
 
368
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
369
    {
370
      startPurchase_args args = new startPurchase_args();
371
      args.setPurchaseOrderId(purchaseOrderId);
372
      args.setInvoiceNumber(invoiceNumber);
373
      args.setFreightCharges(freightCharges);
374
      sendBase("startPurchase", args);
375
    }
376
 
377
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
378
    {
379
      startPurchase_result result = new startPurchase_result();
380
      receiveBase(result, "startPurchase");
381
      if (result.isSetSuccess()) {
382
        return result.success;
383
      }
384
      if (result.e != null) {
385
        throw result.e;
386
      }
387
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
388
    }
389
 
390
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
391
    {
392
      send_closePurchase(purchaseId);
393
      return recv_closePurchase();
394
    }
395
 
396
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
397
    {
398
      closePurchase_args args = new closePurchase_args();
399
      args.setPurchaseId(purchaseId);
400
      sendBase("closePurchase", args);
401
    }
402
 
403
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
404
    {
405
      closePurchase_result result = new closePurchase_result();
406
      receiveBase(result, "closePurchase");
407
      if (result.isSetSuccess()) {
408
        return result.success;
409
      }
410
      if (result.e != null) {
411
        throw result.e;
412
      }
413
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
414
    }
415
 
416
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
417
    {
418
      send_getAllPurchases(purchaseOrderId, open);
419
      return recv_getAllPurchases();
420
    }
421
 
422
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
423
    {
424
      getAllPurchases_args args = new getAllPurchases_args();
425
      args.setPurchaseOrderId(purchaseOrderId);
426
      args.setOpen(open);
427
      sendBase("getAllPurchases", args);
428
    }
429
 
430
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
431
    {
432
      getAllPurchases_result result = new getAllPurchases_result();
433
      receiveBase(result, "getAllPurchases");
434
      if (result.isSetSuccess()) {
435
        return result.success;
436
      }
437
      if (result.e != null) {
438
        throw result.e;
439
      }
440
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
441
    }
442
 
6385 amar.kumar 443
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
444
    {
445
      send_getPurchasesForPO(purchaseOrderId);
446
      return recv_getPurchasesForPO();
447
    }
448
 
449
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
450
    {
451
      getPurchasesForPO_args args = new getPurchasesForPO_args();
452
      args.setPurchaseOrderId(purchaseOrderId);
453
      sendBase("getPurchasesForPO", args);
454
    }
455
 
456
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
457
    {
458
      getPurchasesForPO_result result = new getPurchasesForPO_result();
459
      receiveBase(result, "getPurchasesForPO");
460
      if (result.isSetSuccess()) {
461
        return result.success;
462
      }
463
      if (result.e != null) {
464
        throw result.e;
465
      }
466
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
467
    }
468
 
4555 mandeep.dh 469
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 470
    {
4555 mandeep.dh 471
      send_getPurchaseOrderForPurchase(purchaseId);
472
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 473
    }
474
 
4555 mandeep.dh 475
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 476
    {
4555 mandeep.dh 477
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 478
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 479
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 480
    }
481
 
4555 mandeep.dh 482
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 483
    {
4555 mandeep.dh 484
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
485
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 486
      if (result.isSetSuccess()) {
487
        return result.success;
488
      }
4555 mandeep.dh 489
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 490
    }
491
 
4754 mandeep.dh 492
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
493
    {
494
      send_getPendingPurchaseOrders(warehouseId);
495
      return recv_getPendingPurchaseOrders();
496
    }
497
 
498
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
499
    {
500
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
501
      args.setWarehouseId(warehouseId);
502
      sendBase("getPendingPurchaseOrders", args);
503
    }
504
 
505
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
506
    {
507
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
508
      receiveBase(result, "getPendingPurchaseOrders");
509
      if (result.isSetSuccess()) {
510
        return result.success;
511
      }
512
      if (result.e != null) {
513
        throw result.e;
514
      }
515
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
516
    }
517
 
518
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
519
    {
520
      send_getSuppliers();
521
      return recv_getSuppliers();
522
    }
523
 
524
    public void send_getSuppliers() throws org.apache.thrift.TException
525
    {
526
      getSuppliers_args args = new getSuppliers_args();
527
      sendBase("getSuppliers", args);
528
    }
529
 
530
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
531
    {
532
      getSuppliers_result result = new getSuppliers_result();
533
      receiveBase(result, "getSuppliers");
534
      if (result.isSetSuccess()) {
535
        return result.success;
536
      }
537
      if (result.e != null) {
538
        throw result.e;
539
      }
540
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
541
    }
542
 
543
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
544
    {
545
      send_fulfillPO(purchaseOrderId, itemId, quantity);
546
      recv_fulfillPO();
547
    }
548
 
549
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
550
    {
551
      fulfillPO_args args = new fulfillPO_args();
552
      args.setPurchaseOrderId(purchaseOrderId);
553
      args.setItemId(itemId);
554
      args.setQuantity(quantity);
555
      sendBase("fulfillPO", args);
556
    }
557
 
558
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
559
    {
560
      fulfillPO_result result = new fulfillPO_result();
561
      receiveBase(result, "fulfillPO");
562
      if (result.e != null) {
563
        throw result.e;
564
      }
565
      return;
566
    }
567
 
568
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
569
    {
570
      send_updatePurchaseOrder(purchaseOrder);
571
      recv_updatePurchaseOrder();
572
    }
573
 
574
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
575
    {
576
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
577
      args.setPurchaseOrder(purchaseOrder);
578
      sendBase("updatePurchaseOrder", args);
579
    }
580
 
581
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
582
    {
583
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
584
      receiveBase(result, "updatePurchaseOrder");
585
      if (result.e != null) {
586
        throw result.e;
587
      }
588
      return;
589
    }
590
 
5185 mandeep.dh 591
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
592
    {
593
      send_unFulfillPO(purchaseId, itemId, quantity);
594
      recv_unFulfillPO();
595
    }
596
 
597
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
598
    {
599
      unFulfillPO_args args = new unFulfillPO_args();
600
      args.setPurchaseId(purchaseId);
601
      args.setItemId(itemId);
602
      args.setQuantity(quantity);
603
      sendBase("unFulfillPO", args);
604
    }
605
 
606
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
607
    {
608
      unFulfillPO_result result = new unFulfillPO_result();
609
      receiveBase(result, "unFulfillPO");
610
      if (result.e != null) {
611
        throw result.e;
612
      }
613
      return;
614
    }
615
 
5443 mandeep.dh 616
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
617
    {
618
      send_getInvoices(date);
619
      return recv_getInvoices();
620
    }
621
 
622
    public void send_getInvoices(long date) throws org.apache.thrift.TException
623
    {
624
      getInvoices_args args = new getInvoices_args();
625
      args.setDate(date);
626
      sendBase("getInvoices", args);
627
    }
628
 
629
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
630
    {
631
      getInvoices_result result = new getInvoices_result();
632
      receiveBase(result, "getInvoices");
633
      if (result.isSetSuccess()) {
634
        return result.success;
635
      }
636
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
637
    }
638
 
639
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
640
    {
641
      send_createInvoice(invoice);
642
      recv_createInvoice();
643
    }
644
 
645
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
646
    {
647
      createInvoice_args args = new createInvoice_args();
648
      args.setInvoice(invoice);
649
      sendBase("createInvoice", args);
650
    }
651
 
652
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
653
    {
654
      createInvoice_result result = new createInvoice_result();
655
      receiveBase(result, "createInvoice");
656
      if (result.e != null) {
657
        throw result.e;
658
      }
659
      return;
660
    }
661
 
5591 mandeep.dh 662
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
663
    {
664
      send_addSupplier(supplier);
665
      return recv_addSupplier();
666
    }
667
 
668
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
669
    {
670
      addSupplier_args args = new addSupplier_args();
671
      args.setSupplier(supplier);
672
      sendBase("addSupplier", args);
673
    }
674
 
675
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
676
    {
677
      addSupplier_result result = new addSupplier_result();
678
      receiveBase(result, "addSupplier");
679
      if (result.isSetSuccess()) {
680
        return result.success;
681
      }
682
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
683
    }
684
 
685
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
686
    {
687
      send_updateSupplier(supplier);
688
      recv_updateSupplier();
689
    }
690
 
691
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
692
    {
693
      updateSupplier_args args = new updateSupplier_args();
694
      args.setSupplier(supplier);
695
      sendBase("updateSupplier", args);
696
    }
697
 
698
    public void recv_updateSupplier() throws org.apache.thrift.TException
699
    {
700
      updateSupplier_result result = new updateSupplier_result();
701
      receiveBase(result, "updateSupplier");
702
      return;
703
    }
704
 
6467 amar.kumar 705
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
706
    {
707
      send_createPurchaseReturn(purchaseReturn);
708
      return recv_createPurchaseReturn();
709
    }
710
 
711
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
712
    {
713
      createPurchaseReturn_args args = new createPurchaseReturn_args();
714
      args.setPurchaseReturn(purchaseReturn);
715
      sendBase("createPurchaseReturn", args);
716
    }
717
 
718
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
719
    {
720
      createPurchaseReturn_result result = new createPurchaseReturn_result();
721
      receiveBase(result, "createPurchaseReturn");
722
      if (result.isSetSuccess()) {
723
        return result.success;
724
      }
725
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
726
    }
727
 
728
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
729
    {
730
      send_settlePurchaseReturn(id);
731
      recv_settlePurchaseReturn();
732
    }
733
 
734
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
735
    {
736
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
737
      args.setId(id);
738
      sendBase("settlePurchaseReturn", args);
739
    }
740
 
741
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
742
    {
743
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
744
      receiveBase(result, "settlePurchaseReturn");
745
      return;
746
    }
747
 
748
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
749
    {
750
      send_getUnsettledPurchaseReturns();
751
      return recv_getUnsettledPurchaseReturns();
752
    }
753
 
754
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
755
    {
756
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
757
      sendBase("getUnsettledPurchaseReturns", args);
758
    }
759
 
760
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
761
    {
762
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
763
      receiveBase(result, "getUnsettledPurchaseReturns");
764
      if (result.isSetSuccess()) {
765
        return result.success;
766
      }
767
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
768
    }
769
 
6630 amar.kumar 770
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
771
    {
772
      send_getInvoice(invoiceNumber, supplierId);
773
      return recv_getInvoice();
774
    }
775
 
776
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
777
    {
778
      getInvoice_args args = new getInvoice_args();
779
      args.setInvoiceNumber(invoiceNumber);
780
      args.setSupplierId(supplierId);
781
      sendBase("getInvoice", args);
782
    }
783
 
784
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
785
    {
786
      getInvoice_result result = new getInvoice_result();
787
      receiveBase(result, "getInvoice");
788
      if (result.isSetSuccess()) {
789
        return result.success;
790
      }
791
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
792
    }
793
 
4496 mandeep.dh 794
  }
795
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
796
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
797
      private org.apache.thrift.async.TAsyncClientManager clientManager;
798
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
799
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
800
        this.clientManager = clientManager;
801
        this.protocolFactory = protocolFactory;
802
      }
803
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
804
        return new AsyncClient(protocolFactory, clientManager, transport);
805
      }
806
    }
807
 
808
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
809
      super(protocolFactory, clientManager, transport);
810
    }
811
 
812
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
813
      checkReady();
814
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
815
      this.___currentMethod = method_call;
816
      ___manager.call(method_call);
817
    }
818
 
819
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
820
      private PurchaseOrder purchaseOrder;
821
      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 {
822
        super(client, protocolFactory, transport, resultHandler, false);
823
        this.purchaseOrder = purchaseOrder;
824
      }
825
 
826
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
827
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
828
        createPurchaseOrder_args args = new createPurchaseOrder_args();
829
        args.setPurchaseOrder(purchaseOrder);
830
        args.write(prot);
831
        prot.writeMessageEnd();
832
      }
833
 
834
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
835
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
836
          throw new IllegalStateException("Method call not finished!");
837
        }
838
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
839
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
840
        return (new Client(prot)).recv_createPurchaseOrder();
841
      }
842
    }
843
 
844
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
845
      checkReady();
846
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
847
      this.___currentMethod = method_call;
848
      ___manager.call(method_call);
849
    }
850
 
851
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
852
      private long id;
853
      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 {
854
        super(client, protocolFactory, transport, resultHandler, false);
855
        this.id = id;
856
      }
857
 
858
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
859
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
860
        getPurchaseOrder_args args = new getPurchaseOrder_args();
861
        args.setId(id);
862
        args.write(prot);
863
        prot.writeMessageEnd();
864
      }
865
 
866
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
867
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
868
          throw new IllegalStateException("Method call not finished!");
869
        }
870
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
871
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
872
        return (new Client(prot)).recv_getPurchaseOrder();
873
      }
874
    }
875
 
876
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
877
      checkReady();
878
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
879
      this.___currentMethod = method_call;
880
      ___manager.call(method_call);
881
    }
882
 
883
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
884
      private POStatus status;
885
      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 {
886
        super(client, protocolFactory, transport, resultHandler, false);
887
        this.status = status;
888
      }
889
 
890
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
891
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
892
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
893
        args.setStatus(status);
894
        args.write(prot);
895
        prot.writeMessageEnd();
896
      }
897
 
898
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
899
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
900
          throw new IllegalStateException("Method call not finished!");
901
        }
902
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
903
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
904
        return (new Client(prot)).recv_getAllPurchaseOrders();
905
      }
906
    }
907
 
908
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
909
      checkReady();
910
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
911
      this.___currentMethod = method_call;
912
      ___manager.call(method_call);
913
    }
914
 
915
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
916
      private long id;
917
      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 {
918
        super(client, protocolFactory, transport, resultHandler, false);
919
        this.id = id;
920
      }
921
 
922
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
923
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
924
        getSupplier_args args = new getSupplier_args();
925
        args.setId(id);
926
        args.write(prot);
927
        prot.writeMessageEnd();
928
      }
929
 
930
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
931
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
932
          throw new IllegalStateException("Method call not finished!");
933
        }
934
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
935
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
936
        return (new Client(prot)).recv_getSupplier();
937
      }
938
    }
939
 
940
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
941
      checkReady();
942
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
943
      this.___currentMethod = method_call;
944
      ___manager.call(method_call);
945
    }
946
 
947
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
948
      private long purchaseOrderId;
949
      private String invoiceNumber;
950
      private double freightCharges;
951
      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 {
952
        super(client, protocolFactory, transport, resultHandler, false);
953
        this.purchaseOrderId = purchaseOrderId;
954
        this.invoiceNumber = invoiceNumber;
955
        this.freightCharges = freightCharges;
956
      }
957
 
958
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
959
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
960
        startPurchase_args args = new startPurchase_args();
961
        args.setPurchaseOrderId(purchaseOrderId);
962
        args.setInvoiceNumber(invoiceNumber);
963
        args.setFreightCharges(freightCharges);
964
        args.write(prot);
965
        prot.writeMessageEnd();
966
      }
967
 
968
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
969
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
970
          throw new IllegalStateException("Method call not finished!");
971
        }
972
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
973
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
974
        return (new Client(prot)).recv_startPurchase();
975
      }
976
    }
977
 
978
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
979
      checkReady();
980
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
981
      this.___currentMethod = method_call;
982
      ___manager.call(method_call);
983
    }
984
 
985
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
986
      private long purchaseId;
987
      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 {
988
        super(client, protocolFactory, transport, resultHandler, false);
989
        this.purchaseId = purchaseId;
990
      }
991
 
992
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
993
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
994
        closePurchase_args args = new closePurchase_args();
995
        args.setPurchaseId(purchaseId);
996
        args.write(prot);
997
        prot.writeMessageEnd();
998
      }
999
 
1000
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1001
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1002
          throw new IllegalStateException("Method call not finished!");
1003
        }
1004
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1005
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1006
        return (new Client(prot)).recv_closePurchase();
1007
      }
1008
    }
1009
 
1010
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
1011
      checkReady();
1012
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
1013
      this.___currentMethod = method_call;
1014
      ___manager.call(method_call);
1015
    }
1016
 
1017
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
1018
      private long purchaseOrderId;
1019
      private boolean open;
1020
      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 {
1021
        super(client, protocolFactory, transport, resultHandler, false);
1022
        this.purchaseOrderId = purchaseOrderId;
1023
        this.open = open;
1024
      }
1025
 
1026
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1027
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
1028
        getAllPurchases_args args = new getAllPurchases_args();
1029
        args.setPurchaseOrderId(purchaseOrderId);
1030
        args.setOpen(open);
1031
        args.write(prot);
1032
        prot.writeMessageEnd();
1033
      }
1034
 
1035
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1036
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1037
          throw new IllegalStateException("Method call not finished!");
1038
        }
1039
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1040
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1041
        return (new Client(prot)).recv_getAllPurchases();
1042
      }
1043
    }
1044
 
6385 amar.kumar 1045
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1046
      checkReady();
1047
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1048
      this.___currentMethod = method_call;
1049
      ___manager.call(method_call);
1050
    }
1051
 
1052
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1053
      private long purchaseOrderId;
1054
      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 {
1055
        super(client, protocolFactory, transport, resultHandler, false);
1056
        this.purchaseOrderId = purchaseOrderId;
1057
      }
1058
 
1059
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1060
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1061
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1062
        args.setPurchaseOrderId(purchaseOrderId);
1063
        args.write(prot);
1064
        prot.writeMessageEnd();
1065
      }
1066
 
1067
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1068
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1069
          throw new IllegalStateException("Method call not finished!");
1070
        }
1071
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1072
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1073
        return (new Client(prot)).recv_getPurchasesForPO();
1074
      }
1075
    }
1076
 
4555 mandeep.dh 1077
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1078
      checkReady();
4555 mandeep.dh 1079
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1080
      this.___currentMethod = method_call;
1081
      ___manager.call(method_call);
1082
    }
1083
 
4555 mandeep.dh 1084
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1085
      private long purchaseId;
4555 mandeep.dh 1086
      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 1087
        super(client, protocolFactory, transport, resultHandler, false);
1088
        this.purchaseId = purchaseId;
1089
      }
1090
 
1091
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1092
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1093
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1094
        args.setPurchaseId(purchaseId);
1095
        args.write(prot);
1096
        prot.writeMessageEnd();
1097
      }
1098
 
4555 mandeep.dh 1099
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1100
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1101
          throw new IllegalStateException("Method call not finished!");
1102
        }
1103
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1104
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1105
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1106
      }
1107
    }
1108
 
4754 mandeep.dh 1109
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1110
      checkReady();
1111
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1112
      this.___currentMethod = method_call;
1113
      ___manager.call(method_call);
1114
    }
1115
 
1116
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1117
      private long warehouseId;
1118
      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 {
1119
        super(client, protocolFactory, transport, resultHandler, false);
1120
        this.warehouseId = warehouseId;
1121
      }
1122
 
1123
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1124
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1125
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1126
        args.setWarehouseId(warehouseId);
1127
        args.write(prot);
1128
        prot.writeMessageEnd();
1129
      }
1130
 
1131
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1132
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1133
          throw new IllegalStateException("Method call not finished!");
1134
        }
1135
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1136
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1137
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1138
      }
1139
    }
1140
 
1141
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1142
      checkReady();
1143
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1144
      this.___currentMethod = method_call;
1145
      ___manager.call(method_call);
1146
    }
1147
 
1148
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1149
      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 {
1150
        super(client, protocolFactory, transport, resultHandler, false);
1151
      }
1152
 
1153
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1154
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1155
        getSuppliers_args args = new getSuppliers_args();
1156
        args.write(prot);
1157
        prot.writeMessageEnd();
1158
      }
1159
 
1160
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1161
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1162
          throw new IllegalStateException("Method call not finished!");
1163
        }
1164
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1165
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1166
        return (new Client(prot)).recv_getSuppliers();
1167
      }
1168
    }
1169
 
1170
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1171
      checkReady();
1172
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1173
      this.___currentMethod = method_call;
1174
      ___manager.call(method_call);
1175
    }
1176
 
1177
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1178
      private long purchaseOrderId;
1179
      private long itemId;
1180
      private long quantity;
1181
      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 {
1182
        super(client, protocolFactory, transport, resultHandler, false);
1183
        this.purchaseOrderId = purchaseOrderId;
1184
        this.itemId = itemId;
1185
        this.quantity = quantity;
1186
      }
1187
 
1188
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1189
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1190
        fulfillPO_args args = new fulfillPO_args();
1191
        args.setPurchaseOrderId(purchaseOrderId);
1192
        args.setItemId(itemId);
1193
        args.setQuantity(quantity);
1194
        args.write(prot);
1195
        prot.writeMessageEnd();
1196
      }
1197
 
1198
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1199
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1200
          throw new IllegalStateException("Method call not finished!");
1201
        }
1202
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1203
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1204
        (new Client(prot)).recv_fulfillPO();
1205
      }
1206
    }
1207
 
1208
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1209
      checkReady();
1210
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1211
      this.___currentMethod = method_call;
1212
      ___manager.call(method_call);
1213
    }
1214
 
1215
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1216
      private PurchaseOrder purchaseOrder;
1217
      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 {
1218
        super(client, protocolFactory, transport, resultHandler, false);
1219
        this.purchaseOrder = purchaseOrder;
1220
      }
1221
 
1222
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1223
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1224
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1225
        args.setPurchaseOrder(purchaseOrder);
1226
        args.write(prot);
1227
        prot.writeMessageEnd();
1228
      }
1229
 
1230
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1231
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1232
          throw new IllegalStateException("Method call not finished!");
1233
        }
1234
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1235
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1236
        (new Client(prot)).recv_updatePurchaseOrder();
1237
      }
1238
    }
1239
 
5185 mandeep.dh 1240
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1241
      checkReady();
1242
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1243
      this.___currentMethod = method_call;
1244
      ___manager.call(method_call);
1245
    }
1246
 
1247
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1248
      private long purchaseId;
1249
      private long itemId;
1250
      private long quantity;
1251
      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 {
1252
        super(client, protocolFactory, transport, resultHandler, false);
1253
        this.purchaseId = purchaseId;
1254
        this.itemId = itemId;
1255
        this.quantity = quantity;
1256
      }
1257
 
1258
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1259
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1260
        unFulfillPO_args args = new unFulfillPO_args();
1261
        args.setPurchaseId(purchaseId);
1262
        args.setItemId(itemId);
1263
        args.setQuantity(quantity);
1264
        args.write(prot);
1265
        prot.writeMessageEnd();
1266
      }
1267
 
1268
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1269
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1270
          throw new IllegalStateException("Method call not finished!");
1271
        }
1272
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1273
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1274
        (new Client(prot)).recv_unFulfillPO();
1275
      }
1276
    }
1277
 
5443 mandeep.dh 1278
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1279
      checkReady();
1280
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1281
      this.___currentMethod = method_call;
1282
      ___manager.call(method_call);
1283
    }
1284
 
1285
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1286
      private long date;
1287
      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 {
1288
        super(client, protocolFactory, transport, resultHandler, false);
1289
        this.date = date;
1290
      }
1291
 
1292
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1293
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1294
        getInvoices_args args = new getInvoices_args();
1295
        args.setDate(date);
1296
        args.write(prot);
1297
        prot.writeMessageEnd();
1298
      }
1299
 
1300
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1301
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1302
          throw new IllegalStateException("Method call not finished!");
1303
        }
1304
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1305
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1306
        return (new Client(prot)).recv_getInvoices();
1307
      }
1308
    }
1309
 
1310
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1311
      checkReady();
1312
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1313
      this.___currentMethod = method_call;
1314
      ___manager.call(method_call);
1315
    }
1316
 
1317
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1318
      private Invoice invoice;
1319
      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 {
1320
        super(client, protocolFactory, transport, resultHandler, false);
1321
        this.invoice = invoice;
1322
      }
1323
 
1324
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1325
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1326
        createInvoice_args args = new createInvoice_args();
1327
        args.setInvoice(invoice);
1328
        args.write(prot);
1329
        prot.writeMessageEnd();
1330
      }
1331
 
1332
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1333
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1334
          throw new IllegalStateException("Method call not finished!");
1335
        }
1336
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1337
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1338
        (new Client(prot)).recv_createInvoice();
1339
      }
1340
    }
1341
 
5591 mandeep.dh 1342
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1343
      checkReady();
1344
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1345
      this.___currentMethod = method_call;
1346
      ___manager.call(method_call);
1347
    }
1348
 
1349
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1350
      private Supplier supplier;
1351
      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 {
1352
        super(client, protocolFactory, transport, resultHandler, false);
1353
        this.supplier = supplier;
1354
      }
1355
 
1356
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1357
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1358
        addSupplier_args args = new addSupplier_args();
1359
        args.setSupplier(supplier);
1360
        args.write(prot);
1361
        prot.writeMessageEnd();
1362
      }
1363
 
1364
      public Supplier getResult() throws org.apache.thrift.TException {
1365
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1366
          throw new IllegalStateException("Method call not finished!");
1367
        }
1368
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1369
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1370
        return (new Client(prot)).recv_addSupplier();
1371
      }
1372
    }
1373
 
1374
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1375
      checkReady();
1376
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1377
      this.___currentMethod = method_call;
1378
      ___manager.call(method_call);
1379
    }
1380
 
1381
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1382
      private Supplier supplier;
1383
      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 {
1384
        super(client, protocolFactory, transport, resultHandler, false);
1385
        this.supplier = supplier;
1386
      }
1387
 
1388
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1389
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1390
        updateSupplier_args args = new updateSupplier_args();
1391
        args.setSupplier(supplier);
1392
        args.write(prot);
1393
        prot.writeMessageEnd();
1394
      }
1395
 
1396
      public void getResult() throws org.apache.thrift.TException {
1397
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1398
          throw new IllegalStateException("Method call not finished!");
1399
        }
1400
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1401
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1402
        (new Client(prot)).recv_updateSupplier();
1403
      }
1404
    }
1405
 
6467 amar.kumar 1406
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1407
      checkReady();
1408
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1409
      this.___currentMethod = method_call;
1410
      ___manager.call(method_call);
1411
    }
1412
 
1413
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1414
      private PurchaseReturn purchaseReturn;
1415
      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 {
1416
        super(client, protocolFactory, transport, resultHandler, false);
1417
        this.purchaseReturn = purchaseReturn;
1418
      }
1419
 
1420
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1421
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1422
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1423
        args.setPurchaseReturn(purchaseReturn);
1424
        args.write(prot);
1425
        prot.writeMessageEnd();
1426
      }
1427
 
1428
      public long getResult() throws org.apache.thrift.TException {
1429
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1430
          throw new IllegalStateException("Method call not finished!");
1431
        }
1432
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1433
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1434
        return (new Client(prot)).recv_createPurchaseReturn();
1435
      }
1436
    }
1437
 
1438
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1439
      checkReady();
1440
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1441
      this.___currentMethod = method_call;
1442
      ___manager.call(method_call);
1443
    }
1444
 
1445
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1446
      private long id;
1447
      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 {
1448
        super(client, protocolFactory, transport, resultHandler, false);
1449
        this.id = id;
1450
      }
1451
 
1452
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1453
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1454
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1455
        args.setId(id);
1456
        args.write(prot);
1457
        prot.writeMessageEnd();
1458
      }
1459
 
1460
      public void getResult() throws org.apache.thrift.TException {
1461
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1462
          throw new IllegalStateException("Method call not finished!");
1463
        }
1464
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1465
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1466
        (new Client(prot)).recv_settlePurchaseReturn();
1467
      }
1468
    }
1469
 
1470
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1471
      checkReady();
1472
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1473
      this.___currentMethod = method_call;
1474
      ___manager.call(method_call);
1475
    }
1476
 
1477
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1478
      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 {
1479
        super(client, protocolFactory, transport, resultHandler, false);
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("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1484
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1485
        args.write(prot);
1486
        prot.writeMessageEnd();
1487
      }
1488
 
1489
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1490
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1491
          throw new IllegalStateException("Method call not finished!");
1492
        }
1493
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1494
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1495
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1496
      }
1497
    }
1498
 
6630 amar.kumar 1499
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
1500
      checkReady();
1501
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
1502
      this.___currentMethod = method_call;
1503
      ___manager.call(method_call);
1504
    }
1505
 
1506
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1507
      private String invoiceNumber;
1508
      private long supplierId;
1509
      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 {
1510
        super(client, protocolFactory, transport, resultHandler, false);
1511
        this.invoiceNumber = invoiceNumber;
1512
        this.supplierId = supplierId;
1513
      }
1514
 
1515
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1516
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1517
        getInvoice_args args = new getInvoice_args();
1518
        args.setInvoiceNumber(invoiceNumber);
1519
        args.setSupplierId(supplierId);
1520
        args.write(prot);
1521
        prot.writeMessageEnd();
1522
      }
1523
 
1524
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1525
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1526
          throw new IllegalStateException("Method call not finished!");
1527
        }
1528
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1529
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1530
        return (new Client(prot)).recv_getInvoice();
1531
      }
1532
    }
1533
 
4496 mandeep.dh 1534
  }
1535
 
1536
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1537
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1538
    public Processor(I iface) {
1539
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1540
    }
1541
 
1542
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1543
      super(iface, getProcessMap(processMap));
1544
    }
1545
 
1546
    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) {
1547
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1548
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1549
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1550
      processMap.put("getSupplier", new getSupplier());
1551
      processMap.put("startPurchase", new startPurchase());
1552
      processMap.put("closePurchase", new closePurchase());
1553
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 1554
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 1555
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1556
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1557
      processMap.put("getSuppliers", new getSuppliers());
1558
      processMap.put("fulfillPO", new fulfillPO());
1559
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1560
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1561
      processMap.put("getInvoices", new getInvoices());
1562
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1563
      processMap.put("addSupplier", new addSupplier());
1564
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 1565
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1566
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1567
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
6630 amar.kumar 1568
      processMap.put("getInvoice", new getInvoice());
4496 mandeep.dh 1569
      return processMap;
1570
    }
1571
 
1572
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1573
      public createPurchaseOrder() {
1574
        super("createPurchaseOrder");
1575
      }
1576
 
1577
      protected createPurchaseOrder_args getEmptyArgsInstance() {
1578
        return new createPurchaseOrder_args();
1579
      }
1580
 
1581
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1582
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1583
        try {
1584
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1585
          result.setSuccessIsSet(true);
1586
        } catch (PurchaseServiceException e) {
1587
          result.e = e;
1588
        }
1589
        return result;
1590
      }
1591
    }
1592
 
1593
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1594
      public getPurchaseOrder() {
1595
        super("getPurchaseOrder");
1596
      }
1597
 
1598
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1599
        return new getPurchaseOrder_args();
1600
      }
1601
 
1602
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1603
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1604
        try {
1605
          result.success = iface.getPurchaseOrder(args.id);
1606
        } catch (PurchaseServiceException e) {
1607
          result.e = e;
1608
        }
1609
        return result;
1610
      }
1611
    }
1612
 
1613
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1614
      public getAllPurchaseOrders() {
1615
        super("getAllPurchaseOrders");
1616
      }
1617
 
1618
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1619
        return new getAllPurchaseOrders_args();
1620
      }
1621
 
1622
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1623
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1624
        try {
1625
          result.success = iface.getAllPurchaseOrders(args.status);
1626
        } catch (PurchaseServiceException e) {
1627
          result.e = e;
1628
        }
1629
        return result;
1630
      }
1631
    }
1632
 
1633
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1634
      public getSupplier() {
1635
        super("getSupplier");
1636
      }
1637
 
1638
      protected getSupplier_args getEmptyArgsInstance() {
1639
        return new getSupplier_args();
1640
      }
1641
 
1642
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1643
        getSupplier_result result = new getSupplier_result();
1644
        try {
1645
          result.success = iface.getSupplier(args.id);
1646
        } catch (PurchaseServiceException e) {
1647
          result.e = e;
1648
        }
1649
        return result;
1650
      }
1651
    }
1652
 
1653
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
1654
      public startPurchase() {
1655
        super("startPurchase");
1656
      }
1657
 
1658
      protected startPurchase_args getEmptyArgsInstance() {
1659
        return new startPurchase_args();
1660
      }
1661
 
1662
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
1663
        startPurchase_result result = new startPurchase_result();
1664
        try {
1665
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
1666
          result.setSuccessIsSet(true);
1667
        } catch (PurchaseServiceException e) {
1668
          result.e = e;
1669
        }
1670
        return result;
1671
      }
1672
    }
1673
 
1674
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
1675
      public closePurchase() {
1676
        super("closePurchase");
1677
      }
1678
 
1679
      protected closePurchase_args getEmptyArgsInstance() {
1680
        return new closePurchase_args();
1681
      }
1682
 
1683
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
1684
        closePurchase_result result = new closePurchase_result();
1685
        try {
1686
          result.success = iface.closePurchase(args.purchaseId);
1687
          result.setSuccessIsSet(true);
1688
        } catch (PurchaseServiceException e) {
1689
          result.e = e;
1690
        }
1691
        return result;
1692
      }
1693
    }
1694
 
1695
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
1696
      public getAllPurchases() {
1697
        super("getAllPurchases");
1698
      }
1699
 
1700
      protected getAllPurchases_args getEmptyArgsInstance() {
1701
        return new getAllPurchases_args();
1702
      }
1703
 
1704
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
1705
        getAllPurchases_result result = new getAllPurchases_result();
1706
        try {
1707
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
1708
        } catch (PurchaseServiceException e) {
1709
          result.e = e;
1710
        }
1711
        return result;
1712
      }
1713
    }
1714
 
6385 amar.kumar 1715
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
1716
      public getPurchasesForPO() {
1717
        super("getPurchasesForPO");
1718
      }
1719
 
1720
      protected getPurchasesForPO_args getEmptyArgsInstance() {
1721
        return new getPurchasesForPO_args();
1722
      }
1723
 
1724
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
1725
        getPurchasesForPO_result result = new getPurchasesForPO_result();
1726
        try {
1727
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
1728
        } catch (PurchaseServiceException e) {
1729
          result.e = e;
1730
        }
1731
        return result;
1732
      }
1733
    }
1734
 
4555 mandeep.dh 1735
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
1736
      public getPurchaseOrderForPurchase() {
1737
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 1738
      }
1739
 
4555 mandeep.dh 1740
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
1741
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1742
      }
1743
 
4555 mandeep.dh 1744
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
1745
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
1746
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 1747
        return result;
1748
      }
1749
    }
1750
 
4754 mandeep.dh 1751
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
1752
      public getPendingPurchaseOrders() {
1753
        super("getPendingPurchaseOrders");
1754
      }
1755
 
1756
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
1757
        return new getPendingPurchaseOrders_args();
1758
      }
1759
 
1760
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
1761
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
1762
        try {
1763
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
1764
        } catch (PurchaseServiceException e) {
1765
          result.e = e;
1766
        }
1767
        return result;
1768
      }
1769
    }
1770
 
1771
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
1772
      public getSuppliers() {
1773
        super("getSuppliers");
1774
      }
1775
 
1776
      protected getSuppliers_args getEmptyArgsInstance() {
1777
        return new getSuppliers_args();
1778
      }
1779
 
1780
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
1781
        getSuppliers_result result = new getSuppliers_result();
1782
        try {
1783
          result.success = iface.getSuppliers();
1784
        } catch (PurchaseServiceException e) {
1785
          result.e = e;
1786
        }
1787
        return result;
1788
      }
1789
    }
1790
 
1791
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
1792
      public fulfillPO() {
1793
        super("fulfillPO");
1794
      }
1795
 
1796
      protected fulfillPO_args getEmptyArgsInstance() {
1797
        return new fulfillPO_args();
1798
      }
1799
 
1800
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
1801
        fulfillPO_result result = new fulfillPO_result();
1802
        try {
1803
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
1804
        } catch (PurchaseServiceException e) {
1805
          result.e = e;
1806
        }
1807
        return result;
1808
      }
1809
    }
1810
 
1811
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
1812
      public updatePurchaseOrder() {
1813
        super("updatePurchaseOrder");
1814
      }
1815
 
1816
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
1817
        return new updatePurchaseOrder_args();
1818
      }
1819
 
1820
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
1821
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
1822
        try {
1823
          iface.updatePurchaseOrder(args.purchaseOrder);
1824
        } catch (PurchaseServiceException e) {
1825
          result.e = e;
1826
        }
1827
        return result;
1828
      }
1829
    }
1830
 
5185 mandeep.dh 1831
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
1832
      public unFulfillPO() {
1833
        super("unFulfillPO");
1834
      }
1835
 
1836
      protected unFulfillPO_args getEmptyArgsInstance() {
1837
        return new unFulfillPO_args();
1838
      }
1839
 
1840
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
1841
        unFulfillPO_result result = new unFulfillPO_result();
1842
        try {
1843
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
1844
        } catch (PurchaseServiceException e) {
1845
          result.e = e;
1846
        }
1847
        return result;
1848
      }
1849
    }
1850
 
5443 mandeep.dh 1851
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
1852
      public getInvoices() {
1853
        super("getInvoices");
1854
      }
1855
 
1856
      protected getInvoices_args getEmptyArgsInstance() {
1857
        return new getInvoices_args();
1858
      }
1859
 
1860
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
1861
        getInvoices_result result = new getInvoices_result();
1862
        result.success = iface.getInvoices(args.date);
1863
        return result;
1864
      }
1865
    }
1866
 
1867
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
1868
      public createInvoice() {
1869
        super("createInvoice");
1870
      }
1871
 
1872
      protected createInvoice_args getEmptyArgsInstance() {
1873
        return new createInvoice_args();
1874
      }
1875
 
1876
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
1877
        createInvoice_result result = new createInvoice_result();
1878
        try {
1879
          iface.createInvoice(args.invoice);
1880
        } catch (PurchaseServiceException e) {
1881
          result.e = e;
1882
        }
1883
        return result;
1884
      }
1885
    }
1886
 
5591 mandeep.dh 1887
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
1888
      public addSupplier() {
1889
        super("addSupplier");
1890
      }
1891
 
1892
      protected addSupplier_args getEmptyArgsInstance() {
1893
        return new addSupplier_args();
1894
      }
1895
 
1896
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
1897
        addSupplier_result result = new addSupplier_result();
1898
        result.success = iface.addSupplier(args.supplier);
1899
        return result;
1900
      }
1901
    }
1902
 
1903
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
1904
      public updateSupplier() {
1905
        super("updateSupplier");
1906
      }
1907
 
1908
      protected updateSupplier_args getEmptyArgsInstance() {
1909
        return new updateSupplier_args();
1910
      }
1911
 
1912
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
1913
        updateSupplier_result result = new updateSupplier_result();
1914
        iface.updateSupplier(args.supplier);
1915
        return result;
1916
      }
1917
    }
1918
 
6467 amar.kumar 1919
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
1920
      public createPurchaseReturn() {
1921
        super("createPurchaseReturn");
1922
      }
1923
 
1924
      protected createPurchaseReturn_args getEmptyArgsInstance() {
1925
        return new createPurchaseReturn_args();
1926
      }
1927
 
1928
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
1929
        createPurchaseReturn_result result = new createPurchaseReturn_result();
1930
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
1931
        result.setSuccessIsSet(true);
1932
        return result;
1933
      }
1934
    }
1935
 
1936
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
1937
      public settlePurchaseReturn() {
1938
        super("settlePurchaseReturn");
1939
      }
1940
 
1941
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
1942
        return new settlePurchaseReturn_args();
1943
      }
1944
 
1945
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
1946
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
1947
        iface.settlePurchaseReturn(args.id);
1948
        return result;
1949
      }
1950
    }
1951
 
1952
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
1953
      public getUnsettledPurchaseReturns() {
1954
        super("getUnsettledPurchaseReturns");
1955
      }
1956
 
1957
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
1958
        return new getUnsettledPurchaseReturns_args();
1959
      }
1960
 
1961
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
1962
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
1963
        result.success = iface.getUnsettledPurchaseReturns();
1964
        return result;
1965
      }
1966
    }
1967
 
6630 amar.kumar 1968
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
1969
      public getInvoice() {
1970
        super("getInvoice");
1971
      }
1972
 
1973
      protected getInvoice_args getEmptyArgsInstance() {
1974
        return new getInvoice_args();
1975
      }
1976
 
1977
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
1978
        getInvoice_result result = new getInvoice_result();
1979
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
1980
        return result;
1981
      }
1982
    }
1983
 
4496 mandeep.dh 1984
  }
1985
 
1986
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1987
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1988
 
1989
    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);
1990
 
1991
    private PurchaseOrder purchaseOrder; // required
1992
 
1993
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1994
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1995
      PURCHASE_ORDER((short)1, "purchaseOrder");
1996
 
1997
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1998
 
1999
      static {
2000
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2001
          byName.put(field.getFieldName(), field);
2002
        }
2003
      }
2004
 
2005
      /**
2006
       * Find the _Fields constant that matches fieldId, or null if its not found.
2007
       */
2008
      public static _Fields findByThriftId(int fieldId) {
2009
        switch(fieldId) {
2010
          case 1: // PURCHASE_ORDER
2011
            return PURCHASE_ORDER;
2012
          default:
2013
            return null;
2014
        }
2015
      }
2016
 
2017
      /**
2018
       * Find the _Fields constant that matches fieldId, throwing an exception
2019
       * if it is not found.
2020
       */
2021
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2022
        _Fields fields = findByThriftId(fieldId);
2023
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2024
        return fields;
2025
      }
2026
 
2027
      /**
2028
       * Find the _Fields constant that matches name, or null if its not found.
2029
       */
2030
      public static _Fields findByName(String name) {
2031
        return byName.get(name);
2032
      }
2033
 
2034
      private final short _thriftId;
2035
      private final String _fieldName;
2036
 
2037
      _Fields(short thriftId, String fieldName) {
2038
        _thriftId = thriftId;
2039
        _fieldName = fieldName;
2040
      }
2041
 
2042
      public short getThriftFieldId() {
2043
        return _thriftId;
2044
      }
2045
 
2046
      public String getFieldName() {
2047
        return _fieldName;
2048
      }
2049
    }
2050
 
2051
    // isset id assignments
2052
 
2053
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2054
    static {
2055
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2056
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2057
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2058
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2059
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
2060
    }
2061
 
2062
    public createPurchaseOrder_args() {
2063
    }
2064
 
2065
    public createPurchaseOrder_args(
2066
      PurchaseOrder purchaseOrder)
2067
    {
2068
      this();
2069
      this.purchaseOrder = purchaseOrder;
2070
    }
2071
 
2072
    /**
2073
     * Performs a deep copy on <i>other</i>.
2074
     */
2075
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
2076
      if (other.isSetPurchaseOrder()) {
2077
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
2078
      }
2079
    }
2080
 
2081
    public createPurchaseOrder_args deepCopy() {
2082
      return new createPurchaseOrder_args(this);
2083
    }
2084
 
2085
    @Override
2086
    public void clear() {
2087
      this.purchaseOrder = null;
2088
    }
2089
 
2090
    public PurchaseOrder getPurchaseOrder() {
2091
      return this.purchaseOrder;
2092
    }
2093
 
2094
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2095
      this.purchaseOrder = purchaseOrder;
2096
    }
2097
 
2098
    public void unsetPurchaseOrder() {
2099
      this.purchaseOrder = null;
2100
    }
2101
 
2102
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2103
    public boolean isSetPurchaseOrder() {
2104
      return this.purchaseOrder != null;
2105
    }
2106
 
2107
    public void setPurchaseOrderIsSet(boolean value) {
2108
      if (!value) {
2109
        this.purchaseOrder = null;
2110
      }
2111
    }
2112
 
2113
    public void setFieldValue(_Fields field, Object value) {
2114
      switch (field) {
2115
      case PURCHASE_ORDER:
2116
        if (value == null) {
2117
          unsetPurchaseOrder();
2118
        } else {
2119
          setPurchaseOrder((PurchaseOrder)value);
2120
        }
2121
        break;
2122
 
2123
      }
2124
    }
2125
 
2126
    public Object getFieldValue(_Fields field) {
2127
      switch (field) {
2128
      case PURCHASE_ORDER:
2129
        return getPurchaseOrder();
2130
 
2131
      }
2132
      throw new IllegalStateException();
2133
    }
2134
 
2135
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2136
    public boolean isSet(_Fields field) {
2137
      if (field == null) {
2138
        throw new IllegalArgumentException();
2139
      }
2140
 
2141
      switch (field) {
2142
      case PURCHASE_ORDER:
2143
        return isSetPurchaseOrder();
2144
      }
2145
      throw new IllegalStateException();
2146
    }
2147
 
2148
    @Override
2149
    public boolean equals(Object that) {
2150
      if (that == null)
2151
        return false;
2152
      if (that instanceof createPurchaseOrder_args)
2153
        return this.equals((createPurchaseOrder_args)that);
2154
      return false;
2155
    }
2156
 
2157
    public boolean equals(createPurchaseOrder_args that) {
2158
      if (that == null)
2159
        return false;
2160
 
2161
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2162
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2163
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2164
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2165
          return false;
2166
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2167
          return false;
2168
      }
2169
 
2170
      return true;
2171
    }
2172
 
2173
    @Override
2174
    public int hashCode() {
2175
      return 0;
2176
    }
2177
 
2178
    public int compareTo(createPurchaseOrder_args other) {
2179
      if (!getClass().equals(other.getClass())) {
2180
        return getClass().getName().compareTo(other.getClass().getName());
2181
      }
2182
 
2183
      int lastComparison = 0;
2184
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2185
 
2186
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2187
      if (lastComparison != 0) {
2188
        return lastComparison;
2189
      }
2190
      if (isSetPurchaseOrder()) {
2191
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2192
        if (lastComparison != 0) {
2193
          return lastComparison;
2194
        }
2195
      }
2196
      return 0;
2197
    }
2198
 
2199
    public _Fields fieldForId(int fieldId) {
2200
      return _Fields.findByThriftId(fieldId);
2201
    }
2202
 
2203
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2204
      org.apache.thrift.protocol.TField field;
2205
      iprot.readStructBegin();
2206
      while (true)
2207
      {
2208
        field = iprot.readFieldBegin();
2209
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2210
          break;
2211
        }
2212
        switch (field.id) {
2213
          case 1: // PURCHASE_ORDER
2214
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2215
              this.purchaseOrder = new PurchaseOrder();
2216
              this.purchaseOrder.read(iprot);
2217
            } else { 
2218
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2219
            }
2220
            break;
2221
          default:
2222
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2223
        }
2224
        iprot.readFieldEnd();
2225
      }
2226
      iprot.readStructEnd();
2227
      validate();
2228
    }
2229
 
2230
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2231
      validate();
2232
 
2233
      oprot.writeStructBegin(STRUCT_DESC);
2234
      if (this.purchaseOrder != null) {
2235
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2236
        this.purchaseOrder.write(oprot);
2237
        oprot.writeFieldEnd();
2238
      }
2239
      oprot.writeFieldStop();
2240
      oprot.writeStructEnd();
2241
    }
2242
 
2243
    @Override
2244
    public String toString() {
2245
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2246
      boolean first = true;
2247
 
2248
      sb.append("purchaseOrder:");
2249
      if (this.purchaseOrder == null) {
2250
        sb.append("null");
2251
      } else {
2252
        sb.append(this.purchaseOrder);
2253
      }
2254
      first = false;
2255
      sb.append(")");
2256
      return sb.toString();
2257
    }
2258
 
2259
    public void validate() throws org.apache.thrift.TException {
2260
      // check for required fields
2261
    }
2262
 
2263
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2264
      try {
2265
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2266
      } catch (org.apache.thrift.TException te) {
2267
        throw new java.io.IOException(te);
2268
      }
2269
    }
2270
 
2271
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2272
      try {
2273
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2274
      } catch (org.apache.thrift.TException te) {
2275
        throw new java.io.IOException(te);
2276
      }
2277
    }
2278
 
2279
  }
2280
 
2281
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2282
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2283
 
2284
    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);
2285
    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);
2286
 
2287
    private long success; // required
2288
    private PurchaseServiceException e; // required
2289
 
2290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2291
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2292
      SUCCESS((short)0, "success"),
2293
      E((short)1, "e");
2294
 
2295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2296
 
2297
      static {
2298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2299
          byName.put(field.getFieldName(), field);
2300
        }
2301
      }
2302
 
2303
      /**
2304
       * Find the _Fields constant that matches fieldId, or null if its not found.
2305
       */
2306
      public static _Fields findByThriftId(int fieldId) {
2307
        switch(fieldId) {
2308
          case 0: // SUCCESS
2309
            return SUCCESS;
2310
          case 1: // E
2311
            return E;
2312
          default:
2313
            return null;
2314
        }
2315
      }
2316
 
2317
      /**
2318
       * Find the _Fields constant that matches fieldId, throwing an exception
2319
       * if it is not found.
2320
       */
2321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2322
        _Fields fields = findByThriftId(fieldId);
2323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2324
        return fields;
2325
      }
2326
 
2327
      /**
2328
       * Find the _Fields constant that matches name, or null if its not found.
2329
       */
2330
      public static _Fields findByName(String name) {
2331
        return byName.get(name);
2332
      }
2333
 
2334
      private final short _thriftId;
2335
      private final String _fieldName;
2336
 
2337
      _Fields(short thriftId, String fieldName) {
2338
        _thriftId = thriftId;
2339
        _fieldName = fieldName;
2340
      }
2341
 
2342
      public short getThriftFieldId() {
2343
        return _thriftId;
2344
      }
2345
 
2346
      public String getFieldName() {
2347
        return _fieldName;
2348
      }
2349
    }
2350
 
2351
    // isset id assignments
2352
    private static final int __SUCCESS_ISSET_ID = 0;
2353
    private BitSet __isset_bit_vector = new BitSet(1);
2354
 
2355
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2356
    static {
2357
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2358
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2359
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2360
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2361
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2362
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2363
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2364
    }
2365
 
2366
    public createPurchaseOrder_result() {
2367
    }
2368
 
2369
    public createPurchaseOrder_result(
2370
      long success,
2371
      PurchaseServiceException e)
2372
    {
2373
      this();
2374
      this.success = success;
2375
      setSuccessIsSet(true);
2376
      this.e = e;
2377
    }
2378
 
2379
    /**
2380
     * Performs a deep copy on <i>other</i>.
2381
     */
2382
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
2383
      __isset_bit_vector.clear();
2384
      __isset_bit_vector.or(other.__isset_bit_vector);
2385
      this.success = other.success;
2386
      if (other.isSetE()) {
2387
        this.e = new PurchaseServiceException(other.e);
2388
      }
2389
    }
2390
 
2391
    public createPurchaseOrder_result deepCopy() {
2392
      return new createPurchaseOrder_result(this);
2393
    }
2394
 
2395
    @Override
2396
    public void clear() {
2397
      setSuccessIsSet(false);
2398
      this.success = 0;
2399
      this.e = null;
2400
    }
2401
 
2402
    public long getSuccess() {
2403
      return this.success;
2404
    }
2405
 
2406
    public void setSuccess(long success) {
2407
      this.success = success;
2408
      setSuccessIsSet(true);
2409
    }
2410
 
2411
    public void unsetSuccess() {
2412
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2413
    }
2414
 
2415
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2416
    public boolean isSetSuccess() {
2417
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2418
    }
2419
 
2420
    public void setSuccessIsSet(boolean value) {
2421
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2422
    }
2423
 
2424
    public PurchaseServiceException getE() {
2425
      return this.e;
2426
    }
2427
 
2428
    public void setE(PurchaseServiceException e) {
2429
      this.e = e;
2430
    }
2431
 
2432
    public void unsetE() {
2433
      this.e = null;
2434
    }
2435
 
2436
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2437
    public boolean isSetE() {
2438
      return this.e != null;
2439
    }
2440
 
2441
    public void setEIsSet(boolean value) {
2442
      if (!value) {
2443
        this.e = null;
2444
      }
2445
    }
2446
 
2447
    public void setFieldValue(_Fields field, Object value) {
2448
      switch (field) {
2449
      case SUCCESS:
2450
        if (value == null) {
2451
          unsetSuccess();
2452
        } else {
2453
          setSuccess((Long)value);
2454
        }
2455
        break;
2456
 
2457
      case E:
2458
        if (value == null) {
2459
          unsetE();
2460
        } else {
2461
          setE((PurchaseServiceException)value);
2462
        }
2463
        break;
2464
 
2465
      }
2466
    }
2467
 
2468
    public Object getFieldValue(_Fields field) {
2469
      switch (field) {
2470
      case SUCCESS:
2471
        return Long.valueOf(getSuccess());
2472
 
2473
      case E:
2474
        return getE();
2475
 
2476
      }
2477
      throw new IllegalStateException();
2478
    }
2479
 
2480
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2481
    public boolean isSet(_Fields field) {
2482
      if (field == null) {
2483
        throw new IllegalArgumentException();
2484
      }
2485
 
2486
      switch (field) {
2487
      case SUCCESS:
2488
        return isSetSuccess();
2489
      case E:
2490
        return isSetE();
2491
      }
2492
      throw new IllegalStateException();
2493
    }
2494
 
2495
    @Override
2496
    public boolean equals(Object that) {
2497
      if (that == null)
2498
        return false;
2499
      if (that instanceof createPurchaseOrder_result)
2500
        return this.equals((createPurchaseOrder_result)that);
2501
      return false;
2502
    }
2503
 
2504
    public boolean equals(createPurchaseOrder_result that) {
2505
      if (that == null)
2506
        return false;
2507
 
2508
      boolean this_present_success = true;
2509
      boolean that_present_success = true;
2510
      if (this_present_success || that_present_success) {
2511
        if (!(this_present_success && that_present_success))
2512
          return false;
2513
        if (this.success != that.success)
2514
          return false;
2515
      }
2516
 
2517
      boolean this_present_e = true && this.isSetE();
2518
      boolean that_present_e = true && that.isSetE();
2519
      if (this_present_e || that_present_e) {
2520
        if (!(this_present_e && that_present_e))
2521
          return false;
2522
        if (!this.e.equals(that.e))
2523
          return false;
2524
      }
2525
 
2526
      return true;
2527
    }
2528
 
2529
    @Override
2530
    public int hashCode() {
2531
      return 0;
2532
    }
2533
 
2534
    public int compareTo(createPurchaseOrder_result other) {
2535
      if (!getClass().equals(other.getClass())) {
2536
        return getClass().getName().compareTo(other.getClass().getName());
2537
      }
2538
 
2539
      int lastComparison = 0;
2540
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
2541
 
2542
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2543
      if (lastComparison != 0) {
2544
        return lastComparison;
2545
      }
2546
      if (isSetSuccess()) {
2547
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2548
        if (lastComparison != 0) {
2549
          return lastComparison;
2550
        }
2551
      }
2552
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2553
      if (lastComparison != 0) {
2554
        return lastComparison;
2555
      }
2556
      if (isSetE()) {
2557
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2558
        if (lastComparison != 0) {
2559
          return lastComparison;
2560
        }
2561
      }
2562
      return 0;
2563
    }
2564
 
2565
    public _Fields fieldForId(int fieldId) {
2566
      return _Fields.findByThriftId(fieldId);
2567
    }
2568
 
2569
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2570
      org.apache.thrift.protocol.TField field;
2571
      iprot.readStructBegin();
2572
      while (true)
2573
      {
2574
        field = iprot.readFieldBegin();
2575
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2576
          break;
2577
        }
2578
        switch (field.id) {
2579
          case 0: // SUCCESS
2580
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2581
              this.success = iprot.readI64();
2582
              setSuccessIsSet(true);
2583
            } else { 
2584
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2585
            }
2586
            break;
2587
          case 1: // E
2588
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2589
              this.e = new PurchaseServiceException();
2590
              this.e.read(iprot);
2591
            } else { 
2592
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2593
            }
2594
            break;
2595
          default:
2596
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2597
        }
2598
        iprot.readFieldEnd();
2599
      }
2600
      iprot.readStructEnd();
2601
      validate();
2602
    }
2603
 
2604
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2605
      oprot.writeStructBegin(STRUCT_DESC);
2606
 
2607
      if (this.isSetSuccess()) {
2608
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2609
        oprot.writeI64(this.success);
2610
        oprot.writeFieldEnd();
2611
      } else if (this.isSetE()) {
2612
        oprot.writeFieldBegin(E_FIELD_DESC);
2613
        this.e.write(oprot);
2614
        oprot.writeFieldEnd();
2615
      }
2616
      oprot.writeFieldStop();
2617
      oprot.writeStructEnd();
2618
    }
2619
 
2620
    @Override
2621
    public String toString() {
2622
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
2623
      boolean first = true;
2624
 
2625
      sb.append("success:");
2626
      sb.append(this.success);
2627
      first = false;
2628
      if (!first) sb.append(", ");
2629
      sb.append("e:");
2630
      if (this.e == null) {
2631
        sb.append("null");
2632
      } else {
2633
        sb.append(this.e);
2634
      }
2635
      first = false;
2636
      sb.append(")");
2637
      return sb.toString();
2638
    }
2639
 
2640
    public void validate() throws org.apache.thrift.TException {
2641
      // check for required fields
2642
    }
2643
 
2644
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2645
      try {
2646
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2647
      } catch (org.apache.thrift.TException te) {
2648
        throw new java.io.IOException(te);
2649
      }
2650
    }
2651
 
2652
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2653
      try {
2654
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2655
      } catch (org.apache.thrift.TException te) {
2656
        throw new java.io.IOException(te);
2657
      }
2658
    }
2659
 
2660
  }
2661
 
2662
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2663
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
2664
 
2665
    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);
2666
 
2667
    private long id; // required
2668
 
2669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2670
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2671
      ID((short)1, "id");
2672
 
2673
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2674
 
2675
      static {
2676
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2677
          byName.put(field.getFieldName(), field);
2678
        }
2679
      }
2680
 
2681
      /**
2682
       * Find the _Fields constant that matches fieldId, or null if its not found.
2683
       */
2684
      public static _Fields findByThriftId(int fieldId) {
2685
        switch(fieldId) {
2686
          case 1: // ID
2687
            return ID;
2688
          default:
2689
            return null;
2690
        }
2691
      }
2692
 
2693
      /**
2694
       * Find the _Fields constant that matches fieldId, throwing an exception
2695
       * if it is not found.
2696
       */
2697
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2698
        _Fields fields = findByThriftId(fieldId);
2699
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2700
        return fields;
2701
      }
2702
 
2703
      /**
2704
       * Find the _Fields constant that matches name, or null if its not found.
2705
       */
2706
      public static _Fields findByName(String name) {
2707
        return byName.get(name);
2708
      }
2709
 
2710
      private final short _thriftId;
2711
      private final String _fieldName;
2712
 
2713
      _Fields(short thriftId, String fieldName) {
2714
        _thriftId = thriftId;
2715
        _fieldName = fieldName;
2716
      }
2717
 
2718
      public short getThriftFieldId() {
2719
        return _thriftId;
2720
      }
2721
 
2722
      public String getFieldName() {
2723
        return _fieldName;
2724
      }
2725
    }
2726
 
2727
    // isset id assignments
2728
    private static final int __ID_ISSET_ID = 0;
2729
    private BitSet __isset_bit_vector = new BitSet(1);
2730
 
2731
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2732
    static {
2733
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2734
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2735
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2736
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2737
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
2738
    }
2739
 
2740
    public getPurchaseOrder_args() {
2741
    }
2742
 
2743
    public getPurchaseOrder_args(
2744
      long id)
2745
    {
2746
      this();
2747
      this.id = id;
2748
      setIdIsSet(true);
2749
    }
2750
 
2751
    /**
2752
     * Performs a deep copy on <i>other</i>.
2753
     */
2754
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
2755
      __isset_bit_vector.clear();
2756
      __isset_bit_vector.or(other.__isset_bit_vector);
2757
      this.id = other.id;
2758
    }
2759
 
2760
    public getPurchaseOrder_args deepCopy() {
2761
      return new getPurchaseOrder_args(this);
2762
    }
2763
 
2764
    @Override
2765
    public void clear() {
2766
      setIdIsSet(false);
2767
      this.id = 0;
2768
    }
2769
 
2770
    public long getId() {
2771
      return this.id;
2772
    }
2773
 
2774
    public void setId(long id) {
2775
      this.id = id;
2776
      setIdIsSet(true);
2777
    }
2778
 
2779
    public void unsetId() {
2780
      __isset_bit_vector.clear(__ID_ISSET_ID);
2781
    }
2782
 
2783
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
2784
    public boolean isSetId() {
2785
      return __isset_bit_vector.get(__ID_ISSET_ID);
2786
    }
2787
 
2788
    public void setIdIsSet(boolean value) {
2789
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2790
    }
2791
 
2792
    public void setFieldValue(_Fields field, Object value) {
2793
      switch (field) {
2794
      case ID:
2795
        if (value == null) {
2796
          unsetId();
2797
        } else {
2798
          setId((Long)value);
2799
        }
2800
        break;
2801
 
2802
      }
2803
    }
2804
 
2805
    public Object getFieldValue(_Fields field) {
2806
      switch (field) {
2807
      case ID:
2808
        return Long.valueOf(getId());
2809
 
2810
      }
2811
      throw new IllegalStateException();
2812
    }
2813
 
2814
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2815
    public boolean isSet(_Fields field) {
2816
      if (field == null) {
2817
        throw new IllegalArgumentException();
2818
      }
2819
 
2820
      switch (field) {
2821
      case ID:
2822
        return isSetId();
2823
      }
2824
      throw new IllegalStateException();
2825
    }
2826
 
2827
    @Override
2828
    public boolean equals(Object that) {
2829
      if (that == null)
2830
        return false;
2831
      if (that instanceof getPurchaseOrder_args)
2832
        return this.equals((getPurchaseOrder_args)that);
2833
      return false;
2834
    }
2835
 
2836
    public boolean equals(getPurchaseOrder_args that) {
2837
      if (that == null)
2838
        return false;
2839
 
2840
      boolean this_present_id = true;
2841
      boolean that_present_id = true;
2842
      if (this_present_id || that_present_id) {
2843
        if (!(this_present_id && that_present_id))
2844
          return false;
2845
        if (this.id != that.id)
2846
          return false;
2847
      }
2848
 
2849
      return true;
2850
    }
2851
 
2852
    @Override
2853
    public int hashCode() {
2854
      return 0;
2855
    }
2856
 
2857
    public int compareTo(getPurchaseOrder_args other) {
2858
      if (!getClass().equals(other.getClass())) {
2859
        return getClass().getName().compareTo(other.getClass().getName());
2860
      }
2861
 
2862
      int lastComparison = 0;
2863
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
2864
 
2865
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
2866
      if (lastComparison != 0) {
2867
        return lastComparison;
2868
      }
2869
      if (isSetId()) {
2870
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
2871
        if (lastComparison != 0) {
2872
          return lastComparison;
2873
        }
2874
      }
2875
      return 0;
2876
    }
2877
 
2878
    public _Fields fieldForId(int fieldId) {
2879
      return _Fields.findByThriftId(fieldId);
2880
    }
2881
 
2882
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2883
      org.apache.thrift.protocol.TField field;
2884
      iprot.readStructBegin();
2885
      while (true)
2886
      {
2887
        field = iprot.readFieldBegin();
2888
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2889
          break;
2890
        }
2891
        switch (field.id) {
2892
          case 1: // ID
2893
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2894
              this.id = iprot.readI64();
2895
              setIdIsSet(true);
2896
            } else { 
2897
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2898
            }
2899
            break;
2900
          default:
2901
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2902
        }
2903
        iprot.readFieldEnd();
2904
      }
2905
      iprot.readStructEnd();
2906
      validate();
2907
    }
2908
 
2909
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2910
      validate();
2911
 
2912
      oprot.writeStructBegin(STRUCT_DESC);
2913
      oprot.writeFieldBegin(ID_FIELD_DESC);
2914
      oprot.writeI64(this.id);
2915
      oprot.writeFieldEnd();
2916
      oprot.writeFieldStop();
2917
      oprot.writeStructEnd();
2918
    }
2919
 
2920
    @Override
2921
    public String toString() {
2922
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
2923
      boolean first = true;
2924
 
2925
      sb.append("id:");
2926
      sb.append(this.id);
2927
      first = false;
2928
      sb.append(")");
2929
      return sb.toString();
2930
    }
2931
 
2932
    public void validate() throws org.apache.thrift.TException {
2933
      // check for required fields
2934
    }
2935
 
2936
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2937
      try {
2938
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2939
      } catch (org.apache.thrift.TException te) {
2940
        throw new java.io.IOException(te);
2941
      }
2942
    }
2943
 
2944
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2945
      try {
2946
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2947
      } catch (org.apache.thrift.TException te) {
2948
        throw new java.io.IOException(te);
2949
      }
2950
    }
2951
 
2952
  }
2953
 
2954
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2955
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
2956
 
2957
    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);
2958
    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);
2959
 
2960
    private PurchaseOrder success; // required
2961
    private PurchaseServiceException e; // required
2962
 
2963
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2964
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2965
      SUCCESS((short)0, "success"),
2966
      E((short)1, "e");
2967
 
2968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2969
 
2970
      static {
2971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2972
          byName.put(field.getFieldName(), field);
2973
        }
2974
      }
2975
 
2976
      /**
2977
       * Find the _Fields constant that matches fieldId, or null if its not found.
2978
       */
2979
      public static _Fields findByThriftId(int fieldId) {
2980
        switch(fieldId) {
2981
          case 0: // SUCCESS
2982
            return SUCCESS;
2983
          case 1: // E
2984
            return E;
2985
          default:
2986
            return null;
2987
        }
2988
      }
2989
 
2990
      /**
2991
       * Find the _Fields constant that matches fieldId, throwing an exception
2992
       * if it is not found.
2993
       */
2994
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2995
        _Fields fields = findByThriftId(fieldId);
2996
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2997
        return fields;
2998
      }
2999
 
3000
      /**
3001
       * Find the _Fields constant that matches name, or null if its not found.
3002
       */
3003
      public static _Fields findByName(String name) {
3004
        return byName.get(name);
3005
      }
3006
 
3007
      private final short _thriftId;
3008
      private final String _fieldName;
3009
 
3010
      _Fields(short thriftId, String fieldName) {
3011
        _thriftId = thriftId;
3012
        _fieldName = fieldName;
3013
      }
3014
 
3015
      public short getThriftFieldId() {
3016
        return _thriftId;
3017
      }
3018
 
3019
      public String getFieldName() {
3020
        return _fieldName;
3021
      }
3022
    }
3023
 
3024
    // isset id assignments
3025
 
3026
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3027
    static {
3028
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3029
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3030
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
3031
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3032
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3033
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3034
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
3035
    }
3036
 
3037
    public getPurchaseOrder_result() {
3038
    }
3039
 
3040
    public getPurchaseOrder_result(
3041
      PurchaseOrder success,
3042
      PurchaseServiceException e)
3043
    {
3044
      this();
3045
      this.success = success;
3046
      this.e = e;
3047
    }
3048
 
3049
    /**
3050
     * Performs a deep copy on <i>other</i>.
3051
     */
3052
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
3053
      if (other.isSetSuccess()) {
3054
        this.success = new PurchaseOrder(other.success);
3055
      }
3056
      if (other.isSetE()) {
3057
        this.e = new PurchaseServiceException(other.e);
3058
      }
3059
    }
3060
 
3061
    public getPurchaseOrder_result deepCopy() {
3062
      return new getPurchaseOrder_result(this);
3063
    }
3064
 
3065
    @Override
3066
    public void clear() {
3067
      this.success = null;
3068
      this.e = null;
3069
    }
3070
 
3071
    public PurchaseOrder getSuccess() {
3072
      return this.success;
3073
    }
3074
 
3075
    public void setSuccess(PurchaseOrder success) {
3076
      this.success = success;
3077
    }
3078
 
3079
    public void unsetSuccess() {
3080
      this.success = null;
3081
    }
3082
 
3083
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3084
    public boolean isSetSuccess() {
3085
      return this.success != null;
3086
    }
3087
 
3088
    public void setSuccessIsSet(boolean value) {
3089
      if (!value) {
3090
        this.success = null;
3091
      }
3092
    }
3093
 
3094
    public PurchaseServiceException getE() {
3095
      return this.e;
3096
    }
3097
 
3098
    public void setE(PurchaseServiceException e) {
3099
      this.e = e;
3100
    }
3101
 
3102
    public void unsetE() {
3103
      this.e = null;
3104
    }
3105
 
3106
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3107
    public boolean isSetE() {
3108
      return this.e != null;
3109
    }
3110
 
3111
    public void setEIsSet(boolean value) {
3112
      if (!value) {
3113
        this.e = null;
3114
      }
3115
    }
3116
 
3117
    public void setFieldValue(_Fields field, Object value) {
3118
      switch (field) {
3119
      case SUCCESS:
3120
        if (value == null) {
3121
          unsetSuccess();
3122
        } else {
3123
          setSuccess((PurchaseOrder)value);
3124
        }
3125
        break;
3126
 
3127
      case E:
3128
        if (value == null) {
3129
          unsetE();
3130
        } else {
3131
          setE((PurchaseServiceException)value);
3132
        }
3133
        break;
3134
 
3135
      }
3136
    }
3137
 
3138
    public Object getFieldValue(_Fields field) {
3139
      switch (field) {
3140
      case SUCCESS:
3141
        return getSuccess();
3142
 
3143
      case E:
3144
        return getE();
3145
 
3146
      }
3147
      throw new IllegalStateException();
3148
    }
3149
 
3150
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3151
    public boolean isSet(_Fields field) {
3152
      if (field == null) {
3153
        throw new IllegalArgumentException();
3154
      }
3155
 
3156
      switch (field) {
3157
      case SUCCESS:
3158
        return isSetSuccess();
3159
      case E:
3160
        return isSetE();
3161
      }
3162
      throw new IllegalStateException();
3163
    }
3164
 
3165
    @Override
3166
    public boolean equals(Object that) {
3167
      if (that == null)
3168
        return false;
3169
      if (that instanceof getPurchaseOrder_result)
3170
        return this.equals((getPurchaseOrder_result)that);
3171
      return false;
3172
    }
3173
 
3174
    public boolean equals(getPurchaseOrder_result that) {
3175
      if (that == null)
3176
        return false;
3177
 
3178
      boolean this_present_success = true && this.isSetSuccess();
3179
      boolean that_present_success = true && that.isSetSuccess();
3180
      if (this_present_success || that_present_success) {
3181
        if (!(this_present_success && that_present_success))
3182
          return false;
3183
        if (!this.success.equals(that.success))
3184
          return false;
3185
      }
3186
 
3187
      boolean this_present_e = true && this.isSetE();
3188
      boolean that_present_e = true && that.isSetE();
3189
      if (this_present_e || that_present_e) {
3190
        if (!(this_present_e && that_present_e))
3191
          return false;
3192
        if (!this.e.equals(that.e))
3193
          return false;
3194
      }
3195
 
3196
      return true;
3197
    }
3198
 
3199
    @Override
3200
    public int hashCode() {
3201
      return 0;
3202
    }
3203
 
3204
    public int compareTo(getPurchaseOrder_result other) {
3205
      if (!getClass().equals(other.getClass())) {
3206
        return getClass().getName().compareTo(other.getClass().getName());
3207
      }
3208
 
3209
      int lastComparison = 0;
3210
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3211
 
3212
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3213
      if (lastComparison != 0) {
3214
        return lastComparison;
3215
      }
3216
      if (isSetSuccess()) {
3217
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3218
        if (lastComparison != 0) {
3219
          return lastComparison;
3220
        }
3221
      }
3222
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3223
      if (lastComparison != 0) {
3224
        return lastComparison;
3225
      }
3226
      if (isSetE()) {
3227
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3228
        if (lastComparison != 0) {
3229
          return lastComparison;
3230
        }
3231
      }
3232
      return 0;
3233
    }
3234
 
3235
    public _Fields fieldForId(int fieldId) {
3236
      return _Fields.findByThriftId(fieldId);
3237
    }
3238
 
3239
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3240
      org.apache.thrift.protocol.TField field;
3241
      iprot.readStructBegin();
3242
      while (true)
3243
      {
3244
        field = iprot.readFieldBegin();
3245
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3246
          break;
3247
        }
3248
        switch (field.id) {
3249
          case 0: // SUCCESS
3250
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3251
              this.success = new PurchaseOrder();
3252
              this.success.read(iprot);
3253
            } else { 
3254
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3255
            }
3256
            break;
3257
          case 1: // E
3258
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3259
              this.e = new PurchaseServiceException();
3260
              this.e.read(iprot);
3261
            } else { 
3262
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3263
            }
3264
            break;
3265
          default:
3266
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3267
        }
3268
        iprot.readFieldEnd();
3269
      }
3270
      iprot.readStructEnd();
3271
      validate();
3272
    }
3273
 
3274
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3275
      oprot.writeStructBegin(STRUCT_DESC);
3276
 
3277
      if (this.isSetSuccess()) {
3278
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3279
        this.success.write(oprot);
3280
        oprot.writeFieldEnd();
3281
      } else if (this.isSetE()) {
3282
        oprot.writeFieldBegin(E_FIELD_DESC);
3283
        this.e.write(oprot);
3284
        oprot.writeFieldEnd();
3285
      }
3286
      oprot.writeFieldStop();
3287
      oprot.writeStructEnd();
3288
    }
3289
 
3290
    @Override
3291
    public String toString() {
3292
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3293
      boolean first = true;
3294
 
3295
      sb.append("success:");
3296
      if (this.success == null) {
3297
        sb.append("null");
3298
      } else {
3299
        sb.append(this.success);
3300
      }
3301
      first = false;
3302
      if (!first) sb.append(", ");
3303
      sb.append("e:");
3304
      if (this.e == null) {
3305
        sb.append("null");
3306
      } else {
3307
        sb.append(this.e);
3308
      }
3309
      first = false;
3310
      sb.append(")");
3311
      return sb.toString();
3312
    }
3313
 
3314
    public void validate() throws org.apache.thrift.TException {
3315
      // check for required fields
3316
    }
3317
 
3318
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3319
      try {
3320
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3321
      } catch (org.apache.thrift.TException te) {
3322
        throw new java.io.IOException(te);
3323
      }
3324
    }
3325
 
3326
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3327
      try {
3328
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3329
      } catch (org.apache.thrift.TException te) {
3330
        throw new java.io.IOException(te);
3331
      }
3332
    }
3333
 
3334
  }
3335
 
3336
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3337
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3338
 
3339
    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);
3340
 
3341
    private POStatus status; // required
3342
 
3343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3344
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3345
      /**
3346
       * 
3347
       * @see POStatus
3348
       */
3349
      STATUS((short)1, "status");
3350
 
3351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3352
 
3353
      static {
3354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3355
          byName.put(field.getFieldName(), field);
3356
        }
3357
      }
3358
 
3359
      /**
3360
       * Find the _Fields constant that matches fieldId, or null if its not found.
3361
       */
3362
      public static _Fields findByThriftId(int fieldId) {
3363
        switch(fieldId) {
3364
          case 1: // STATUS
3365
            return STATUS;
3366
          default:
3367
            return null;
3368
        }
3369
      }
3370
 
3371
      /**
3372
       * Find the _Fields constant that matches fieldId, throwing an exception
3373
       * if it is not found.
3374
       */
3375
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3376
        _Fields fields = findByThriftId(fieldId);
3377
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3378
        return fields;
3379
      }
3380
 
3381
      /**
3382
       * Find the _Fields constant that matches name, or null if its not found.
3383
       */
3384
      public static _Fields findByName(String name) {
3385
        return byName.get(name);
3386
      }
3387
 
3388
      private final short _thriftId;
3389
      private final String _fieldName;
3390
 
3391
      _Fields(short thriftId, String fieldName) {
3392
        _thriftId = thriftId;
3393
        _fieldName = fieldName;
3394
      }
3395
 
3396
      public short getThriftFieldId() {
3397
        return _thriftId;
3398
      }
3399
 
3400
      public String getFieldName() {
3401
        return _fieldName;
3402
      }
3403
    }
3404
 
3405
    // isset id assignments
3406
 
3407
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3408
    static {
3409
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3410
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3411
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3412
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3413
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3414
    }
3415
 
3416
    public getAllPurchaseOrders_args() {
3417
    }
3418
 
3419
    public getAllPurchaseOrders_args(
3420
      POStatus status)
3421
    {
3422
      this();
3423
      this.status = status;
3424
    }
3425
 
3426
    /**
3427
     * Performs a deep copy on <i>other</i>.
3428
     */
3429
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3430
      if (other.isSetStatus()) {
3431
        this.status = other.status;
3432
      }
3433
    }
3434
 
3435
    public getAllPurchaseOrders_args deepCopy() {
3436
      return new getAllPurchaseOrders_args(this);
3437
    }
3438
 
3439
    @Override
3440
    public void clear() {
3441
      this.status = null;
3442
    }
3443
 
3444
    /**
3445
     * 
3446
     * @see POStatus
3447
     */
3448
    public POStatus getStatus() {
3449
      return this.status;
3450
    }
3451
 
3452
    /**
3453
     * 
3454
     * @see POStatus
3455
     */
3456
    public void setStatus(POStatus status) {
3457
      this.status = status;
3458
    }
3459
 
3460
    public void unsetStatus() {
3461
      this.status = null;
3462
    }
3463
 
3464
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3465
    public boolean isSetStatus() {
3466
      return this.status != null;
3467
    }
3468
 
3469
    public void setStatusIsSet(boolean value) {
3470
      if (!value) {
3471
        this.status = null;
3472
      }
3473
    }
3474
 
3475
    public void setFieldValue(_Fields field, Object value) {
3476
      switch (field) {
3477
      case STATUS:
3478
        if (value == null) {
3479
          unsetStatus();
3480
        } else {
3481
          setStatus((POStatus)value);
3482
        }
3483
        break;
3484
 
3485
      }
3486
    }
3487
 
3488
    public Object getFieldValue(_Fields field) {
3489
      switch (field) {
3490
      case STATUS:
3491
        return getStatus();
3492
 
3493
      }
3494
      throw new IllegalStateException();
3495
    }
3496
 
3497
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3498
    public boolean isSet(_Fields field) {
3499
      if (field == null) {
3500
        throw new IllegalArgumentException();
3501
      }
3502
 
3503
      switch (field) {
3504
      case STATUS:
3505
        return isSetStatus();
3506
      }
3507
      throw new IllegalStateException();
3508
    }
3509
 
3510
    @Override
3511
    public boolean equals(Object that) {
3512
      if (that == null)
3513
        return false;
3514
      if (that instanceof getAllPurchaseOrders_args)
3515
        return this.equals((getAllPurchaseOrders_args)that);
3516
      return false;
3517
    }
3518
 
3519
    public boolean equals(getAllPurchaseOrders_args that) {
3520
      if (that == null)
3521
        return false;
3522
 
3523
      boolean this_present_status = true && this.isSetStatus();
3524
      boolean that_present_status = true && that.isSetStatus();
3525
      if (this_present_status || that_present_status) {
3526
        if (!(this_present_status && that_present_status))
3527
          return false;
3528
        if (!this.status.equals(that.status))
3529
          return false;
3530
      }
3531
 
3532
      return true;
3533
    }
3534
 
3535
    @Override
3536
    public int hashCode() {
3537
      return 0;
3538
    }
3539
 
3540
    public int compareTo(getAllPurchaseOrders_args other) {
3541
      if (!getClass().equals(other.getClass())) {
3542
        return getClass().getName().compareTo(other.getClass().getName());
3543
      }
3544
 
3545
      int lastComparison = 0;
3546
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
3547
 
3548
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
3549
      if (lastComparison != 0) {
3550
        return lastComparison;
3551
      }
3552
      if (isSetStatus()) {
3553
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3554
        if (lastComparison != 0) {
3555
          return lastComparison;
3556
        }
3557
      }
3558
      return 0;
3559
    }
3560
 
3561
    public _Fields fieldForId(int fieldId) {
3562
      return _Fields.findByThriftId(fieldId);
3563
    }
3564
 
3565
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3566
      org.apache.thrift.protocol.TField field;
3567
      iprot.readStructBegin();
3568
      while (true)
3569
      {
3570
        field = iprot.readFieldBegin();
3571
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3572
          break;
3573
        }
3574
        switch (field.id) {
3575
          case 1: // STATUS
3576
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3577
              this.status = POStatus.findByValue(iprot.readI32());
3578
            } else { 
3579
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3580
            }
3581
            break;
3582
          default:
3583
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3584
        }
3585
        iprot.readFieldEnd();
3586
      }
3587
      iprot.readStructEnd();
3588
      validate();
3589
    }
3590
 
3591
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3592
      validate();
3593
 
3594
      oprot.writeStructBegin(STRUCT_DESC);
3595
      if (this.status != null) {
3596
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3597
        oprot.writeI32(this.status.getValue());
3598
        oprot.writeFieldEnd();
3599
      }
3600
      oprot.writeFieldStop();
3601
      oprot.writeStructEnd();
3602
    }
3603
 
3604
    @Override
3605
    public String toString() {
3606
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
3607
      boolean first = true;
3608
 
3609
      sb.append("status:");
3610
      if (this.status == null) {
3611
        sb.append("null");
3612
      } else {
3613
        sb.append(this.status);
3614
      }
3615
      first = false;
3616
      sb.append(")");
3617
      return sb.toString();
3618
    }
3619
 
3620
    public void validate() throws org.apache.thrift.TException {
3621
      // check for required fields
3622
    }
3623
 
3624
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3625
      try {
3626
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3627
      } catch (org.apache.thrift.TException te) {
3628
        throw new java.io.IOException(te);
3629
      }
3630
    }
3631
 
3632
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3633
      try {
3634
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3635
      } catch (org.apache.thrift.TException te) {
3636
        throw new java.io.IOException(te);
3637
      }
3638
    }
3639
 
3640
  }
3641
 
3642
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
3643
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
3644
 
3645
    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);
3646
    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);
3647
 
3648
    private List<PurchaseOrder> success; // required
3649
    private PurchaseServiceException e; // required
3650
 
3651
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3652
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3653
      SUCCESS((short)0, "success"),
3654
      E((short)1, "e");
3655
 
3656
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3657
 
3658
      static {
3659
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3660
          byName.put(field.getFieldName(), field);
3661
        }
3662
      }
3663
 
3664
      /**
3665
       * Find the _Fields constant that matches fieldId, or null if its not found.
3666
       */
3667
      public static _Fields findByThriftId(int fieldId) {
3668
        switch(fieldId) {
3669
          case 0: // SUCCESS
3670
            return SUCCESS;
3671
          case 1: // E
3672
            return E;
3673
          default:
3674
            return null;
3675
        }
3676
      }
3677
 
3678
      /**
3679
       * Find the _Fields constant that matches fieldId, throwing an exception
3680
       * if it is not found.
3681
       */
3682
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3683
        _Fields fields = findByThriftId(fieldId);
3684
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3685
        return fields;
3686
      }
3687
 
3688
      /**
3689
       * Find the _Fields constant that matches name, or null if its not found.
3690
       */
3691
      public static _Fields findByName(String name) {
3692
        return byName.get(name);
3693
      }
3694
 
3695
      private final short _thriftId;
3696
      private final String _fieldName;
3697
 
3698
      _Fields(short thriftId, String fieldName) {
3699
        _thriftId = thriftId;
3700
        _fieldName = fieldName;
3701
      }
3702
 
3703
      public short getThriftFieldId() {
3704
        return _thriftId;
3705
      }
3706
 
3707
      public String getFieldName() {
3708
        return _fieldName;
3709
      }
3710
    }
3711
 
3712
    // isset id assignments
3713
 
3714
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3715
    static {
3716
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3717
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3718
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3719
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
3720
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3721
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3722
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3723
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
3724
    }
3725
 
3726
    public getAllPurchaseOrders_result() {
3727
    }
3728
 
3729
    public getAllPurchaseOrders_result(
3730
      List<PurchaseOrder> success,
3731
      PurchaseServiceException e)
3732
    {
3733
      this();
3734
      this.success = success;
3735
      this.e = e;
3736
    }
3737
 
3738
    /**
3739
     * Performs a deep copy on <i>other</i>.
3740
     */
3741
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
3742
      if (other.isSetSuccess()) {
3743
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
3744
        for (PurchaseOrder other_element : other.success) {
3745
          __this__success.add(new PurchaseOrder(other_element));
3746
        }
3747
        this.success = __this__success;
3748
      }
3749
      if (other.isSetE()) {
3750
        this.e = new PurchaseServiceException(other.e);
3751
      }
3752
    }
3753
 
3754
    public getAllPurchaseOrders_result deepCopy() {
3755
      return new getAllPurchaseOrders_result(this);
3756
    }
3757
 
3758
    @Override
3759
    public void clear() {
3760
      this.success = null;
3761
      this.e = null;
3762
    }
3763
 
3764
    public int getSuccessSize() {
3765
      return (this.success == null) ? 0 : this.success.size();
3766
    }
3767
 
3768
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
3769
      return (this.success == null) ? null : this.success.iterator();
3770
    }
3771
 
3772
    public void addToSuccess(PurchaseOrder elem) {
3773
      if (this.success == null) {
3774
        this.success = new ArrayList<PurchaseOrder>();
3775
      }
3776
      this.success.add(elem);
3777
    }
3778
 
3779
    public List<PurchaseOrder> getSuccess() {
3780
      return this.success;
3781
    }
3782
 
3783
    public void setSuccess(List<PurchaseOrder> success) {
3784
      this.success = success;
3785
    }
3786
 
3787
    public void unsetSuccess() {
3788
      this.success = null;
3789
    }
3790
 
3791
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3792
    public boolean isSetSuccess() {
3793
      return this.success != null;
3794
    }
3795
 
3796
    public void setSuccessIsSet(boolean value) {
3797
      if (!value) {
3798
        this.success = null;
3799
      }
3800
    }
3801
 
3802
    public PurchaseServiceException getE() {
3803
      return this.e;
3804
    }
3805
 
3806
    public void setE(PurchaseServiceException e) {
3807
      this.e = e;
3808
    }
3809
 
3810
    public void unsetE() {
3811
      this.e = null;
3812
    }
3813
 
3814
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3815
    public boolean isSetE() {
3816
      return this.e != null;
3817
    }
3818
 
3819
    public void setEIsSet(boolean value) {
3820
      if (!value) {
3821
        this.e = null;
3822
      }
3823
    }
3824
 
3825
    public void setFieldValue(_Fields field, Object value) {
3826
      switch (field) {
3827
      case SUCCESS:
3828
        if (value == null) {
3829
          unsetSuccess();
3830
        } else {
3831
          setSuccess((List<PurchaseOrder>)value);
3832
        }
3833
        break;
3834
 
3835
      case E:
3836
        if (value == null) {
3837
          unsetE();
3838
        } else {
3839
          setE((PurchaseServiceException)value);
3840
        }
3841
        break;
3842
 
3843
      }
3844
    }
3845
 
3846
    public Object getFieldValue(_Fields field) {
3847
      switch (field) {
3848
      case SUCCESS:
3849
        return getSuccess();
3850
 
3851
      case E:
3852
        return getE();
3853
 
3854
      }
3855
      throw new IllegalStateException();
3856
    }
3857
 
3858
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3859
    public boolean isSet(_Fields field) {
3860
      if (field == null) {
3861
        throw new IllegalArgumentException();
3862
      }
3863
 
3864
      switch (field) {
3865
      case SUCCESS:
3866
        return isSetSuccess();
3867
      case E:
3868
        return isSetE();
3869
      }
3870
      throw new IllegalStateException();
3871
    }
3872
 
3873
    @Override
3874
    public boolean equals(Object that) {
3875
      if (that == null)
3876
        return false;
3877
      if (that instanceof getAllPurchaseOrders_result)
3878
        return this.equals((getAllPurchaseOrders_result)that);
3879
      return false;
3880
    }
3881
 
3882
    public boolean equals(getAllPurchaseOrders_result that) {
3883
      if (that == null)
3884
        return false;
3885
 
3886
      boolean this_present_success = true && this.isSetSuccess();
3887
      boolean that_present_success = true && that.isSetSuccess();
3888
      if (this_present_success || that_present_success) {
3889
        if (!(this_present_success && that_present_success))
3890
          return false;
3891
        if (!this.success.equals(that.success))
3892
          return false;
3893
      }
3894
 
3895
      boolean this_present_e = true && this.isSetE();
3896
      boolean that_present_e = true && that.isSetE();
3897
      if (this_present_e || that_present_e) {
3898
        if (!(this_present_e && that_present_e))
3899
          return false;
3900
        if (!this.e.equals(that.e))
3901
          return false;
3902
      }
3903
 
3904
      return true;
3905
    }
3906
 
3907
    @Override
3908
    public int hashCode() {
3909
      return 0;
3910
    }
3911
 
3912
    public int compareTo(getAllPurchaseOrders_result other) {
3913
      if (!getClass().equals(other.getClass())) {
3914
        return getClass().getName().compareTo(other.getClass().getName());
3915
      }
3916
 
3917
      int lastComparison = 0;
3918
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
3919
 
3920
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3921
      if (lastComparison != 0) {
3922
        return lastComparison;
3923
      }
3924
      if (isSetSuccess()) {
3925
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3926
        if (lastComparison != 0) {
3927
          return lastComparison;
3928
        }
3929
      }
3930
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3931
      if (lastComparison != 0) {
3932
        return lastComparison;
3933
      }
3934
      if (isSetE()) {
3935
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3936
        if (lastComparison != 0) {
3937
          return lastComparison;
3938
        }
3939
      }
3940
      return 0;
3941
    }
3942
 
3943
    public _Fields fieldForId(int fieldId) {
3944
      return _Fields.findByThriftId(fieldId);
3945
    }
3946
 
3947
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3948
      org.apache.thrift.protocol.TField field;
3949
      iprot.readStructBegin();
3950
      while (true)
3951
      {
3952
        field = iprot.readFieldBegin();
3953
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3954
          break;
3955
        }
3956
        switch (field.id) {
3957
          case 0: // SUCCESS
3958
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
3959
              {
3960
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
3961
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
3962
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
3963
                {
3964
                  PurchaseOrder _elem6; // required
3965
                  _elem6 = new PurchaseOrder();
3966
                  _elem6.read(iprot);
3967
                  this.success.add(_elem6);
3968
                }
3969
                iprot.readListEnd();
3970
              }
3971
            } else { 
3972
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3973
            }
3974
            break;
3975
          case 1: // E
3976
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3977
              this.e = new PurchaseServiceException();
3978
              this.e.read(iprot);
3979
            } else { 
3980
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3981
            }
3982
            break;
3983
          default:
3984
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3985
        }
3986
        iprot.readFieldEnd();
3987
      }
3988
      iprot.readStructEnd();
3989
      validate();
3990
    }
3991
 
3992
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3993
      oprot.writeStructBegin(STRUCT_DESC);
3994
 
3995
      if (this.isSetSuccess()) {
3996
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3997
        {
3998
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
3999
          for (PurchaseOrder _iter7 : this.success)
4000
          {
4001
            _iter7.write(oprot);
4002
          }
4003
          oprot.writeListEnd();
4004
        }
4005
        oprot.writeFieldEnd();
4006
      } else if (this.isSetE()) {
4007
        oprot.writeFieldBegin(E_FIELD_DESC);
4008
        this.e.write(oprot);
4009
        oprot.writeFieldEnd();
4010
      }
4011
      oprot.writeFieldStop();
4012
      oprot.writeStructEnd();
4013
    }
4014
 
4015
    @Override
4016
    public String toString() {
4017
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
4018
      boolean first = true;
4019
 
4020
      sb.append("success:");
4021
      if (this.success == null) {
4022
        sb.append("null");
4023
      } else {
4024
        sb.append(this.success);
4025
      }
4026
      first = false;
4027
      if (!first) sb.append(", ");
4028
      sb.append("e:");
4029
      if (this.e == null) {
4030
        sb.append("null");
4031
      } else {
4032
        sb.append(this.e);
4033
      }
4034
      first = false;
4035
      sb.append(")");
4036
      return sb.toString();
4037
    }
4038
 
4039
    public void validate() throws org.apache.thrift.TException {
4040
      // check for required fields
4041
    }
4042
 
4043
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4044
      try {
4045
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4046
      } catch (org.apache.thrift.TException te) {
4047
        throw new java.io.IOException(te);
4048
      }
4049
    }
4050
 
4051
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4052
      try {
4053
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4054
      } catch (org.apache.thrift.TException te) {
4055
        throw new java.io.IOException(te);
4056
      }
4057
    }
4058
 
4059
  }
4060
 
4061
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
4062
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
4063
 
4064
    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);
4065
 
4066
    private long id; // required
4067
 
4068
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4069
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4070
      ID((short)1, "id");
4071
 
4072
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4073
 
4074
      static {
4075
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4076
          byName.put(field.getFieldName(), field);
4077
        }
4078
      }
4079
 
4080
      /**
4081
       * Find the _Fields constant that matches fieldId, or null if its not found.
4082
       */
4083
      public static _Fields findByThriftId(int fieldId) {
4084
        switch(fieldId) {
4085
          case 1: // ID
4086
            return ID;
4087
          default:
4088
            return null;
4089
        }
4090
      }
4091
 
4092
      /**
4093
       * Find the _Fields constant that matches fieldId, throwing an exception
4094
       * if it is not found.
4095
       */
4096
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4097
        _Fields fields = findByThriftId(fieldId);
4098
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4099
        return fields;
4100
      }
4101
 
4102
      /**
4103
       * Find the _Fields constant that matches name, or null if its not found.
4104
       */
4105
      public static _Fields findByName(String name) {
4106
        return byName.get(name);
4107
      }
4108
 
4109
      private final short _thriftId;
4110
      private final String _fieldName;
4111
 
4112
      _Fields(short thriftId, String fieldName) {
4113
        _thriftId = thriftId;
4114
        _fieldName = fieldName;
4115
      }
4116
 
4117
      public short getThriftFieldId() {
4118
        return _thriftId;
4119
      }
4120
 
4121
      public String getFieldName() {
4122
        return _fieldName;
4123
      }
4124
    }
4125
 
4126
    // isset id assignments
4127
    private static final int __ID_ISSET_ID = 0;
4128
    private BitSet __isset_bit_vector = new BitSet(1);
4129
 
4130
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4131
    static {
4132
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4133
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4134
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4135
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4136
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4137
    }
4138
 
4139
    public getSupplier_args() {
4140
    }
4141
 
4142
    public getSupplier_args(
4143
      long id)
4144
    {
4145
      this();
4146
      this.id = id;
4147
      setIdIsSet(true);
4148
    }
4149
 
4150
    /**
4151
     * Performs a deep copy on <i>other</i>.
4152
     */
4153
    public getSupplier_args(getSupplier_args other) {
4154
      __isset_bit_vector.clear();
4155
      __isset_bit_vector.or(other.__isset_bit_vector);
4156
      this.id = other.id;
4157
    }
4158
 
4159
    public getSupplier_args deepCopy() {
4160
      return new getSupplier_args(this);
4161
    }
4162
 
4163
    @Override
4164
    public void clear() {
4165
      setIdIsSet(false);
4166
      this.id = 0;
4167
    }
4168
 
4169
    public long getId() {
4170
      return this.id;
4171
    }
4172
 
4173
    public void setId(long id) {
4174
      this.id = id;
4175
      setIdIsSet(true);
4176
    }
4177
 
4178
    public void unsetId() {
4179
      __isset_bit_vector.clear(__ID_ISSET_ID);
4180
    }
4181
 
4182
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4183
    public boolean isSetId() {
4184
      return __isset_bit_vector.get(__ID_ISSET_ID);
4185
    }
4186
 
4187
    public void setIdIsSet(boolean value) {
4188
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4189
    }
4190
 
4191
    public void setFieldValue(_Fields field, Object value) {
4192
      switch (field) {
4193
      case ID:
4194
        if (value == null) {
4195
          unsetId();
4196
        } else {
4197
          setId((Long)value);
4198
        }
4199
        break;
4200
 
4201
      }
4202
    }
4203
 
4204
    public Object getFieldValue(_Fields field) {
4205
      switch (field) {
4206
      case ID:
4207
        return Long.valueOf(getId());
4208
 
4209
      }
4210
      throw new IllegalStateException();
4211
    }
4212
 
4213
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4214
    public boolean isSet(_Fields field) {
4215
      if (field == null) {
4216
        throw new IllegalArgumentException();
4217
      }
4218
 
4219
      switch (field) {
4220
      case ID:
4221
        return isSetId();
4222
      }
4223
      throw new IllegalStateException();
4224
    }
4225
 
4226
    @Override
4227
    public boolean equals(Object that) {
4228
      if (that == null)
4229
        return false;
4230
      if (that instanceof getSupplier_args)
4231
        return this.equals((getSupplier_args)that);
4232
      return false;
4233
    }
4234
 
4235
    public boolean equals(getSupplier_args that) {
4236
      if (that == null)
4237
        return false;
4238
 
4239
      boolean this_present_id = true;
4240
      boolean that_present_id = true;
4241
      if (this_present_id || that_present_id) {
4242
        if (!(this_present_id && that_present_id))
4243
          return false;
4244
        if (this.id != that.id)
4245
          return false;
4246
      }
4247
 
4248
      return true;
4249
    }
4250
 
4251
    @Override
4252
    public int hashCode() {
4253
      return 0;
4254
    }
4255
 
4256
    public int compareTo(getSupplier_args other) {
4257
      if (!getClass().equals(other.getClass())) {
4258
        return getClass().getName().compareTo(other.getClass().getName());
4259
      }
4260
 
4261
      int lastComparison = 0;
4262
      getSupplier_args typedOther = (getSupplier_args)other;
4263
 
4264
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4265
      if (lastComparison != 0) {
4266
        return lastComparison;
4267
      }
4268
      if (isSetId()) {
4269
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4270
        if (lastComparison != 0) {
4271
          return lastComparison;
4272
        }
4273
      }
4274
      return 0;
4275
    }
4276
 
4277
    public _Fields fieldForId(int fieldId) {
4278
      return _Fields.findByThriftId(fieldId);
4279
    }
4280
 
4281
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4282
      org.apache.thrift.protocol.TField field;
4283
      iprot.readStructBegin();
4284
      while (true)
4285
      {
4286
        field = iprot.readFieldBegin();
4287
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4288
          break;
4289
        }
4290
        switch (field.id) {
4291
          case 1: // ID
4292
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4293
              this.id = iprot.readI64();
4294
              setIdIsSet(true);
4295
            } else { 
4296
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4297
            }
4298
            break;
4299
          default:
4300
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4301
        }
4302
        iprot.readFieldEnd();
4303
      }
4304
      iprot.readStructEnd();
4305
      validate();
4306
    }
4307
 
4308
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4309
      validate();
4310
 
4311
      oprot.writeStructBegin(STRUCT_DESC);
4312
      oprot.writeFieldBegin(ID_FIELD_DESC);
4313
      oprot.writeI64(this.id);
4314
      oprot.writeFieldEnd();
4315
      oprot.writeFieldStop();
4316
      oprot.writeStructEnd();
4317
    }
4318
 
4319
    @Override
4320
    public String toString() {
4321
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4322
      boolean first = true;
4323
 
4324
      sb.append("id:");
4325
      sb.append(this.id);
4326
      first = false;
4327
      sb.append(")");
4328
      return sb.toString();
4329
    }
4330
 
4331
    public void validate() throws org.apache.thrift.TException {
4332
      // check for required fields
4333
    }
4334
 
4335
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4336
      try {
4337
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4338
      } catch (org.apache.thrift.TException te) {
4339
        throw new java.io.IOException(te);
4340
      }
4341
    }
4342
 
4343
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4344
      try {
4345
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4346
        __isset_bit_vector = new BitSet(1);
4347
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4348
      } catch (org.apache.thrift.TException te) {
4349
        throw new java.io.IOException(te);
4350
      }
4351
    }
4352
 
4353
  }
4354
 
4355
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4356
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4357
 
4358
    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);
4359
    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);
4360
 
4361
    private Supplier success; // required
4362
    private PurchaseServiceException e; // required
4363
 
4364
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4365
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4366
      SUCCESS((short)0, "success"),
4367
      E((short)1, "e");
4368
 
4369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4370
 
4371
      static {
4372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4373
          byName.put(field.getFieldName(), field);
4374
        }
4375
      }
4376
 
4377
      /**
4378
       * Find the _Fields constant that matches fieldId, or null if its not found.
4379
       */
4380
      public static _Fields findByThriftId(int fieldId) {
4381
        switch(fieldId) {
4382
          case 0: // SUCCESS
4383
            return SUCCESS;
4384
          case 1: // E
4385
            return E;
4386
          default:
4387
            return null;
4388
        }
4389
      }
4390
 
4391
      /**
4392
       * Find the _Fields constant that matches fieldId, throwing an exception
4393
       * if it is not found.
4394
       */
4395
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4396
        _Fields fields = findByThriftId(fieldId);
4397
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4398
        return fields;
4399
      }
4400
 
4401
      /**
4402
       * Find the _Fields constant that matches name, or null if its not found.
4403
       */
4404
      public static _Fields findByName(String name) {
4405
        return byName.get(name);
4406
      }
4407
 
4408
      private final short _thriftId;
4409
      private final String _fieldName;
4410
 
4411
      _Fields(short thriftId, String fieldName) {
4412
        _thriftId = thriftId;
4413
        _fieldName = fieldName;
4414
      }
4415
 
4416
      public short getThriftFieldId() {
4417
        return _thriftId;
4418
      }
4419
 
4420
      public String getFieldName() {
4421
        return _fieldName;
4422
      }
4423
    }
4424
 
4425
    // isset id assignments
4426
 
4427
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4428
    static {
4429
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4430
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4431
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4432
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4433
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4434
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4435
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4436
    }
4437
 
4438
    public getSupplier_result() {
4439
    }
4440
 
4441
    public getSupplier_result(
4442
      Supplier success,
4443
      PurchaseServiceException e)
4444
    {
4445
      this();
4446
      this.success = success;
4447
      this.e = e;
4448
    }
4449
 
4450
    /**
4451
     * Performs a deep copy on <i>other</i>.
4452
     */
4453
    public getSupplier_result(getSupplier_result other) {
4454
      if (other.isSetSuccess()) {
4455
        this.success = new Supplier(other.success);
4456
      }
4457
      if (other.isSetE()) {
4458
        this.e = new PurchaseServiceException(other.e);
4459
      }
4460
    }
4461
 
4462
    public getSupplier_result deepCopy() {
4463
      return new getSupplier_result(this);
4464
    }
4465
 
4466
    @Override
4467
    public void clear() {
4468
      this.success = null;
4469
      this.e = null;
4470
    }
4471
 
4472
    public Supplier getSuccess() {
4473
      return this.success;
4474
    }
4475
 
4476
    public void setSuccess(Supplier success) {
4477
      this.success = success;
4478
    }
4479
 
4480
    public void unsetSuccess() {
4481
      this.success = null;
4482
    }
4483
 
4484
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4485
    public boolean isSetSuccess() {
4486
      return this.success != null;
4487
    }
4488
 
4489
    public void setSuccessIsSet(boolean value) {
4490
      if (!value) {
4491
        this.success = null;
4492
      }
4493
    }
4494
 
4495
    public PurchaseServiceException getE() {
4496
      return this.e;
4497
    }
4498
 
4499
    public void setE(PurchaseServiceException e) {
4500
      this.e = e;
4501
    }
4502
 
4503
    public void unsetE() {
4504
      this.e = null;
4505
    }
4506
 
4507
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4508
    public boolean isSetE() {
4509
      return this.e != null;
4510
    }
4511
 
4512
    public void setEIsSet(boolean value) {
4513
      if (!value) {
4514
        this.e = null;
4515
      }
4516
    }
4517
 
4518
    public void setFieldValue(_Fields field, Object value) {
4519
      switch (field) {
4520
      case SUCCESS:
4521
        if (value == null) {
4522
          unsetSuccess();
4523
        } else {
4524
          setSuccess((Supplier)value);
4525
        }
4526
        break;
4527
 
4528
      case E:
4529
        if (value == null) {
4530
          unsetE();
4531
        } else {
4532
          setE((PurchaseServiceException)value);
4533
        }
4534
        break;
4535
 
4536
      }
4537
    }
4538
 
4539
    public Object getFieldValue(_Fields field) {
4540
      switch (field) {
4541
      case SUCCESS:
4542
        return getSuccess();
4543
 
4544
      case E:
4545
        return getE();
4546
 
4547
      }
4548
      throw new IllegalStateException();
4549
    }
4550
 
4551
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4552
    public boolean isSet(_Fields field) {
4553
      if (field == null) {
4554
        throw new IllegalArgumentException();
4555
      }
4556
 
4557
      switch (field) {
4558
      case SUCCESS:
4559
        return isSetSuccess();
4560
      case E:
4561
        return isSetE();
4562
      }
4563
      throw new IllegalStateException();
4564
    }
4565
 
4566
    @Override
4567
    public boolean equals(Object that) {
4568
      if (that == null)
4569
        return false;
4570
      if (that instanceof getSupplier_result)
4571
        return this.equals((getSupplier_result)that);
4572
      return false;
4573
    }
4574
 
4575
    public boolean equals(getSupplier_result that) {
4576
      if (that == null)
4577
        return false;
4578
 
4579
      boolean this_present_success = true && this.isSetSuccess();
4580
      boolean that_present_success = true && that.isSetSuccess();
4581
      if (this_present_success || that_present_success) {
4582
        if (!(this_present_success && that_present_success))
4583
          return false;
4584
        if (!this.success.equals(that.success))
4585
          return false;
4586
      }
4587
 
4588
      boolean this_present_e = true && this.isSetE();
4589
      boolean that_present_e = true && that.isSetE();
4590
      if (this_present_e || that_present_e) {
4591
        if (!(this_present_e && that_present_e))
4592
          return false;
4593
        if (!this.e.equals(that.e))
4594
          return false;
4595
      }
4596
 
4597
      return true;
4598
    }
4599
 
4600
    @Override
4601
    public int hashCode() {
4602
      return 0;
4603
    }
4604
 
4605
    public int compareTo(getSupplier_result other) {
4606
      if (!getClass().equals(other.getClass())) {
4607
        return getClass().getName().compareTo(other.getClass().getName());
4608
      }
4609
 
4610
      int lastComparison = 0;
4611
      getSupplier_result typedOther = (getSupplier_result)other;
4612
 
4613
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4614
      if (lastComparison != 0) {
4615
        return lastComparison;
4616
      }
4617
      if (isSetSuccess()) {
4618
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4619
        if (lastComparison != 0) {
4620
          return lastComparison;
4621
        }
4622
      }
4623
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4624
      if (lastComparison != 0) {
4625
        return lastComparison;
4626
      }
4627
      if (isSetE()) {
4628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4629
        if (lastComparison != 0) {
4630
          return lastComparison;
4631
        }
4632
      }
4633
      return 0;
4634
    }
4635
 
4636
    public _Fields fieldForId(int fieldId) {
4637
      return _Fields.findByThriftId(fieldId);
4638
    }
4639
 
4640
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4641
      org.apache.thrift.protocol.TField field;
4642
      iprot.readStructBegin();
4643
      while (true)
4644
      {
4645
        field = iprot.readFieldBegin();
4646
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4647
          break;
4648
        }
4649
        switch (field.id) {
4650
          case 0: // SUCCESS
4651
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4652
              this.success = new Supplier();
4653
              this.success.read(iprot);
4654
            } else { 
4655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4656
            }
4657
            break;
4658
          case 1: // E
4659
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4660
              this.e = new PurchaseServiceException();
4661
              this.e.read(iprot);
4662
            } else { 
4663
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4664
            }
4665
            break;
4666
          default:
4667
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4668
        }
4669
        iprot.readFieldEnd();
4670
      }
4671
      iprot.readStructEnd();
4672
      validate();
4673
    }
4674
 
4675
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4676
      oprot.writeStructBegin(STRUCT_DESC);
4677
 
4678
      if (this.isSetSuccess()) {
4679
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4680
        this.success.write(oprot);
4681
        oprot.writeFieldEnd();
4682
      } else if (this.isSetE()) {
4683
        oprot.writeFieldBegin(E_FIELD_DESC);
4684
        this.e.write(oprot);
4685
        oprot.writeFieldEnd();
4686
      }
4687
      oprot.writeFieldStop();
4688
      oprot.writeStructEnd();
4689
    }
4690
 
4691
    @Override
4692
    public String toString() {
4693
      StringBuilder sb = new StringBuilder("getSupplier_result(");
4694
      boolean first = true;
4695
 
4696
      sb.append("success:");
4697
      if (this.success == null) {
4698
        sb.append("null");
4699
      } else {
4700
        sb.append(this.success);
4701
      }
4702
      first = false;
4703
      if (!first) sb.append(", ");
4704
      sb.append("e:");
4705
      if (this.e == null) {
4706
        sb.append("null");
4707
      } else {
4708
        sb.append(this.e);
4709
      }
4710
      first = false;
4711
      sb.append(")");
4712
      return sb.toString();
4713
    }
4714
 
4715
    public void validate() throws org.apache.thrift.TException {
4716
      // check for required fields
4717
    }
4718
 
4719
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4720
      try {
4721
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4722
      } catch (org.apache.thrift.TException te) {
4723
        throw new java.io.IOException(te);
4724
      }
4725
    }
4726
 
4727
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4728
      try {
4729
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4730
      } catch (org.apache.thrift.TException te) {
4731
        throw new java.io.IOException(te);
4732
      }
4733
    }
4734
 
4735
  }
4736
 
4737
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
4738
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
4739
 
4740
    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);
4741
    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);
4742
    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);
4743
 
4744
    private long purchaseOrderId; // required
4745
    private String invoiceNumber; // required
4746
    private double freightCharges; // required
4747
 
4748
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4749
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4750
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
4751
      INVOICE_NUMBER((short)2, "invoiceNumber"),
4752
      FREIGHT_CHARGES((short)3, "freightCharges");
4753
 
4754
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4755
 
4756
      static {
4757
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4758
          byName.put(field.getFieldName(), field);
4759
        }
4760
      }
4761
 
4762
      /**
4763
       * Find the _Fields constant that matches fieldId, or null if its not found.
4764
       */
4765
      public static _Fields findByThriftId(int fieldId) {
4766
        switch(fieldId) {
4767
          case 1: // PURCHASE_ORDER_ID
4768
            return PURCHASE_ORDER_ID;
4769
          case 2: // INVOICE_NUMBER
4770
            return INVOICE_NUMBER;
4771
          case 3: // FREIGHT_CHARGES
4772
            return FREIGHT_CHARGES;
4773
          default:
4774
            return null;
4775
        }
4776
      }
4777
 
4778
      /**
4779
       * Find the _Fields constant that matches fieldId, throwing an exception
4780
       * if it is not found.
4781
       */
4782
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4783
        _Fields fields = findByThriftId(fieldId);
4784
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4785
        return fields;
4786
      }
4787
 
4788
      /**
4789
       * Find the _Fields constant that matches name, or null if its not found.
4790
       */
4791
      public static _Fields findByName(String name) {
4792
        return byName.get(name);
4793
      }
4794
 
4795
      private final short _thriftId;
4796
      private final String _fieldName;
4797
 
4798
      _Fields(short thriftId, String fieldName) {
4799
        _thriftId = thriftId;
4800
        _fieldName = fieldName;
4801
      }
4802
 
4803
      public short getThriftFieldId() {
4804
        return _thriftId;
4805
      }
4806
 
4807
      public String getFieldName() {
4808
        return _fieldName;
4809
      }
4810
    }
4811
 
4812
    // isset id assignments
4813
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
4814
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
4815
    private BitSet __isset_bit_vector = new BitSet(2);
4816
 
4817
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4818
    static {
4819
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4820
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4821
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4822
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4823
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4824
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4825
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4826
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4827
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
4828
    }
4829
 
4830
    public startPurchase_args() {
4831
    }
4832
 
4833
    public startPurchase_args(
4834
      long purchaseOrderId,
4835
      String invoiceNumber,
4836
      double freightCharges)
4837
    {
4838
      this();
4839
      this.purchaseOrderId = purchaseOrderId;
4840
      setPurchaseOrderIdIsSet(true);
4841
      this.invoiceNumber = invoiceNumber;
4842
      this.freightCharges = freightCharges;
4843
      setFreightChargesIsSet(true);
4844
    }
4845
 
4846
    /**
4847
     * Performs a deep copy on <i>other</i>.
4848
     */
4849
    public startPurchase_args(startPurchase_args other) {
4850
      __isset_bit_vector.clear();
4851
      __isset_bit_vector.or(other.__isset_bit_vector);
4852
      this.purchaseOrderId = other.purchaseOrderId;
4853
      if (other.isSetInvoiceNumber()) {
4854
        this.invoiceNumber = other.invoiceNumber;
4855
      }
4856
      this.freightCharges = other.freightCharges;
4857
    }
4858
 
4859
    public startPurchase_args deepCopy() {
4860
      return new startPurchase_args(this);
4861
    }
4862
 
4863
    @Override
4864
    public void clear() {
4865
      setPurchaseOrderIdIsSet(false);
4866
      this.purchaseOrderId = 0;
4867
      this.invoiceNumber = null;
4868
      setFreightChargesIsSet(false);
4869
      this.freightCharges = 0.0;
4870
    }
4871
 
4872
    public long getPurchaseOrderId() {
4873
      return this.purchaseOrderId;
4874
    }
4875
 
4876
    public void setPurchaseOrderId(long purchaseOrderId) {
4877
      this.purchaseOrderId = purchaseOrderId;
4878
      setPurchaseOrderIdIsSet(true);
4879
    }
4880
 
4881
    public void unsetPurchaseOrderId() {
4882
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
4883
    }
4884
 
4885
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
4886
    public boolean isSetPurchaseOrderId() {
4887
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
4888
    }
4889
 
4890
    public void setPurchaseOrderIdIsSet(boolean value) {
4891
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
4892
    }
4893
 
4894
    public String getInvoiceNumber() {
4895
      return this.invoiceNumber;
4896
    }
4897
 
4898
    public void setInvoiceNumber(String invoiceNumber) {
4899
      this.invoiceNumber = invoiceNumber;
4900
    }
4901
 
4902
    public void unsetInvoiceNumber() {
4903
      this.invoiceNumber = null;
4904
    }
4905
 
4906
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
4907
    public boolean isSetInvoiceNumber() {
4908
      return this.invoiceNumber != null;
4909
    }
4910
 
4911
    public void setInvoiceNumberIsSet(boolean value) {
4912
      if (!value) {
4913
        this.invoiceNumber = null;
4914
      }
4915
    }
4916
 
4917
    public double getFreightCharges() {
4918
      return this.freightCharges;
4919
    }
4920
 
4921
    public void setFreightCharges(double freightCharges) {
4922
      this.freightCharges = freightCharges;
4923
      setFreightChargesIsSet(true);
4924
    }
4925
 
4926
    public void unsetFreightCharges() {
4927
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
4928
    }
4929
 
4930
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
4931
    public boolean isSetFreightCharges() {
4932
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
4933
    }
4934
 
4935
    public void setFreightChargesIsSet(boolean value) {
4936
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
4937
    }
4938
 
4939
    public void setFieldValue(_Fields field, Object value) {
4940
      switch (field) {
4941
      case PURCHASE_ORDER_ID:
4942
        if (value == null) {
4943
          unsetPurchaseOrderId();
4944
        } else {
4945
          setPurchaseOrderId((Long)value);
4946
        }
4947
        break;
4948
 
4949
      case INVOICE_NUMBER:
4950
        if (value == null) {
4951
          unsetInvoiceNumber();
4952
        } else {
4953
          setInvoiceNumber((String)value);
4954
        }
4955
        break;
4956
 
4957
      case FREIGHT_CHARGES:
4958
        if (value == null) {
4959
          unsetFreightCharges();
4960
        } else {
4961
          setFreightCharges((Double)value);
4962
        }
4963
        break;
4964
 
4965
      }
4966
    }
4967
 
4968
    public Object getFieldValue(_Fields field) {
4969
      switch (field) {
4970
      case PURCHASE_ORDER_ID:
4971
        return Long.valueOf(getPurchaseOrderId());
4972
 
4973
      case INVOICE_NUMBER:
4974
        return getInvoiceNumber();
4975
 
4976
      case FREIGHT_CHARGES:
4977
        return Double.valueOf(getFreightCharges());
4978
 
4979
      }
4980
      throw new IllegalStateException();
4981
    }
4982
 
4983
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4984
    public boolean isSet(_Fields field) {
4985
      if (field == null) {
4986
        throw new IllegalArgumentException();
4987
      }
4988
 
4989
      switch (field) {
4990
      case PURCHASE_ORDER_ID:
4991
        return isSetPurchaseOrderId();
4992
      case INVOICE_NUMBER:
4993
        return isSetInvoiceNumber();
4994
      case FREIGHT_CHARGES:
4995
        return isSetFreightCharges();
4996
      }
4997
      throw new IllegalStateException();
4998
    }
4999
 
5000
    @Override
5001
    public boolean equals(Object that) {
5002
      if (that == null)
5003
        return false;
5004
      if (that instanceof startPurchase_args)
5005
        return this.equals((startPurchase_args)that);
5006
      return false;
5007
    }
5008
 
5009
    public boolean equals(startPurchase_args that) {
5010
      if (that == null)
5011
        return false;
5012
 
5013
      boolean this_present_purchaseOrderId = true;
5014
      boolean that_present_purchaseOrderId = true;
5015
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5016
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5017
          return false;
5018
        if (this.purchaseOrderId != that.purchaseOrderId)
5019
          return false;
5020
      }
5021
 
5022
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
5023
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
5024
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
5025
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
5026
          return false;
5027
        if (!this.invoiceNumber.equals(that.invoiceNumber))
5028
          return false;
5029
      }
5030
 
5031
      boolean this_present_freightCharges = true;
5032
      boolean that_present_freightCharges = true;
5033
      if (this_present_freightCharges || that_present_freightCharges) {
5034
        if (!(this_present_freightCharges && that_present_freightCharges))
5035
          return false;
5036
        if (this.freightCharges != that.freightCharges)
5037
          return false;
5038
      }
5039
 
5040
      return true;
5041
    }
5042
 
5043
    @Override
5044
    public int hashCode() {
5045
      return 0;
5046
    }
5047
 
5048
    public int compareTo(startPurchase_args other) {
5049
      if (!getClass().equals(other.getClass())) {
5050
        return getClass().getName().compareTo(other.getClass().getName());
5051
      }
5052
 
5053
      int lastComparison = 0;
5054
      startPurchase_args typedOther = (startPurchase_args)other;
5055
 
5056
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5057
      if (lastComparison != 0) {
5058
        return lastComparison;
5059
      }
5060
      if (isSetPurchaseOrderId()) {
5061
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5062
        if (lastComparison != 0) {
5063
          return lastComparison;
5064
        }
5065
      }
5066
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
5067
      if (lastComparison != 0) {
5068
        return lastComparison;
5069
      }
5070
      if (isSetInvoiceNumber()) {
5071
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
5072
        if (lastComparison != 0) {
5073
          return lastComparison;
5074
        }
5075
      }
5076
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
5077
      if (lastComparison != 0) {
5078
        return lastComparison;
5079
      }
5080
      if (isSetFreightCharges()) {
5081
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5082
        if (lastComparison != 0) {
5083
          return lastComparison;
5084
        }
5085
      }
5086
      return 0;
5087
    }
5088
 
5089
    public _Fields fieldForId(int fieldId) {
5090
      return _Fields.findByThriftId(fieldId);
5091
    }
5092
 
5093
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5094
      org.apache.thrift.protocol.TField field;
5095
      iprot.readStructBegin();
5096
      while (true)
5097
      {
5098
        field = iprot.readFieldBegin();
5099
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5100
          break;
5101
        }
5102
        switch (field.id) {
5103
          case 1: // PURCHASE_ORDER_ID
5104
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5105
              this.purchaseOrderId = iprot.readI64();
5106
              setPurchaseOrderIdIsSet(true);
5107
            } else { 
5108
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5109
            }
5110
            break;
5111
          case 2: // INVOICE_NUMBER
5112
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5113
              this.invoiceNumber = iprot.readString();
5114
            } else { 
5115
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5116
            }
5117
            break;
5118
          case 3: // FREIGHT_CHARGES
5119
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5120
              this.freightCharges = iprot.readDouble();
5121
              setFreightChargesIsSet(true);
5122
            } else { 
5123
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5124
            }
5125
            break;
5126
          default:
5127
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5128
        }
5129
        iprot.readFieldEnd();
5130
      }
5131
      iprot.readStructEnd();
5132
      validate();
5133
    }
5134
 
5135
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5136
      validate();
5137
 
5138
      oprot.writeStructBegin(STRUCT_DESC);
5139
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5140
      oprot.writeI64(this.purchaseOrderId);
5141
      oprot.writeFieldEnd();
5142
      if (this.invoiceNumber != null) {
5143
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5144
        oprot.writeString(this.invoiceNumber);
5145
        oprot.writeFieldEnd();
5146
      }
5147
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5148
      oprot.writeDouble(this.freightCharges);
5149
      oprot.writeFieldEnd();
5150
      oprot.writeFieldStop();
5151
      oprot.writeStructEnd();
5152
    }
5153
 
5154
    @Override
5155
    public String toString() {
5156
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5157
      boolean first = true;
5158
 
5159
      sb.append("purchaseOrderId:");
5160
      sb.append(this.purchaseOrderId);
5161
      first = false;
5162
      if (!first) sb.append(", ");
5163
      sb.append("invoiceNumber:");
5164
      if (this.invoiceNumber == null) {
5165
        sb.append("null");
5166
      } else {
5167
        sb.append(this.invoiceNumber);
5168
      }
5169
      first = false;
5170
      if (!first) sb.append(", ");
5171
      sb.append("freightCharges:");
5172
      sb.append(this.freightCharges);
5173
      first = false;
5174
      sb.append(")");
5175
      return sb.toString();
5176
    }
5177
 
5178
    public void validate() throws org.apache.thrift.TException {
5179
      // check for required fields
5180
    }
5181
 
5182
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5183
      try {
5184
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5185
      } catch (org.apache.thrift.TException te) {
5186
        throw new java.io.IOException(te);
5187
      }
5188
    }
5189
 
5190
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5191
      try {
5192
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5193
      } catch (org.apache.thrift.TException te) {
5194
        throw new java.io.IOException(te);
5195
      }
5196
    }
5197
 
5198
  }
5199
 
5200
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5201
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5202
 
5203
    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);
5204
    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);
5205
 
5206
    private long success; // required
5207
    private PurchaseServiceException e; // required
5208
 
5209
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5210
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5211
      SUCCESS((short)0, "success"),
5212
      E((short)1, "e");
5213
 
5214
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5215
 
5216
      static {
5217
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5218
          byName.put(field.getFieldName(), field);
5219
        }
5220
      }
5221
 
5222
      /**
5223
       * Find the _Fields constant that matches fieldId, or null if its not found.
5224
       */
5225
      public static _Fields findByThriftId(int fieldId) {
5226
        switch(fieldId) {
5227
          case 0: // SUCCESS
5228
            return SUCCESS;
5229
          case 1: // E
5230
            return E;
5231
          default:
5232
            return null;
5233
        }
5234
      }
5235
 
5236
      /**
5237
       * Find the _Fields constant that matches fieldId, throwing an exception
5238
       * if it is not found.
5239
       */
5240
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5241
        _Fields fields = findByThriftId(fieldId);
5242
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5243
        return fields;
5244
      }
5245
 
5246
      /**
5247
       * Find the _Fields constant that matches name, or null if its not found.
5248
       */
5249
      public static _Fields findByName(String name) {
5250
        return byName.get(name);
5251
      }
5252
 
5253
      private final short _thriftId;
5254
      private final String _fieldName;
5255
 
5256
      _Fields(short thriftId, String fieldName) {
5257
        _thriftId = thriftId;
5258
        _fieldName = fieldName;
5259
      }
5260
 
5261
      public short getThriftFieldId() {
5262
        return _thriftId;
5263
      }
5264
 
5265
      public String getFieldName() {
5266
        return _fieldName;
5267
      }
5268
    }
5269
 
5270
    // isset id assignments
5271
    private static final int __SUCCESS_ISSET_ID = 0;
5272
    private BitSet __isset_bit_vector = new BitSet(1);
5273
 
5274
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5275
    static {
5276
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5277
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5278
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5279
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5280
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5281
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5282
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5283
    }
5284
 
5285
    public startPurchase_result() {
5286
    }
5287
 
5288
    public startPurchase_result(
5289
      long success,
5290
      PurchaseServiceException e)
5291
    {
5292
      this();
5293
      this.success = success;
5294
      setSuccessIsSet(true);
5295
      this.e = e;
5296
    }
5297
 
5298
    /**
5299
     * Performs a deep copy on <i>other</i>.
5300
     */
5301
    public startPurchase_result(startPurchase_result other) {
5302
      __isset_bit_vector.clear();
5303
      __isset_bit_vector.or(other.__isset_bit_vector);
5304
      this.success = other.success;
5305
      if (other.isSetE()) {
5306
        this.e = new PurchaseServiceException(other.e);
5307
      }
5308
    }
5309
 
5310
    public startPurchase_result deepCopy() {
5311
      return new startPurchase_result(this);
5312
    }
5313
 
5314
    @Override
5315
    public void clear() {
5316
      setSuccessIsSet(false);
5317
      this.success = 0;
5318
      this.e = null;
5319
    }
5320
 
5321
    public long getSuccess() {
5322
      return this.success;
5323
    }
5324
 
5325
    public void setSuccess(long success) {
5326
      this.success = success;
5327
      setSuccessIsSet(true);
5328
    }
5329
 
5330
    public void unsetSuccess() {
5331
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5332
    }
5333
 
5334
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5335
    public boolean isSetSuccess() {
5336
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5337
    }
5338
 
5339
    public void setSuccessIsSet(boolean value) {
5340
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5341
    }
5342
 
5343
    public PurchaseServiceException getE() {
5344
      return this.e;
5345
    }
5346
 
5347
    public void setE(PurchaseServiceException e) {
5348
      this.e = e;
5349
    }
5350
 
5351
    public void unsetE() {
5352
      this.e = null;
5353
    }
5354
 
5355
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5356
    public boolean isSetE() {
5357
      return this.e != null;
5358
    }
5359
 
5360
    public void setEIsSet(boolean value) {
5361
      if (!value) {
5362
        this.e = null;
5363
      }
5364
    }
5365
 
5366
    public void setFieldValue(_Fields field, Object value) {
5367
      switch (field) {
5368
      case SUCCESS:
5369
        if (value == null) {
5370
          unsetSuccess();
5371
        } else {
5372
          setSuccess((Long)value);
5373
        }
5374
        break;
5375
 
5376
      case E:
5377
        if (value == null) {
5378
          unsetE();
5379
        } else {
5380
          setE((PurchaseServiceException)value);
5381
        }
5382
        break;
5383
 
5384
      }
5385
    }
5386
 
5387
    public Object getFieldValue(_Fields field) {
5388
      switch (field) {
5389
      case SUCCESS:
5390
        return Long.valueOf(getSuccess());
5391
 
5392
      case E:
5393
        return getE();
5394
 
5395
      }
5396
      throw new IllegalStateException();
5397
    }
5398
 
5399
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5400
    public boolean isSet(_Fields field) {
5401
      if (field == null) {
5402
        throw new IllegalArgumentException();
5403
      }
5404
 
5405
      switch (field) {
5406
      case SUCCESS:
5407
        return isSetSuccess();
5408
      case E:
5409
        return isSetE();
5410
      }
5411
      throw new IllegalStateException();
5412
    }
5413
 
5414
    @Override
5415
    public boolean equals(Object that) {
5416
      if (that == null)
5417
        return false;
5418
      if (that instanceof startPurchase_result)
5419
        return this.equals((startPurchase_result)that);
5420
      return false;
5421
    }
5422
 
5423
    public boolean equals(startPurchase_result that) {
5424
      if (that == null)
5425
        return false;
5426
 
5427
      boolean this_present_success = true;
5428
      boolean that_present_success = true;
5429
      if (this_present_success || that_present_success) {
5430
        if (!(this_present_success && that_present_success))
5431
          return false;
5432
        if (this.success != that.success)
5433
          return false;
5434
      }
5435
 
5436
      boolean this_present_e = true && this.isSetE();
5437
      boolean that_present_e = true && that.isSetE();
5438
      if (this_present_e || that_present_e) {
5439
        if (!(this_present_e && that_present_e))
5440
          return false;
5441
        if (!this.e.equals(that.e))
5442
          return false;
5443
      }
5444
 
5445
      return true;
5446
    }
5447
 
5448
    @Override
5449
    public int hashCode() {
5450
      return 0;
5451
    }
5452
 
5453
    public int compareTo(startPurchase_result other) {
5454
      if (!getClass().equals(other.getClass())) {
5455
        return getClass().getName().compareTo(other.getClass().getName());
5456
      }
5457
 
5458
      int lastComparison = 0;
5459
      startPurchase_result typedOther = (startPurchase_result)other;
5460
 
5461
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5462
      if (lastComparison != 0) {
5463
        return lastComparison;
5464
      }
5465
      if (isSetSuccess()) {
5466
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5467
        if (lastComparison != 0) {
5468
          return lastComparison;
5469
        }
5470
      }
5471
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5472
      if (lastComparison != 0) {
5473
        return lastComparison;
5474
      }
5475
      if (isSetE()) {
5476
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5477
        if (lastComparison != 0) {
5478
          return lastComparison;
5479
        }
5480
      }
5481
      return 0;
5482
    }
5483
 
5484
    public _Fields fieldForId(int fieldId) {
5485
      return _Fields.findByThriftId(fieldId);
5486
    }
5487
 
5488
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5489
      org.apache.thrift.protocol.TField field;
5490
      iprot.readStructBegin();
5491
      while (true)
5492
      {
5493
        field = iprot.readFieldBegin();
5494
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5495
          break;
5496
        }
5497
        switch (field.id) {
5498
          case 0: // SUCCESS
5499
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5500
              this.success = iprot.readI64();
5501
              setSuccessIsSet(true);
5502
            } else { 
5503
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5504
            }
5505
            break;
5506
          case 1: // E
5507
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5508
              this.e = new PurchaseServiceException();
5509
              this.e.read(iprot);
5510
            } else { 
5511
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5512
            }
5513
            break;
5514
          default:
5515
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5516
        }
5517
        iprot.readFieldEnd();
5518
      }
5519
      iprot.readStructEnd();
5520
      validate();
5521
    }
5522
 
5523
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5524
      oprot.writeStructBegin(STRUCT_DESC);
5525
 
5526
      if (this.isSetSuccess()) {
5527
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5528
        oprot.writeI64(this.success);
5529
        oprot.writeFieldEnd();
5530
      } else if (this.isSetE()) {
5531
        oprot.writeFieldBegin(E_FIELD_DESC);
5532
        this.e.write(oprot);
5533
        oprot.writeFieldEnd();
5534
      }
5535
      oprot.writeFieldStop();
5536
      oprot.writeStructEnd();
5537
    }
5538
 
5539
    @Override
5540
    public String toString() {
5541
      StringBuilder sb = new StringBuilder("startPurchase_result(");
5542
      boolean first = true;
5543
 
5544
      sb.append("success:");
5545
      sb.append(this.success);
5546
      first = false;
5547
      if (!first) sb.append(", ");
5548
      sb.append("e:");
5549
      if (this.e == null) {
5550
        sb.append("null");
5551
      } else {
5552
        sb.append(this.e);
5553
      }
5554
      first = false;
5555
      sb.append(")");
5556
      return sb.toString();
5557
    }
5558
 
5559
    public void validate() throws org.apache.thrift.TException {
5560
      // check for required fields
5561
    }
5562
 
5563
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5564
      try {
5565
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5566
      } catch (org.apache.thrift.TException te) {
5567
        throw new java.io.IOException(te);
5568
      }
5569
    }
5570
 
5571
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5572
      try {
5573
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5574
      } catch (org.apache.thrift.TException te) {
5575
        throw new java.io.IOException(te);
5576
      }
5577
    }
5578
 
5579
  }
5580
 
5581
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
5582
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
5583
 
5584
    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);
5585
 
5586
    private long purchaseId; // required
5587
 
5588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5589
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5590
      PURCHASE_ID((short)1, "purchaseId");
5591
 
5592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5593
 
5594
      static {
5595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5596
          byName.put(field.getFieldName(), field);
5597
        }
5598
      }
5599
 
5600
      /**
5601
       * Find the _Fields constant that matches fieldId, or null if its not found.
5602
       */
5603
      public static _Fields findByThriftId(int fieldId) {
5604
        switch(fieldId) {
5605
          case 1: // PURCHASE_ID
5606
            return PURCHASE_ID;
5607
          default:
5608
            return null;
5609
        }
5610
      }
5611
 
5612
      /**
5613
       * Find the _Fields constant that matches fieldId, throwing an exception
5614
       * if it is not found.
5615
       */
5616
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5617
        _Fields fields = findByThriftId(fieldId);
5618
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5619
        return fields;
5620
      }
5621
 
5622
      /**
5623
       * Find the _Fields constant that matches name, or null if its not found.
5624
       */
5625
      public static _Fields findByName(String name) {
5626
        return byName.get(name);
5627
      }
5628
 
5629
      private final short _thriftId;
5630
      private final String _fieldName;
5631
 
5632
      _Fields(short thriftId, String fieldName) {
5633
        _thriftId = thriftId;
5634
        _fieldName = fieldName;
5635
      }
5636
 
5637
      public short getThriftFieldId() {
5638
        return _thriftId;
5639
      }
5640
 
5641
      public String getFieldName() {
5642
        return _fieldName;
5643
      }
5644
    }
5645
 
5646
    // isset id assignments
5647
    private static final int __PURCHASEID_ISSET_ID = 0;
5648
    private BitSet __isset_bit_vector = new BitSet(1);
5649
 
5650
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5651
    static {
5652
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5653
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5654
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5655
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5656
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
5657
    }
5658
 
5659
    public closePurchase_args() {
5660
    }
5661
 
5662
    public closePurchase_args(
5663
      long purchaseId)
5664
    {
5665
      this();
5666
      this.purchaseId = purchaseId;
5667
      setPurchaseIdIsSet(true);
5668
    }
5669
 
5670
    /**
5671
     * Performs a deep copy on <i>other</i>.
5672
     */
5673
    public closePurchase_args(closePurchase_args other) {
5674
      __isset_bit_vector.clear();
5675
      __isset_bit_vector.or(other.__isset_bit_vector);
5676
      this.purchaseId = other.purchaseId;
5677
    }
5678
 
5679
    public closePurchase_args deepCopy() {
5680
      return new closePurchase_args(this);
5681
    }
5682
 
5683
    @Override
5684
    public void clear() {
5685
      setPurchaseIdIsSet(false);
5686
      this.purchaseId = 0;
5687
    }
5688
 
5689
    public long getPurchaseId() {
5690
      return this.purchaseId;
5691
    }
5692
 
5693
    public void setPurchaseId(long purchaseId) {
5694
      this.purchaseId = purchaseId;
5695
      setPurchaseIdIsSet(true);
5696
    }
5697
 
5698
    public void unsetPurchaseId() {
5699
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
5700
    }
5701
 
5702
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
5703
    public boolean isSetPurchaseId() {
5704
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
5705
    }
5706
 
5707
    public void setPurchaseIdIsSet(boolean value) {
5708
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
5709
    }
5710
 
5711
    public void setFieldValue(_Fields field, Object value) {
5712
      switch (field) {
5713
      case PURCHASE_ID:
5714
        if (value == null) {
5715
          unsetPurchaseId();
5716
        } else {
5717
          setPurchaseId((Long)value);
5718
        }
5719
        break;
5720
 
5721
      }
5722
    }
5723
 
5724
    public Object getFieldValue(_Fields field) {
5725
      switch (field) {
5726
      case PURCHASE_ID:
5727
        return Long.valueOf(getPurchaseId());
5728
 
5729
      }
5730
      throw new IllegalStateException();
5731
    }
5732
 
5733
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5734
    public boolean isSet(_Fields field) {
5735
      if (field == null) {
5736
        throw new IllegalArgumentException();
5737
      }
5738
 
5739
      switch (field) {
5740
      case PURCHASE_ID:
5741
        return isSetPurchaseId();
5742
      }
5743
      throw new IllegalStateException();
5744
    }
5745
 
5746
    @Override
5747
    public boolean equals(Object that) {
5748
      if (that == null)
5749
        return false;
5750
      if (that instanceof closePurchase_args)
5751
        return this.equals((closePurchase_args)that);
5752
      return false;
5753
    }
5754
 
5755
    public boolean equals(closePurchase_args that) {
5756
      if (that == null)
5757
        return false;
5758
 
5759
      boolean this_present_purchaseId = true;
5760
      boolean that_present_purchaseId = true;
5761
      if (this_present_purchaseId || that_present_purchaseId) {
5762
        if (!(this_present_purchaseId && that_present_purchaseId))
5763
          return false;
5764
        if (this.purchaseId != that.purchaseId)
5765
          return false;
5766
      }
5767
 
5768
      return true;
5769
    }
5770
 
5771
    @Override
5772
    public int hashCode() {
5773
      return 0;
5774
    }
5775
 
5776
    public int compareTo(closePurchase_args other) {
5777
      if (!getClass().equals(other.getClass())) {
5778
        return getClass().getName().compareTo(other.getClass().getName());
5779
      }
5780
 
5781
      int lastComparison = 0;
5782
      closePurchase_args typedOther = (closePurchase_args)other;
5783
 
5784
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
5785
      if (lastComparison != 0) {
5786
        return lastComparison;
5787
      }
5788
      if (isSetPurchaseId()) {
5789
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
5790
        if (lastComparison != 0) {
5791
          return lastComparison;
5792
        }
5793
      }
5794
      return 0;
5795
    }
5796
 
5797
    public _Fields fieldForId(int fieldId) {
5798
      return _Fields.findByThriftId(fieldId);
5799
    }
5800
 
5801
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5802
      org.apache.thrift.protocol.TField field;
5803
      iprot.readStructBegin();
5804
      while (true)
5805
      {
5806
        field = iprot.readFieldBegin();
5807
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5808
          break;
5809
        }
5810
        switch (field.id) {
5811
          case 1: // PURCHASE_ID
5812
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5813
              this.purchaseId = iprot.readI64();
5814
              setPurchaseIdIsSet(true);
5815
            } else { 
5816
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5817
            }
5818
            break;
5819
          default:
5820
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5821
        }
5822
        iprot.readFieldEnd();
5823
      }
5824
      iprot.readStructEnd();
5825
      validate();
5826
    }
5827
 
5828
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5829
      validate();
5830
 
5831
      oprot.writeStructBegin(STRUCT_DESC);
5832
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
5833
      oprot.writeI64(this.purchaseId);
5834
      oprot.writeFieldEnd();
5835
      oprot.writeFieldStop();
5836
      oprot.writeStructEnd();
5837
    }
5838
 
5839
    @Override
5840
    public String toString() {
5841
      StringBuilder sb = new StringBuilder("closePurchase_args(");
5842
      boolean first = true;
5843
 
5844
      sb.append("purchaseId:");
5845
      sb.append(this.purchaseId);
5846
      first = false;
5847
      sb.append(")");
5848
      return sb.toString();
5849
    }
5850
 
5851
    public void validate() throws org.apache.thrift.TException {
5852
      // check for required fields
5853
    }
5854
 
5855
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5856
      try {
5857
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5858
      } catch (org.apache.thrift.TException te) {
5859
        throw new java.io.IOException(te);
5860
      }
5861
    }
5862
 
5863
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5864
      try {
5865
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5866
      } catch (org.apache.thrift.TException te) {
5867
        throw new java.io.IOException(te);
5868
      }
5869
    }
5870
 
5871
  }
5872
 
5873
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
5874
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
5875
 
5876
    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);
5877
    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);
5878
 
5879
    private long success; // required
5880
    private PurchaseServiceException e; // required
5881
 
5882
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5883
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5884
      SUCCESS((short)0, "success"),
5885
      E((short)1, "e");
5886
 
5887
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5888
 
5889
      static {
5890
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5891
          byName.put(field.getFieldName(), field);
5892
        }
5893
      }
5894
 
5895
      /**
5896
       * Find the _Fields constant that matches fieldId, or null if its not found.
5897
       */
5898
      public static _Fields findByThriftId(int fieldId) {
5899
        switch(fieldId) {
5900
          case 0: // SUCCESS
5901
            return SUCCESS;
5902
          case 1: // E
5903
            return E;
5904
          default:
5905
            return null;
5906
        }
5907
      }
5908
 
5909
      /**
5910
       * Find the _Fields constant that matches fieldId, throwing an exception
5911
       * if it is not found.
5912
       */
5913
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5914
        _Fields fields = findByThriftId(fieldId);
5915
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5916
        return fields;
5917
      }
5918
 
5919
      /**
5920
       * Find the _Fields constant that matches name, or null if its not found.
5921
       */
5922
      public static _Fields findByName(String name) {
5923
        return byName.get(name);
5924
      }
5925
 
5926
      private final short _thriftId;
5927
      private final String _fieldName;
5928
 
5929
      _Fields(short thriftId, String fieldName) {
5930
        _thriftId = thriftId;
5931
        _fieldName = fieldName;
5932
      }
5933
 
5934
      public short getThriftFieldId() {
5935
        return _thriftId;
5936
      }
5937
 
5938
      public String getFieldName() {
5939
        return _fieldName;
5940
      }
5941
    }
5942
 
5943
    // isset id assignments
5944
    private static final int __SUCCESS_ISSET_ID = 0;
5945
    private BitSet __isset_bit_vector = new BitSet(1);
5946
 
5947
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5948
    static {
5949
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5950
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5951
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5952
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5953
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5954
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5955
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
5956
    }
5957
 
5958
    public closePurchase_result() {
5959
    }
5960
 
5961
    public closePurchase_result(
5962
      long success,
5963
      PurchaseServiceException e)
5964
    {
5965
      this();
5966
      this.success = success;
5967
      setSuccessIsSet(true);
5968
      this.e = e;
5969
    }
5970
 
5971
    /**
5972
     * Performs a deep copy on <i>other</i>.
5973
     */
5974
    public closePurchase_result(closePurchase_result other) {
5975
      __isset_bit_vector.clear();
5976
      __isset_bit_vector.or(other.__isset_bit_vector);
5977
      this.success = other.success;
5978
      if (other.isSetE()) {
5979
        this.e = new PurchaseServiceException(other.e);
5980
      }
5981
    }
5982
 
5983
    public closePurchase_result deepCopy() {
5984
      return new closePurchase_result(this);
5985
    }
5986
 
5987
    @Override
5988
    public void clear() {
5989
      setSuccessIsSet(false);
5990
      this.success = 0;
5991
      this.e = null;
5992
    }
5993
 
5994
    public long getSuccess() {
5995
      return this.success;
5996
    }
5997
 
5998
    public void setSuccess(long success) {
5999
      this.success = success;
6000
      setSuccessIsSet(true);
6001
    }
6002
 
6003
    public void unsetSuccess() {
6004
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6005
    }
6006
 
6007
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6008
    public boolean isSetSuccess() {
6009
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6010
    }
6011
 
6012
    public void setSuccessIsSet(boolean value) {
6013
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6014
    }
6015
 
6016
    public PurchaseServiceException getE() {
6017
      return this.e;
6018
    }
6019
 
6020
    public void setE(PurchaseServiceException e) {
6021
      this.e = e;
6022
    }
6023
 
6024
    public void unsetE() {
6025
      this.e = null;
6026
    }
6027
 
6028
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6029
    public boolean isSetE() {
6030
      return this.e != null;
6031
    }
6032
 
6033
    public void setEIsSet(boolean value) {
6034
      if (!value) {
6035
        this.e = null;
6036
      }
6037
    }
6038
 
6039
    public void setFieldValue(_Fields field, Object value) {
6040
      switch (field) {
6041
      case SUCCESS:
6042
        if (value == null) {
6043
          unsetSuccess();
6044
        } else {
6045
          setSuccess((Long)value);
6046
        }
6047
        break;
6048
 
6049
      case E:
6050
        if (value == null) {
6051
          unsetE();
6052
        } else {
6053
          setE((PurchaseServiceException)value);
6054
        }
6055
        break;
6056
 
6057
      }
6058
    }
6059
 
6060
    public Object getFieldValue(_Fields field) {
6061
      switch (field) {
6062
      case SUCCESS:
6063
        return Long.valueOf(getSuccess());
6064
 
6065
      case E:
6066
        return getE();
6067
 
6068
      }
6069
      throw new IllegalStateException();
6070
    }
6071
 
6072
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6073
    public boolean isSet(_Fields field) {
6074
      if (field == null) {
6075
        throw new IllegalArgumentException();
6076
      }
6077
 
6078
      switch (field) {
6079
      case SUCCESS:
6080
        return isSetSuccess();
6081
      case E:
6082
        return isSetE();
6083
      }
6084
      throw new IllegalStateException();
6085
    }
6086
 
6087
    @Override
6088
    public boolean equals(Object that) {
6089
      if (that == null)
6090
        return false;
6091
      if (that instanceof closePurchase_result)
6092
        return this.equals((closePurchase_result)that);
6093
      return false;
6094
    }
6095
 
6096
    public boolean equals(closePurchase_result that) {
6097
      if (that == null)
6098
        return false;
6099
 
6100
      boolean this_present_success = true;
6101
      boolean that_present_success = true;
6102
      if (this_present_success || that_present_success) {
6103
        if (!(this_present_success && that_present_success))
6104
          return false;
6105
        if (this.success != that.success)
6106
          return false;
6107
      }
6108
 
6109
      boolean this_present_e = true && this.isSetE();
6110
      boolean that_present_e = true && that.isSetE();
6111
      if (this_present_e || that_present_e) {
6112
        if (!(this_present_e && that_present_e))
6113
          return false;
6114
        if (!this.e.equals(that.e))
6115
          return false;
6116
      }
6117
 
6118
      return true;
6119
    }
6120
 
6121
    @Override
6122
    public int hashCode() {
6123
      return 0;
6124
    }
6125
 
6126
    public int compareTo(closePurchase_result other) {
6127
      if (!getClass().equals(other.getClass())) {
6128
        return getClass().getName().compareTo(other.getClass().getName());
6129
      }
6130
 
6131
      int lastComparison = 0;
6132
      closePurchase_result typedOther = (closePurchase_result)other;
6133
 
6134
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6135
      if (lastComparison != 0) {
6136
        return lastComparison;
6137
      }
6138
      if (isSetSuccess()) {
6139
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6140
        if (lastComparison != 0) {
6141
          return lastComparison;
6142
        }
6143
      }
6144
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6145
      if (lastComparison != 0) {
6146
        return lastComparison;
6147
      }
6148
      if (isSetE()) {
6149
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6150
        if (lastComparison != 0) {
6151
          return lastComparison;
6152
        }
6153
      }
6154
      return 0;
6155
    }
6156
 
6157
    public _Fields fieldForId(int fieldId) {
6158
      return _Fields.findByThriftId(fieldId);
6159
    }
6160
 
6161
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6162
      org.apache.thrift.protocol.TField field;
6163
      iprot.readStructBegin();
6164
      while (true)
6165
      {
6166
        field = iprot.readFieldBegin();
6167
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6168
          break;
6169
        }
6170
        switch (field.id) {
6171
          case 0: // SUCCESS
6172
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6173
              this.success = iprot.readI64();
6174
              setSuccessIsSet(true);
6175
            } else { 
6176
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6177
            }
6178
            break;
6179
          case 1: // E
6180
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6181
              this.e = new PurchaseServiceException();
6182
              this.e.read(iprot);
6183
            } else { 
6184
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6185
            }
6186
            break;
6187
          default:
6188
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6189
        }
6190
        iprot.readFieldEnd();
6191
      }
6192
      iprot.readStructEnd();
6193
      validate();
6194
    }
6195
 
6196
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6197
      oprot.writeStructBegin(STRUCT_DESC);
6198
 
6199
      if (this.isSetSuccess()) {
6200
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6201
        oprot.writeI64(this.success);
6202
        oprot.writeFieldEnd();
6203
      } else if (this.isSetE()) {
6204
        oprot.writeFieldBegin(E_FIELD_DESC);
6205
        this.e.write(oprot);
6206
        oprot.writeFieldEnd();
6207
      }
6208
      oprot.writeFieldStop();
6209
      oprot.writeStructEnd();
6210
    }
6211
 
6212
    @Override
6213
    public String toString() {
6214
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6215
      boolean first = true;
6216
 
6217
      sb.append("success:");
6218
      sb.append(this.success);
6219
      first = false;
6220
      if (!first) sb.append(", ");
6221
      sb.append("e:");
6222
      if (this.e == null) {
6223
        sb.append("null");
6224
      } else {
6225
        sb.append(this.e);
6226
      }
6227
      first = false;
6228
      sb.append(")");
6229
      return sb.toString();
6230
    }
6231
 
6232
    public void validate() throws org.apache.thrift.TException {
6233
      // check for required fields
6234
    }
6235
 
6236
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6237
      try {
6238
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6239
      } catch (org.apache.thrift.TException te) {
6240
        throw new java.io.IOException(te);
6241
      }
6242
    }
6243
 
6244
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6245
      try {
6246
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6247
      } catch (org.apache.thrift.TException te) {
6248
        throw new java.io.IOException(te);
6249
      }
6250
    }
6251
 
6252
  }
6253
 
6254
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6255
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6256
 
6257
    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);
6258
    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);
6259
 
6260
    private long purchaseOrderId; // required
6261
    private boolean open; // required
6262
 
6263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6264
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6265
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6266
      OPEN((short)2, "open");
6267
 
6268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6269
 
6270
      static {
6271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6272
          byName.put(field.getFieldName(), field);
6273
        }
6274
      }
6275
 
6276
      /**
6277
       * Find the _Fields constant that matches fieldId, or null if its not found.
6278
       */
6279
      public static _Fields findByThriftId(int fieldId) {
6280
        switch(fieldId) {
6281
          case 1: // PURCHASE_ORDER_ID
6282
            return PURCHASE_ORDER_ID;
6283
          case 2: // OPEN
6284
            return OPEN;
6285
          default:
6286
            return null;
6287
        }
6288
      }
6289
 
6290
      /**
6291
       * Find the _Fields constant that matches fieldId, throwing an exception
6292
       * if it is not found.
6293
       */
6294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6295
        _Fields fields = findByThriftId(fieldId);
6296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6297
        return fields;
6298
      }
6299
 
6300
      /**
6301
       * Find the _Fields constant that matches name, or null if its not found.
6302
       */
6303
      public static _Fields findByName(String name) {
6304
        return byName.get(name);
6305
      }
6306
 
6307
      private final short _thriftId;
6308
      private final String _fieldName;
6309
 
6310
      _Fields(short thriftId, String fieldName) {
6311
        _thriftId = thriftId;
6312
        _fieldName = fieldName;
6313
      }
6314
 
6315
      public short getThriftFieldId() {
6316
        return _thriftId;
6317
      }
6318
 
6319
      public String getFieldName() {
6320
        return _fieldName;
6321
      }
6322
    }
6323
 
6324
    // isset id assignments
6325
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6326
    private static final int __OPEN_ISSET_ID = 1;
6327
    private BitSet __isset_bit_vector = new BitSet(2);
6328
 
6329
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6330
    static {
6331
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6332
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6333
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6334
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6335
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6336
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6337
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6338
    }
6339
 
6340
    public getAllPurchases_args() {
6341
    }
6342
 
6343
    public getAllPurchases_args(
6344
      long purchaseOrderId,
6345
      boolean open)
6346
    {
6347
      this();
6348
      this.purchaseOrderId = purchaseOrderId;
6349
      setPurchaseOrderIdIsSet(true);
6350
      this.open = open;
6351
      setOpenIsSet(true);
6352
    }
6353
 
6354
    /**
6355
     * Performs a deep copy on <i>other</i>.
6356
     */
6357
    public getAllPurchases_args(getAllPurchases_args other) {
6358
      __isset_bit_vector.clear();
6359
      __isset_bit_vector.or(other.__isset_bit_vector);
6360
      this.purchaseOrderId = other.purchaseOrderId;
6361
      this.open = other.open;
6362
    }
6363
 
6364
    public getAllPurchases_args deepCopy() {
6365
      return new getAllPurchases_args(this);
6366
    }
6367
 
6368
    @Override
6369
    public void clear() {
6370
      setPurchaseOrderIdIsSet(false);
6371
      this.purchaseOrderId = 0;
6372
      setOpenIsSet(false);
6373
      this.open = false;
6374
    }
6375
 
6376
    public long getPurchaseOrderId() {
6377
      return this.purchaseOrderId;
6378
    }
6379
 
6380
    public void setPurchaseOrderId(long purchaseOrderId) {
6381
      this.purchaseOrderId = purchaseOrderId;
6382
      setPurchaseOrderIdIsSet(true);
6383
    }
6384
 
6385
    public void unsetPurchaseOrderId() {
6386
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
6387
    }
6388
 
6389
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
6390
    public boolean isSetPurchaseOrderId() {
6391
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
6392
    }
6393
 
6394
    public void setPurchaseOrderIdIsSet(boolean value) {
6395
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
6396
    }
6397
 
6398
    public boolean isOpen() {
6399
      return this.open;
6400
    }
6401
 
6402
    public void setOpen(boolean open) {
6403
      this.open = open;
6404
      setOpenIsSet(true);
6405
    }
6406
 
6407
    public void unsetOpen() {
6408
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6409
    }
6410
 
6411
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6412
    public boolean isSetOpen() {
6413
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6414
    }
6415
 
6416
    public void setOpenIsSet(boolean value) {
6417
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6418
    }
6419
 
6420
    public void setFieldValue(_Fields field, Object value) {
6421
      switch (field) {
6422
      case PURCHASE_ORDER_ID:
6423
        if (value == null) {
6424
          unsetPurchaseOrderId();
6425
        } else {
6426
          setPurchaseOrderId((Long)value);
6427
        }
6428
        break;
6429
 
6430
      case OPEN:
6431
        if (value == null) {
6432
          unsetOpen();
6433
        } else {
6434
          setOpen((Boolean)value);
6435
        }
6436
        break;
6437
 
6438
      }
6439
    }
6440
 
6441
    public Object getFieldValue(_Fields field) {
6442
      switch (field) {
6443
      case PURCHASE_ORDER_ID:
6444
        return Long.valueOf(getPurchaseOrderId());
6445
 
6446
      case OPEN:
6447
        return Boolean.valueOf(isOpen());
6448
 
6449
      }
6450
      throw new IllegalStateException();
6451
    }
6452
 
6453
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6454
    public boolean isSet(_Fields field) {
6455
      if (field == null) {
6456
        throw new IllegalArgumentException();
6457
      }
6458
 
6459
      switch (field) {
6460
      case PURCHASE_ORDER_ID:
6461
        return isSetPurchaseOrderId();
6462
      case OPEN:
6463
        return isSetOpen();
6464
      }
6465
      throw new IllegalStateException();
6466
    }
6467
 
6468
    @Override
6469
    public boolean equals(Object that) {
6470
      if (that == null)
6471
        return false;
6472
      if (that instanceof getAllPurchases_args)
6473
        return this.equals((getAllPurchases_args)that);
6474
      return false;
6475
    }
6476
 
6477
    public boolean equals(getAllPurchases_args that) {
6478
      if (that == null)
6479
        return false;
6480
 
6481
      boolean this_present_purchaseOrderId = true;
6482
      boolean that_present_purchaseOrderId = true;
6483
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6484
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6485
          return false;
6486
        if (this.purchaseOrderId != that.purchaseOrderId)
6487
          return false;
6488
      }
6489
 
6490
      boolean this_present_open = true;
6491
      boolean that_present_open = true;
6492
      if (this_present_open || that_present_open) {
6493
        if (!(this_present_open && that_present_open))
6494
          return false;
6495
        if (this.open != that.open)
6496
          return false;
6497
      }
6498
 
6499
      return true;
6500
    }
6501
 
6502
    @Override
6503
    public int hashCode() {
6504
      return 0;
6505
    }
6506
 
6507
    public int compareTo(getAllPurchases_args other) {
6508
      if (!getClass().equals(other.getClass())) {
6509
        return getClass().getName().compareTo(other.getClass().getName());
6510
      }
6511
 
6512
      int lastComparison = 0;
6513
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
6514
 
6515
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6516
      if (lastComparison != 0) {
6517
        return lastComparison;
6518
      }
6519
      if (isSetPurchaseOrderId()) {
6520
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6521
        if (lastComparison != 0) {
6522
          return lastComparison;
6523
        }
6524
      }
6525
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
6526
      if (lastComparison != 0) {
6527
        return lastComparison;
6528
      }
6529
      if (isSetOpen()) {
6530
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
6531
        if (lastComparison != 0) {
6532
          return lastComparison;
6533
        }
6534
      }
6535
      return 0;
6536
    }
6537
 
6538
    public _Fields fieldForId(int fieldId) {
6539
      return _Fields.findByThriftId(fieldId);
6540
    }
6541
 
6542
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6543
      org.apache.thrift.protocol.TField field;
6544
      iprot.readStructBegin();
6545
      while (true)
6546
      {
6547
        field = iprot.readFieldBegin();
6548
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6549
          break;
6550
        }
6551
        switch (field.id) {
6552
          case 1: // PURCHASE_ORDER_ID
6553
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6554
              this.purchaseOrderId = iprot.readI64();
6555
              setPurchaseOrderIdIsSet(true);
6556
            } else { 
6557
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6558
            }
6559
            break;
6560
          case 2: // OPEN
6561
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
6562
              this.open = iprot.readBool();
6563
              setOpenIsSet(true);
6564
            } else { 
6565
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6566
            }
6567
            break;
6568
          default:
6569
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6570
        }
6571
        iprot.readFieldEnd();
6572
      }
6573
      iprot.readStructEnd();
6574
      validate();
6575
    }
6576
 
6577
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6578
      validate();
6579
 
6580
      oprot.writeStructBegin(STRUCT_DESC);
6581
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6582
      oprot.writeI64(this.purchaseOrderId);
6583
      oprot.writeFieldEnd();
6584
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
6585
      oprot.writeBool(this.open);
6586
      oprot.writeFieldEnd();
6587
      oprot.writeFieldStop();
6588
      oprot.writeStructEnd();
6589
    }
6590
 
6591
    @Override
6592
    public String toString() {
6593
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
6594
      boolean first = true;
6595
 
6596
      sb.append("purchaseOrderId:");
6597
      sb.append(this.purchaseOrderId);
6598
      first = false;
6599
      if (!first) sb.append(", ");
6600
      sb.append("open:");
6601
      sb.append(this.open);
6602
      first = false;
6603
      sb.append(")");
6604
      return sb.toString();
6605
    }
6606
 
6607
    public void validate() throws org.apache.thrift.TException {
6608
      // check for required fields
6609
    }
6610
 
6611
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6612
      try {
6613
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6614
      } catch (org.apache.thrift.TException te) {
6615
        throw new java.io.IOException(te);
6616
      }
6617
    }
6618
 
6619
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6620
      try {
6621
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6622
      } catch (org.apache.thrift.TException te) {
6623
        throw new java.io.IOException(te);
6624
      }
6625
    }
6626
 
6627
  }
6628
 
6629
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
6630
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
6631
 
6632
    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);
6633
    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);
6634
 
6635
    private List<Purchase> success; // required
6636
    private PurchaseServiceException e; // required
6637
 
6638
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6639
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6640
      SUCCESS((short)0, "success"),
6641
      E((short)1, "e");
6642
 
6643
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6644
 
6645
      static {
6646
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6647
          byName.put(field.getFieldName(), field);
6648
        }
6649
      }
6650
 
6651
      /**
6652
       * Find the _Fields constant that matches fieldId, or null if its not found.
6653
       */
6654
      public static _Fields findByThriftId(int fieldId) {
6655
        switch(fieldId) {
6656
          case 0: // SUCCESS
6657
            return SUCCESS;
6658
          case 1: // E
6659
            return E;
6660
          default:
6661
            return null;
6662
        }
6663
      }
6664
 
6665
      /**
6666
       * Find the _Fields constant that matches fieldId, throwing an exception
6667
       * if it is not found.
6668
       */
6669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6670
        _Fields fields = findByThriftId(fieldId);
6671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6672
        return fields;
6673
      }
6674
 
6675
      /**
6676
       * Find the _Fields constant that matches name, or null if its not found.
6677
       */
6678
      public static _Fields findByName(String name) {
6679
        return byName.get(name);
6680
      }
6681
 
6682
      private final short _thriftId;
6683
      private final String _fieldName;
6684
 
6685
      _Fields(short thriftId, String fieldName) {
6686
        _thriftId = thriftId;
6687
        _fieldName = fieldName;
6688
      }
6689
 
6690
      public short getThriftFieldId() {
6691
        return _thriftId;
6692
      }
6693
 
6694
      public String getFieldName() {
6695
        return _fieldName;
6696
      }
6697
    }
6698
 
6699
    // isset id assignments
6700
 
6701
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6702
    static {
6703
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6704
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6705
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6706
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
6707
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6708
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6709
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6710
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
6711
    }
6712
 
6713
    public getAllPurchases_result() {
6714
    }
6715
 
6716
    public getAllPurchases_result(
6717
      List<Purchase> success,
6718
      PurchaseServiceException e)
6719
    {
6720
      this();
6721
      this.success = success;
6722
      this.e = e;
6723
    }
6724
 
6725
    /**
6726
     * Performs a deep copy on <i>other</i>.
6727
     */
6728
    public getAllPurchases_result(getAllPurchases_result other) {
6729
      if (other.isSetSuccess()) {
6730
        List<Purchase> __this__success = new ArrayList<Purchase>();
6731
        for (Purchase other_element : other.success) {
6732
          __this__success.add(new Purchase(other_element));
6733
        }
6734
        this.success = __this__success;
6735
      }
6736
      if (other.isSetE()) {
6737
        this.e = new PurchaseServiceException(other.e);
6738
      }
6739
    }
6740
 
6741
    public getAllPurchases_result deepCopy() {
6742
      return new getAllPurchases_result(this);
6743
    }
6744
 
6745
    @Override
6746
    public void clear() {
6747
      this.success = null;
6748
      this.e = null;
6749
    }
6750
 
6751
    public int getSuccessSize() {
6752
      return (this.success == null) ? 0 : this.success.size();
6753
    }
6754
 
6755
    public java.util.Iterator<Purchase> getSuccessIterator() {
6756
      return (this.success == null) ? null : this.success.iterator();
6757
    }
6758
 
6759
    public void addToSuccess(Purchase elem) {
6760
      if (this.success == null) {
6761
        this.success = new ArrayList<Purchase>();
6762
      }
6763
      this.success.add(elem);
6764
    }
6765
 
6766
    public List<Purchase> getSuccess() {
6767
      return this.success;
6768
    }
6769
 
6770
    public void setSuccess(List<Purchase> success) {
6771
      this.success = success;
6772
    }
6773
 
6774
    public void unsetSuccess() {
6775
      this.success = null;
6776
    }
6777
 
6778
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6779
    public boolean isSetSuccess() {
6780
      return this.success != null;
6781
    }
6782
 
6783
    public void setSuccessIsSet(boolean value) {
6784
      if (!value) {
6785
        this.success = null;
6786
      }
6787
    }
6788
 
6789
    public PurchaseServiceException getE() {
6790
      return this.e;
6791
    }
6792
 
6793
    public void setE(PurchaseServiceException e) {
6794
      this.e = e;
6795
    }
6796
 
6797
    public void unsetE() {
6798
      this.e = null;
6799
    }
6800
 
6801
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6802
    public boolean isSetE() {
6803
      return this.e != null;
6804
    }
6805
 
6806
    public void setEIsSet(boolean value) {
6807
      if (!value) {
6808
        this.e = null;
6809
      }
6810
    }
6811
 
6812
    public void setFieldValue(_Fields field, Object value) {
6813
      switch (field) {
6814
      case SUCCESS:
6815
        if (value == null) {
6816
          unsetSuccess();
6817
        } else {
6818
          setSuccess((List<Purchase>)value);
6819
        }
6820
        break;
6821
 
6822
      case E:
6823
        if (value == null) {
6824
          unsetE();
6825
        } else {
6826
          setE((PurchaseServiceException)value);
6827
        }
6828
        break;
6829
 
6830
      }
6831
    }
6832
 
6833
    public Object getFieldValue(_Fields field) {
6834
      switch (field) {
6835
      case SUCCESS:
6836
        return getSuccess();
6837
 
6838
      case E:
6839
        return getE();
6840
 
6841
      }
6842
      throw new IllegalStateException();
6843
    }
6844
 
6845
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6846
    public boolean isSet(_Fields field) {
6847
      if (field == null) {
6848
        throw new IllegalArgumentException();
6849
      }
6850
 
6851
      switch (field) {
6852
      case SUCCESS:
6853
        return isSetSuccess();
6854
      case E:
6855
        return isSetE();
6856
      }
6857
      throw new IllegalStateException();
6858
    }
6859
 
6860
    @Override
6861
    public boolean equals(Object that) {
6862
      if (that == null)
6863
        return false;
6864
      if (that instanceof getAllPurchases_result)
6865
        return this.equals((getAllPurchases_result)that);
6866
      return false;
6867
    }
6868
 
6869
    public boolean equals(getAllPurchases_result that) {
6870
      if (that == null)
6871
        return false;
6872
 
6873
      boolean this_present_success = true && this.isSetSuccess();
6874
      boolean that_present_success = true && that.isSetSuccess();
6875
      if (this_present_success || that_present_success) {
6876
        if (!(this_present_success && that_present_success))
6877
          return false;
6878
        if (!this.success.equals(that.success))
6879
          return false;
6880
      }
6881
 
6882
      boolean this_present_e = true && this.isSetE();
6883
      boolean that_present_e = true && that.isSetE();
6884
      if (this_present_e || that_present_e) {
6885
        if (!(this_present_e && that_present_e))
6886
          return false;
6887
        if (!this.e.equals(that.e))
6888
          return false;
6889
      }
6890
 
6891
      return true;
6892
    }
6893
 
6894
    @Override
6895
    public int hashCode() {
6896
      return 0;
6897
    }
6898
 
6899
    public int compareTo(getAllPurchases_result other) {
6900
      if (!getClass().equals(other.getClass())) {
6901
        return getClass().getName().compareTo(other.getClass().getName());
6902
      }
6903
 
6904
      int lastComparison = 0;
6905
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
6906
 
6907
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6908
      if (lastComparison != 0) {
6909
        return lastComparison;
6910
      }
6911
      if (isSetSuccess()) {
6912
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6913
        if (lastComparison != 0) {
6914
          return lastComparison;
6915
        }
6916
      }
6917
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6918
      if (lastComparison != 0) {
6919
        return lastComparison;
6920
      }
6921
      if (isSetE()) {
6922
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6923
        if (lastComparison != 0) {
6924
          return lastComparison;
6925
        }
6926
      }
6927
      return 0;
6928
    }
6929
 
6930
    public _Fields fieldForId(int fieldId) {
6931
      return _Fields.findByThriftId(fieldId);
6932
    }
6933
 
6934
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6935
      org.apache.thrift.protocol.TField field;
6936
      iprot.readStructBegin();
6937
      while (true)
6938
      {
6939
        field = iprot.readFieldBegin();
6940
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6941
          break;
6942
        }
6943
        switch (field.id) {
6944
          case 0: // SUCCESS
6945
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6946
              {
6947
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
6948
                this.success = new ArrayList<Purchase>(_list8.size);
6949
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
6950
                {
6951
                  Purchase _elem10; // required
6952
                  _elem10 = new Purchase();
6953
                  _elem10.read(iprot);
6954
                  this.success.add(_elem10);
6955
                }
6956
                iprot.readListEnd();
6957
              }
6958
            } else { 
6959
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6960
            }
6961
            break;
6962
          case 1: // E
6963
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6964
              this.e = new PurchaseServiceException();
6965
              this.e.read(iprot);
6966
            } else { 
6967
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6968
            }
6969
            break;
6970
          default:
6971
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6972
        }
6973
        iprot.readFieldEnd();
6974
      }
6975
      iprot.readStructEnd();
6976
      validate();
6977
    }
6978
 
6979
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6980
      oprot.writeStructBegin(STRUCT_DESC);
6981
 
6982
      if (this.isSetSuccess()) {
6983
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6984
        {
6985
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6986
          for (Purchase _iter11 : this.success)
6987
          {
6988
            _iter11.write(oprot);
6989
          }
6990
          oprot.writeListEnd();
6991
        }
6992
        oprot.writeFieldEnd();
6993
      } else if (this.isSetE()) {
6994
        oprot.writeFieldBegin(E_FIELD_DESC);
6995
        this.e.write(oprot);
6996
        oprot.writeFieldEnd();
6997
      }
6998
      oprot.writeFieldStop();
6999
      oprot.writeStructEnd();
7000
    }
7001
 
7002
    @Override
7003
    public String toString() {
7004
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
7005
      boolean first = true;
7006
 
7007
      sb.append("success:");
7008
      if (this.success == null) {
7009
        sb.append("null");
7010
      } else {
7011
        sb.append(this.success);
7012
      }
7013
      first = false;
7014
      if (!first) sb.append(", ");
7015
      sb.append("e:");
7016
      if (this.e == null) {
7017
        sb.append("null");
7018
      } else {
7019
        sb.append(this.e);
7020
      }
7021
      first = false;
7022
      sb.append(")");
7023
      return sb.toString();
7024
    }
7025
 
7026
    public void validate() throws org.apache.thrift.TException {
7027
      // check for required fields
7028
    }
7029
 
7030
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7031
      try {
7032
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7033
      } catch (org.apache.thrift.TException te) {
7034
        throw new java.io.IOException(te);
7035
      }
7036
    }
7037
 
7038
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7039
      try {
7040
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7041
      } catch (org.apache.thrift.TException te) {
7042
        throw new java.io.IOException(te);
7043
      }
7044
    }
7045
 
7046
  }
7047
 
6385 amar.kumar 7048
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
7049
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
7050
 
7051
    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);
7052
 
7053
    private long purchaseOrderId; // required
7054
 
7055
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7056
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7057
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
7058
 
7059
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7060
 
7061
      static {
7062
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7063
          byName.put(field.getFieldName(), field);
7064
        }
7065
      }
7066
 
7067
      /**
7068
       * Find the _Fields constant that matches fieldId, or null if its not found.
7069
       */
7070
      public static _Fields findByThriftId(int fieldId) {
7071
        switch(fieldId) {
7072
          case 1: // PURCHASE_ORDER_ID
7073
            return PURCHASE_ORDER_ID;
7074
          default:
7075
            return null;
7076
        }
7077
      }
7078
 
7079
      /**
7080
       * Find the _Fields constant that matches fieldId, throwing an exception
7081
       * if it is not found.
7082
       */
7083
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7084
        _Fields fields = findByThriftId(fieldId);
7085
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7086
        return fields;
7087
      }
7088
 
7089
      /**
7090
       * Find the _Fields constant that matches name, or null if its not found.
7091
       */
7092
      public static _Fields findByName(String name) {
7093
        return byName.get(name);
7094
      }
7095
 
7096
      private final short _thriftId;
7097
      private final String _fieldName;
7098
 
7099
      _Fields(short thriftId, String fieldName) {
7100
        _thriftId = thriftId;
7101
        _fieldName = fieldName;
7102
      }
7103
 
7104
      public short getThriftFieldId() {
7105
        return _thriftId;
7106
      }
7107
 
7108
      public String getFieldName() {
7109
        return _fieldName;
7110
      }
7111
    }
7112
 
7113
    // isset id assignments
7114
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7115
    private BitSet __isset_bit_vector = new BitSet(1);
7116
 
7117
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7118
    static {
7119
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7120
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7121
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7122
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7123
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7124
    }
7125
 
7126
    public getPurchasesForPO_args() {
7127
    }
7128
 
7129
    public getPurchasesForPO_args(
7130
      long purchaseOrderId)
7131
    {
7132
      this();
7133
      this.purchaseOrderId = purchaseOrderId;
7134
      setPurchaseOrderIdIsSet(true);
7135
    }
7136
 
7137
    /**
7138
     * Performs a deep copy on <i>other</i>.
7139
     */
7140
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7141
      __isset_bit_vector.clear();
7142
      __isset_bit_vector.or(other.__isset_bit_vector);
7143
      this.purchaseOrderId = other.purchaseOrderId;
7144
    }
7145
 
7146
    public getPurchasesForPO_args deepCopy() {
7147
      return new getPurchasesForPO_args(this);
7148
    }
7149
 
7150
    @Override
7151
    public void clear() {
7152
      setPurchaseOrderIdIsSet(false);
7153
      this.purchaseOrderId = 0;
7154
    }
7155
 
7156
    public long getPurchaseOrderId() {
7157
      return this.purchaseOrderId;
7158
    }
7159
 
7160
    public void setPurchaseOrderId(long purchaseOrderId) {
7161
      this.purchaseOrderId = purchaseOrderId;
7162
      setPurchaseOrderIdIsSet(true);
7163
    }
7164
 
7165
    public void unsetPurchaseOrderId() {
7166
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7167
    }
7168
 
7169
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7170
    public boolean isSetPurchaseOrderId() {
7171
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7172
    }
7173
 
7174
    public void setPurchaseOrderIdIsSet(boolean value) {
7175
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7176
    }
7177
 
7178
    public void setFieldValue(_Fields field, Object value) {
7179
      switch (field) {
7180
      case PURCHASE_ORDER_ID:
7181
        if (value == null) {
7182
          unsetPurchaseOrderId();
7183
        } else {
7184
          setPurchaseOrderId((Long)value);
7185
        }
7186
        break;
7187
 
7188
      }
7189
    }
7190
 
7191
    public Object getFieldValue(_Fields field) {
7192
      switch (field) {
7193
      case PURCHASE_ORDER_ID:
7194
        return Long.valueOf(getPurchaseOrderId());
7195
 
7196
      }
7197
      throw new IllegalStateException();
7198
    }
7199
 
7200
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7201
    public boolean isSet(_Fields field) {
7202
      if (field == null) {
7203
        throw new IllegalArgumentException();
7204
      }
7205
 
7206
      switch (field) {
7207
      case PURCHASE_ORDER_ID:
7208
        return isSetPurchaseOrderId();
7209
      }
7210
      throw new IllegalStateException();
7211
    }
7212
 
7213
    @Override
7214
    public boolean equals(Object that) {
7215
      if (that == null)
7216
        return false;
7217
      if (that instanceof getPurchasesForPO_args)
7218
        return this.equals((getPurchasesForPO_args)that);
7219
      return false;
7220
    }
7221
 
7222
    public boolean equals(getPurchasesForPO_args that) {
7223
      if (that == null)
7224
        return false;
7225
 
7226
      boolean this_present_purchaseOrderId = true;
7227
      boolean that_present_purchaseOrderId = true;
7228
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7229
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7230
          return false;
7231
        if (this.purchaseOrderId != that.purchaseOrderId)
7232
          return false;
7233
      }
7234
 
7235
      return true;
7236
    }
7237
 
7238
    @Override
7239
    public int hashCode() {
7240
      return 0;
7241
    }
7242
 
7243
    public int compareTo(getPurchasesForPO_args other) {
7244
      if (!getClass().equals(other.getClass())) {
7245
        return getClass().getName().compareTo(other.getClass().getName());
7246
      }
7247
 
7248
      int lastComparison = 0;
7249
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7250
 
7251
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7252
      if (lastComparison != 0) {
7253
        return lastComparison;
7254
      }
7255
      if (isSetPurchaseOrderId()) {
7256
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7257
        if (lastComparison != 0) {
7258
          return lastComparison;
7259
        }
7260
      }
7261
      return 0;
7262
    }
7263
 
7264
    public _Fields fieldForId(int fieldId) {
7265
      return _Fields.findByThriftId(fieldId);
7266
    }
7267
 
7268
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7269
      org.apache.thrift.protocol.TField field;
7270
      iprot.readStructBegin();
7271
      while (true)
7272
      {
7273
        field = iprot.readFieldBegin();
7274
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7275
          break;
7276
        }
7277
        switch (field.id) {
7278
          case 1: // PURCHASE_ORDER_ID
7279
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7280
              this.purchaseOrderId = iprot.readI64();
7281
              setPurchaseOrderIdIsSet(true);
7282
            } else { 
7283
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7284
            }
7285
            break;
7286
          default:
7287
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7288
        }
7289
        iprot.readFieldEnd();
7290
      }
7291
      iprot.readStructEnd();
7292
      validate();
7293
    }
7294
 
7295
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7296
      validate();
7297
 
7298
      oprot.writeStructBegin(STRUCT_DESC);
7299
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7300
      oprot.writeI64(this.purchaseOrderId);
7301
      oprot.writeFieldEnd();
7302
      oprot.writeFieldStop();
7303
      oprot.writeStructEnd();
7304
    }
7305
 
7306
    @Override
7307
    public String toString() {
7308
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7309
      boolean first = true;
7310
 
7311
      sb.append("purchaseOrderId:");
7312
      sb.append(this.purchaseOrderId);
7313
      first = false;
7314
      sb.append(")");
7315
      return sb.toString();
7316
    }
7317
 
7318
    public void validate() throws org.apache.thrift.TException {
7319
      // check for required fields
7320
    }
7321
 
7322
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7323
      try {
7324
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7325
      } catch (org.apache.thrift.TException te) {
7326
        throw new java.io.IOException(te);
7327
      }
7328
    }
7329
 
7330
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7331
      try {
7332
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7333
        __isset_bit_vector = new BitSet(1);
7334
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7335
      } catch (org.apache.thrift.TException te) {
7336
        throw new java.io.IOException(te);
7337
      }
7338
    }
7339
 
7340
  }
7341
 
7342
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7343
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7344
 
7345
    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);
7346
    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);
7347
 
7348
    private List<Purchase> success; // required
7349
    private PurchaseServiceException e; // required
7350
 
7351
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7352
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7353
      SUCCESS((short)0, "success"),
7354
      E((short)1, "e");
7355
 
7356
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7357
 
7358
      static {
7359
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7360
          byName.put(field.getFieldName(), field);
7361
        }
7362
      }
7363
 
7364
      /**
7365
       * Find the _Fields constant that matches fieldId, or null if its not found.
7366
       */
7367
      public static _Fields findByThriftId(int fieldId) {
7368
        switch(fieldId) {
7369
          case 0: // SUCCESS
7370
            return SUCCESS;
7371
          case 1: // E
7372
            return E;
7373
          default:
7374
            return null;
7375
        }
7376
      }
7377
 
7378
      /**
7379
       * Find the _Fields constant that matches fieldId, throwing an exception
7380
       * if it is not found.
7381
       */
7382
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7383
        _Fields fields = findByThriftId(fieldId);
7384
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7385
        return fields;
7386
      }
7387
 
7388
      /**
7389
       * Find the _Fields constant that matches name, or null if its not found.
7390
       */
7391
      public static _Fields findByName(String name) {
7392
        return byName.get(name);
7393
      }
7394
 
7395
      private final short _thriftId;
7396
      private final String _fieldName;
7397
 
7398
      _Fields(short thriftId, String fieldName) {
7399
        _thriftId = thriftId;
7400
        _fieldName = fieldName;
7401
      }
7402
 
7403
      public short getThriftFieldId() {
7404
        return _thriftId;
7405
      }
7406
 
7407
      public String getFieldName() {
7408
        return _fieldName;
7409
      }
7410
    }
7411
 
7412
    // isset id assignments
7413
 
7414
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7415
    static {
7416
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7417
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7418
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7419
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7420
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7421
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7422
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7423
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
7424
    }
7425
 
7426
    public getPurchasesForPO_result() {
7427
    }
7428
 
7429
    public getPurchasesForPO_result(
7430
      List<Purchase> success,
7431
      PurchaseServiceException e)
7432
    {
7433
      this();
7434
      this.success = success;
7435
      this.e = e;
7436
    }
7437
 
7438
    /**
7439
     * Performs a deep copy on <i>other</i>.
7440
     */
7441
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
7442
      if (other.isSetSuccess()) {
7443
        List<Purchase> __this__success = new ArrayList<Purchase>();
7444
        for (Purchase other_element : other.success) {
7445
          __this__success.add(new Purchase(other_element));
7446
        }
7447
        this.success = __this__success;
7448
      }
7449
      if (other.isSetE()) {
7450
        this.e = new PurchaseServiceException(other.e);
7451
      }
7452
    }
7453
 
7454
    public getPurchasesForPO_result deepCopy() {
7455
      return new getPurchasesForPO_result(this);
7456
    }
7457
 
7458
    @Override
7459
    public void clear() {
7460
      this.success = null;
7461
      this.e = null;
7462
    }
7463
 
7464
    public int getSuccessSize() {
7465
      return (this.success == null) ? 0 : this.success.size();
7466
    }
7467
 
7468
    public java.util.Iterator<Purchase> getSuccessIterator() {
7469
      return (this.success == null) ? null : this.success.iterator();
7470
    }
7471
 
7472
    public void addToSuccess(Purchase elem) {
7473
      if (this.success == null) {
7474
        this.success = new ArrayList<Purchase>();
7475
      }
7476
      this.success.add(elem);
7477
    }
7478
 
7479
    public List<Purchase> getSuccess() {
7480
      return this.success;
7481
    }
7482
 
7483
    public void setSuccess(List<Purchase> success) {
7484
      this.success = success;
7485
    }
7486
 
7487
    public void unsetSuccess() {
7488
      this.success = null;
7489
    }
7490
 
7491
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7492
    public boolean isSetSuccess() {
7493
      return this.success != null;
7494
    }
7495
 
7496
    public void setSuccessIsSet(boolean value) {
7497
      if (!value) {
7498
        this.success = null;
7499
      }
7500
    }
7501
 
7502
    public PurchaseServiceException getE() {
7503
      return this.e;
7504
    }
7505
 
7506
    public void setE(PurchaseServiceException e) {
7507
      this.e = e;
7508
    }
7509
 
7510
    public void unsetE() {
7511
      this.e = null;
7512
    }
7513
 
7514
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7515
    public boolean isSetE() {
7516
      return this.e != null;
7517
    }
7518
 
7519
    public void setEIsSet(boolean value) {
7520
      if (!value) {
7521
        this.e = null;
7522
      }
7523
    }
7524
 
7525
    public void setFieldValue(_Fields field, Object value) {
7526
      switch (field) {
7527
      case SUCCESS:
7528
        if (value == null) {
7529
          unsetSuccess();
7530
        } else {
7531
          setSuccess((List<Purchase>)value);
7532
        }
7533
        break;
7534
 
7535
      case E:
7536
        if (value == null) {
7537
          unsetE();
7538
        } else {
7539
          setE((PurchaseServiceException)value);
7540
        }
7541
        break;
7542
 
7543
      }
7544
    }
7545
 
7546
    public Object getFieldValue(_Fields field) {
7547
      switch (field) {
7548
      case SUCCESS:
7549
        return getSuccess();
7550
 
7551
      case E:
7552
        return getE();
7553
 
7554
      }
7555
      throw new IllegalStateException();
7556
    }
7557
 
7558
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7559
    public boolean isSet(_Fields field) {
7560
      if (field == null) {
7561
        throw new IllegalArgumentException();
7562
      }
7563
 
7564
      switch (field) {
7565
      case SUCCESS:
7566
        return isSetSuccess();
7567
      case E:
7568
        return isSetE();
7569
      }
7570
      throw new IllegalStateException();
7571
    }
7572
 
7573
    @Override
7574
    public boolean equals(Object that) {
7575
      if (that == null)
7576
        return false;
7577
      if (that instanceof getPurchasesForPO_result)
7578
        return this.equals((getPurchasesForPO_result)that);
7579
      return false;
7580
    }
7581
 
7582
    public boolean equals(getPurchasesForPO_result that) {
7583
      if (that == null)
7584
        return false;
7585
 
7586
      boolean this_present_success = true && this.isSetSuccess();
7587
      boolean that_present_success = true && that.isSetSuccess();
7588
      if (this_present_success || that_present_success) {
7589
        if (!(this_present_success && that_present_success))
7590
          return false;
7591
        if (!this.success.equals(that.success))
7592
          return false;
7593
      }
7594
 
7595
      boolean this_present_e = true && this.isSetE();
7596
      boolean that_present_e = true && that.isSetE();
7597
      if (this_present_e || that_present_e) {
7598
        if (!(this_present_e && that_present_e))
7599
          return false;
7600
        if (!this.e.equals(that.e))
7601
          return false;
7602
      }
7603
 
7604
      return true;
7605
    }
7606
 
7607
    @Override
7608
    public int hashCode() {
7609
      return 0;
7610
    }
7611
 
7612
    public int compareTo(getPurchasesForPO_result other) {
7613
      if (!getClass().equals(other.getClass())) {
7614
        return getClass().getName().compareTo(other.getClass().getName());
7615
      }
7616
 
7617
      int lastComparison = 0;
7618
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
7619
 
7620
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7621
      if (lastComparison != 0) {
7622
        return lastComparison;
7623
      }
7624
      if (isSetSuccess()) {
7625
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7626
        if (lastComparison != 0) {
7627
          return lastComparison;
7628
        }
7629
      }
7630
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7631
      if (lastComparison != 0) {
7632
        return lastComparison;
7633
      }
7634
      if (isSetE()) {
7635
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7636
        if (lastComparison != 0) {
7637
          return lastComparison;
7638
        }
7639
      }
7640
      return 0;
7641
    }
7642
 
7643
    public _Fields fieldForId(int fieldId) {
7644
      return _Fields.findByThriftId(fieldId);
7645
    }
7646
 
7647
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7648
      org.apache.thrift.protocol.TField field;
7649
      iprot.readStructBegin();
7650
      while (true)
7651
      {
7652
        field = iprot.readFieldBegin();
7653
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7654
          break;
7655
        }
7656
        switch (field.id) {
7657
          case 0: // SUCCESS
7658
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7659
              {
7660
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
7661
                this.success = new ArrayList<Purchase>(_list12.size);
7662
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
7663
                {
7664
                  Purchase _elem14; // required
7665
                  _elem14 = new Purchase();
7666
                  _elem14.read(iprot);
7667
                  this.success.add(_elem14);
7668
                }
7669
                iprot.readListEnd();
7670
              }
7671
            } else { 
7672
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7673
            }
7674
            break;
7675
          case 1: // E
7676
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7677
              this.e = new PurchaseServiceException();
7678
              this.e.read(iprot);
7679
            } else { 
7680
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7681
            }
7682
            break;
7683
          default:
7684
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7685
        }
7686
        iprot.readFieldEnd();
7687
      }
7688
      iprot.readStructEnd();
7689
      validate();
7690
    }
7691
 
7692
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7693
      oprot.writeStructBegin(STRUCT_DESC);
7694
 
7695
      if (this.isSetSuccess()) {
7696
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7697
        {
7698
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7699
          for (Purchase _iter15 : this.success)
7700
          {
7701
            _iter15.write(oprot);
7702
          }
7703
          oprot.writeListEnd();
7704
        }
7705
        oprot.writeFieldEnd();
7706
      } else if (this.isSetE()) {
7707
        oprot.writeFieldBegin(E_FIELD_DESC);
7708
        this.e.write(oprot);
7709
        oprot.writeFieldEnd();
7710
      }
7711
      oprot.writeFieldStop();
7712
      oprot.writeStructEnd();
7713
    }
7714
 
7715
    @Override
7716
    public String toString() {
7717
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
7718
      boolean first = true;
7719
 
7720
      sb.append("success:");
7721
      if (this.success == null) {
7722
        sb.append("null");
7723
      } else {
7724
        sb.append(this.success);
7725
      }
7726
      first = false;
7727
      if (!first) sb.append(", ");
7728
      sb.append("e:");
7729
      if (this.e == null) {
7730
        sb.append("null");
7731
      } else {
7732
        sb.append(this.e);
7733
      }
7734
      first = false;
7735
      sb.append(")");
7736
      return sb.toString();
7737
    }
7738
 
7739
    public void validate() throws org.apache.thrift.TException {
7740
      // check for required fields
7741
    }
7742
 
7743
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7744
      try {
7745
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7746
      } catch (org.apache.thrift.TException te) {
7747
        throw new java.io.IOException(te);
7748
      }
7749
    }
7750
 
7751
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7752
      try {
7753
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7754
      } catch (org.apache.thrift.TException te) {
7755
        throw new java.io.IOException(te);
7756
      }
7757
    }
7758
 
7759
  }
7760
 
4555 mandeep.dh 7761
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
7762
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 7763
 
7764
    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);
7765
 
7766
    private long purchaseId; // required
7767
 
7768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7769
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 7770
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 7771
 
7772
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7773
 
7774
      static {
7775
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7776
          byName.put(field.getFieldName(), field);
7777
        }
7778
      }
7779
 
7780
      /**
7781
       * Find the _Fields constant that matches fieldId, or null if its not found.
7782
       */
7783
      public static _Fields findByThriftId(int fieldId) {
7784
        switch(fieldId) {
7785
          case 1: // PURCHASE_ID
7786
            return PURCHASE_ID;
7787
          default:
7788
            return null;
7789
        }
7790
      }
7791
 
7792
      /**
7793
       * Find the _Fields constant that matches fieldId, throwing an exception
7794
       * if it is not found.
7795
       */
7796
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7797
        _Fields fields = findByThriftId(fieldId);
7798
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7799
        return fields;
7800
      }
7801
 
7802
      /**
7803
       * Find the _Fields constant that matches name, or null if its not found.
7804
       */
7805
      public static _Fields findByName(String name) {
7806
        return byName.get(name);
7807
      }
7808
 
7809
      private final short _thriftId;
7810
      private final String _fieldName;
7811
 
7812
      _Fields(short thriftId, String fieldName) {
7813
        _thriftId = thriftId;
7814
        _fieldName = fieldName;
7815
      }
7816
 
7817
      public short getThriftFieldId() {
7818
        return _thriftId;
7819
      }
7820
 
7821
      public String getFieldName() {
7822
        return _fieldName;
7823
      }
7824
    }
7825
 
7826
    // isset id assignments
7827
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 7828
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 7829
 
7830
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7831
    static {
7832
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7833
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7834
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7835
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 7836
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 7837
    }
7838
 
4555 mandeep.dh 7839
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 7840
    }
7841
 
4555 mandeep.dh 7842
    public getPurchaseOrderForPurchase_args(
7843
      long purchaseId)
4496 mandeep.dh 7844
    {
7845
      this();
7846
      this.purchaseId = purchaseId;
7847
      setPurchaseIdIsSet(true);
7848
    }
7849
 
7850
    /**
7851
     * Performs a deep copy on <i>other</i>.
7852
     */
4555 mandeep.dh 7853
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 7854
      __isset_bit_vector.clear();
7855
      __isset_bit_vector.or(other.__isset_bit_vector);
7856
      this.purchaseId = other.purchaseId;
7857
    }
7858
 
4555 mandeep.dh 7859
    public getPurchaseOrderForPurchase_args deepCopy() {
7860
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 7861
    }
7862
 
7863
    @Override
7864
    public void clear() {
7865
      setPurchaseIdIsSet(false);
7866
      this.purchaseId = 0;
7867
    }
7868
 
7869
    public long getPurchaseId() {
7870
      return this.purchaseId;
7871
    }
7872
 
7873
    public void setPurchaseId(long purchaseId) {
7874
      this.purchaseId = purchaseId;
7875
      setPurchaseIdIsSet(true);
7876
    }
7877
 
7878
    public void unsetPurchaseId() {
7879
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
7880
    }
7881
 
7882
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
7883
    public boolean isSetPurchaseId() {
7884
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
7885
    }
7886
 
7887
    public void setPurchaseIdIsSet(boolean value) {
7888
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
7889
    }
7890
 
7891
    public void setFieldValue(_Fields field, Object value) {
7892
      switch (field) {
7893
      case PURCHASE_ID:
7894
        if (value == null) {
7895
          unsetPurchaseId();
7896
        } else {
7897
          setPurchaseId((Long)value);
7898
        }
7899
        break;
7900
 
7901
      }
7902
    }
7903
 
7904
    public Object getFieldValue(_Fields field) {
7905
      switch (field) {
7906
      case PURCHASE_ID:
7907
        return Long.valueOf(getPurchaseId());
7908
 
7909
      }
7910
      throw new IllegalStateException();
7911
    }
7912
 
7913
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7914
    public boolean isSet(_Fields field) {
7915
      if (field == null) {
7916
        throw new IllegalArgumentException();
7917
      }
7918
 
7919
      switch (field) {
7920
      case PURCHASE_ID:
7921
        return isSetPurchaseId();
7922
      }
7923
      throw new IllegalStateException();
7924
    }
7925
 
7926
    @Override
7927
    public boolean equals(Object that) {
7928
      if (that == null)
7929
        return false;
4555 mandeep.dh 7930
      if (that instanceof getPurchaseOrderForPurchase_args)
7931
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 7932
      return false;
7933
    }
7934
 
4555 mandeep.dh 7935
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 7936
      if (that == null)
7937
        return false;
7938
 
7939
      boolean this_present_purchaseId = true;
7940
      boolean that_present_purchaseId = true;
7941
      if (this_present_purchaseId || that_present_purchaseId) {
7942
        if (!(this_present_purchaseId && that_present_purchaseId))
7943
          return false;
7944
        if (this.purchaseId != that.purchaseId)
7945
          return false;
7946
      }
7947
 
7948
      return true;
7949
    }
7950
 
7951
    @Override
7952
    public int hashCode() {
7953
      return 0;
7954
    }
7955
 
4555 mandeep.dh 7956
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 7957
      if (!getClass().equals(other.getClass())) {
7958
        return getClass().getName().compareTo(other.getClass().getName());
7959
      }
7960
 
7961
      int lastComparison = 0;
4555 mandeep.dh 7962
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 7963
 
7964
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
7965
      if (lastComparison != 0) {
7966
        return lastComparison;
7967
      }
7968
      if (isSetPurchaseId()) {
7969
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
7970
        if (lastComparison != 0) {
7971
          return lastComparison;
7972
        }
7973
      }
7974
      return 0;
7975
    }
7976
 
7977
    public _Fields fieldForId(int fieldId) {
7978
      return _Fields.findByThriftId(fieldId);
7979
    }
7980
 
7981
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7982
      org.apache.thrift.protocol.TField field;
7983
      iprot.readStructBegin();
7984
      while (true)
7985
      {
7986
        field = iprot.readFieldBegin();
7987
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7988
          break;
7989
        }
7990
        switch (field.id) {
7991
          case 1: // PURCHASE_ID
7992
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7993
              this.purchaseId = iprot.readI64();
7994
              setPurchaseIdIsSet(true);
7995
            } else { 
7996
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7997
            }
7998
            break;
7999
          default:
8000
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8001
        }
8002
        iprot.readFieldEnd();
8003
      }
8004
      iprot.readStructEnd();
8005
      validate();
8006
    }
8007
 
8008
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8009
      validate();
8010
 
8011
      oprot.writeStructBegin(STRUCT_DESC);
8012
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
8013
      oprot.writeI64(this.purchaseId);
8014
      oprot.writeFieldEnd();
8015
      oprot.writeFieldStop();
8016
      oprot.writeStructEnd();
8017
    }
8018
 
8019
    @Override
8020
    public String toString() {
4555 mandeep.dh 8021
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 8022
      boolean first = true;
8023
 
8024
      sb.append("purchaseId:");
8025
      sb.append(this.purchaseId);
8026
      first = false;
8027
      sb.append(")");
8028
      return sb.toString();
8029
    }
8030
 
8031
    public void validate() throws org.apache.thrift.TException {
8032
      // check for required fields
8033
    }
8034
 
8035
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8036
      try {
8037
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8038
      } catch (org.apache.thrift.TException te) {
8039
        throw new java.io.IOException(te);
8040
      }
8041
    }
8042
 
8043
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8044
      try {
4555 mandeep.dh 8045
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8046
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 8047
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8048
      } catch (org.apache.thrift.TException te) {
8049
        throw new java.io.IOException(te);
8050
      }
8051
    }
8052
 
8053
  }
8054
 
4555 mandeep.dh 8055
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
8056
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 8057
 
4555 mandeep.dh 8058
    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 8059
 
4555 mandeep.dh 8060
    private PurchaseOrder success; // required
4496 mandeep.dh 8061
 
8062
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8063
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8064
      SUCCESS((short)0, "success");
8065
 
8066
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8067
 
8068
      static {
8069
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8070
          byName.put(field.getFieldName(), field);
8071
        }
8072
      }
8073
 
8074
      /**
8075
       * Find the _Fields constant that matches fieldId, or null if its not found.
8076
       */
8077
      public static _Fields findByThriftId(int fieldId) {
8078
        switch(fieldId) {
8079
          case 0: // SUCCESS
8080
            return SUCCESS;
8081
          default:
8082
            return null;
8083
        }
8084
      }
8085
 
8086
      /**
8087
       * Find the _Fields constant that matches fieldId, throwing an exception
8088
       * if it is not found.
8089
       */
8090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8091
        _Fields fields = findByThriftId(fieldId);
8092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8093
        return fields;
8094
      }
8095
 
8096
      /**
8097
       * Find the _Fields constant that matches name, or null if its not found.
8098
       */
8099
      public static _Fields findByName(String name) {
8100
        return byName.get(name);
8101
      }
8102
 
8103
      private final short _thriftId;
8104
      private final String _fieldName;
8105
 
8106
      _Fields(short thriftId, String fieldName) {
8107
        _thriftId = thriftId;
8108
        _fieldName = fieldName;
8109
      }
8110
 
8111
      public short getThriftFieldId() {
8112
        return _thriftId;
8113
      }
8114
 
8115
      public String getFieldName() {
8116
        return _fieldName;
8117
      }
8118
    }
8119
 
8120
    // isset id assignments
8121
 
8122
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8123
    static {
8124
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8125
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8126
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8127
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8128
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8129
    }
8130
 
4555 mandeep.dh 8131
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8132
    }
8133
 
4555 mandeep.dh 8134
    public getPurchaseOrderForPurchase_result(
8135
      PurchaseOrder success)
4496 mandeep.dh 8136
    {
8137
      this();
8138
      this.success = success;
8139
    }
8140
 
8141
    /**
8142
     * Performs a deep copy on <i>other</i>.
8143
     */
4555 mandeep.dh 8144
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8145
      if (other.isSetSuccess()) {
8146
        this.success = new PurchaseOrder(other.success);
8147
      }
4496 mandeep.dh 8148
    }
8149
 
4555 mandeep.dh 8150
    public getPurchaseOrderForPurchase_result deepCopy() {
8151
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8152
    }
8153
 
8154
    @Override
8155
    public void clear() {
4555 mandeep.dh 8156
      this.success = null;
4496 mandeep.dh 8157
    }
8158
 
4555 mandeep.dh 8159
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8160
      return this.success;
8161
    }
8162
 
4555 mandeep.dh 8163
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8164
      this.success = success;
8165
    }
8166
 
8167
    public void unsetSuccess() {
4555 mandeep.dh 8168
      this.success = null;
4496 mandeep.dh 8169
    }
8170
 
8171
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8172
    public boolean isSetSuccess() {
4555 mandeep.dh 8173
      return this.success != null;
4496 mandeep.dh 8174
    }
8175
 
8176
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8177
      if (!value) {
8178
        this.success = null;
8179
      }
4496 mandeep.dh 8180
    }
8181
 
8182
    public void setFieldValue(_Fields field, Object value) {
8183
      switch (field) {
8184
      case SUCCESS:
8185
        if (value == null) {
8186
          unsetSuccess();
8187
        } else {
4555 mandeep.dh 8188
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8189
        }
8190
        break;
8191
 
8192
      }
8193
    }
8194
 
8195
    public Object getFieldValue(_Fields field) {
8196
      switch (field) {
8197
      case SUCCESS:
4555 mandeep.dh 8198
        return getSuccess();
4496 mandeep.dh 8199
 
8200
      }
8201
      throw new IllegalStateException();
8202
    }
8203
 
8204
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8205
    public boolean isSet(_Fields field) {
8206
      if (field == null) {
8207
        throw new IllegalArgumentException();
8208
      }
8209
 
8210
      switch (field) {
8211
      case SUCCESS:
8212
        return isSetSuccess();
8213
      }
8214
      throw new IllegalStateException();
8215
    }
8216
 
8217
    @Override
8218
    public boolean equals(Object that) {
8219
      if (that == null)
8220
        return false;
4555 mandeep.dh 8221
      if (that instanceof getPurchaseOrderForPurchase_result)
8222
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8223
      return false;
8224
    }
8225
 
4555 mandeep.dh 8226
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8227
      if (that == null)
8228
        return false;
8229
 
4555 mandeep.dh 8230
      boolean this_present_success = true && this.isSetSuccess();
8231
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8232
      if (this_present_success || that_present_success) {
8233
        if (!(this_present_success && that_present_success))
8234
          return false;
4555 mandeep.dh 8235
        if (!this.success.equals(that.success))
4496 mandeep.dh 8236
          return false;
8237
      }
8238
 
8239
      return true;
8240
    }
8241
 
8242
    @Override
8243
    public int hashCode() {
8244
      return 0;
8245
    }
8246
 
4555 mandeep.dh 8247
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8248
      if (!getClass().equals(other.getClass())) {
8249
        return getClass().getName().compareTo(other.getClass().getName());
8250
      }
8251
 
8252
      int lastComparison = 0;
4555 mandeep.dh 8253
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8254
 
8255
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8256
      if (lastComparison != 0) {
8257
        return lastComparison;
8258
      }
8259
      if (isSetSuccess()) {
8260
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8261
        if (lastComparison != 0) {
8262
          return lastComparison;
8263
        }
8264
      }
8265
      return 0;
8266
    }
8267
 
8268
    public _Fields fieldForId(int fieldId) {
8269
      return _Fields.findByThriftId(fieldId);
8270
    }
8271
 
8272
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8273
      org.apache.thrift.protocol.TField field;
8274
      iprot.readStructBegin();
8275
      while (true)
8276
      {
8277
        field = iprot.readFieldBegin();
8278
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8279
          break;
8280
        }
8281
        switch (field.id) {
8282
          case 0: // SUCCESS
4555 mandeep.dh 8283
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8284
              this.success = new PurchaseOrder();
8285
              this.success.read(iprot);
4496 mandeep.dh 8286
            } else { 
8287
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8288
            }
8289
            break;
8290
          default:
8291
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8292
        }
8293
        iprot.readFieldEnd();
8294
      }
8295
      iprot.readStructEnd();
8296
      validate();
8297
    }
8298
 
8299
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8300
      oprot.writeStructBegin(STRUCT_DESC);
8301
 
8302
      if (this.isSetSuccess()) {
8303
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8304
        this.success.write(oprot);
4496 mandeep.dh 8305
        oprot.writeFieldEnd();
8306
      }
8307
      oprot.writeFieldStop();
8308
      oprot.writeStructEnd();
8309
    }
8310
 
8311
    @Override
8312
    public String toString() {
4555 mandeep.dh 8313
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8314
      boolean first = true;
8315
 
8316
      sb.append("success:");
4555 mandeep.dh 8317
      if (this.success == null) {
8318
        sb.append("null");
8319
      } else {
8320
        sb.append(this.success);
8321
      }
4496 mandeep.dh 8322
      first = false;
8323
      sb.append(")");
8324
      return sb.toString();
8325
    }
8326
 
8327
    public void validate() throws org.apache.thrift.TException {
8328
      // check for required fields
8329
    }
8330
 
8331
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8332
      try {
8333
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8334
      } catch (org.apache.thrift.TException te) {
8335
        throw new java.io.IOException(te);
8336
      }
8337
    }
8338
 
8339
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8340
      try {
8341
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8342
      } catch (org.apache.thrift.TException te) {
8343
        throw new java.io.IOException(te);
8344
      }
8345
    }
8346
 
8347
  }
8348
 
4754 mandeep.dh 8349
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8350
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8351
 
8352
    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);
8353
 
8354
    private long warehouseId; // required
8355
 
8356
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8357
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8358
      WAREHOUSE_ID((short)1, "warehouseId");
8359
 
8360
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8361
 
8362
      static {
8363
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8364
          byName.put(field.getFieldName(), field);
8365
        }
8366
      }
8367
 
8368
      /**
8369
       * Find the _Fields constant that matches fieldId, or null if its not found.
8370
       */
8371
      public static _Fields findByThriftId(int fieldId) {
8372
        switch(fieldId) {
8373
          case 1: // WAREHOUSE_ID
8374
            return WAREHOUSE_ID;
8375
          default:
8376
            return null;
8377
        }
8378
      }
8379
 
8380
      /**
8381
       * Find the _Fields constant that matches fieldId, throwing an exception
8382
       * if it is not found.
8383
       */
8384
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8385
        _Fields fields = findByThriftId(fieldId);
8386
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8387
        return fields;
8388
      }
8389
 
8390
      /**
8391
       * Find the _Fields constant that matches name, or null if its not found.
8392
       */
8393
      public static _Fields findByName(String name) {
8394
        return byName.get(name);
8395
      }
8396
 
8397
      private final short _thriftId;
8398
      private final String _fieldName;
8399
 
8400
      _Fields(short thriftId, String fieldName) {
8401
        _thriftId = thriftId;
8402
        _fieldName = fieldName;
8403
      }
8404
 
8405
      public short getThriftFieldId() {
8406
        return _thriftId;
8407
      }
8408
 
8409
      public String getFieldName() {
8410
        return _fieldName;
8411
      }
8412
    }
8413
 
8414
    // isset id assignments
8415
    private static final int __WAREHOUSEID_ISSET_ID = 0;
8416
    private BitSet __isset_bit_vector = new BitSet(1);
8417
 
8418
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8419
    static {
8420
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8421
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8422
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8423
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8424
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
8425
    }
8426
 
8427
    public getPendingPurchaseOrders_args() {
8428
    }
8429
 
8430
    public getPendingPurchaseOrders_args(
8431
      long warehouseId)
8432
    {
8433
      this();
8434
      this.warehouseId = warehouseId;
8435
      setWarehouseIdIsSet(true);
8436
    }
8437
 
8438
    /**
8439
     * Performs a deep copy on <i>other</i>.
8440
     */
8441
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
8442
      __isset_bit_vector.clear();
8443
      __isset_bit_vector.or(other.__isset_bit_vector);
8444
      this.warehouseId = other.warehouseId;
8445
    }
8446
 
8447
    public getPendingPurchaseOrders_args deepCopy() {
8448
      return new getPendingPurchaseOrders_args(this);
8449
    }
8450
 
8451
    @Override
8452
    public void clear() {
8453
      setWarehouseIdIsSet(false);
8454
      this.warehouseId = 0;
8455
    }
8456
 
8457
    public long getWarehouseId() {
8458
      return this.warehouseId;
8459
    }
8460
 
8461
    public void setWarehouseId(long warehouseId) {
8462
      this.warehouseId = warehouseId;
8463
      setWarehouseIdIsSet(true);
8464
    }
8465
 
8466
    public void unsetWarehouseId() {
8467
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8468
    }
8469
 
8470
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8471
    public boolean isSetWarehouseId() {
8472
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
8473
    }
8474
 
8475
    public void setWarehouseIdIsSet(boolean value) {
8476
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
8477
    }
8478
 
8479
    public void setFieldValue(_Fields field, Object value) {
8480
      switch (field) {
8481
      case WAREHOUSE_ID:
8482
        if (value == null) {
8483
          unsetWarehouseId();
8484
        } else {
8485
          setWarehouseId((Long)value);
8486
        }
8487
        break;
8488
 
8489
      }
8490
    }
8491
 
8492
    public Object getFieldValue(_Fields field) {
8493
      switch (field) {
8494
      case WAREHOUSE_ID:
8495
        return Long.valueOf(getWarehouseId());
8496
 
8497
      }
8498
      throw new IllegalStateException();
8499
    }
8500
 
8501
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8502
    public boolean isSet(_Fields field) {
8503
      if (field == null) {
8504
        throw new IllegalArgumentException();
8505
      }
8506
 
8507
      switch (field) {
8508
      case WAREHOUSE_ID:
8509
        return isSetWarehouseId();
8510
      }
8511
      throw new IllegalStateException();
8512
    }
8513
 
8514
    @Override
8515
    public boolean equals(Object that) {
8516
      if (that == null)
8517
        return false;
8518
      if (that instanceof getPendingPurchaseOrders_args)
8519
        return this.equals((getPendingPurchaseOrders_args)that);
8520
      return false;
8521
    }
8522
 
8523
    public boolean equals(getPendingPurchaseOrders_args that) {
8524
      if (that == null)
8525
        return false;
8526
 
8527
      boolean this_present_warehouseId = true;
8528
      boolean that_present_warehouseId = true;
8529
      if (this_present_warehouseId || that_present_warehouseId) {
8530
        if (!(this_present_warehouseId && that_present_warehouseId))
8531
          return false;
8532
        if (this.warehouseId != that.warehouseId)
8533
          return false;
8534
      }
8535
 
8536
      return true;
8537
    }
8538
 
8539
    @Override
8540
    public int hashCode() {
8541
      return 0;
8542
    }
8543
 
8544
    public int compareTo(getPendingPurchaseOrders_args other) {
8545
      if (!getClass().equals(other.getClass())) {
8546
        return getClass().getName().compareTo(other.getClass().getName());
8547
      }
8548
 
8549
      int lastComparison = 0;
8550
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
8551
 
8552
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
8553
      if (lastComparison != 0) {
8554
        return lastComparison;
8555
      }
8556
      if (isSetWarehouseId()) {
8557
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
8558
        if (lastComparison != 0) {
8559
          return lastComparison;
8560
        }
8561
      }
8562
      return 0;
8563
    }
8564
 
8565
    public _Fields fieldForId(int fieldId) {
8566
      return _Fields.findByThriftId(fieldId);
8567
    }
8568
 
8569
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8570
      org.apache.thrift.protocol.TField field;
8571
      iprot.readStructBegin();
8572
      while (true)
8573
      {
8574
        field = iprot.readFieldBegin();
8575
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8576
          break;
8577
        }
8578
        switch (field.id) {
8579
          case 1: // WAREHOUSE_ID
8580
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8581
              this.warehouseId = iprot.readI64();
8582
              setWarehouseIdIsSet(true);
8583
            } else { 
8584
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8585
            }
8586
            break;
8587
          default:
8588
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8589
        }
8590
        iprot.readFieldEnd();
8591
      }
8592
      iprot.readStructEnd();
8593
      validate();
8594
    }
8595
 
8596
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8597
      validate();
8598
 
8599
      oprot.writeStructBegin(STRUCT_DESC);
8600
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8601
      oprot.writeI64(this.warehouseId);
8602
      oprot.writeFieldEnd();
8603
      oprot.writeFieldStop();
8604
      oprot.writeStructEnd();
8605
    }
8606
 
8607
    @Override
8608
    public String toString() {
8609
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
8610
      boolean first = true;
8611
 
8612
      sb.append("warehouseId:");
8613
      sb.append(this.warehouseId);
8614
      first = false;
8615
      sb.append(")");
8616
      return sb.toString();
8617
    }
8618
 
8619
    public void validate() throws org.apache.thrift.TException {
8620
      // check for required fields
8621
    }
8622
 
8623
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8624
      try {
8625
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8626
      } catch (org.apache.thrift.TException te) {
8627
        throw new java.io.IOException(te);
8628
      }
8629
    }
8630
 
8631
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8632
      try {
8633
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8634
        __isset_bit_vector = new BitSet(1);
8635
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8636
      } catch (org.apache.thrift.TException te) {
8637
        throw new java.io.IOException(te);
8638
      }
8639
    }
8640
 
8641
  }
8642
 
8643
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
8644
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
8645
 
8646
    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);
8647
    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);
8648
 
8649
    private List<PurchaseOrder> success; // required
8650
    private PurchaseServiceException e; // required
8651
 
8652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8653
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8654
      SUCCESS((short)0, "success"),
8655
      E((short)1, "e");
8656
 
8657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8658
 
8659
      static {
8660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8661
          byName.put(field.getFieldName(), field);
8662
        }
8663
      }
8664
 
8665
      /**
8666
       * Find the _Fields constant that matches fieldId, or null if its not found.
8667
       */
8668
      public static _Fields findByThriftId(int fieldId) {
8669
        switch(fieldId) {
8670
          case 0: // SUCCESS
8671
            return SUCCESS;
8672
          case 1: // E
8673
            return E;
8674
          default:
8675
            return null;
8676
        }
8677
      }
8678
 
8679
      /**
8680
       * Find the _Fields constant that matches fieldId, throwing an exception
8681
       * if it is not found.
8682
       */
8683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8684
        _Fields fields = findByThriftId(fieldId);
8685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8686
        return fields;
8687
      }
8688
 
8689
      /**
8690
       * Find the _Fields constant that matches name, or null if its not found.
8691
       */
8692
      public static _Fields findByName(String name) {
8693
        return byName.get(name);
8694
      }
8695
 
8696
      private final short _thriftId;
8697
      private final String _fieldName;
8698
 
8699
      _Fields(short thriftId, String fieldName) {
8700
        _thriftId = thriftId;
8701
        _fieldName = fieldName;
8702
      }
8703
 
8704
      public short getThriftFieldId() {
8705
        return _thriftId;
8706
      }
8707
 
8708
      public String getFieldName() {
8709
        return _fieldName;
8710
      }
8711
    }
8712
 
8713
    // isset id assignments
8714
 
8715
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8716
    static {
8717
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8718
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8719
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8720
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
8721
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8722
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8723
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8724
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
8725
    }
8726
 
8727
    public getPendingPurchaseOrders_result() {
8728
    }
8729
 
8730
    public getPendingPurchaseOrders_result(
8731
      List<PurchaseOrder> success,
8732
      PurchaseServiceException e)
8733
    {
8734
      this();
8735
      this.success = success;
8736
      this.e = e;
8737
    }
8738
 
8739
    /**
8740
     * Performs a deep copy on <i>other</i>.
8741
     */
8742
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
8743
      if (other.isSetSuccess()) {
8744
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
8745
        for (PurchaseOrder other_element : other.success) {
8746
          __this__success.add(new PurchaseOrder(other_element));
8747
        }
8748
        this.success = __this__success;
8749
      }
8750
      if (other.isSetE()) {
8751
        this.e = new PurchaseServiceException(other.e);
8752
      }
8753
    }
8754
 
8755
    public getPendingPurchaseOrders_result deepCopy() {
8756
      return new getPendingPurchaseOrders_result(this);
8757
    }
8758
 
8759
    @Override
8760
    public void clear() {
8761
      this.success = null;
8762
      this.e = null;
8763
    }
8764
 
8765
    public int getSuccessSize() {
8766
      return (this.success == null) ? 0 : this.success.size();
8767
    }
8768
 
8769
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
8770
      return (this.success == null) ? null : this.success.iterator();
8771
    }
8772
 
8773
    public void addToSuccess(PurchaseOrder elem) {
8774
      if (this.success == null) {
8775
        this.success = new ArrayList<PurchaseOrder>();
8776
      }
8777
      this.success.add(elem);
8778
    }
8779
 
8780
    public List<PurchaseOrder> getSuccess() {
8781
      return this.success;
8782
    }
8783
 
8784
    public void setSuccess(List<PurchaseOrder> success) {
8785
      this.success = success;
8786
    }
8787
 
8788
    public void unsetSuccess() {
8789
      this.success = null;
8790
    }
8791
 
8792
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8793
    public boolean isSetSuccess() {
8794
      return this.success != null;
8795
    }
8796
 
8797
    public void setSuccessIsSet(boolean value) {
8798
      if (!value) {
8799
        this.success = null;
8800
      }
8801
    }
8802
 
8803
    public PurchaseServiceException getE() {
8804
      return this.e;
8805
    }
8806
 
8807
    public void setE(PurchaseServiceException e) {
8808
      this.e = e;
8809
    }
8810
 
8811
    public void unsetE() {
8812
      this.e = null;
8813
    }
8814
 
8815
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8816
    public boolean isSetE() {
8817
      return this.e != null;
8818
    }
8819
 
8820
    public void setEIsSet(boolean value) {
8821
      if (!value) {
8822
        this.e = null;
8823
      }
8824
    }
8825
 
8826
    public void setFieldValue(_Fields field, Object value) {
8827
      switch (field) {
8828
      case SUCCESS:
8829
        if (value == null) {
8830
          unsetSuccess();
8831
        } else {
8832
          setSuccess((List<PurchaseOrder>)value);
8833
        }
8834
        break;
8835
 
8836
      case E:
8837
        if (value == null) {
8838
          unsetE();
8839
        } else {
8840
          setE((PurchaseServiceException)value);
8841
        }
8842
        break;
8843
 
8844
      }
8845
    }
8846
 
8847
    public Object getFieldValue(_Fields field) {
8848
      switch (field) {
8849
      case SUCCESS:
8850
        return getSuccess();
8851
 
8852
      case E:
8853
        return getE();
8854
 
8855
      }
8856
      throw new IllegalStateException();
8857
    }
8858
 
8859
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8860
    public boolean isSet(_Fields field) {
8861
      if (field == null) {
8862
        throw new IllegalArgumentException();
8863
      }
8864
 
8865
      switch (field) {
8866
      case SUCCESS:
8867
        return isSetSuccess();
8868
      case E:
8869
        return isSetE();
8870
      }
8871
      throw new IllegalStateException();
8872
    }
8873
 
8874
    @Override
8875
    public boolean equals(Object that) {
8876
      if (that == null)
8877
        return false;
8878
      if (that instanceof getPendingPurchaseOrders_result)
8879
        return this.equals((getPendingPurchaseOrders_result)that);
8880
      return false;
8881
    }
8882
 
8883
    public boolean equals(getPendingPurchaseOrders_result that) {
8884
      if (that == null)
8885
        return false;
8886
 
8887
      boolean this_present_success = true && this.isSetSuccess();
8888
      boolean that_present_success = true && that.isSetSuccess();
8889
      if (this_present_success || that_present_success) {
8890
        if (!(this_present_success && that_present_success))
8891
          return false;
8892
        if (!this.success.equals(that.success))
8893
          return false;
8894
      }
8895
 
8896
      boolean this_present_e = true && this.isSetE();
8897
      boolean that_present_e = true && that.isSetE();
8898
      if (this_present_e || that_present_e) {
8899
        if (!(this_present_e && that_present_e))
8900
          return false;
8901
        if (!this.e.equals(that.e))
8902
          return false;
8903
      }
8904
 
8905
      return true;
8906
    }
8907
 
8908
    @Override
8909
    public int hashCode() {
8910
      return 0;
8911
    }
8912
 
8913
    public int compareTo(getPendingPurchaseOrders_result other) {
8914
      if (!getClass().equals(other.getClass())) {
8915
        return getClass().getName().compareTo(other.getClass().getName());
8916
      }
8917
 
8918
      int lastComparison = 0;
8919
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
8920
 
8921
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8922
      if (lastComparison != 0) {
8923
        return lastComparison;
8924
      }
8925
      if (isSetSuccess()) {
8926
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8927
        if (lastComparison != 0) {
8928
          return lastComparison;
8929
        }
8930
      }
8931
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8932
      if (lastComparison != 0) {
8933
        return lastComparison;
8934
      }
8935
      if (isSetE()) {
8936
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8937
        if (lastComparison != 0) {
8938
          return lastComparison;
8939
        }
8940
      }
8941
      return 0;
8942
    }
8943
 
8944
    public _Fields fieldForId(int fieldId) {
8945
      return _Fields.findByThriftId(fieldId);
8946
    }
8947
 
8948
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8949
      org.apache.thrift.protocol.TField field;
8950
      iprot.readStructBegin();
8951
      while (true)
8952
      {
8953
        field = iprot.readFieldBegin();
8954
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8955
          break;
8956
        }
8957
        switch (field.id) {
8958
          case 0: // SUCCESS
8959
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8960
              {
6385 amar.kumar 8961
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
8962
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
8963
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 8964
                {
6385 amar.kumar 8965
                  PurchaseOrder _elem18; // required
8966
                  _elem18 = new PurchaseOrder();
8967
                  _elem18.read(iprot);
8968
                  this.success.add(_elem18);
4754 mandeep.dh 8969
                }
8970
                iprot.readListEnd();
8971
              }
8972
            } else { 
8973
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8974
            }
8975
            break;
8976
          case 1: // E
8977
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8978
              this.e = new PurchaseServiceException();
8979
              this.e.read(iprot);
8980
            } else { 
8981
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8982
            }
8983
            break;
8984
          default:
8985
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8986
        }
8987
        iprot.readFieldEnd();
8988
      }
8989
      iprot.readStructEnd();
8990
      validate();
8991
    }
8992
 
8993
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8994
      oprot.writeStructBegin(STRUCT_DESC);
8995
 
8996
      if (this.isSetSuccess()) {
8997
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8998
        {
8999
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9000
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 9001
          {
6385 amar.kumar 9002
            _iter19.write(oprot);
4754 mandeep.dh 9003
          }
9004
          oprot.writeListEnd();
9005
        }
9006
        oprot.writeFieldEnd();
9007
      } else if (this.isSetE()) {
9008
        oprot.writeFieldBegin(E_FIELD_DESC);
9009
        this.e.write(oprot);
9010
        oprot.writeFieldEnd();
9011
      }
9012
      oprot.writeFieldStop();
9013
      oprot.writeStructEnd();
9014
    }
9015
 
9016
    @Override
9017
    public String toString() {
9018
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
9019
      boolean first = true;
9020
 
9021
      sb.append("success:");
9022
      if (this.success == null) {
9023
        sb.append("null");
9024
      } else {
9025
        sb.append(this.success);
9026
      }
9027
      first = false;
9028
      if (!first) sb.append(", ");
9029
      sb.append("e:");
9030
      if (this.e == null) {
9031
        sb.append("null");
9032
      } else {
9033
        sb.append(this.e);
9034
      }
9035
      first = false;
9036
      sb.append(")");
9037
      return sb.toString();
9038
    }
9039
 
9040
    public void validate() throws org.apache.thrift.TException {
9041
      // check for required fields
9042
    }
9043
 
9044
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9045
      try {
9046
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9047
      } catch (org.apache.thrift.TException te) {
9048
        throw new java.io.IOException(te);
9049
      }
9050
    }
9051
 
9052
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9053
      try {
9054
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9055
      } catch (org.apache.thrift.TException te) {
9056
        throw new java.io.IOException(te);
9057
      }
9058
    }
9059
 
9060
  }
9061
 
9062
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
9063
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
9064
 
9065
 
9066
 
9067
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9068
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9069
;
9070
 
9071
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9072
 
9073
      static {
9074
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9075
          byName.put(field.getFieldName(), field);
9076
        }
9077
      }
9078
 
9079
      /**
9080
       * Find the _Fields constant that matches fieldId, or null if its not found.
9081
       */
9082
      public static _Fields findByThriftId(int fieldId) {
9083
        switch(fieldId) {
9084
          default:
9085
            return null;
9086
        }
9087
      }
9088
 
9089
      /**
9090
       * Find the _Fields constant that matches fieldId, throwing an exception
9091
       * if it is not found.
9092
       */
9093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9094
        _Fields fields = findByThriftId(fieldId);
9095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9096
        return fields;
9097
      }
9098
 
9099
      /**
9100
       * Find the _Fields constant that matches name, or null if its not found.
9101
       */
9102
      public static _Fields findByName(String name) {
9103
        return byName.get(name);
9104
      }
9105
 
9106
      private final short _thriftId;
9107
      private final String _fieldName;
9108
 
9109
      _Fields(short thriftId, String fieldName) {
9110
        _thriftId = thriftId;
9111
        _fieldName = fieldName;
9112
      }
9113
 
9114
      public short getThriftFieldId() {
9115
        return _thriftId;
9116
      }
9117
 
9118
      public String getFieldName() {
9119
        return _fieldName;
9120
      }
9121
    }
9122
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9123
    static {
9124
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9125
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9126
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9127
    }
9128
 
9129
    public getSuppliers_args() {
9130
    }
9131
 
9132
    /**
9133
     * Performs a deep copy on <i>other</i>.
9134
     */
9135
    public getSuppliers_args(getSuppliers_args other) {
9136
    }
9137
 
9138
    public getSuppliers_args deepCopy() {
9139
      return new getSuppliers_args(this);
9140
    }
9141
 
9142
    @Override
9143
    public void clear() {
9144
    }
9145
 
9146
    public void setFieldValue(_Fields field, Object value) {
9147
      switch (field) {
9148
      }
9149
    }
9150
 
9151
    public Object getFieldValue(_Fields field) {
9152
      switch (field) {
9153
      }
9154
      throw new IllegalStateException();
9155
    }
9156
 
9157
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9158
    public boolean isSet(_Fields field) {
9159
      if (field == null) {
9160
        throw new IllegalArgumentException();
9161
      }
9162
 
9163
      switch (field) {
9164
      }
9165
      throw new IllegalStateException();
9166
    }
9167
 
9168
    @Override
9169
    public boolean equals(Object that) {
9170
      if (that == null)
9171
        return false;
9172
      if (that instanceof getSuppliers_args)
9173
        return this.equals((getSuppliers_args)that);
9174
      return false;
9175
    }
9176
 
9177
    public boolean equals(getSuppliers_args that) {
9178
      if (that == null)
9179
        return false;
9180
 
9181
      return true;
9182
    }
9183
 
9184
    @Override
9185
    public int hashCode() {
9186
      return 0;
9187
    }
9188
 
9189
    public int compareTo(getSuppliers_args other) {
9190
      if (!getClass().equals(other.getClass())) {
9191
        return getClass().getName().compareTo(other.getClass().getName());
9192
      }
9193
 
9194
      int lastComparison = 0;
9195
      getSuppliers_args typedOther = (getSuppliers_args)other;
9196
 
9197
      return 0;
9198
    }
9199
 
9200
    public _Fields fieldForId(int fieldId) {
9201
      return _Fields.findByThriftId(fieldId);
9202
    }
9203
 
9204
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9205
      org.apache.thrift.protocol.TField field;
9206
      iprot.readStructBegin();
9207
      while (true)
9208
      {
9209
        field = iprot.readFieldBegin();
9210
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9211
          break;
9212
        }
9213
        switch (field.id) {
9214
          default:
9215
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9216
        }
9217
        iprot.readFieldEnd();
9218
      }
9219
      iprot.readStructEnd();
9220
      validate();
9221
    }
9222
 
9223
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9224
      validate();
9225
 
9226
      oprot.writeStructBegin(STRUCT_DESC);
9227
      oprot.writeFieldStop();
9228
      oprot.writeStructEnd();
9229
    }
9230
 
9231
    @Override
9232
    public String toString() {
9233
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9234
      boolean first = true;
9235
 
9236
      sb.append(")");
9237
      return sb.toString();
9238
    }
9239
 
9240
    public void validate() throws org.apache.thrift.TException {
9241
      // check for required fields
9242
    }
9243
 
9244
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9245
      try {
9246
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9247
      } catch (org.apache.thrift.TException te) {
9248
        throw new java.io.IOException(te);
9249
      }
9250
    }
9251
 
9252
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9253
      try {
9254
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9255
      } catch (org.apache.thrift.TException te) {
9256
        throw new java.io.IOException(te);
9257
      }
9258
    }
9259
 
9260
  }
9261
 
9262
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9263
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9264
 
9265
    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);
9266
    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);
9267
 
9268
    private List<Supplier> success; // required
9269
    private PurchaseServiceException e; // required
9270
 
9271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9272
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9273
      SUCCESS((short)0, "success"),
9274
      E((short)1, "e");
9275
 
9276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9277
 
9278
      static {
9279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9280
          byName.put(field.getFieldName(), field);
9281
        }
9282
      }
9283
 
9284
      /**
9285
       * Find the _Fields constant that matches fieldId, or null if its not found.
9286
       */
9287
      public static _Fields findByThriftId(int fieldId) {
9288
        switch(fieldId) {
9289
          case 0: // SUCCESS
9290
            return SUCCESS;
9291
          case 1: // E
9292
            return E;
9293
          default:
9294
            return null;
9295
        }
9296
      }
9297
 
9298
      /**
9299
       * Find the _Fields constant that matches fieldId, throwing an exception
9300
       * if it is not found.
9301
       */
9302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9303
        _Fields fields = findByThriftId(fieldId);
9304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9305
        return fields;
9306
      }
9307
 
9308
      /**
9309
       * Find the _Fields constant that matches name, or null if its not found.
9310
       */
9311
      public static _Fields findByName(String name) {
9312
        return byName.get(name);
9313
      }
9314
 
9315
      private final short _thriftId;
9316
      private final String _fieldName;
9317
 
9318
      _Fields(short thriftId, String fieldName) {
9319
        _thriftId = thriftId;
9320
        _fieldName = fieldName;
9321
      }
9322
 
9323
      public short getThriftFieldId() {
9324
        return _thriftId;
9325
      }
9326
 
9327
      public String getFieldName() {
9328
        return _fieldName;
9329
      }
9330
    }
9331
 
9332
    // isset id assignments
9333
 
9334
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9335
    static {
9336
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9337
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9338
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9339
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9340
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9341
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9342
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9343
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9344
    }
9345
 
9346
    public getSuppliers_result() {
9347
    }
9348
 
9349
    public getSuppliers_result(
9350
      List<Supplier> success,
9351
      PurchaseServiceException e)
9352
    {
9353
      this();
9354
      this.success = success;
9355
      this.e = e;
9356
    }
9357
 
9358
    /**
9359
     * Performs a deep copy on <i>other</i>.
9360
     */
9361
    public getSuppliers_result(getSuppliers_result other) {
9362
      if (other.isSetSuccess()) {
9363
        List<Supplier> __this__success = new ArrayList<Supplier>();
9364
        for (Supplier other_element : other.success) {
9365
          __this__success.add(new Supplier(other_element));
9366
        }
9367
        this.success = __this__success;
9368
      }
9369
      if (other.isSetE()) {
9370
        this.e = new PurchaseServiceException(other.e);
9371
      }
9372
    }
9373
 
9374
    public getSuppliers_result deepCopy() {
9375
      return new getSuppliers_result(this);
9376
    }
9377
 
9378
    @Override
9379
    public void clear() {
9380
      this.success = null;
9381
      this.e = null;
9382
    }
9383
 
9384
    public int getSuccessSize() {
9385
      return (this.success == null) ? 0 : this.success.size();
9386
    }
9387
 
9388
    public java.util.Iterator<Supplier> getSuccessIterator() {
9389
      return (this.success == null) ? null : this.success.iterator();
9390
    }
9391
 
9392
    public void addToSuccess(Supplier elem) {
9393
      if (this.success == null) {
9394
        this.success = new ArrayList<Supplier>();
9395
      }
9396
      this.success.add(elem);
9397
    }
9398
 
9399
    public List<Supplier> getSuccess() {
9400
      return this.success;
9401
    }
9402
 
9403
    public void setSuccess(List<Supplier> success) {
9404
      this.success = success;
9405
    }
9406
 
9407
    public void unsetSuccess() {
9408
      this.success = null;
9409
    }
9410
 
9411
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9412
    public boolean isSetSuccess() {
9413
      return this.success != null;
9414
    }
9415
 
9416
    public void setSuccessIsSet(boolean value) {
9417
      if (!value) {
9418
        this.success = null;
9419
      }
9420
    }
9421
 
9422
    public PurchaseServiceException getE() {
9423
      return this.e;
9424
    }
9425
 
9426
    public void setE(PurchaseServiceException e) {
9427
      this.e = e;
9428
    }
9429
 
9430
    public void unsetE() {
9431
      this.e = null;
9432
    }
9433
 
9434
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9435
    public boolean isSetE() {
9436
      return this.e != null;
9437
    }
9438
 
9439
    public void setEIsSet(boolean value) {
9440
      if (!value) {
9441
        this.e = null;
9442
      }
9443
    }
9444
 
9445
    public void setFieldValue(_Fields field, Object value) {
9446
      switch (field) {
9447
      case SUCCESS:
9448
        if (value == null) {
9449
          unsetSuccess();
9450
        } else {
9451
          setSuccess((List<Supplier>)value);
9452
        }
9453
        break;
9454
 
9455
      case E:
9456
        if (value == null) {
9457
          unsetE();
9458
        } else {
9459
          setE((PurchaseServiceException)value);
9460
        }
9461
        break;
9462
 
9463
      }
9464
    }
9465
 
9466
    public Object getFieldValue(_Fields field) {
9467
      switch (field) {
9468
      case SUCCESS:
9469
        return getSuccess();
9470
 
9471
      case E:
9472
        return getE();
9473
 
9474
      }
9475
      throw new IllegalStateException();
9476
    }
9477
 
9478
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9479
    public boolean isSet(_Fields field) {
9480
      if (field == null) {
9481
        throw new IllegalArgumentException();
9482
      }
9483
 
9484
      switch (field) {
9485
      case SUCCESS:
9486
        return isSetSuccess();
9487
      case E:
9488
        return isSetE();
9489
      }
9490
      throw new IllegalStateException();
9491
    }
9492
 
9493
    @Override
9494
    public boolean equals(Object that) {
9495
      if (that == null)
9496
        return false;
9497
      if (that instanceof getSuppliers_result)
9498
        return this.equals((getSuppliers_result)that);
9499
      return false;
9500
    }
9501
 
9502
    public boolean equals(getSuppliers_result that) {
9503
      if (that == null)
9504
        return false;
9505
 
9506
      boolean this_present_success = true && this.isSetSuccess();
9507
      boolean that_present_success = true && that.isSetSuccess();
9508
      if (this_present_success || that_present_success) {
9509
        if (!(this_present_success && that_present_success))
9510
          return false;
9511
        if (!this.success.equals(that.success))
9512
          return false;
9513
      }
9514
 
9515
      boolean this_present_e = true && this.isSetE();
9516
      boolean that_present_e = true && that.isSetE();
9517
      if (this_present_e || that_present_e) {
9518
        if (!(this_present_e && that_present_e))
9519
          return false;
9520
        if (!this.e.equals(that.e))
9521
          return false;
9522
      }
9523
 
9524
      return true;
9525
    }
9526
 
9527
    @Override
9528
    public int hashCode() {
9529
      return 0;
9530
    }
9531
 
9532
    public int compareTo(getSuppliers_result other) {
9533
      if (!getClass().equals(other.getClass())) {
9534
        return getClass().getName().compareTo(other.getClass().getName());
9535
      }
9536
 
9537
      int lastComparison = 0;
9538
      getSuppliers_result typedOther = (getSuppliers_result)other;
9539
 
9540
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9541
      if (lastComparison != 0) {
9542
        return lastComparison;
9543
      }
9544
      if (isSetSuccess()) {
9545
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9546
        if (lastComparison != 0) {
9547
          return lastComparison;
9548
        }
9549
      }
9550
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9551
      if (lastComparison != 0) {
9552
        return lastComparison;
9553
      }
9554
      if (isSetE()) {
9555
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9556
        if (lastComparison != 0) {
9557
          return lastComparison;
9558
        }
9559
      }
9560
      return 0;
9561
    }
9562
 
9563
    public _Fields fieldForId(int fieldId) {
9564
      return _Fields.findByThriftId(fieldId);
9565
    }
9566
 
9567
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9568
      org.apache.thrift.protocol.TField field;
9569
      iprot.readStructBegin();
9570
      while (true)
9571
      {
9572
        field = iprot.readFieldBegin();
9573
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9574
          break;
9575
        }
9576
        switch (field.id) {
9577
          case 0: // SUCCESS
9578
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9579
              {
6385 amar.kumar 9580
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
9581
                this.success = new ArrayList<Supplier>(_list20.size);
9582
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 9583
                {
6385 amar.kumar 9584
                  Supplier _elem22; // required
9585
                  _elem22 = new Supplier();
9586
                  _elem22.read(iprot);
9587
                  this.success.add(_elem22);
4754 mandeep.dh 9588
                }
9589
                iprot.readListEnd();
9590
              }
9591
            } else { 
9592
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9593
            }
9594
            break;
9595
          case 1: // E
9596
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9597
              this.e = new PurchaseServiceException();
9598
              this.e.read(iprot);
9599
            } else { 
9600
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9601
            }
9602
            break;
9603
          default:
9604
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9605
        }
9606
        iprot.readFieldEnd();
9607
      }
9608
      iprot.readStructEnd();
9609
      validate();
9610
    }
9611
 
9612
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9613
      oprot.writeStructBegin(STRUCT_DESC);
9614
 
9615
      if (this.isSetSuccess()) {
9616
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9617
        {
9618
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9619
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 9620
          {
6385 amar.kumar 9621
            _iter23.write(oprot);
4754 mandeep.dh 9622
          }
9623
          oprot.writeListEnd();
9624
        }
9625
        oprot.writeFieldEnd();
9626
      } else if (this.isSetE()) {
9627
        oprot.writeFieldBegin(E_FIELD_DESC);
9628
        this.e.write(oprot);
9629
        oprot.writeFieldEnd();
9630
      }
9631
      oprot.writeFieldStop();
9632
      oprot.writeStructEnd();
9633
    }
9634
 
9635
    @Override
9636
    public String toString() {
9637
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
9638
      boolean first = true;
9639
 
9640
      sb.append("success:");
9641
      if (this.success == null) {
9642
        sb.append("null");
9643
      } else {
9644
        sb.append(this.success);
9645
      }
9646
      first = false;
9647
      if (!first) sb.append(", ");
9648
      sb.append("e:");
9649
      if (this.e == null) {
9650
        sb.append("null");
9651
      } else {
9652
        sb.append(this.e);
9653
      }
9654
      first = false;
9655
      sb.append(")");
9656
      return sb.toString();
9657
    }
9658
 
9659
    public void validate() throws org.apache.thrift.TException {
9660
      // check for required fields
9661
    }
9662
 
9663
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9664
      try {
9665
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9666
      } catch (org.apache.thrift.TException te) {
9667
        throw new java.io.IOException(te);
9668
      }
9669
    }
9670
 
9671
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9672
      try {
9673
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9674
      } catch (org.apache.thrift.TException te) {
9675
        throw new java.io.IOException(te);
9676
      }
9677
    }
9678
 
9679
  }
9680
 
9681
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
9682
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
9683
 
9684
    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);
9685
    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);
9686
    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);
9687
 
9688
    private long purchaseOrderId; // required
9689
    private long itemId; // required
9690
    private long quantity; // required
9691
 
9692
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9693
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9694
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
9695
      ITEM_ID((short)2, "itemId"),
9696
      QUANTITY((short)3, "quantity");
9697
 
9698
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9699
 
9700
      static {
9701
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9702
          byName.put(field.getFieldName(), field);
9703
        }
9704
      }
9705
 
9706
      /**
9707
       * Find the _Fields constant that matches fieldId, or null if its not found.
9708
       */
9709
      public static _Fields findByThriftId(int fieldId) {
9710
        switch(fieldId) {
9711
          case 1: // PURCHASE_ORDER_ID
9712
            return PURCHASE_ORDER_ID;
9713
          case 2: // ITEM_ID
9714
            return ITEM_ID;
9715
          case 3: // QUANTITY
9716
            return QUANTITY;
9717
          default:
9718
            return null;
9719
        }
9720
      }
9721
 
9722
      /**
9723
       * Find the _Fields constant that matches fieldId, throwing an exception
9724
       * if it is not found.
9725
       */
9726
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9727
        _Fields fields = findByThriftId(fieldId);
9728
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9729
        return fields;
9730
      }
9731
 
9732
      /**
9733
       * Find the _Fields constant that matches name, or null if its not found.
9734
       */
9735
      public static _Fields findByName(String name) {
9736
        return byName.get(name);
9737
      }
9738
 
9739
      private final short _thriftId;
9740
      private final String _fieldName;
9741
 
9742
      _Fields(short thriftId, String fieldName) {
9743
        _thriftId = thriftId;
9744
        _fieldName = fieldName;
9745
      }
9746
 
9747
      public short getThriftFieldId() {
9748
        return _thriftId;
9749
      }
9750
 
9751
      public String getFieldName() {
9752
        return _fieldName;
9753
      }
9754
    }
9755
 
9756
    // isset id assignments
9757
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
9758
    private static final int __ITEMID_ISSET_ID = 1;
9759
    private static final int __QUANTITY_ISSET_ID = 2;
9760
    private BitSet __isset_bit_vector = new BitSet(3);
9761
 
9762
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9763
    static {
9764
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9765
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9766
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9767
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9768
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9769
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9770
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9771
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9772
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
9773
    }
9774
 
9775
    public fulfillPO_args() {
9776
    }
9777
 
9778
    public fulfillPO_args(
9779
      long purchaseOrderId,
9780
      long itemId,
9781
      long quantity)
9782
    {
9783
      this();
9784
      this.purchaseOrderId = purchaseOrderId;
9785
      setPurchaseOrderIdIsSet(true);
9786
      this.itemId = itemId;
9787
      setItemIdIsSet(true);
9788
      this.quantity = quantity;
9789
      setQuantityIsSet(true);
9790
    }
9791
 
9792
    /**
9793
     * Performs a deep copy on <i>other</i>.
9794
     */
9795
    public fulfillPO_args(fulfillPO_args other) {
9796
      __isset_bit_vector.clear();
9797
      __isset_bit_vector.or(other.__isset_bit_vector);
9798
      this.purchaseOrderId = other.purchaseOrderId;
9799
      this.itemId = other.itemId;
9800
      this.quantity = other.quantity;
9801
    }
9802
 
9803
    public fulfillPO_args deepCopy() {
9804
      return new fulfillPO_args(this);
9805
    }
9806
 
9807
    @Override
9808
    public void clear() {
9809
      setPurchaseOrderIdIsSet(false);
9810
      this.purchaseOrderId = 0;
9811
      setItemIdIsSet(false);
9812
      this.itemId = 0;
9813
      setQuantityIsSet(false);
9814
      this.quantity = 0;
9815
    }
9816
 
9817
    public long getPurchaseOrderId() {
9818
      return this.purchaseOrderId;
9819
    }
9820
 
9821
    public void setPurchaseOrderId(long purchaseOrderId) {
9822
      this.purchaseOrderId = purchaseOrderId;
9823
      setPurchaseOrderIdIsSet(true);
9824
    }
9825
 
9826
    public void unsetPurchaseOrderId() {
9827
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
9828
    }
9829
 
9830
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
9831
    public boolean isSetPurchaseOrderId() {
9832
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
9833
    }
9834
 
9835
    public void setPurchaseOrderIdIsSet(boolean value) {
9836
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
9837
    }
9838
 
9839
    public long getItemId() {
9840
      return this.itemId;
9841
    }
9842
 
9843
    public void setItemId(long itemId) {
9844
      this.itemId = itemId;
9845
      setItemIdIsSet(true);
9846
    }
9847
 
9848
    public void unsetItemId() {
9849
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
9850
    }
9851
 
9852
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
9853
    public boolean isSetItemId() {
9854
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
9855
    }
9856
 
9857
    public void setItemIdIsSet(boolean value) {
9858
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
9859
    }
9860
 
9861
    public long getQuantity() {
9862
      return this.quantity;
9863
    }
9864
 
9865
    public void setQuantity(long quantity) {
9866
      this.quantity = quantity;
9867
      setQuantityIsSet(true);
9868
    }
9869
 
9870
    public void unsetQuantity() {
9871
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
9872
    }
9873
 
9874
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
9875
    public boolean isSetQuantity() {
9876
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
9877
    }
9878
 
9879
    public void setQuantityIsSet(boolean value) {
9880
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
9881
    }
9882
 
9883
    public void setFieldValue(_Fields field, Object value) {
9884
      switch (field) {
9885
      case PURCHASE_ORDER_ID:
9886
        if (value == null) {
9887
          unsetPurchaseOrderId();
9888
        } else {
9889
          setPurchaseOrderId((Long)value);
9890
        }
9891
        break;
9892
 
9893
      case ITEM_ID:
9894
        if (value == null) {
9895
          unsetItemId();
9896
        } else {
9897
          setItemId((Long)value);
9898
        }
9899
        break;
9900
 
9901
      case QUANTITY:
9902
        if (value == null) {
9903
          unsetQuantity();
9904
        } else {
9905
          setQuantity((Long)value);
9906
        }
9907
        break;
9908
 
9909
      }
9910
    }
9911
 
9912
    public Object getFieldValue(_Fields field) {
9913
      switch (field) {
9914
      case PURCHASE_ORDER_ID:
9915
        return Long.valueOf(getPurchaseOrderId());
9916
 
9917
      case ITEM_ID:
9918
        return Long.valueOf(getItemId());
9919
 
9920
      case QUANTITY:
9921
        return Long.valueOf(getQuantity());
9922
 
9923
      }
9924
      throw new IllegalStateException();
9925
    }
9926
 
9927
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9928
    public boolean isSet(_Fields field) {
9929
      if (field == null) {
9930
        throw new IllegalArgumentException();
9931
      }
9932
 
9933
      switch (field) {
9934
      case PURCHASE_ORDER_ID:
9935
        return isSetPurchaseOrderId();
9936
      case ITEM_ID:
9937
        return isSetItemId();
9938
      case QUANTITY:
9939
        return isSetQuantity();
9940
      }
9941
      throw new IllegalStateException();
9942
    }
9943
 
9944
    @Override
9945
    public boolean equals(Object that) {
9946
      if (that == null)
9947
        return false;
9948
      if (that instanceof fulfillPO_args)
9949
        return this.equals((fulfillPO_args)that);
9950
      return false;
9951
    }
9952
 
9953
    public boolean equals(fulfillPO_args that) {
9954
      if (that == null)
9955
        return false;
9956
 
9957
      boolean this_present_purchaseOrderId = true;
9958
      boolean that_present_purchaseOrderId = true;
9959
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
9960
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
9961
          return false;
9962
        if (this.purchaseOrderId != that.purchaseOrderId)
9963
          return false;
9964
      }
9965
 
9966
      boolean this_present_itemId = true;
9967
      boolean that_present_itemId = true;
9968
      if (this_present_itemId || that_present_itemId) {
9969
        if (!(this_present_itemId && that_present_itemId))
9970
          return false;
9971
        if (this.itemId != that.itemId)
9972
          return false;
9973
      }
9974
 
9975
      boolean this_present_quantity = true;
9976
      boolean that_present_quantity = true;
9977
      if (this_present_quantity || that_present_quantity) {
9978
        if (!(this_present_quantity && that_present_quantity))
9979
          return false;
9980
        if (this.quantity != that.quantity)
9981
          return false;
9982
      }
9983
 
9984
      return true;
9985
    }
9986
 
9987
    @Override
9988
    public int hashCode() {
9989
      return 0;
9990
    }
9991
 
9992
    public int compareTo(fulfillPO_args other) {
9993
      if (!getClass().equals(other.getClass())) {
9994
        return getClass().getName().compareTo(other.getClass().getName());
9995
      }
9996
 
9997
      int lastComparison = 0;
9998
      fulfillPO_args typedOther = (fulfillPO_args)other;
9999
 
10000
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
10001
      if (lastComparison != 0) {
10002
        return lastComparison;
10003
      }
10004
      if (isSetPurchaseOrderId()) {
10005
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
10006
        if (lastComparison != 0) {
10007
          return lastComparison;
10008
        }
10009
      }
10010
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10011
      if (lastComparison != 0) {
10012
        return lastComparison;
10013
      }
10014
      if (isSetItemId()) {
10015
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10016
        if (lastComparison != 0) {
10017
          return lastComparison;
10018
        }
10019
      }
10020
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10021
      if (lastComparison != 0) {
10022
        return lastComparison;
10023
      }
10024
      if (isSetQuantity()) {
10025
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10026
        if (lastComparison != 0) {
10027
          return lastComparison;
10028
        }
10029
      }
10030
      return 0;
10031
    }
10032
 
10033
    public _Fields fieldForId(int fieldId) {
10034
      return _Fields.findByThriftId(fieldId);
10035
    }
10036
 
10037
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10038
      org.apache.thrift.protocol.TField field;
10039
      iprot.readStructBegin();
10040
      while (true)
10041
      {
10042
        field = iprot.readFieldBegin();
10043
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10044
          break;
10045
        }
10046
        switch (field.id) {
10047
          case 1: // PURCHASE_ORDER_ID
10048
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10049
              this.purchaseOrderId = iprot.readI64();
10050
              setPurchaseOrderIdIsSet(true);
10051
            } else { 
10052
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10053
            }
10054
            break;
10055
          case 2: // ITEM_ID
10056
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10057
              this.itemId = iprot.readI64();
10058
              setItemIdIsSet(true);
10059
            } else { 
10060
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10061
            }
10062
            break;
10063
          case 3: // QUANTITY
10064
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10065
              this.quantity = iprot.readI64();
10066
              setQuantityIsSet(true);
10067
            } else { 
10068
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10069
            }
10070
            break;
10071
          default:
10072
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10073
        }
10074
        iprot.readFieldEnd();
10075
      }
10076
      iprot.readStructEnd();
10077
      validate();
10078
    }
10079
 
10080
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10081
      validate();
10082
 
10083
      oprot.writeStructBegin(STRUCT_DESC);
10084
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
10085
      oprot.writeI64(this.purchaseOrderId);
10086
      oprot.writeFieldEnd();
10087
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10088
      oprot.writeI64(this.itemId);
10089
      oprot.writeFieldEnd();
10090
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10091
      oprot.writeI64(this.quantity);
10092
      oprot.writeFieldEnd();
10093
      oprot.writeFieldStop();
10094
      oprot.writeStructEnd();
10095
    }
10096
 
10097
    @Override
10098
    public String toString() {
10099
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10100
      boolean first = true;
10101
 
10102
      sb.append("purchaseOrderId:");
10103
      sb.append(this.purchaseOrderId);
10104
      first = false;
10105
      if (!first) sb.append(", ");
10106
      sb.append("itemId:");
10107
      sb.append(this.itemId);
10108
      first = false;
10109
      if (!first) sb.append(", ");
10110
      sb.append("quantity:");
10111
      sb.append(this.quantity);
10112
      first = false;
10113
      sb.append(")");
10114
      return sb.toString();
10115
    }
10116
 
10117
    public void validate() throws org.apache.thrift.TException {
10118
      // check for required fields
10119
    }
10120
 
10121
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10122
      try {
10123
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10124
      } catch (org.apache.thrift.TException te) {
10125
        throw new java.io.IOException(te);
10126
      }
10127
    }
10128
 
10129
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10130
      try {
10131
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10132
        __isset_bit_vector = new BitSet(1);
10133
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10134
      } catch (org.apache.thrift.TException te) {
10135
        throw new java.io.IOException(te);
10136
      }
10137
    }
10138
 
10139
  }
10140
 
10141
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10142
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10143
 
10144
    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);
10145
 
10146
    private PurchaseServiceException e; // required
10147
 
10148
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10149
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10150
      E((short)1, "e");
10151
 
10152
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10153
 
10154
      static {
10155
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10156
          byName.put(field.getFieldName(), field);
10157
        }
10158
      }
10159
 
10160
      /**
10161
       * Find the _Fields constant that matches fieldId, or null if its not found.
10162
       */
10163
      public static _Fields findByThriftId(int fieldId) {
10164
        switch(fieldId) {
10165
          case 1: // E
10166
            return E;
10167
          default:
10168
            return null;
10169
        }
10170
      }
10171
 
10172
      /**
10173
       * Find the _Fields constant that matches fieldId, throwing an exception
10174
       * if it is not found.
10175
       */
10176
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10177
        _Fields fields = findByThriftId(fieldId);
10178
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10179
        return fields;
10180
      }
10181
 
10182
      /**
10183
       * Find the _Fields constant that matches name, or null if its not found.
10184
       */
10185
      public static _Fields findByName(String name) {
10186
        return byName.get(name);
10187
      }
10188
 
10189
      private final short _thriftId;
10190
      private final String _fieldName;
10191
 
10192
      _Fields(short thriftId, String fieldName) {
10193
        _thriftId = thriftId;
10194
        _fieldName = fieldName;
10195
      }
10196
 
10197
      public short getThriftFieldId() {
10198
        return _thriftId;
10199
      }
10200
 
10201
      public String getFieldName() {
10202
        return _fieldName;
10203
      }
10204
    }
10205
 
10206
    // isset id assignments
10207
 
10208
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10209
    static {
10210
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10211
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10212
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10213
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10214
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10215
    }
10216
 
10217
    public fulfillPO_result() {
10218
    }
10219
 
10220
    public fulfillPO_result(
10221
      PurchaseServiceException e)
10222
    {
10223
      this();
10224
      this.e = e;
10225
    }
10226
 
10227
    /**
10228
     * Performs a deep copy on <i>other</i>.
10229
     */
10230
    public fulfillPO_result(fulfillPO_result other) {
10231
      if (other.isSetE()) {
10232
        this.e = new PurchaseServiceException(other.e);
10233
      }
10234
    }
10235
 
10236
    public fulfillPO_result deepCopy() {
10237
      return new fulfillPO_result(this);
10238
    }
10239
 
10240
    @Override
10241
    public void clear() {
10242
      this.e = null;
10243
    }
10244
 
10245
    public PurchaseServiceException getE() {
10246
      return this.e;
10247
    }
10248
 
10249
    public void setE(PurchaseServiceException e) {
10250
      this.e = e;
10251
    }
10252
 
10253
    public void unsetE() {
10254
      this.e = null;
10255
    }
10256
 
10257
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10258
    public boolean isSetE() {
10259
      return this.e != null;
10260
    }
10261
 
10262
    public void setEIsSet(boolean value) {
10263
      if (!value) {
10264
        this.e = null;
10265
      }
10266
    }
10267
 
10268
    public void setFieldValue(_Fields field, Object value) {
10269
      switch (field) {
10270
      case E:
10271
        if (value == null) {
10272
          unsetE();
10273
        } else {
10274
          setE((PurchaseServiceException)value);
10275
        }
10276
        break;
10277
 
10278
      }
10279
    }
10280
 
10281
    public Object getFieldValue(_Fields field) {
10282
      switch (field) {
10283
      case E:
10284
        return getE();
10285
 
10286
      }
10287
      throw new IllegalStateException();
10288
    }
10289
 
10290
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10291
    public boolean isSet(_Fields field) {
10292
      if (field == null) {
10293
        throw new IllegalArgumentException();
10294
      }
10295
 
10296
      switch (field) {
10297
      case E:
10298
        return isSetE();
10299
      }
10300
      throw new IllegalStateException();
10301
    }
10302
 
10303
    @Override
10304
    public boolean equals(Object that) {
10305
      if (that == null)
10306
        return false;
10307
      if (that instanceof fulfillPO_result)
10308
        return this.equals((fulfillPO_result)that);
10309
      return false;
10310
    }
10311
 
10312
    public boolean equals(fulfillPO_result that) {
10313
      if (that == null)
10314
        return false;
10315
 
10316
      boolean this_present_e = true && this.isSetE();
10317
      boolean that_present_e = true && that.isSetE();
10318
      if (this_present_e || that_present_e) {
10319
        if (!(this_present_e && that_present_e))
10320
          return false;
10321
        if (!this.e.equals(that.e))
10322
          return false;
10323
      }
10324
 
10325
      return true;
10326
    }
10327
 
10328
    @Override
10329
    public int hashCode() {
10330
      return 0;
10331
    }
10332
 
10333
    public int compareTo(fulfillPO_result other) {
10334
      if (!getClass().equals(other.getClass())) {
10335
        return getClass().getName().compareTo(other.getClass().getName());
10336
      }
10337
 
10338
      int lastComparison = 0;
10339
      fulfillPO_result typedOther = (fulfillPO_result)other;
10340
 
10341
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10342
      if (lastComparison != 0) {
10343
        return lastComparison;
10344
      }
10345
      if (isSetE()) {
10346
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10347
        if (lastComparison != 0) {
10348
          return lastComparison;
10349
        }
10350
      }
10351
      return 0;
10352
    }
10353
 
10354
    public _Fields fieldForId(int fieldId) {
10355
      return _Fields.findByThriftId(fieldId);
10356
    }
10357
 
10358
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10359
      org.apache.thrift.protocol.TField field;
10360
      iprot.readStructBegin();
10361
      while (true)
10362
      {
10363
        field = iprot.readFieldBegin();
10364
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10365
          break;
10366
        }
10367
        switch (field.id) {
10368
          case 1: // E
10369
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10370
              this.e = new PurchaseServiceException();
10371
              this.e.read(iprot);
10372
            } else { 
10373
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10374
            }
10375
            break;
10376
          default:
10377
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10378
        }
10379
        iprot.readFieldEnd();
10380
      }
10381
      iprot.readStructEnd();
10382
      validate();
10383
    }
10384
 
10385
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10386
      oprot.writeStructBegin(STRUCT_DESC);
10387
 
10388
      if (this.isSetE()) {
10389
        oprot.writeFieldBegin(E_FIELD_DESC);
10390
        this.e.write(oprot);
10391
        oprot.writeFieldEnd();
10392
      }
10393
      oprot.writeFieldStop();
10394
      oprot.writeStructEnd();
10395
    }
10396
 
10397
    @Override
10398
    public String toString() {
10399
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
10400
      boolean first = true;
10401
 
10402
      sb.append("e:");
10403
      if (this.e == null) {
10404
        sb.append("null");
10405
      } else {
10406
        sb.append(this.e);
10407
      }
10408
      first = false;
10409
      sb.append(")");
10410
      return sb.toString();
10411
    }
10412
 
10413
    public void validate() throws org.apache.thrift.TException {
10414
      // check for required fields
10415
    }
10416
 
10417
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10418
      try {
10419
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10420
      } catch (org.apache.thrift.TException te) {
10421
        throw new java.io.IOException(te);
10422
      }
10423
    }
10424
 
10425
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10426
      try {
10427
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10428
      } catch (org.apache.thrift.TException te) {
10429
        throw new java.io.IOException(te);
10430
      }
10431
    }
10432
 
10433
  }
10434
 
10435
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
10436
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
10437
 
10438
    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);
10439
 
10440
    private PurchaseOrder purchaseOrder; // required
10441
 
10442
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10443
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10444
      PURCHASE_ORDER((short)1, "purchaseOrder");
10445
 
10446
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10447
 
10448
      static {
10449
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10450
          byName.put(field.getFieldName(), field);
10451
        }
10452
      }
10453
 
10454
      /**
10455
       * Find the _Fields constant that matches fieldId, or null if its not found.
10456
       */
10457
      public static _Fields findByThriftId(int fieldId) {
10458
        switch(fieldId) {
10459
          case 1: // PURCHASE_ORDER
10460
            return PURCHASE_ORDER;
10461
          default:
10462
            return null;
10463
        }
10464
      }
10465
 
10466
      /**
10467
       * Find the _Fields constant that matches fieldId, throwing an exception
10468
       * if it is not found.
10469
       */
10470
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10471
        _Fields fields = findByThriftId(fieldId);
10472
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10473
        return fields;
10474
      }
10475
 
10476
      /**
10477
       * Find the _Fields constant that matches name, or null if its not found.
10478
       */
10479
      public static _Fields findByName(String name) {
10480
        return byName.get(name);
10481
      }
10482
 
10483
      private final short _thriftId;
10484
      private final String _fieldName;
10485
 
10486
      _Fields(short thriftId, String fieldName) {
10487
        _thriftId = thriftId;
10488
        _fieldName = fieldName;
10489
      }
10490
 
10491
      public short getThriftFieldId() {
10492
        return _thriftId;
10493
      }
10494
 
10495
      public String getFieldName() {
10496
        return _fieldName;
10497
      }
10498
    }
10499
 
10500
    // isset id assignments
10501
 
10502
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10503
    static {
10504
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10505
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10506
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
10507
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10508
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
10509
    }
10510
 
10511
    public updatePurchaseOrder_args() {
10512
    }
10513
 
10514
    public updatePurchaseOrder_args(
10515
      PurchaseOrder purchaseOrder)
10516
    {
10517
      this();
10518
      this.purchaseOrder = purchaseOrder;
10519
    }
10520
 
10521
    /**
10522
     * Performs a deep copy on <i>other</i>.
10523
     */
10524
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
10525
      if (other.isSetPurchaseOrder()) {
10526
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
10527
      }
10528
    }
10529
 
10530
    public updatePurchaseOrder_args deepCopy() {
10531
      return new updatePurchaseOrder_args(this);
10532
    }
10533
 
10534
    @Override
10535
    public void clear() {
10536
      this.purchaseOrder = null;
10537
    }
10538
 
10539
    public PurchaseOrder getPurchaseOrder() {
10540
      return this.purchaseOrder;
10541
    }
10542
 
10543
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
10544
      this.purchaseOrder = purchaseOrder;
10545
    }
10546
 
10547
    public void unsetPurchaseOrder() {
10548
      this.purchaseOrder = null;
10549
    }
10550
 
10551
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
10552
    public boolean isSetPurchaseOrder() {
10553
      return this.purchaseOrder != null;
10554
    }
10555
 
10556
    public void setPurchaseOrderIsSet(boolean value) {
10557
      if (!value) {
10558
        this.purchaseOrder = null;
10559
      }
10560
    }
10561
 
10562
    public void setFieldValue(_Fields field, Object value) {
10563
      switch (field) {
10564
      case PURCHASE_ORDER:
10565
        if (value == null) {
10566
          unsetPurchaseOrder();
10567
        } else {
10568
          setPurchaseOrder((PurchaseOrder)value);
10569
        }
10570
        break;
10571
 
10572
      }
10573
    }
10574
 
10575
    public Object getFieldValue(_Fields field) {
10576
      switch (field) {
10577
      case PURCHASE_ORDER:
10578
        return getPurchaseOrder();
10579
 
10580
      }
10581
      throw new IllegalStateException();
10582
    }
10583
 
10584
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10585
    public boolean isSet(_Fields field) {
10586
      if (field == null) {
10587
        throw new IllegalArgumentException();
10588
      }
10589
 
10590
      switch (field) {
10591
      case PURCHASE_ORDER:
10592
        return isSetPurchaseOrder();
10593
      }
10594
      throw new IllegalStateException();
10595
    }
10596
 
10597
    @Override
10598
    public boolean equals(Object that) {
10599
      if (that == null)
10600
        return false;
10601
      if (that instanceof updatePurchaseOrder_args)
10602
        return this.equals((updatePurchaseOrder_args)that);
10603
      return false;
10604
    }
10605
 
10606
    public boolean equals(updatePurchaseOrder_args that) {
10607
      if (that == null)
10608
        return false;
10609
 
10610
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
10611
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
10612
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
10613
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
10614
          return false;
10615
        if (!this.purchaseOrder.equals(that.purchaseOrder))
10616
          return false;
10617
      }
10618
 
10619
      return true;
10620
    }
10621
 
10622
    @Override
10623
    public int hashCode() {
10624
      return 0;
10625
    }
10626
 
10627
    public int compareTo(updatePurchaseOrder_args other) {
10628
      if (!getClass().equals(other.getClass())) {
10629
        return getClass().getName().compareTo(other.getClass().getName());
10630
      }
10631
 
10632
      int lastComparison = 0;
10633
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
10634
 
10635
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
10636
      if (lastComparison != 0) {
10637
        return lastComparison;
10638
      }
10639
      if (isSetPurchaseOrder()) {
10640
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
10641
        if (lastComparison != 0) {
10642
          return lastComparison;
10643
        }
10644
      }
10645
      return 0;
10646
    }
10647
 
10648
    public _Fields fieldForId(int fieldId) {
10649
      return _Fields.findByThriftId(fieldId);
10650
    }
10651
 
10652
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10653
      org.apache.thrift.protocol.TField field;
10654
      iprot.readStructBegin();
10655
      while (true)
10656
      {
10657
        field = iprot.readFieldBegin();
10658
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10659
          break;
10660
        }
10661
        switch (field.id) {
10662
          case 1: // PURCHASE_ORDER
10663
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10664
              this.purchaseOrder = new PurchaseOrder();
10665
              this.purchaseOrder.read(iprot);
10666
            } else { 
10667
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10668
            }
10669
            break;
10670
          default:
10671
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10672
        }
10673
        iprot.readFieldEnd();
10674
      }
10675
      iprot.readStructEnd();
10676
      validate();
10677
    }
10678
 
10679
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10680
      validate();
10681
 
10682
      oprot.writeStructBegin(STRUCT_DESC);
10683
      if (this.purchaseOrder != null) {
10684
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
10685
        this.purchaseOrder.write(oprot);
10686
        oprot.writeFieldEnd();
10687
      }
10688
      oprot.writeFieldStop();
10689
      oprot.writeStructEnd();
10690
    }
10691
 
10692
    @Override
10693
    public String toString() {
10694
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
10695
      boolean first = true;
10696
 
10697
      sb.append("purchaseOrder:");
10698
      if (this.purchaseOrder == null) {
10699
        sb.append("null");
10700
      } else {
10701
        sb.append(this.purchaseOrder);
10702
      }
10703
      first = false;
10704
      sb.append(")");
10705
      return sb.toString();
10706
    }
10707
 
10708
    public void validate() throws org.apache.thrift.TException {
10709
      // check for required fields
10710
    }
10711
 
10712
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10713
      try {
10714
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10715
      } catch (org.apache.thrift.TException te) {
10716
        throw new java.io.IOException(te);
10717
      }
10718
    }
10719
 
10720
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10721
      try {
10722
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10723
      } catch (org.apache.thrift.TException te) {
10724
        throw new java.io.IOException(te);
10725
      }
10726
    }
10727
 
10728
  }
10729
 
10730
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
10731
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
10732
 
10733
    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);
10734
 
10735
    private PurchaseServiceException e; // required
10736
 
10737
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10738
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10739
      E((short)1, "e");
10740
 
10741
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10742
 
10743
      static {
10744
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10745
          byName.put(field.getFieldName(), field);
10746
        }
10747
      }
10748
 
10749
      /**
10750
       * Find the _Fields constant that matches fieldId, or null if its not found.
10751
       */
10752
      public static _Fields findByThriftId(int fieldId) {
10753
        switch(fieldId) {
10754
          case 1: // E
10755
            return E;
10756
          default:
10757
            return null;
10758
        }
10759
      }
10760
 
10761
      /**
10762
       * Find the _Fields constant that matches fieldId, throwing an exception
10763
       * if it is not found.
10764
       */
10765
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10766
        _Fields fields = findByThriftId(fieldId);
10767
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10768
        return fields;
10769
      }
10770
 
10771
      /**
10772
       * Find the _Fields constant that matches name, or null if its not found.
10773
       */
10774
      public static _Fields findByName(String name) {
10775
        return byName.get(name);
10776
      }
10777
 
10778
      private final short _thriftId;
10779
      private final String _fieldName;
10780
 
10781
      _Fields(short thriftId, String fieldName) {
10782
        _thriftId = thriftId;
10783
        _fieldName = fieldName;
10784
      }
10785
 
10786
      public short getThriftFieldId() {
10787
        return _thriftId;
10788
      }
10789
 
10790
      public String getFieldName() {
10791
        return _fieldName;
10792
      }
10793
    }
10794
 
10795
    // isset id assignments
10796
 
10797
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10798
    static {
10799
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10800
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10801
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10802
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10803
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
10804
    }
10805
 
10806
    public updatePurchaseOrder_result() {
10807
    }
10808
 
10809
    public updatePurchaseOrder_result(
10810
      PurchaseServiceException e)
10811
    {
10812
      this();
10813
      this.e = e;
10814
    }
10815
 
10816
    /**
10817
     * Performs a deep copy on <i>other</i>.
10818
     */
10819
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
10820
      if (other.isSetE()) {
10821
        this.e = new PurchaseServiceException(other.e);
10822
      }
10823
    }
10824
 
10825
    public updatePurchaseOrder_result deepCopy() {
10826
      return new updatePurchaseOrder_result(this);
10827
    }
10828
 
10829
    @Override
10830
    public void clear() {
10831
      this.e = null;
10832
    }
10833
 
10834
    public PurchaseServiceException getE() {
10835
      return this.e;
10836
    }
10837
 
10838
    public void setE(PurchaseServiceException e) {
10839
      this.e = e;
10840
    }
10841
 
10842
    public void unsetE() {
10843
      this.e = null;
10844
    }
10845
 
10846
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10847
    public boolean isSetE() {
10848
      return this.e != null;
10849
    }
10850
 
10851
    public void setEIsSet(boolean value) {
10852
      if (!value) {
10853
        this.e = null;
10854
      }
10855
    }
10856
 
10857
    public void setFieldValue(_Fields field, Object value) {
10858
      switch (field) {
10859
      case E:
10860
        if (value == null) {
10861
          unsetE();
10862
        } else {
10863
          setE((PurchaseServiceException)value);
10864
        }
10865
        break;
10866
 
10867
      }
10868
    }
10869
 
10870
    public Object getFieldValue(_Fields field) {
10871
      switch (field) {
10872
      case E:
10873
        return getE();
10874
 
10875
      }
10876
      throw new IllegalStateException();
10877
    }
10878
 
10879
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10880
    public boolean isSet(_Fields field) {
10881
      if (field == null) {
10882
        throw new IllegalArgumentException();
10883
      }
10884
 
10885
      switch (field) {
10886
      case E:
10887
        return isSetE();
10888
      }
10889
      throw new IllegalStateException();
10890
    }
10891
 
10892
    @Override
10893
    public boolean equals(Object that) {
10894
      if (that == null)
10895
        return false;
10896
      if (that instanceof updatePurchaseOrder_result)
10897
        return this.equals((updatePurchaseOrder_result)that);
10898
      return false;
10899
    }
10900
 
10901
    public boolean equals(updatePurchaseOrder_result that) {
10902
      if (that == null)
10903
        return false;
10904
 
10905
      boolean this_present_e = true && this.isSetE();
10906
      boolean that_present_e = true && that.isSetE();
10907
      if (this_present_e || that_present_e) {
10908
        if (!(this_present_e && that_present_e))
10909
          return false;
10910
        if (!this.e.equals(that.e))
10911
          return false;
10912
      }
10913
 
10914
      return true;
10915
    }
10916
 
10917
    @Override
10918
    public int hashCode() {
10919
      return 0;
10920
    }
10921
 
10922
    public int compareTo(updatePurchaseOrder_result other) {
10923
      if (!getClass().equals(other.getClass())) {
10924
        return getClass().getName().compareTo(other.getClass().getName());
10925
      }
10926
 
10927
      int lastComparison = 0;
10928
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
10929
 
10930
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10931
      if (lastComparison != 0) {
10932
        return lastComparison;
10933
      }
10934
      if (isSetE()) {
10935
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10936
        if (lastComparison != 0) {
10937
          return lastComparison;
10938
        }
10939
      }
10940
      return 0;
10941
    }
10942
 
10943
    public _Fields fieldForId(int fieldId) {
10944
      return _Fields.findByThriftId(fieldId);
10945
    }
10946
 
10947
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10948
      org.apache.thrift.protocol.TField field;
10949
      iprot.readStructBegin();
10950
      while (true)
10951
      {
10952
        field = iprot.readFieldBegin();
10953
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10954
          break;
10955
        }
10956
        switch (field.id) {
10957
          case 1: // E
10958
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10959
              this.e = new PurchaseServiceException();
10960
              this.e.read(iprot);
10961
            } else { 
10962
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10963
            }
10964
            break;
10965
          default:
10966
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10967
        }
10968
        iprot.readFieldEnd();
10969
      }
10970
      iprot.readStructEnd();
10971
      validate();
10972
    }
10973
 
10974
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10975
      oprot.writeStructBegin(STRUCT_DESC);
10976
 
10977
      if (this.isSetE()) {
10978
        oprot.writeFieldBegin(E_FIELD_DESC);
10979
        this.e.write(oprot);
10980
        oprot.writeFieldEnd();
10981
      }
10982
      oprot.writeFieldStop();
10983
      oprot.writeStructEnd();
10984
    }
10985
 
10986
    @Override
10987
    public String toString() {
10988
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
10989
      boolean first = true;
10990
 
10991
      sb.append("e:");
10992
      if (this.e == null) {
10993
        sb.append("null");
10994
      } else {
10995
        sb.append(this.e);
10996
      }
10997
      first = false;
10998
      sb.append(")");
10999
      return sb.toString();
11000
    }
11001
 
11002
    public void validate() throws org.apache.thrift.TException {
11003
      // check for required fields
11004
    }
11005
 
11006
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11007
      try {
11008
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11009
      } catch (org.apache.thrift.TException te) {
11010
        throw new java.io.IOException(te);
11011
      }
11012
    }
11013
 
11014
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11015
      try {
11016
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11017
      } catch (org.apache.thrift.TException te) {
11018
        throw new java.io.IOException(te);
11019
      }
11020
    }
11021
 
11022
  }
11023
 
5185 mandeep.dh 11024
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
11025
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
11026
 
11027
    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);
11028
    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);
11029
    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);
11030
 
11031
    private long purchaseId; // required
11032
    private long itemId; // required
11033
    private long quantity; // required
11034
 
11035
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11036
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11037
      PURCHASE_ID((short)1, "purchaseId"),
11038
      ITEM_ID((short)2, "itemId"),
11039
      QUANTITY((short)3, "quantity");
11040
 
11041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11042
 
11043
      static {
11044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11045
          byName.put(field.getFieldName(), field);
11046
        }
11047
      }
11048
 
11049
      /**
11050
       * Find the _Fields constant that matches fieldId, or null if its not found.
11051
       */
11052
      public static _Fields findByThriftId(int fieldId) {
11053
        switch(fieldId) {
11054
          case 1: // PURCHASE_ID
11055
            return PURCHASE_ID;
11056
          case 2: // ITEM_ID
11057
            return ITEM_ID;
11058
          case 3: // QUANTITY
11059
            return QUANTITY;
11060
          default:
11061
            return null;
11062
        }
11063
      }
11064
 
11065
      /**
11066
       * Find the _Fields constant that matches fieldId, throwing an exception
11067
       * if it is not found.
11068
       */
11069
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11070
        _Fields fields = findByThriftId(fieldId);
11071
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11072
        return fields;
11073
      }
11074
 
11075
      /**
11076
       * Find the _Fields constant that matches name, or null if its not found.
11077
       */
11078
      public static _Fields findByName(String name) {
11079
        return byName.get(name);
11080
      }
11081
 
11082
      private final short _thriftId;
11083
      private final String _fieldName;
11084
 
11085
      _Fields(short thriftId, String fieldName) {
11086
        _thriftId = thriftId;
11087
        _fieldName = fieldName;
11088
      }
11089
 
11090
      public short getThriftFieldId() {
11091
        return _thriftId;
11092
      }
11093
 
11094
      public String getFieldName() {
11095
        return _fieldName;
11096
      }
11097
    }
11098
 
11099
    // isset id assignments
11100
    private static final int __PURCHASEID_ISSET_ID = 0;
11101
    private static final int __ITEMID_ISSET_ID = 1;
11102
    private static final int __QUANTITY_ISSET_ID = 2;
11103
    private BitSet __isset_bit_vector = new BitSet(3);
11104
 
11105
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11106
    static {
11107
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11108
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11109
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11110
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11111
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11112
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11113
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11114
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11115
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11116
    }
11117
 
11118
    public unFulfillPO_args() {
11119
    }
11120
 
11121
    public unFulfillPO_args(
11122
      long purchaseId,
11123
      long itemId,
11124
      long quantity)
11125
    {
11126
      this();
11127
      this.purchaseId = purchaseId;
11128
      setPurchaseIdIsSet(true);
11129
      this.itemId = itemId;
11130
      setItemIdIsSet(true);
11131
      this.quantity = quantity;
11132
      setQuantityIsSet(true);
11133
    }
11134
 
11135
    /**
11136
     * Performs a deep copy on <i>other</i>.
11137
     */
11138
    public unFulfillPO_args(unFulfillPO_args other) {
11139
      __isset_bit_vector.clear();
11140
      __isset_bit_vector.or(other.__isset_bit_vector);
11141
      this.purchaseId = other.purchaseId;
11142
      this.itemId = other.itemId;
11143
      this.quantity = other.quantity;
11144
    }
11145
 
11146
    public unFulfillPO_args deepCopy() {
11147
      return new unFulfillPO_args(this);
11148
    }
11149
 
11150
    @Override
11151
    public void clear() {
11152
      setPurchaseIdIsSet(false);
11153
      this.purchaseId = 0;
11154
      setItemIdIsSet(false);
11155
      this.itemId = 0;
11156
      setQuantityIsSet(false);
11157
      this.quantity = 0;
11158
    }
11159
 
11160
    public long getPurchaseId() {
11161
      return this.purchaseId;
11162
    }
11163
 
11164
    public void setPurchaseId(long purchaseId) {
11165
      this.purchaseId = purchaseId;
11166
      setPurchaseIdIsSet(true);
11167
    }
11168
 
11169
    public void unsetPurchaseId() {
11170
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11171
    }
11172
 
11173
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11174
    public boolean isSetPurchaseId() {
11175
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11176
    }
11177
 
11178
    public void setPurchaseIdIsSet(boolean value) {
11179
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11180
    }
11181
 
11182
    public long getItemId() {
11183
      return this.itemId;
11184
    }
11185
 
11186
    public void setItemId(long itemId) {
11187
      this.itemId = itemId;
11188
      setItemIdIsSet(true);
11189
    }
11190
 
11191
    public void unsetItemId() {
11192
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11193
    }
11194
 
11195
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11196
    public boolean isSetItemId() {
11197
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11198
    }
11199
 
11200
    public void setItemIdIsSet(boolean value) {
11201
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11202
    }
11203
 
11204
    public long getQuantity() {
11205
      return this.quantity;
11206
    }
11207
 
11208
    public void setQuantity(long quantity) {
11209
      this.quantity = quantity;
11210
      setQuantityIsSet(true);
11211
    }
11212
 
11213
    public void unsetQuantity() {
11214
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11215
    }
11216
 
11217
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11218
    public boolean isSetQuantity() {
11219
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11220
    }
11221
 
11222
    public void setQuantityIsSet(boolean value) {
11223
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11224
    }
11225
 
11226
    public void setFieldValue(_Fields field, Object value) {
11227
      switch (field) {
11228
      case PURCHASE_ID:
11229
        if (value == null) {
11230
          unsetPurchaseId();
11231
        } else {
11232
          setPurchaseId((Long)value);
11233
        }
11234
        break;
11235
 
11236
      case ITEM_ID:
11237
        if (value == null) {
11238
          unsetItemId();
11239
        } else {
11240
          setItemId((Long)value);
11241
        }
11242
        break;
11243
 
11244
      case QUANTITY:
11245
        if (value == null) {
11246
          unsetQuantity();
11247
        } else {
11248
          setQuantity((Long)value);
11249
        }
11250
        break;
11251
 
11252
      }
11253
    }
11254
 
11255
    public Object getFieldValue(_Fields field) {
11256
      switch (field) {
11257
      case PURCHASE_ID:
11258
        return Long.valueOf(getPurchaseId());
11259
 
11260
      case ITEM_ID:
11261
        return Long.valueOf(getItemId());
11262
 
11263
      case QUANTITY:
11264
        return Long.valueOf(getQuantity());
11265
 
11266
      }
11267
      throw new IllegalStateException();
11268
    }
11269
 
11270
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11271
    public boolean isSet(_Fields field) {
11272
      if (field == null) {
11273
        throw new IllegalArgumentException();
11274
      }
11275
 
11276
      switch (field) {
11277
      case PURCHASE_ID:
11278
        return isSetPurchaseId();
11279
      case ITEM_ID:
11280
        return isSetItemId();
11281
      case QUANTITY:
11282
        return isSetQuantity();
11283
      }
11284
      throw new IllegalStateException();
11285
    }
11286
 
11287
    @Override
11288
    public boolean equals(Object that) {
11289
      if (that == null)
11290
        return false;
11291
      if (that instanceof unFulfillPO_args)
11292
        return this.equals((unFulfillPO_args)that);
11293
      return false;
11294
    }
11295
 
11296
    public boolean equals(unFulfillPO_args that) {
11297
      if (that == null)
11298
        return false;
11299
 
11300
      boolean this_present_purchaseId = true;
11301
      boolean that_present_purchaseId = true;
11302
      if (this_present_purchaseId || that_present_purchaseId) {
11303
        if (!(this_present_purchaseId && that_present_purchaseId))
11304
          return false;
11305
        if (this.purchaseId != that.purchaseId)
11306
          return false;
11307
      }
11308
 
11309
      boolean this_present_itemId = true;
11310
      boolean that_present_itemId = true;
11311
      if (this_present_itemId || that_present_itemId) {
11312
        if (!(this_present_itemId && that_present_itemId))
11313
          return false;
11314
        if (this.itemId != that.itemId)
11315
          return false;
11316
      }
11317
 
11318
      boolean this_present_quantity = true;
11319
      boolean that_present_quantity = true;
11320
      if (this_present_quantity || that_present_quantity) {
11321
        if (!(this_present_quantity && that_present_quantity))
11322
          return false;
11323
        if (this.quantity != that.quantity)
11324
          return false;
11325
      }
11326
 
11327
      return true;
11328
    }
11329
 
11330
    @Override
11331
    public int hashCode() {
11332
      return 0;
11333
    }
11334
 
11335
    public int compareTo(unFulfillPO_args other) {
11336
      if (!getClass().equals(other.getClass())) {
11337
        return getClass().getName().compareTo(other.getClass().getName());
11338
      }
11339
 
11340
      int lastComparison = 0;
11341
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11342
 
11343
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11344
      if (lastComparison != 0) {
11345
        return lastComparison;
11346
      }
11347
      if (isSetPurchaseId()) {
11348
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11349
        if (lastComparison != 0) {
11350
          return lastComparison;
11351
        }
11352
      }
11353
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11354
      if (lastComparison != 0) {
11355
        return lastComparison;
11356
      }
11357
      if (isSetItemId()) {
11358
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11359
        if (lastComparison != 0) {
11360
          return lastComparison;
11361
        }
11362
      }
11363
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11364
      if (lastComparison != 0) {
11365
        return lastComparison;
11366
      }
11367
      if (isSetQuantity()) {
11368
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11369
        if (lastComparison != 0) {
11370
          return lastComparison;
11371
        }
11372
      }
11373
      return 0;
11374
    }
11375
 
11376
    public _Fields fieldForId(int fieldId) {
11377
      return _Fields.findByThriftId(fieldId);
11378
    }
11379
 
11380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11381
      org.apache.thrift.protocol.TField field;
11382
      iprot.readStructBegin();
11383
      while (true)
11384
      {
11385
        field = iprot.readFieldBegin();
11386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11387
          break;
11388
        }
11389
        switch (field.id) {
11390
          case 1: // PURCHASE_ID
11391
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11392
              this.purchaseId = iprot.readI64();
11393
              setPurchaseIdIsSet(true);
11394
            } else { 
11395
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11396
            }
11397
            break;
11398
          case 2: // ITEM_ID
11399
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11400
              this.itemId = iprot.readI64();
11401
              setItemIdIsSet(true);
11402
            } else { 
11403
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11404
            }
11405
            break;
11406
          case 3: // QUANTITY
11407
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11408
              this.quantity = iprot.readI64();
11409
              setQuantityIsSet(true);
11410
            } else { 
11411
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11412
            }
11413
            break;
11414
          default:
11415
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11416
        }
11417
        iprot.readFieldEnd();
11418
      }
11419
      iprot.readStructEnd();
11420
      validate();
11421
    }
11422
 
11423
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11424
      validate();
11425
 
11426
      oprot.writeStructBegin(STRUCT_DESC);
11427
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
11428
      oprot.writeI64(this.purchaseId);
11429
      oprot.writeFieldEnd();
11430
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11431
      oprot.writeI64(this.itemId);
11432
      oprot.writeFieldEnd();
11433
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11434
      oprot.writeI64(this.quantity);
11435
      oprot.writeFieldEnd();
11436
      oprot.writeFieldStop();
11437
      oprot.writeStructEnd();
11438
    }
11439
 
11440
    @Override
11441
    public String toString() {
11442
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
11443
      boolean first = true;
11444
 
11445
      sb.append("purchaseId:");
11446
      sb.append(this.purchaseId);
11447
      first = false;
11448
      if (!first) sb.append(", ");
11449
      sb.append("itemId:");
11450
      sb.append(this.itemId);
11451
      first = false;
11452
      if (!first) sb.append(", ");
11453
      sb.append("quantity:");
11454
      sb.append(this.quantity);
11455
      first = false;
11456
      sb.append(")");
11457
      return sb.toString();
11458
    }
11459
 
11460
    public void validate() throws org.apache.thrift.TException {
11461
      // check for required fields
11462
    }
11463
 
11464
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11465
      try {
11466
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11467
      } catch (org.apache.thrift.TException te) {
11468
        throw new java.io.IOException(te);
11469
      }
11470
    }
11471
 
11472
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11473
      try {
11474
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11475
        __isset_bit_vector = new BitSet(1);
11476
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11477
      } catch (org.apache.thrift.TException te) {
11478
        throw new java.io.IOException(te);
11479
      }
11480
    }
11481
 
11482
  }
11483
 
11484
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11485
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
11486
 
11487
    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);
11488
 
11489
    private PurchaseServiceException e; // required
11490
 
11491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11492
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11493
      E((short)1, "e");
11494
 
11495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11496
 
11497
      static {
11498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11499
          byName.put(field.getFieldName(), field);
11500
        }
11501
      }
11502
 
11503
      /**
11504
       * Find the _Fields constant that matches fieldId, or null if its not found.
11505
       */
11506
      public static _Fields findByThriftId(int fieldId) {
11507
        switch(fieldId) {
11508
          case 1: // E
11509
            return E;
11510
          default:
11511
            return null;
11512
        }
11513
      }
11514
 
11515
      /**
11516
       * Find the _Fields constant that matches fieldId, throwing an exception
11517
       * if it is not found.
11518
       */
11519
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11520
        _Fields fields = findByThriftId(fieldId);
11521
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11522
        return fields;
11523
      }
11524
 
11525
      /**
11526
       * Find the _Fields constant that matches name, or null if its not found.
11527
       */
11528
      public static _Fields findByName(String name) {
11529
        return byName.get(name);
11530
      }
11531
 
11532
      private final short _thriftId;
11533
      private final String _fieldName;
11534
 
11535
      _Fields(short thriftId, String fieldName) {
11536
        _thriftId = thriftId;
11537
        _fieldName = fieldName;
11538
      }
11539
 
11540
      public short getThriftFieldId() {
11541
        return _thriftId;
11542
      }
11543
 
11544
      public String getFieldName() {
11545
        return _fieldName;
11546
      }
11547
    }
11548
 
11549
    // isset id assignments
11550
 
11551
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11552
    static {
11553
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11554
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11555
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11556
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11557
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
11558
    }
11559
 
11560
    public unFulfillPO_result() {
11561
    }
11562
 
11563
    public unFulfillPO_result(
11564
      PurchaseServiceException e)
11565
    {
11566
      this();
11567
      this.e = e;
11568
    }
11569
 
11570
    /**
11571
     * Performs a deep copy on <i>other</i>.
11572
     */
11573
    public unFulfillPO_result(unFulfillPO_result other) {
11574
      if (other.isSetE()) {
11575
        this.e = new PurchaseServiceException(other.e);
11576
      }
11577
    }
11578
 
11579
    public unFulfillPO_result deepCopy() {
11580
      return new unFulfillPO_result(this);
11581
    }
11582
 
11583
    @Override
11584
    public void clear() {
11585
      this.e = null;
11586
    }
11587
 
11588
    public PurchaseServiceException getE() {
11589
      return this.e;
11590
    }
11591
 
11592
    public void setE(PurchaseServiceException e) {
11593
      this.e = e;
11594
    }
11595
 
11596
    public void unsetE() {
11597
      this.e = null;
11598
    }
11599
 
11600
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11601
    public boolean isSetE() {
11602
      return this.e != null;
11603
    }
11604
 
11605
    public void setEIsSet(boolean value) {
11606
      if (!value) {
11607
        this.e = null;
11608
      }
11609
    }
11610
 
11611
    public void setFieldValue(_Fields field, Object value) {
11612
      switch (field) {
11613
      case E:
11614
        if (value == null) {
11615
          unsetE();
11616
        } else {
11617
          setE((PurchaseServiceException)value);
11618
        }
11619
        break;
11620
 
11621
      }
11622
    }
11623
 
11624
    public Object getFieldValue(_Fields field) {
11625
      switch (field) {
11626
      case E:
11627
        return getE();
11628
 
11629
      }
11630
      throw new IllegalStateException();
11631
    }
11632
 
11633
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11634
    public boolean isSet(_Fields field) {
11635
      if (field == null) {
11636
        throw new IllegalArgumentException();
11637
      }
11638
 
11639
      switch (field) {
11640
      case E:
11641
        return isSetE();
11642
      }
11643
      throw new IllegalStateException();
11644
    }
11645
 
11646
    @Override
11647
    public boolean equals(Object that) {
11648
      if (that == null)
11649
        return false;
11650
      if (that instanceof unFulfillPO_result)
11651
        return this.equals((unFulfillPO_result)that);
11652
      return false;
11653
    }
11654
 
11655
    public boolean equals(unFulfillPO_result that) {
11656
      if (that == null)
11657
        return false;
11658
 
11659
      boolean this_present_e = true && this.isSetE();
11660
      boolean that_present_e = true && that.isSetE();
11661
      if (this_present_e || that_present_e) {
11662
        if (!(this_present_e && that_present_e))
11663
          return false;
11664
        if (!this.e.equals(that.e))
11665
          return false;
11666
      }
11667
 
11668
      return true;
11669
    }
11670
 
11671
    @Override
11672
    public int hashCode() {
11673
      return 0;
11674
    }
11675
 
11676
    public int compareTo(unFulfillPO_result other) {
11677
      if (!getClass().equals(other.getClass())) {
11678
        return getClass().getName().compareTo(other.getClass().getName());
11679
      }
11680
 
11681
      int lastComparison = 0;
11682
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
11683
 
11684
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11685
      if (lastComparison != 0) {
11686
        return lastComparison;
11687
      }
11688
      if (isSetE()) {
11689
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11690
        if (lastComparison != 0) {
11691
          return lastComparison;
11692
        }
11693
      }
11694
      return 0;
11695
    }
11696
 
11697
    public _Fields fieldForId(int fieldId) {
11698
      return _Fields.findByThriftId(fieldId);
11699
    }
11700
 
11701
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11702
      org.apache.thrift.protocol.TField field;
11703
      iprot.readStructBegin();
11704
      while (true)
11705
      {
11706
        field = iprot.readFieldBegin();
11707
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11708
          break;
11709
        }
11710
        switch (field.id) {
11711
          case 1: // E
11712
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11713
              this.e = new PurchaseServiceException();
11714
              this.e.read(iprot);
11715
            } else { 
11716
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11717
            }
11718
            break;
11719
          default:
11720
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11721
        }
11722
        iprot.readFieldEnd();
11723
      }
11724
      iprot.readStructEnd();
11725
      validate();
11726
    }
11727
 
11728
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11729
      oprot.writeStructBegin(STRUCT_DESC);
11730
 
11731
      if (this.isSetE()) {
11732
        oprot.writeFieldBegin(E_FIELD_DESC);
11733
        this.e.write(oprot);
11734
        oprot.writeFieldEnd();
11735
      }
11736
      oprot.writeFieldStop();
11737
      oprot.writeStructEnd();
11738
    }
11739
 
11740
    @Override
11741
    public String toString() {
11742
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
11743
      boolean first = true;
11744
 
11745
      sb.append("e:");
11746
      if (this.e == null) {
11747
        sb.append("null");
11748
      } else {
11749
        sb.append(this.e);
11750
      }
11751
      first = false;
11752
      sb.append(")");
11753
      return sb.toString();
11754
    }
11755
 
11756
    public void validate() throws org.apache.thrift.TException {
11757
      // check for required fields
11758
    }
11759
 
11760
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11761
      try {
11762
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11763
      } catch (org.apache.thrift.TException te) {
11764
        throw new java.io.IOException(te);
11765
      }
11766
    }
11767
 
11768
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11769
      try {
11770
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11771
      } catch (org.apache.thrift.TException te) {
11772
        throw new java.io.IOException(te);
11773
      }
11774
    }
11775
 
11776
  }
11777
 
5443 mandeep.dh 11778
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
11779
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
11780
 
11781
    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);
11782
 
11783
    private long date; // required
11784
 
11785
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11786
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11787
      DATE((short)1, "date");
11788
 
11789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11790
 
11791
      static {
11792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11793
          byName.put(field.getFieldName(), field);
11794
        }
11795
      }
11796
 
11797
      /**
11798
       * Find the _Fields constant that matches fieldId, or null if its not found.
11799
       */
11800
      public static _Fields findByThriftId(int fieldId) {
11801
        switch(fieldId) {
11802
          case 1: // DATE
11803
            return DATE;
11804
          default:
11805
            return null;
11806
        }
11807
      }
11808
 
11809
      /**
11810
       * Find the _Fields constant that matches fieldId, throwing an exception
11811
       * if it is not found.
11812
       */
11813
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11814
        _Fields fields = findByThriftId(fieldId);
11815
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11816
        return fields;
11817
      }
11818
 
11819
      /**
11820
       * Find the _Fields constant that matches name, or null if its not found.
11821
       */
11822
      public static _Fields findByName(String name) {
11823
        return byName.get(name);
11824
      }
11825
 
11826
      private final short _thriftId;
11827
      private final String _fieldName;
11828
 
11829
      _Fields(short thriftId, String fieldName) {
11830
        _thriftId = thriftId;
11831
        _fieldName = fieldName;
11832
      }
11833
 
11834
      public short getThriftFieldId() {
11835
        return _thriftId;
11836
      }
11837
 
11838
      public String getFieldName() {
11839
        return _fieldName;
11840
      }
11841
    }
11842
 
11843
    // isset id assignments
11844
    private static final int __DATE_ISSET_ID = 0;
11845
    private BitSet __isset_bit_vector = new BitSet(1);
11846
 
11847
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11848
    static {
11849
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11850
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11851
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11852
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11853
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
11854
    }
11855
 
11856
    public getInvoices_args() {
11857
    }
11858
 
11859
    public getInvoices_args(
11860
      long date)
11861
    {
11862
      this();
11863
      this.date = date;
11864
      setDateIsSet(true);
11865
    }
11866
 
11867
    /**
11868
     * Performs a deep copy on <i>other</i>.
11869
     */
11870
    public getInvoices_args(getInvoices_args other) {
11871
      __isset_bit_vector.clear();
11872
      __isset_bit_vector.or(other.__isset_bit_vector);
11873
      this.date = other.date;
11874
    }
11875
 
11876
    public getInvoices_args deepCopy() {
11877
      return new getInvoices_args(this);
11878
    }
11879
 
11880
    @Override
11881
    public void clear() {
11882
      setDateIsSet(false);
11883
      this.date = 0;
11884
    }
11885
 
11886
    public long getDate() {
11887
      return this.date;
11888
    }
11889
 
11890
    public void setDate(long date) {
11891
      this.date = date;
11892
      setDateIsSet(true);
11893
    }
11894
 
11895
    public void unsetDate() {
11896
      __isset_bit_vector.clear(__DATE_ISSET_ID);
11897
    }
11898
 
11899
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
11900
    public boolean isSetDate() {
11901
      return __isset_bit_vector.get(__DATE_ISSET_ID);
11902
    }
11903
 
11904
    public void setDateIsSet(boolean value) {
11905
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
11906
    }
11907
 
11908
    public void setFieldValue(_Fields field, Object value) {
11909
      switch (field) {
11910
      case DATE:
11911
        if (value == null) {
11912
          unsetDate();
11913
        } else {
11914
          setDate((Long)value);
11915
        }
11916
        break;
11917
 
11918
      }
11919
    }
11920
 
11921
    public Object getFieldValue(_Fields field) {
11922
      switch (field) {
11923
      case DATE:
11924
        return Long.valueOf(getDate());
11925
 
11926
      }
11927
      throw new IllegalStateException();
11928
    }
11929
 
11930
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11931
    public boolean isSet(_Fields field) {
11932
      if (field == null) {
11933
        throw new IllegalArgumentException();
11934
      }
11935
 
11936
      switch (field) {
11937
      case DATE:
11938
        return isSetDate();
11939
      }
11940
      throw new IllegalStateException();
11941
    }
11942
 
11943
    @Override
11944
    public boolean equals(Object that) {
11945
      if (that == null)
11946
        return false;
11947
      if (that instanceof getInvoices_args)
11948
        return this.equals((getInvoices_args)that);
11949
      return false;
11950
    }
11951
 
11952
    public boolean equals(getInvoices_args that) {
11953
      if (that == null)
11954
        return false;
11955
 
11956
      boolean this_present_date = true;
11957
      boolean that_present_date = true;
11958
      if (this_present_date || that_present_date) {
11959
        if (!(this_present_date && that_present_date))
11960
          return false;
11961
        if (this.date != that.date)
11962
          return false;
11963
      }
11964
 
11965
      return true;
11966
    }
11967
 
11968
    @Override
11969
    public int hashCode() {
11970
      return 0;
11971
    }
11972
 
11973
    public int compareTo(getInvoices_args other) {
11974
      if (!getClass().equals(other.getClass())) {
11975
        return getClass().getName().compareTo(other.getClass().getName());
11976
      }
11977
 
11978
      int lastComparison = 0;
11979
      getInvoices_args typedOther = (getInvoices_args)other;
11980
 
11981
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
11982
      if (lastComparison != 0) {
11983
        return lastComparison;
11984
      }
11985
      if (isSetDate()) {
11986
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
11987
        if (lastComparison != 0) {
11988
          return lastComparison;
11989
        }
11990
      }
11991
      return 0;
11992
    }
11993
 
11994
    public _Fields fieldForId(int fieldId) {
11995
      return _Fields.findByThriftId(fieldId);
11996
    }
11997
 
11998
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11999
      org.apache.thrift.protocol.TField field;
12000
      iprot.readStructBegin();
12001
      while (true)
12002
      {
12003
        field = iprot.readFieldBegin();
12004
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12005
          break;
12006
        }
12007
        switch (field.id) {
12008
          case 1: // DATE
12009
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12010
              this.date = iprot.readI64();
12011
              setDateIsSet(true);
12012
            } else { 
12013
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12014
            }
12015
            break;
12016
          default:
12017
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12018
        }
12019
        iprot.readFieldEnd();
12020
      }
12021
      iprot.readStructEnd();
12022
      validate();
12023
    }
12024
 
12025
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12026
      validate();
12027
 
12028
      oprot.writeStructBegin(STRUCT_DESC);
12029
      oprot.writeFieldBegin(DATE_FIELD_DESC);
12030
      oprot.writeI64(this.date);
12031
      oprot.writeFieldEnd();
12032
      oprot.writeFieldStop();
12033
      oprot.writeStructEnd();
12034
    }
12035
 
12036
    @Override
12037
    public String toString() {
12038
      StringBuilder sb = new StringBuilder("getInvoices_args(");
12039
      boolean first = true;
12040
 
12041
      sb.append("date:");
12042
      sb.append(this.date);
12043
      first = false;
12044
      sb.append(")");
12045
      return sb.toString();
12046
    }
12047
 
12048
    public void validate() throws org.apache.thrift.TException {
12049
      // check for required fields
12050
    }
12051
 
12052
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12053
      try {
12054
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12055
      } catch (org.apache.thrift.TException te) {
12056
        throw new java.io.IOException(te);
12057
      }
12058
    }
12059
 
12060
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12061
      try {
12062
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12063
        __isset_bit_vector = new BitSet(1);
12064
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12065
      } catch (org.apache.thrift.TException te) {
12066
        throw new java.io.IOException(te);
12067
      }
12068
    }
12069
 
12070
  }
12071
 
12072
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
12073
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
12074
 
12075
    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);
12076
 
12077
    private List<Invoice> success; // required
12078
 
12079
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12080
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12081
      SUCCESS((short)0, "success");
12082
 
12083
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12084
 
12085
      static {
12086
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12087
          byName.put(field.getFieldName(), field);
12088
        }
12089
      }
12090
 
12091
      /**
12092
       * Find the _Fields constant that matches fieldId, or null if its not found.
12093
       */
12094
      public static _Fields findByThriftId(int fieldId) {
12095
        switch(fieldId) {
12096
          case 0: // SUCCESS
12097
            return SUCCESS;
12098
          default:
12099
            return null;
12100
        }
12101
      }
12102
 
12103
      /**
12104
       * Find the _Fields constant that matches fieldId, throwing an exception
12105
       * if it is not found.
12106
       */
12107
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12108
        _Fields fields = findByThriftId(fieldId);
12109
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12110
        return fields;
12111
      }
12112
 
12113
      /**
12114
       * Find the _Fields constant that matches name, or null if its not found.
12115
       */
12116
      public static _Fields findByName(String name) {
12117
        return byName.get(name);
12118
      }
12119
 
12120
      private final short _thriftId;
12121
      private final String _fieldName;
12122
 
12123
      _Fields(short thriftId, String fieldName) {
12124
        _thriftId = thriftId;
12125
        _fieldName = fieldName;
12126
      }
12127
 
12128
      public short getThriftFieldId() {
12129
        return _thriftId;
12130
      }
12131
 
12132
      public String getFieldName() {
12133
        return _fieldName;
12134
      }
12135
    }
12136
 
12137
    // isset id assignments
12138
 
12139
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12140
    static {
12141
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12142
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12143
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12144
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12145
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12146
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12147
    }
12148
 
12149
    public getInvoices_result() {
12150
    }
12151
 
12152
    public getInvoices_result(
12153
      List<Invoice> success)
12154
    {
12155
      this();
12156
      this.success = success;
12157
    }
12158
 
12159
    /**
12160
     * Performs a deep copy on <i>other</i>.
12161
     */
12162
    public getInvoices_result(getInvoices_result other) {
12163
      if (other.isSetSuccess()) {
12164
        List<Invoice> __this__success = new ArrayList<Invoice>();
12165
        for (Invoice other_element : other.success) {
12166
          __this__success.add(new Invoice(other_element));
12167
        }
12168
        this.success = __this__success;
12169
      }
12170
    }
12171
 
12172
    public getInvoices_result deepCopy() {
12173
      return new getInvoices_result(this);
12174
    }
12175
 
12176
    @Override
12177
    public void clear() {
12178
      this.success = null;
12179
    }
12180
 
12181
    public int getSuccessSize() {
12182
      return (this.success == null) ? 0 : this.success.size();
12183
    }
12184
 
12185
    public java.util.Iterator<Invoice> getSuccessIterator() {
12186
      return (this.success == null) ? null : this.success.iterator();
12187
    }
12188
 
12189
    public void addToSuccess(Invoice elem) {
12190
      if (this.success == null) {
12191
        this.success = new ArrayList<Invoice>();
12192
      }
12193
      this.success.add(elem);
12194
    }
12195
 
12196
    public List<Invoice> getSuccess() {
12197
      return this.success;
12198
    }
12199
 
12200
    public void setSuccess(List<Invoice> success) {
12201
      this.success = success;
12202
    }
12203
 
12204
    public void unsetSuccess() {
12205
      this.success = null;
12206
    }
12207
 
12208
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12209
    public boolean isSetSuccess() {
12210
      return this.success != null;
12211
    }
12212
 
12213
    public void setSuccessIsSet(boolean value) {
12214
      if (!value) {
12215
        this.success = null;
12216
      }
12217
    }
12218
 
12219
    public void setFieldValue(_Fields field, Object value) {
12220
      switch (field) {
12221
      case SUCCESS:
12222
        if (value == null) {
12223
          unsetSuccess();
12224
        } else {
12225
          setSuccess((List<Invoice>)value);
12226
        }
12227
        break;
12228
 
12229
      }
12230
    }
12231
 
12232
    public Object getFieldValue(_Fields field) {
12233
      switch (field) {
12234
      case SUCCESS:
12235
        return getSuccess();
12236
 
12237
      }
12238
      throw new IllegalStateException();
12239
    }
12240
 
12241
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12242
    public boolean isSet(_Fields field) {
12243
      if (field == null) {
12244
        throw new IllegalArgumentException();
12245
      }
12246
 
12247
      switch (field) {
12248
      case SUCCESS:
12249
        return isSetSuccess();
12250
      }
12251
      throw new IllegalStateException();
12252
    }
12253
 
12254
    @Override
12255
    public boolean equals(Object that) {
12256
      if (that == null)
12257
        return false;
12258
      if (that instanceof getInvoices_result)
12259
        return this.equals((getInvoices_result)that);
12260
      return false;
12261
    }
12262
 
12263
    public boolean equals(getInvoices_result that) {
12264
      if (that == null)
12265
        return false;
12266
 
12267
      boolean this_present_success = true && this.isSetSuccess();
12268
      boolean that_present_success = true && that.isSetSuccess();
12269
      if (this_present_success || that_present_success) {
12270
        if (!(this_present_success && that_present_success))
12271
          return false;
12272
        if (!this.success.equals(that.success))
12273
          return false;
12274
      }
12275
 
12276
      return true;
12277
    }
12278
 
12279
    @Override
12280
    public int hashCode() {
12281
      return 0;
12282
    }
12283
 
12284
    public int compareTo(getInvoices_result other) {
12285
      if (!getClass().equals(other.getClass())) {
12286
        return getClass().getName().compareTo(other.getClass().getName());
12287
      }
12288
 
12289
      int lastComparison = 0;
12290
      getInvoices_result typedOther = (getInvoices_result)other;
12291
 
12292
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12293
      if (lastComparison != 0) {
12294
        return lastComparison;
12295
      }
12296
      if (isSetSuccess()) {
12297
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12298
        if (lastComparison != 0) {
12299
          return lastComparison;
12300
        }
12301
      }
12302
      return 0;
12303
    }
12304
 
12305
    public _Fields fieldForId(int fieldId) {
12306
      return _Fields.findByThriftId(fieldId);
12307
    }
12308
 
12309
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12310
      org.apache.thrift.protocol.TField field;
12311
      iprot.readStructBegin();
12312
      while (true)
12313
      {
12314
        field = iprot.readFieldBegin();
12315
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12316
          break;
12317
        }
12318
        switch (field.id) {
12319
          case 0: // SUCCESS
12320
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12321
              {
6385 amar.kumar 12322
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12323
                this.success = new ArrayList<Invoice>(_list24.size);
12324
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12325
                {
6385 amar.kumar 12326
                  Invoice _elem26; // required
12327
                  _elem26 = new Invoice();
12328
                  _elem26.read(iprot);
12329
                  this.success.add(_elem26);
5443 mandeep.dh 12330
                }
12331
                iprot.readListEnd();
12332
              }
12333
            } else { 
12334
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12335
            }
12336
            break;
12337
          default:
12338
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12339
        }
12340
        iprot.readFieldEnd();
12341
      }
12342
      iprot.readStructEnd();
12343
      validate();
12344
    }
12345
 
12346
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12347
      oprot.writeStructBegin(STRUCT_DESC);
12348
 
12349
      if (this.isSetSuccess()) {
12350
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12351
        {
12352
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12353
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12354
          {
6385 amar.kumar 12355
            _iter27.write(oprot);
5443 mandeep.dh 12356
          }
12357
          oprot.writeListEnd();
12358
        }
12359
        oprot.writeFieldEnd();
12360
      }
12361
      oprot.writeFieldStop();
12362
      oprot.writeStructEnd();
12363
    }
12364
 
12365
    @Override
12366
    public String toString() {
12367
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12368
      boolean first = true;
12369
 
12370
      sb.append("success:");
12371
      if (this.success == null) {
12372
        sb.append("null");
12373
      } else {
12374
        sb.append(this.success);
12375
      }
12376
      first = false;
12377
      sb.append(")");
12378
      return sb.toString();
12379
    }
12380
 
12381
    public void validate() throws org.apache.thrift.TException {
12382
      // check for required fields
12383
    }
12384
 
12385
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12386
      try {
12387
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12388
      } catch (org.apache.thrift.TException te) {
12389
        throw new java.io.IOException(te);
12390
      }
12391
    }
12392
 
12393
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12394
      try {
12395
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12396
      } catch (org.apache.thrift.TException te) {
12397
        throw new java.io.IOException(te);
12398
      }
12399
    }
12400
 
12401
  }
12402
 
12403
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
12404
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
12405
 
12406
    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);
12407
 
12408
    private Invoice invoice; // required
12409
 
12410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12411
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12412
      INVOICE((short)1, "invoice");
12413
 
12414
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12415
 
12416
      static {
12417
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12418
          byName.put(field.getFieldName(), field);
12419
        }
12420
      }
12421
 
12422
      /**
12423
       * Find the _Fields constant that matches fieldId, or null if its not found.
12424
       */
12425
      public static _Fields findByThriftId(int fieldId) {
12426
        switch(fieldId) {
12427
          case 1: // INVOICE
12428
            return INVOICE;
12429
          default:
12430
            return null;
12431
        }
12432
      }
12433
 
12434
      /**
12435
       * Find the _Fields constant that matches fieldId, throwing an exception
12436
       * if it is not found.
12437
       */
12438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12439
        _Fields fields = findByThriftId(fieldId);
12440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12441
        return fields;
12442
      }
12443
 
12444
      /**
12445
       * Find the _Fields constant that matches name, or null if its not found.
12446
       */
12447
      public static _Fields findByName(String name) {
12448
        return byName.get(name);
12449
      }
12450
 
12451
      private final short _thriftId;
12452
      private final String _fieldName;
12453
 
12454
      _Fields(short thriftId, String fieldName) {
12455
        _thriftId = thriftId;
12456
        _fieldName = fieldName;
12457
      }
12458
 
12459
      public short getThriftFieldId() {
12460
        return _thriftId;
12461
      }
12462
 
12463
      public String getFieldName() {
12464
        return _fieldName;
12465
      }
12466
    }
12467
 
12468
    // isset id assignments
12469
 
12470
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12471
    static {
12472
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12473
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12474
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
12475
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12476
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
12477
    }
12478
 
12479
    public createInvoice_args() {
12480
    }
12481
 
12482
    public createInvoice_args(
12483
      Invoice invoice)
12484
    {
12485
      this();
12486
      this.invoice = invoice;
12487
    }
12488
 
12489
    /**
12490
     * Performs a deep copy on <i>other</i>.
12491
     */
12492
    public createInvoice_args(createInvoice_args other) {
12493
      if (other.isSetInvoice()) {
12494
        this.invoice = new Invoice(other.invoice);
12495
      }
12496
    }
12497
 
12498
    public createInvoice_args deepCopy() {
12499
      return new createInvoice_args(this);
12500
    }
12501
 
12502
    @Override
12503
    public void clear() {
12504
      this.invoice = null;
12505
    }
12506
 
12507
    public Invoice getInvoice() {
12508
      return this.invoice;
12509
    }
12510
 
12511
    public void setInvoice(Invoice invoice) {
12512
      this.invoice = invoice;
12513
    }
12514
 
12515
    public void unsetInvoice() {
12516
      this.invoice = null;
12517
    }
12518
 
12519
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
12520
    public boolean isSetInvoice() {
12521
      return this.invoice != null;
12522
    }
12523
 
12524
    public void setInvoiceIsSet(boolean value) {
12525
      if (!value) {
12526
        this.invoice = null;
12527
      }
12528
    }
12529
 
12530
    public void setFieldValue(_Fields field, Object value) {
12531
      switch (field) {
12532
      case INVOICE:
12533
        if (value == null) {
12534
          unsetInvoice();
12535
        } else {
12536
          setInvoice((Invoice)value);
12537
        }
12538
        break;
12539
 
12540
      }
12541
    }
12542
 
12543
    public Object getFieldValue(_Fields field) {
12544
      switch (field) {
12545
      case INVOICE:
12546
        return getInvoice();
12547
 
12548
      }
12549
      throw new IllegalStateException();
12550
    }
12551
 
12552
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12553
    public boolean isSet(_Fields field) {
12554
      if (field == null) {
12555
        throw new IllegalArgumentException();
12556
      }
12557
 
12558
      switch (field) {
12559
      case INVOICE:
12560
        return isSetInvoice();
12561
      }
12562
      throw new IllegalStateException();
12563
    }
12564
 
12565
    @Override
12566
    public boolean equals(Object that) {
12567
      if (that == null)
12568
        return false;
12569
      if (that instanceof createInvoice_args)
12570
        return this.equals((createInvoice_args)that);
12571
      return false;
12572
    }
12573
 
12574
    public boolean equals(createInvoice_args that) {
12575
      if (that == null)
12576
        return false;
12577
 
12578
      boolean this_present_invoice = true && this.isSetInvoice();
12579
      boolean that_present_invoice = true && that.isSetInvoice();
12580
      if (this_present_invoice || that_present_invoice) {
12581
        if (!(this_present_invoice && that_present_invoice))
12582
          return false;
12583
        if (!this.invoice.equals(that.invoice))
12584
          return false;
12585
      }
12586
 
12587
      return true;
12588
    }
12589
 
12590
    @Override
12591
    public int hashCode() {
12592
      return 0;
12593
    }
12594
 
12595
    public int compareTo(createInvoice_args other) {
12596
      if (!getClass().equals(other.getClass())) {
12597
        return getClass().getName().compareTo(other.getClass().getName());
12598
      }
12599
 
12600
      int lastComparison = 0;
12601
      createInvoice_args typedOther = (createInvoice_args)other;
12602
 
12603
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
12604
      if (lastComparison != 0) {
12605
        return lastComparison;
12606
      }
12607
      if (isSetInvoice()) {
12608
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
12609
        if (lastComparison != 0) {
12610
          return lastComparison;
12611
        }
12612
      }
12613
      return 0;
12614
    }
12615
 
12616
    public _Fields fieldForId(int fieldId) {
12617
      return _Fields.findByThriftId(fieldId);
12618
    }
12619
 
12620
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12621
      org.apache.thrift.protocol.TField field;
12622
      iprot.readStructBegin();
12623
      while (true)
12624
      {
12625
        field = iprot.readFieldBegin();
12626
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12627
          break;
12628
        }
12629
        switch (field.id) {
12630
          case 1: // INVOICE
12631
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12632
              this.invoice = new Invoice();
12633
              this.invoice.read(iprot);
12634
            } else { 
12635
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12636
            }
12637
            break;
12638
          default:
12639
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12640
        }
12641
        iprot.readFieldEnd();
12642
      }
12643
      iprot.readStructEnd();
12644
      validate();
12645
    }
12646
 
12647
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12648
      validate();
12649
 
12650
      oprot.writeStructBegin(STRUCT_DESC);
12651
      if (this.invoice != null) {
12652
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
12653
        this.invoice.write(oprot);
12654
        oprot.writeFieldEnd();
12655
      }
12656
      oprot.writeFieldStop();
12657
      oprot.writeStructEnd();
12658
    }
12659
 
12660
    @Override
12661
    public String toString() {
12662
      StringBuilder sb = new StringBuilder("createInvoice_args(");
12663
      boolean first = true;
12664
 
12665
      sb.append("invoice:");
12666
      if (this.invoice == null) {
12667
        sb.append("null");
12668
      } else {
12669
        sb.append(this.invoice);
12670
      }
12671
      first = false;
12672
      sb.append(")");
12673
      return sb.toString();
12674
    }
12675
 
12676
    public void validate() throws org.apache.thrift.TException {
12677
      // check for required fields
12678
    }
12679
 
12680
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12681
      try {
12682
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12683
      } catch (org.apache.thrift.TException te) {
12684
        throw new java.io.IOException(te);
12685
      }
12686
    }
12687
 
12688
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12689
      try {
12690
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12691
      } catch (org.apache.thrift.TException te) {
12692
        throw new java.io.IOException(te);
12693
      }
12694
    }
12695
 
12696
  }
12697
 
12698
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
12699
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
12700
 
12701
    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);
12702
 
12703
    private PurchaseServiceException e; // required
12704
 
12705
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12706
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12707
      E((short)1, "e");
12708
 
12709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12710
 
12711
      static {
12712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12713
          byName.put(field.getFieldName(), field);
12714
        }
12715
      }
12716
 
12717
      /**
12718
       * Find the _Fields constant that matches fieldId, or null if its not found.
12719
       */
12720
      public static _Fields findByThriftId(int fieldId) {
12721
        switch(fieldId) {
12722
          case 1: // E
12723
            return E;
12724
          default:
12725
            return null;
12726
        }
12727
      }
12728
 
12729
      /**
12730
       * Find the _Fields constant that matches fieldId, throwing an exception
12731
       * if it is not found.
12732
       */
12733
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12734
        _Fields fields = findByThriftId(fieldId);
12735
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12736
        return fields;
12737
      }
12738
 
12739
      /**
12740
       * Find the _Fields constant that matches name, or null if its not found.
12741
       */
12742
      public static _Fields findByName(String name) {
12743
        return byName.get(name);
12744
      }
12745
 
12746
      private final short _thriftId;
12747
      private final String _fieldName;
12748
 
12749
      _Fields(short thriftId, String fieldName) {
12750
        _thriftId = thriftId;
12751
        _fieldName = fieldName;
12752
      }
12753
 
12754
      public short getThriftFieldId() {
12755
        return _thriftId;
12756
      }
12757
 
12758
      public String getFieldName() {
12759
        return _fieldName;
12760
      }
12761
    }
12762
 
12763
    // isset id assignments
12764
 
12765
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12766
    static {
12767
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12768
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12769
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12770
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12771
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
12772
    }
12773
 
12774
    public createInvoice_result() {
12775
    }
12776
 
12777
    public createInvoice_result(
12778
      PurchaseServiceException e)
12779
    {
12780
      this();
12781
      this.e = e;
12782
    }
12783
 
12784
    /**
12785
     * Performs a deep copy on <i>other</i>.
12786
     */
12787
    public createInvoice_result(createInvoice_result other) {
12788
      if (other.isSetE()) {
12789
        this.e = new PurchaseServiceException(other.e);
12790
      }
12791
    }
12792
 
12793
    public createInvoice_result deepCopy() {
12794
      return new createInvoice_result(this);
12795
    }
12796
 
12797
    @Override
12798
    public void clear() {
12799
      this.e = null;
12800
    }
12801
 
12802
    public PurchaseServiceException getE() {
12803
      return this.e;
12804
    }
12805
 
12806
    public void setE(PurchaseServiceException e) {
12807
      this.e = e;
12808
    }
12809
 
12810
    public void unsetE() {
12811
      this.e = null;
12812
    }
12813
 
12814
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12815
    public boolean isSetE() {
12816
      return this.e != null;
12817
    }
12818
 
12819
    public void setEIsSet(boolean value) {
12820
      if (!value) {
12821
        this.e = null;
12822
      }
12823
    }
12824
 
12825
    public void setFieldValue(_Fields field, Object value) {
12826
      switch (field) {
12827
      case E:
12828
        if (value == null) {
12829
          unsetE();
12830
        } else {
12831
          setE((PurchaseServiceException)value);
12832
        }
12833
        break;
12834
 
12835
      }
12836
    }
12837
 
12838
    public Object getFieldValue(_Fields field) {
12839
      switch (field) {
12840
      case E:
12841
        return getE();
12842
 
12843
      }
12844
      throw new IllegalStateException();
12845
    }
12846
 
12847
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12848
    public boolean isSet(_Fields field) {
12849
      if (field == null) {
12850
        throw new IllegalArgumentException();
12851
      }
12852
 
12853
      switch (field) {
12854
      case E:
12855
        return isSetE();
12856
      }
12857
      throw new IllegalStateException();
12858
    }
12859
 
12860
    @Override
12861
    public boolean equals(Object that) {
12862
      if (that == null)
12863
        return false;
12864
      if (that instanceof createInvoice_result)
12865
        return this.equals((createInvoice_result)that);
12866
      return false;
12867
    }
12868
 
12869
    public boolean equals(createInvoice_result that) {
12870
      if (that == null)
12871
        return false;
12872
 
12873
      boolean this_present_e = true && this.isSetE();
12874
      boolean that_present_e = true && that.isSetE();
12875
      if (this_present_e || that_present_e) {
12876
        if (!(this_present_e && that_present_e))
12877
          return false;
12878
        if (!this.e.equals(that.e))
12879
          return false;
12880
      }
12881
 
12882
      return true;
12883
    }
12884
 
12885
    @Override
12886
    public int hashCode() {
12887
      return 0;
12888
    }
12889
 
12890
    public int compareTo(createInvoice_result other) {
12891
      if (!getClass().equals(other.getClass())) {
12892
        return getClass().getName().compareTo(other.getClass().getName());
12893
      }
12894
 
12895
      int lastComparison = 0;
12896
      createInvoice_result typedOther = (createInvoice_result)other;
12897
 
12898
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12899
      if (lastComparison != 0) {
12900
        return lastComparison;
12901
      }
12902
      if (isSetE()) {
12903
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12904
        if (lastComparison != 0) {
12905
          return lastComparison;
12906
        }
12907
      }
12908
      return 0;
12909
    }
12910
 
12911
    public _Fields fieldForId(int fieldId) {
12912
      return _Fields.findByThriftId(fieldId);
12913
    }
12914
 
12915
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12916
      org.apache.thrift.protocol.TField field;
12917
      iprot.readStructBegin();
12918
      while (true)
12919
      {
12920
        field = iprot.readFieldBegin();
12921
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12922
          break;
12923
        }
12924
        switch (field.id) {
12925
          case 1: // E
12926
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12927
              this.e = new PurchaseServiceException();
12928
              this.e.read(iprot);
12929
            } else { 
12930
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12931
            }
12932
            break;
12933
          default:
12934
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12935
        }
12936
        iprot.readFieldEnd();
12937
      }
12938
      iprot.readStructEnd();
12939
      validate();
12940
    }
12941
 
12942
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12943
      oprot.writeStructBegin(STRUCT_DESC);
12944
 
12945
      if (this.isSetE()) {
12946
        oprot.writeFieldBegin(E_FIELD_DESC);
12947
        this.e.write(oprot);
12948
        oprot.writeFieldEnd();
12949
      }
12950
      oprot.writeFieldStop();
12951
      oprot.writeStructEnd();
12952
    }
12953
 
12954
    @Override
12955
    public String toString() {
12956
      StringBuilder sb = new StringBuilder("createInvoice_result(");
12957
      boolean first = true;
12958
 
12959
      sb.append("e:");
12960
      if (this.e == null) {
12961
        sb.append("null");
12962
      } else {
12963
        sb.append(this.e);
12964
      }
12965
      first = false;
12966
      sb.append(")");
12967
      return sb.toString();
12968
    }
12969
 
12970
    public void validate() throws org.apache.thrift.TException {
12971
      // check for required fields
12972
    }
12973
 
12974
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12975
      try {
12976
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12977
      } catch (org.apache.thrift.TException te) {
12978
        throw new java.io.IOException(te);
12979
      }
12980
    }
12981
 
12982
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12983
      try {
12984
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12985
      } catch (org.apache.thrift.TException te) {
12986
        throw new java.io.IOException(te);
12987
      }
12988
    }
12989
 
12990
  }
12991
 
5591 mandeep.dh 12992
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
12993
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
12994
 
12995
    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);
12996
 
12997
    private Supplier supplier; // required
12998
 
12999
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13000
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13001
      SUPPLIER((short)1, "supplier");
13002
 
13003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13004
 
13005
      static {
13006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13007
          byName.put(field.getFieldName(), field);
13008
        }
13009
      }
13010
 
13011
      /**
13012
       * Find the _Fields constant that matches fieldId, or null if its not found.
13013
       */
13014
      public static _Fields findByThriftId(int fieldId) {
13015
        switch(fieldId) {
13016
          case 1: // SUPPLIER
13017
            return SUPPLIER;
13018
          default:
13019
            return null;
13020
        }
13021
      }
13022
 
13023
      /**
13024
       * Find the _Fields constant that matches fieldId, throwing an exception
13025
       * if it is not found.
13026
       */
13027
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13028
        _Fields fields = findByThriftId(fieldId);
13029
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13030
        return fields;
13031
      }
13032
 
13033
      /**
13034
       * Find the _Fields constant that matches name, or null if its not found.
13035
       */
13036
      public static _Fields findByName(String name) {
13037
        return byName.get(name);
13038
      }
13039
 
13040
      private final short _thriftId;
13041
      private final String _fieldName;
13042
 
13043
      _Fields(short thriftId, String fieldName) {
13044
        _thriftId = thriftId;
13045
        _fieldName = fieldName;
13046
      }
13047
 
13048
      public short getThriftFieldId() {
13049
        return _thriftId;
13050
      }
13051
 
13052
      public String getFieldName() {
13053
        return _fieldName;
13054
      }
13055
    }
13056
 
13057
    // isset id assignments
13058
 
13059
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13060
    static {
13061
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13062
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13063
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13064
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13065
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
13066
    }
13067
 
13068
    public addSupplier_args() {
13069
    }
13070
 
13071
    public addSupplier_args(
13072
      Supplier supplier)
13073
    {
13074
      this();
13075
      this.supplier = supplier;
13076
    }
13077
 
13078
    /**
13079
     * Performs a deep copy on <i>other</i>.
13080
     */
13081
    public addSupplier_args(addSupplier_args other) {
13082
      if (other.isSetSupplier()) {
13083
        this.supplier = new Supplier(other.supplier);
13084
      }
13085
    }
13086
 
13087
    public addSupplier_args deepCopy() {
13088
      return new addSupplier_args(this);
13089
    }
13090
 
13091
    @Override
13092
    public void clear() {
13093
      this.supplier = null;
13094
    }
13095
 
13096
    public Supplier getSupplier() {
13097
      return this.supplier;
13098
    }
13099
 
13100
    public void setSupplier(Supplier supplier) {
13101
      this.supplier = supplier;
13102
    }
13103
 
13104
    public void unsetSupplier() {
13105
      this.supplier = null;
13106
    }
13107
 
13108
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
13109
    public boolean isSetSupplier() {
13110
      return this.supplier != null;
13111
    }
13112
 
13113
    public void setSupplierIsSet(boolean value) {
13114
      if (!value) {
13115
        this.supplier = null;
13116
      }
13117
    }
13118
 
13119
    public void setFieldValue(_Fields field, Object value) {
13120
      switch (field) {
13121
      case SUPPLIER:
13122
        if (value == null) {
13123
          unsetSupplier();
13124
        } else {
13125
          setSupplier((Supplier)value);
13126
        }
13127
        break;
13128
 
13129
      }
13130
    }
13131
 
13132
    public Object getFieldValue(_Fields field) {
13133
      switch (field) {
13134
      case SUPPLIER:
13135
        return getSupplier();
13136
 
13137
      }
13138
      throw new IllegalStateException();
13139
    }
13140
 
13141
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13142
    public boolean isSet(_Fields field) {
13143
      if (field == null) {
13144
        throw new IllegalArgumentException();
13145
      }
13146
 
13147
      switch (field) {
13148
      case SUPPLIER:
13149
        return isSetSupplier();
13150
      }
13151
      throw new IllegalStateException();
13152
    }
13153
 
13154
    @Override
13155
    public boolean equals(Object that) {
13156
      if (that == null)
13157
        return false;
13158
      if (that instanceof addSupplier_args)
13159
        return this.equals((addSupplier_args)that);
13160
      return false;
13161
    }
13162
 
13163
    public boolean equals(addSupplier_args that) {
13164
      if (that == null)
13165
        return false;
13166
 
13167
      boolean this_present_supplier = true && this.isSetSupplier();
13168
      boolean that_present_supplier = true && that.isSetSupplier();
13169
      if (this_present_supplier || that_present_supplier) {
13170
        if (!(this_present_supplier && that_present_supplier))
13171
          return false;
13172
        if (!this.supplier.equals(that.supplier))
13173
          return false;
13174
      }
13175
 
13176
      return true;
13177
    }
13178
 
13179
    @Override
13180
    public int hashCode() {
13181
      return 0;
13182
    }
13183
 
13184
    public int compareTo(addSupplier_args other) {
13185
      if (!getClass().equals(other.getClass())) {
13186
        return getClass().getName().compareTo(other.getClass().getName());
13187
      }
13188
 
13189
      int lastComparison = 0;
13190
      addSupplier_args typedOther = (addSupplier_args)other;
13191
 
13192
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
13193
      if (lastComparison != 0) {
13194
        return lastComparison;
13195
      }
13196
      if (isSetSupplier()) {
13197
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
13198
        if (lastComparison != 0) {
13199
          return lastComparison;
13200
        }
13201
      }
13202
      return 0;
13203
    }
13204
 
13205
    public _Fields fieldForId(int fieldId) {
13206
      return _Fields.findByThriftId(fieldId);
13207
    }
13208
 
13209
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13210
      org.apache.thrift.protocol.TField field;
13211
      iprot.readStructBegin();
13212
      while (true)
13213
      {
13214
        field = iprot.readFieldBegin();
13215
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13216
          break;
13217
        }
13218
        switch (field.id) {
13219
          case 1: // SUPPLIER
13220
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13221
              this.supplier = new Supplier();
13222
              this.supplier.read(iprot);
13223
            } else { 
13224
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13225
            }
13226
            break;
13227
          default:
13228
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13229
        }
13230
        iprot.readFieldEnd();
13231
      }
13232
      iprot.readStructEnd();
13233
      validate();
13234
    }
13235
 
13236
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13237
      validate();
13238
 
13239
      oprot.writeStructBegin(STRUCT_DESC);
13240
      if (this.supplier != null) {
13241
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
13242
        this.supplier.write(oprot);
13243
        oprot.writeFieldEnd();
13244
      }
13245
      oprot.writeFieldStop();
13246
      oprot.writeStructEnd();
13247
    }
13248
 
13249
    @Override
13250
    public String toString() {
13251
      StringBuilder sb = new StringBuilder("addSupplier_args(");
13252
      boolean first = true;
13253
 
13254
      sb.append("supplier:");
13255
      if (this.supplier == null) {
13256
        sb.append("null");
13257
      } else {
13258
        sb.append(this.supplier);
13259
      }
13260
      first = false;
13261
      sb.append(")");
13262
      return sb.toString();
13263
    }
13264
 
13265
    public void validate() throws org.apache.thrift.TException {
13266
      // check for required fields
13267
    }
13268
 
13269
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13270
      try {
13271
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13272
      } catch (org.apache.thrift.TException te) {
13273
        throw new java.io.IOException(te);
13274
      }
13275
    }
13276
 
13277
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13278
      try {
13279
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13280
      } catch (org.apache.thrift.TException te) {
13281
        throw new java.io.IOException(te);
13282
      }
13283
    }
13284
 
13285
  }
13286
 
13287
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
13288
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
13289
 
13290
    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);
13291
 
13292
    private Supplier success; // required
13293
 
13294
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13295
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13296
      SUCCESS((short)0, "success");
13297
 
13298
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13299
 
13300
      static {
13301
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13302
          byName.put(field.getFieldName(), field);
13303
        }
13304
      }
13305
 
13306
      /**
13307
       * Find the _Fields constant that matches fieldId, or null if its not found.
13308
       */
13309
      public static _Fields findByThriftId(int fieldId) {
13310
        switch(fieldId) {
13311
          case 0: // SUCCESS
13312
            return SUCCESS;
13313
          default:
13314
            return null;
13315
        }
13316
      }
13317
 
13318
      /**
13319
       * Find the _Fields constant that matches fieldId, throwing an exception
13320
       * if it is not found.
13321
       */
13322
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13323
        _Fields fields = findByThriftId(fieldId);
13324
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13325
        return fields;
13326
      }
13327
 
13328
      /**
13329
       * Find the _Fields constant that matches name, or null if its not found.
13330
       */
13331
      public static _Fields findByName(String name) {
13332
        return byName.get(name);
13333
      }
13334
 
13335
      private final short _thriftId;
13336
      private final String _fieldName;
13337
 
13338
      _Fields(short thriftId, String fieldName) {
13339
        _thriftId = thriftId;
13340
        _fieldName = fieldName;
13341
      }
13342
 
13343
      public short getThriftFieldId() {
13344
        return _thriftId;
13345
      }
13346
 
13347
      public String getFieldName() {
13348
        return _fieldName;
13349
      }
13350
    }
13351
 
13352
    // isset id assignments
13353
 
13354
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13355
    static {
13356
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13357
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13358
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13359
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13360
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
13361
    }
13362
 
13363
    public addSupplier_result() {
13364
    }
13365
 
13366
    public addSupplier_result(
13367
      Supplier success)
13368
    {
13369
      this();
13370
      this.success = success;
13371
    }
13372
 
13373
    /**
13374
     * Performs a deep copy on <i>other</i>.
13375
     */
13376
    public addSupplier_result(addSupplier_result other) {
13377
      if (other.isSetSuccess()) {
13378
        this.success = new Supplier(other.success);
13379
      }
13380
    }
13381
 
13382
    public addSupplier_result deepCopy() {
13383
      return new addSupplier_result(this);
13384
    }
13385
 
13386
    @Override
13387
    public void clear() {
13388
      this.success = null;
13389
    }
13390
 
13391
    public Supplier getSuccess() {
13392
      return this.success;
13393
    }
13394
 
13395
    public void setSuccess(Supplier success) {
13396
      this.success = success;
13397
    }
13398
 
13399
    public void unsetSuccess() {
13400
      this.success = null;
13401
    }
13402
 
13403
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13404
    public boolean isSetSuccess() {
13405
      return this.success != null;
13406
    }
13407
 
13408
    public void setSuccessIsSet(boolean value) {
13409
      if (!value) {
13410
        this.success = null;
13411
      }
13412
    }
13413
 
13414
    public void setFieldValue(_Fields field, Object value) {
13415
      switch (field) {
13416
      case SUCCESS:
13417
        if (value == null) {
13418
          unsetSuccess();
13419
        } else {
13420
          setSuccess((Supplier)value);
13421
        }
13422
        break;
13423
 
13424
      }
13425
    }
13426
 
13427
    public Object getFieldValue(_Fields field) {
13428
      switch (field) {
13429
      case SUCCESS:
13430
        return getSuccess();
13431
 
13432
      }
13433
      throw new IllegalStateException();
13434
    }
13435
 
13436
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13437
    public boolean isSet(_Fields field) {
13438
      if (field == null) {
13439
        throw new IllegalArgumentException();
13440
      }
13441
 
13442
      switch (field) {
13443
      case SUCCESS:
13444
        return isSetSuccess();
13445
      }
13446
      throw new IllegalStateException();
13447
    }
13448
 
13449
    @Override
13450
    public boolean equals(Object that) {
13451
      if (that == null)
13452
        return false;
13453
      if (that instanceof addSupplier_result)
13454
        return this.equals((addSupplier_result)that);
13455
      return false;
13456
    }
13457
 
13458
    public boolean equals(addSupplier_result that) {
13459
      if (that == null)
13460
        return false;
13461
 
13462
      boolean this_present_success = true && this.isSetSuccess();
13463
      boolean that_present_success = true && that.isSetSuccess();
13464
      if (this_present_success || that_present_success) {
13465
        if (!(this_present_success && that_present_success))
13466
          return false;
13467
        if (!this.success.equals(that.success))
13468
          return false;
13469
      }
13470
 
13471
      return true;
13472
    }
13473
 
13474
    @Override
13475
    public int hashCode() {
13476
      return 0;
13477
    }
13478
 
13479
    public int compareTo(addSupplier_result other) {
13480
      if (!getClass().equals(other.getClass())) {
13481
        return getClass().getName().compareTo(other.getClass().getName());
13482
      }
13483
 
13484
      int lastComparison = 0;
13485
      addSupplier_result typedOther = (addSupplier_result)other;
13486
 
13487
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13488
      if (lastComparison != 0) {
13489
        return lastComparison;
13490
      }
13491
      if (isSetSuccess()) {
13492
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13493
        if (lastComparison != 0) {
13494
          return lastComparison;
13495
        }
13496
      }
13497
      return 0;
13498
    }
13499
 
13500
    public _Fields fieldForId(int fieldId) {
13501
      return _Fields.findByThriftId(fieldId);
13502
    }
13503
 
13504
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13505
      org.apache.thrift.protocol.TField field;
13506
      iprot.readStructBegin();
13507
      while (true)
13508
      {
13509
        field = iprot.readFieldBegin();
13510
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13511
          break;
13512
        }
13513
        switch (field.id) {
13514
          case 0: // SUCCESS
13515
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13516
              this.success = new Supplier();
13517
              this.success.read(iprot);
13518
            } else { 
13519
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13520
            }
13521
            break;
13522
          default:
13523
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13524
        }
13525
        iprot.readFieldEnd();
13526
      }
13527
      iprot.readStructEnd();
13528
      validate();
13529
    }
13530
 
13531
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13532
      oprot.writeStructBegin(STRUCT_DESC);
13533
 
13534
      if (this.isSetSuccess()) {
13535
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13536
        this.success.write(oprot);
13537
        oprot.writeFieldEnd();
13538
      }
13539
      oprot.writeFieldStop();
13540
      oprot.writeStructEnd();
13541
    }
13542
 
13543
    @Override
13544
    public String toString() {
13545
      StringBuilder sb = new StringBuilder("addSupplier_result(");
13546
      boolean first = true;
13547
 
13548
      sb.append("success:");
13549
      if (this.success == null) {
13550
        sb.append("null");
13551
      } else {
13552
        sb.append(this.success);
13553
      }
13554
      first = false;
13555
      sb.append(")");
13556
      return sb.toString();
13557
    }
13558
 
13559
    public void validate() throws org.apache.thrift.TException {
13560
      // check for required fields
13561
    }
13562
 
13563
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13564
      try {
13565
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13566
      } catch (org.apache.thrift.TException te) {
13567
        throw new java.io.IOException(te);
13568
      }
13569
    }
13570
 
13571
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13572
      try {
13573
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13574
      } catch (org.apache.thrift.TException te) {
13575
        throw new java.io.IOException(te);
13576
      }
13577
    }
13578
 
13579
  }
13580
 
13581
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
13582
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
13583
 
13584
    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);
13585
 
13586
    private Supplier supplier; // required
13587
 
13588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13589
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13590
      SUPPLIER((short)1, "supplier");
13591
 
13592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13593
 
13594
      static {
13595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13596
          byName.put(field.getFieldName(), field);
13597
        }
13598
      }
13599
 
13600
      /**
13601
       * Find the _Fields constant that matches fieldId, or null if its not found.
13602
       */
13603
      public static _Fields findByThriftId(int fieldId) {
13604
        switch(fieldId) {
13605
          case 1: // SUPPLIER
13606
            return SUPPLIER;
13607
          default:
13608
            return null;
13609
        }
13610
      }
13611
 
13612
      /**
13613
       * Find the _Fields constant that matches fieldId, throwing an exception
13614
       * if it is not found.
13615
       */
13616
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13617
        _Fields fields = findByThriftId(fieldId);
13618
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13619
        return fields;
13620
      }
13621
 
13622
      /**
13623
       * Find the _Fields constant that matches name, or null if its not found.
13624
       */
13625
      public static _Fields findByName(String name) {
13626
        return byName.get(name);
13627
      }
13628
 
13629
      private final short _thriftId;
13630
      private final String _fieldName;
13631
 
13632
      _Fields(short thriftId, String fieldName) {
13633
        _thriftId = thriftId;
13634
        _fieldName = fieldName;
13635
      }
13636
 
13637
      public short getThriftFieldId() {
13638
        return _thriftId;
13639
      }
13640
 
13641
      public String getFieldName() {
13642
        return _fieldName;
13643
      }
13644
    }
13645
 
13646
    // isset id assignments
13647
 
13648
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13649
    static {
13650
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13651
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13652
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
13655
    }
13656
 
13657
    public updateSupplier_args() {
13658
    }
13659
 
13660
    public updateSupplier_args(
13661
      Supplier supplier)
13662
    {
13663
      this();
13664
      this.supplier = supplier;
13665
    }
13666
 
13667
    /**
13668
     * Performs a deep copy on <i>other</i>.
13669
     */
13670
    public updateSupplier_args(updateSupplier_args other) {
13671
      if (other.isSetSupplier()) {
13672
        this.supplier = new Supplier(other.supplier);
13673
      }
13674
    }
13675
 
13676
    public updateSupplier_args deepCopy() {
13677
      return new updateSupplier_args(this);
13678
    }
13679
 
13680
    @Override
13681
    public void clear() {
13682
      this.supplier = null;
13683
    }
13684
 
13685
    public Supplier getSupplier() {
13686
      return this.supplier;
13687
    }
13688
 
13689
    public void setSupplier(Supplier supplier) {
13690
      this.supplier = supplier;
13691
    }
13692
 
13693
    public void unsetSupplier() {
13694
      this.supplier = null;
13695
    }
13696
 
13697
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
13698
    public boolean isSetSupplier() {
13699
      return this.supplier != null;
13700
    }
13701
 
13702
    public void setSupplierIsSet(boolean value) {
13703
      if (!value) {
13704
        this.supplier = null;
13705
      }
13706
    }
13707
 
13708
    public void setFieldValue(_Fields field, Object value) {
13709
      switch (field) {
13710
      case SUPPLIER:
13711
        if (value == null) {
13712
          unsetSupplier();
13713
        } else {
13714
          setSupplier((Supplier)value);
13715
        }
13716
        break;
13717
 
13718
      }
13719
    }
13720
 
13721
    public Object getFieldValue(_Fields field) {
13722
      switch (field) {
13723
      case SUPPLIER:
13724
        return getSupplier();
13725
 
13726
      }
13727
      throw new IllegalStateException();
13728
    }
13729
 
13730
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13731
    public boolean isSet(_Fields field) {
13732
      if (field == null) {
13733
        throw new IllegalArgumentException();
13734
      }
13735
 
13736
      switch (field) {
13737
      case SUPPLIER:
13738
        return isSetSupplier();
13739
      }
13740
      throw new IllegalStateException();
13741
    }
13742
 
13743
    @Override
13744
    public boolean equals(Object that) {
13745
      if (that == null)
13746
        return false;
13747
      if (that instanceof updateSupplier_args)
13748
        return this.equals((updateSupplier_args)that);
13749
      return false;
13750
    }
13751
 
13752
    public boolean equals(updateSupplier_args that) {
13753
      if (that == null)
13754
        return false;
13755
 
13756
      boolean this_present_supplier = true && this.isSetSupplier();
13757
      boolean that_present_supplier = true && that.isSetSupplier();
13758
      if (this_present_supplier || that_present_supplier) {
13759
        if (!(this_present_supplier && that_present_supplier))
13760
          return false;
13761
        if (!this.supplier.equals(that.supplier))
13762
          return false;
13763
      }
13764
 
13765
      return true;
13766
    }
13767
 
13768
    @Override
13769
    public int hashCode() {
13770
      return 0;
13771
    }
13772
 
13773
    public int compareTo(updateSupplier_args other) {
13774
      if (!getClass().equals(other.getClass())) {
13775
        return getClass().getName().compareTo(other.getClass().getName());
13776
      }
13777
 
13778
      int lastComparison = 0;
13779
      updateSupplier_args typedOther = (updateSupplier_args)other;
13780
 
13781
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
13782
      if (lastComparison != 0) {
13783
        return lastComparison;
13784
      }
13785
      if (isSetSupplier()) {
13786
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
13787
        if (lastComparison != 0) {
13788
          return lastComparison;
13789
        }
13790
      }
13791
      return 0;
13792
    }
13793
 
13794
    public _Fields fieldForId(int fieldId) {
13795
      return _Fields.findByThriftId(fieldId);
13796
    }
13797
 
13798
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13799
      org.apache.thrift.protocol.TField field;
13800
      iprot.readStructBegin();
13801
      while (true)
13802
      {
13803
        field = iprot.readFieldBegin();
13804
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13805
          break;
13806
        }
13807
        switch (field.id) {
13808
          case 1: // SUPPLIER
13809
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13810
              this.supplier = new Supplier();
13811
              this.supplier.read(iprot);
13812
            } else { 
13813
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13814
            }
13815
            break;
13816
          default:
13817
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13818
        }
13819
        iprot.readFieldEnd();
13820
      }
13821
      iprot.readStructEnd();
13822
      validate();
13823
    }
13824
 
13825
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13826
      validate();
13827
 
13828
      oprot.writeStructBegin(STRUCT_DESC);
13829
      if (this.supplier != null) {
13830
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
13831
        this.supplier.write(oprot);
13832
        oprot.writeFieldEnd();
13833
      }
13834
      oprot.writeFieldStop();
13835
      oprot.writeStructEnd();
13836
    }
13837
 
13838
    @Override
13839
    public String toString() {
13840
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
13841
      boolean first = true;
13842
 
13843
      sb.append("supplier:");
13844
      if (this.supplier == null) {
13845
        sb.append("null");
13846
      } else {
13847
        sb.append(this.supplier);
13848
      }
13849
      first = false;
13850
      sb.append(")");
13851
      return sb.toString();
13852
    }
13853
 
13854
    public void validate() throws org.apache.thrift.TException {
13855
      // check for required fields
13856
    }
13857
 
13858
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13859
      try {
13860
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13861
      } catch (org.apache.thrift.TException te) {
13862
        throw new java.io.IOException(te);
13863
      }
13864
    }
13865
 
13866
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13867
      try {
13868
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13869
      } catch (org.apache.thrift.TException te) {
13870
        throw new java.io.IOException(te);
13871
      }
13872
    }
13873
 
13874
  }
13875
 
13876
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
13877
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
13878
 
13879
 
13880
 
13881
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13882
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13883
;
13884
 
13885
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13886
 
13887
      static {
13888
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13889
          byName.put(field.getFieldName(), field);
13890
        }
13891
      }
13892
 
13893
      /**
13894
       * Find the _Fields constant that matches fieldId, or null if its not found.
13895
       */
13896
      public static _Fields findByThriftId(int fieldId) {
13897
        switch(fieldId) {
13898
          default:
13899
            return null;
13900
        }
13901
      }
13902
 
13903
      /**
13904
       * Find the _Fields constant that matches fieldId, throwing an exception
13905
       * if it is not found.
13906
       */
13907
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13908
        _Fields fields = findByThriftId(fieldId);
13909
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13910
        return fields;
13911
      }
13912
 
13913
      /**
13914
       * Find the _Fields constant that matches name, or null if its not found.
13915
       */
13916
      public static _Fields findByName(String name) {
13917
        return byName.get(name);
13918
      }
13919
 
13920
      private final short _thriftId;
13921
      private final String _fieldName;
13922
 
13923
      _Fields(short thriftId, String fieldName) {
13924
        _thriftId = thriftId;
13925
        _fieldName = fieldName;
13926
      }
13927
 
13928
      public short getThriftFieldId() {
13929
        return _thriftId;
13930
      }
13931
 
13932
      public String getFieldName() {
13933
        return _fieldName;
13934
      }
13935
    }
13936
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13937
    static {
13938
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13939
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13940
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
13941
    }
13942
 
13943
    public updateSupplier_result() {
13944
    }
13945
 
13946
    /**
13947
     * Performs a deep copy on <i>other</i>.
13948
     */
13949
    public updateSupplier_result(updateSupplier_result other) {
13950
    }
13951
 
13952
    public updateSupplier_result deepCopy() {
13953
      return new updateSupplier_result(this);
13954
    }
13955
 
13956
    @Override
13957
    public void clear() {
13958
    }
13959
 
13960
    public void setFieldValue(_Fields field, Object value) {
13961
      switch (field) {
13962
      }
13963
    }
13964
 
13965
    public Object getFieldValue(_Fields field) {
13966
      switch (field) {
13967
      }
13968
      throw new IllegalStateException();
13969
    }
13970
 
13971
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13972
    public boolean isSet(_Fields field) {
13973
      if (field == null) {
13974
        throw new IllegalArgumentException();
13975
      }
13976
 
13977
      switch (field) {
13978
      }
13979
      throw new IllegalStateException();
13980
    }
13981
 
13982
    @Override
13983
    public boolean equals(Object that) {
13984
      if (that == null)
13985
        return false;
13986
      if (that instanceof updateSupplier_result)
13987
        return this.equals((updateSupplier_result)that);
13988
      return false;
13989
    }
13990
 
13991
    public boolean equals(updateSupplier_result that) {
13992
      if (that == null)
13993
        return false;
13994
 
13995
      return true;
13996
    }
13997
 
13998
    @Override
13999
    public int hashCode() {
14000
      return 0;
14001
    }
14002
 
14003
    public int compareTo(updateSupplier_result other) {
14004
      if (!getClass().equals(other.getClass())) {
14005
        return getClass().getName().compareTo(other.getClass().getName());
14006
      }
14007
 
14008
      int lastComparison = 0;
14009
      updateSupplier_result typedOther = (updateSupplier_result)other;
14010
 
14011
      return 0;
14012
    }
14013
 
14014
    public _Fields fieldForId(int fieldId) {
14015
      return _Fields.findByThriftId(fieldId);
14016
    }
14017
 
14018
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14019
      org.apache.thrift.protocol.TField field;
14020
      iprot.readStructBegin();
14021
      while (true)
14022
      {
14023
        field = iprot.readFieldBegin();
14024
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14025
          break;
14026
        }
14027
        switch (field.id) {
14028
          default:
14029
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14030
        }
14031
        iprot.readFieldEnd();
14032
      }
14033
      iprot.readStructEnd();
14034
      validate();
14035
    }
14036
 
14037
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14038
      oprot.writeStructBegin(STRUCT_DESC);
14039
 
14040
      oprot.writeFieldStop();
14041
      oprot.writeStructEnd();
14042
    }
14043
 
14044
    @Override
14045
    public String toString() {
14046
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
14047
      boolean first = true;
14048
 
14049
      sb.append(")");
14050
      return sb.toString();
14051
    }
14052
 
14053
    public void validate() throws org.apache.thrift.TException {
14054
      // check for required fields
14055
    }
14056
 
14057
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14058
      try {
14059
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14060
      } catch (org.apache.thrift.TException te) {
14061
        throw new java.io.IOException(te);
14062
      }
14063
    }
14064
 
14065
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14066
      try {
14067
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14068
      } catch (org.apache.thrift.TException te) {
14069
        throw new java.io.IOException(te);
14070
      }
14071
    }
14072
 
14073
  }
14074
 
6467 amar.kumar 14075
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14076
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
14077
 
14078
    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);
14079
 
14080
    private PurchaseReturn purchaseReturn; // required
14081
 
14082
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14083
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14084
      PURCHASE_RETURN((short)1, "purchaseReturn");
14085
 
14086
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14087
 
14088
      static {
14089
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14090
          byName.put(field.getFieldName(), field);
14091
        }
14092
      }
14093
 
14094
      /**
14095
       * Find the _Fields constant that matches fieldId, or null if its not found.
14096
       */
14097
      public static _Fields findByThriftId(int fieldId) {
14098
        switch(fieldId) {
14099
          case 1: // PURCHASE_RETURN
14100
            return PURCHASE_RETURN;
14101
          default:
14102
            return null;
14103
        }
14104
      }
14105
 
14106
      /**
14107
       * Find the _Fields constant that matches fieldId, throwing an exception
14108
       * if it is not found.
14109
       */
14110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14111
        _Fields fields = findByThriftId(fieldId);
14112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14113
        return fields;
14114
      }
14115
 
14116
      /**
14117
       * Find the _Fields constant that matches name, or null if its not found.
14118
       */
14119
      public static _Fields findByName(String name) {
14120
        return byName.get(name);
14121
      }
14122
 
14123
      private final short _thriftId;
14124
      private final String _fieldName;
14125
 
14126
      _Fields(short thriftId, String fieldName) {
14127
        _thriftId = thriftId;
14128
        _fieldName = fieldName;
14129
      }
14130
 
14131
      public short getThriftFieldId() {
14132
        return _thriftId;
14133
      }
14134
 
14135
      public String getFieldName() {
14136
        return _fieldName;
14137
      }
14138
    }
14139
 
14140
    // isset id assignments
14141
 
14142
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14143
    static {
14144
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14145
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14146
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
14147
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14148
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
14149
    }
14150
 
14151
    public createPurchaseReturn_args() {
14152
    }
14153
 
14154
    public createPurchaseReturn_args(
14155
      PurchaseReturn purchaseReturn)
14156
    {
14157
      this();
14158
      this.purchaseReturn = purchaseReturn;
14159
    }
14160
 
14161
    /**
14162
     * Performs a deep copy on <i>other</i>.
14163
     */
14164
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
14165
      if (other.isSetPurchaseReturn()) {
14166
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
14167
      }
14168
    }
14169
 
14170
    public createPurchaseReturn_args deepCopy() {
14171
      return new createPurchaseReturn_args(this);
14172
    }
14173
 
14174
    @Override
14175
    public void clear() {
14176
      this.purchaseReturn = null;
14177
    }
14178
 
14179
    public PurchaseReturn getPurchaseReturn() {
14180
      return this.purchaseReturn;
14181
    }
14182
 
14183
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
14184
      this.purchaseReturn = purchaseReturn;
14185
    }
14186
 
14187
    public void unsetPurchaseReturn() {
14188
      this.purchaseReturn = null;
14189
    }
14190
 
14191
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
14192
    public boolean isSetPurchaseReturn() {
14193
      return this.purchaseReturn != null;
14194
    }
14195
 
14196
    public void setPurchaseReturnIsSet(boolean value) {
14197
      if (!value) {
14198
        this.purchaseReturn = null;
14199
      }
14200
    }
14201
 
14202
    public void setFieldValue(_Fields field, Object value) {
14203
      switch (field) {
14204
      case PURCHASE_RETURN:
14205
        if (value == null) {
14206
          unsetPurchaseReturn();
14207
        } else {
14208
          setPurchaseReturn((PurchaseReturn)value);
14209
        }
14210
        break;
14211
 
14212
      }
14213
    }
14214
 
14215
    public Object getFieldValue(_Fields field) {
14216
      switch (field) {
14217
      case PURCHASE_RETURN:
14218
        return getPurchaseReturn();
14219
 
14220
      }
14221
      throw new IllegalStateException();
14222
    }
14223
 
14224
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14225
    public boolean isSet(_Fields field) {
14226
      if (field == null) {
14227
        throw new IllegalArgumentException();
14228
      }
14229
 
14230
      switch (field) {
14231
      case PURCHASE_RETURN:
14232
        return isSetPurchaseReturn();
14233
      }
14234
      throw new IllegalStateException();
14235
    }
14236
 
14237
    @Override
14238
    public boolean equals(Object that) {
14239
      if (that == null)
14240
        return false;
14241
      if (that instanceof createPurchaseReturn_args)
14242
        return this.equals((createPurchaseReturn_args)that);
14243
      return false;
14244
    }
14245
 
14246
    public boolean equals(createPurchaseReturn_args that) {
14247
      if (that == null)
14248
        return false;
14249
 
14250
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
14251
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
14252
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
14253
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
14254
          return false;
14255
        if (!this.purchaseReturn.equals(that.purchaseReturn))
14256
          return false;
14257
      }
14258
 
14259
      return true;
14260
    }
14261
 
14262
    @Override
14263
    public int hashCode() {
14264
      return 0;
14265
    }
14266
 
14267
    public int compareTo(createPurchaseReturn_args other) {
14268
      if (!getClass().equals(other.getClass())) {
14269
        return getClass().getName().compareTo(other.getClass().getName());
14270
      }
14271
 
14272
      int lastComparison = 0;
14273
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
14274
 
14275
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
14276
      if (lastComparison != 0) {
14277
        return lastComparison;
14278
      }
14279
      if (isSetPurchaseReturn()) {
14280
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
14281
        if (lastComparison != 0) {
14282
          return lastComparison;
14283
        }
14284
      }
14285
      return 0;
14286
    }
14287
 
14288
    public _Fields fieldForId(int fieldId) {
14289
      return _Fields.findByThriftId(fieldId);
14290
    }
14291
 
14292
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14293
      org.apache.thrift.protocol.TField field;
14294
      iprot.readStructBegin();
14295
      while (true)
14296
      {
14297
        field = iprot.readFieldBegin();
14298
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14299
          break;
14300
        }
14301
        switch (field.id) {
14302
          case 1: // PURCHASE_RETURN
14303
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14304
              this.purchaseReturn = new PurchaseReturn();
14305
              this.purchaseReturn.read(iprot);
14306
            } else { 
14307
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14308
            }
14309
            break;
14310
          default:
14311
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14312
        }
14313
        iprot.readFieldEnd();
14314
      }
14315
      iprot.readStructEnd();
14316
      validate();
14317
    }
14318
 
14319
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14320
      validate();
14321
 
14322
      oprot.writeStructBegin(STRUCT_DESC);
14323
      if (this.purchaseReturn != null) {
14324
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
14325
        this.purchaseReturn.write(oprot);
14326
        oprot.writeFieldEnd();
14327
      }
14328
      oprot.writeFieldStop();
14329
      oprot.writeStructEnd();
14330
    }
14331
 
14332
    @Override
14333
    public String toString() {
14334
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
14335
      boolean first = true;
14336
 
14337
      sb.append("purchaseReturn:");
14338
      if (this.purchaseReturn == null) {
14339
        sb.append("null");
14340
      } else {
14341
        sb.append(this.purchaseReturn);
14342
      }
14343
      first = false;
14344
      sb.append(")");
14345
      return sb.toString();
14346
    }
14347
 
14348
    public void validate() throws org.apache.thrift.TException {
14349
      // check for required fields
14350
    }
14351
 
14352
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14353
      try {
14354
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14355
      } catch (org.apache.thrift.TException te) {
14356
        throw new java.io.IOException(te);
14357
      }
14358
    }
14359
 
14360
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14361
      try {
14362
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14363
      } catch (org.apache.thrift.TException te) {
14364
        throw new java.io.IOException(te);
14365
      }
14366
    }
14367
 
14368
  }
14369
 
14370
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14371
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
14372
 
14373
    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);
14374
 
14375
    private long success; // required
14376
 
14377
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14378
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14379
      SUCCESS((short)0, "success");
14380
 
14381
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14382
 
14383
      static {
14384
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14385
          byName.put(field.getFieldName(), field);
14386
        }
14387
      }
14388
 
14389
      /**
14390
       * Find the _Fields constant that matches fieldId, or null if its not found.
14391
       */
14392
      public static _Fields findByThriftId(int fieldId) {
14393
        switch(fieldId) {
14394
          case 0: // SUCCESS
14395
            return SUCCESS;
14396
          default:
14397
            return null;
14398
        }
14399
      }
14400
 
14401
      /**
14402
       * Find the _Fields constant that matches fieldId, throwing an exception
14403
       * if it is not found.
14404
       */
14405
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14406
        _Fields fields = findByThriftId(fieldId);
14407
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14408
        return fields;
14409
      }
14410
 
14411
      /**
14412
       * Find the _Fields constant that matches name, or null if its not found.
14413
       */
14414
      public static _Fields findByName(String name) {
14415
        return byName.get(name);
14416
      }
14417
 
14418
      private final short _thriftId;
14419
      private final String _fieldName;
14420
 
14421
      _Fields(short thriftId, String fieldName) {
14422
        _thriftId = thriftId;
14423
        _fieldName = fieldName;
14424
      }
14425
 
14426
      public short getThriftFieldId() {
14427
        return _thriftId;
14428
      }
14429
 
14430
      public String getFieldName() {
14431
        return _fieldName;
14432
      }
14433
    }
14434
 
14435
    // isset id assignments
14436
    private static final int __SUCCESS_ISSET_ID = 0;
14437
    private BitSet __isset_bit_vector = new BitSet(1);
14438
 
14439
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14440
    static {
14441
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14442
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14443
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14444
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14445
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
14446
    }
14447
 
14448
    public createPurchaseReturn_result() {
14449
    }
14450
 
14451
    public createPurchaseReturn_result(
14452
      long success)
14453
    {
14454
      this();
14455
      this.success = success;
14456
      setSuccessIsSet(true);
14457
    }
14458
 
14459
    /**
14460
     * Performs a deep copy on <i>other</i>.
14461
     */
14462
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
14463
      __isset_bit_vector.clear();
14464
      __isset_bit_vector.or(other.__isset_bit_vector);
14465
      this.success = other.success;
14466
    }
14467
 
14468
    public createPurchaseReturn_result deepCopy() {
14469
      return new createPurchaseReturn_result(this);
14470
    }
14471
 
14472
    @Override
14473
    public void clear() {
14474
      setSuccessIsSet(false);
14475
      this.success = 0;
14476
    }
14477
 
14478
    public long getSuccess() {
14479
      return this.success;
14480
    }
14481
 
14482
    public void setSuccess(long success) {
14483
      this.success = success;
14484
      setSuccessIsSet(true);
14485
    }
14486
 
14487
    public void unsetSuccess() {
14488
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14489
    }
14490
 
14491
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14492
    public boolean isSetSuccess() {
14493
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14494
    }
14495
 
14496
    public void setSuccessIsSet(boolean value) {
14497
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14498
    }
14499
 
14500
    public void setFieldValue(_Fields field, Object value) {
14501
      switch (field) {
14502
      case SUCCESS:
14503
        if (value == null) {
14504
          unsetSuccess();
14505
        } else {
14506
          setSuccess((Long)value);
14507
        }
14508
        break;
14509
 
14510
      }
14511
    }
14512
 
14513
    public Object getFieldValue(_Fields field) {
14514
      switch (field) {
14515
      case SUCCESS:
14516
        return Long.valueOf(getSuccess());
14517
 
14518
      }
14519
      throw new IllegalStateException();
14520
    }
14521
 
14522
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14523
    public boolean isSet(_Fields field) {
14524
      if (field == null) {
14525
        throw new IllegalArgumentException();
14526
      }
14527
 
14528
      switch (field) {
14529
      case SUCCESS:
14530
        return isSetSuccess();
14531
      }
14532
      throw new IllegalStateException();
14533
    }
14534
 
14535
    @Override
14536
    public boolean equals(Object that) {
14537
      if (that == null)
14538
        return false;
14539
      if (that instanceof createPurchaseReturn_result)
14540
        return this.equals((createPurchaseReturn_result)that);
14541
      return false;
14542
    }
14543
 
14544
    public boolean equals(createPurchaseReturn_result that) {
14545
      if (that == null)
14546
        return false;
14547
 
14548
      boolean this_present_success = true;
14549
      boolean that_present_success = true;
14550
      if (this_present_success || that_present_success) {
14551
        if (!(this_present_success && that_present_success))
14552
          return false;
14553
        if (this.success != that.success)
14554
          return false;
14555
      }
14556
 
14557
      return true;
14558
    }
14559
 
14560
    @Override
14561
    public int hashCode() {
14562
      return 0;
14563
    }
14564
 
14565
    public int compareTo(createPurchaseReturn_result other) {
14566
      if (!getClass().equals(other.getClass())) {
14567
        return getClass().getName().compareTo(other.getClass().getName());
14568
      }
14569
 
14570
      int lastComparison = 0;
14571
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
14572
 
14573
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14574
      if (lastComparison != 0) {
14575
        return lastComparison;
14576
      }
14577
      if (isSetSuccess()) {
14578
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14579
        if (lastComparison != 0) {
14580
          return lastComparison;
14581
        }
14582
      }
14583
      return 0;
14584
    }
14585
 
14586
    public _Fields fieldForId(int fieldId) {
14587
      return _Fields.findByThriftId(fieldId);
14588
    }
14589
 
14590
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14591
      org.apache.thrift.protocol.TField field;
14592
      iprot.readStructBegin();
14593
      while (true)
14594
      {
14595
        field = iprot.readFieldBegin();
14596
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14597
          break;
14598
        }
14599
        switch (field.id) {
14600
          case 0: // SUCCESS
14601
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14602
              this.success = iprot.readI64();
14603
              setSuccessIsSet(true);
14604
            } else { 
14605
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14606
            }
14607
            break;
14608
          default:
14609
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14610
        }
14611
        iprot.readFieldEnd();
14612
      }
14613
      iprot.readStructEnd();
14614
      validate();
14615
    }
14616
 
14617
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14618
      oprot.writeStructBegin(STRUCT_DESC);
14619
 
14620
      if (this.isSetSuccess()) {
14621
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14622
        oprot.writeI64(this.success);
14623
        oprot.writeFieldEnd();
14624
      }
14625
      oprot.writeFieldStop();
14626
      oprot.writeStructEnd();
14627
    }
14628
 
14629
    @Override
14630
    public String toString() {
14631
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
14632
      boolean first = true;
14633
 
14634
      sb.append("success:");
14635
      sb.append(this.success);
14636
      first = false;
14637
      sb.append(")");
14638
      return sb.toString();
14639
    }
14640
 
14641
    public void validate() throws org.apache.thrift.TException {
14642
      // check for required fields
14643
    }
14644
 
14645
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14646
      try {
14647
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14648
      } catch (org.apache.thrift.TException te) {
14649
        throw new java.io.IOException(te);
14650
      }
14651
    }
14652
 
14653
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14654
      try {
14655
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14656
      } catch (org.apache.thrift.TException te) {
14657
        throw new java.io.IOException(te);
14658
      }
14659
    }
14660
 
14661
  }
14662
 
14663
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14664
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
14665
 
14666
    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);
14667
 
14668
    private long id; // required
14669
 
14670
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14671
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14672
      ID((short)1, "id");
14673
 
14674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14675
 
14676
      static {
14677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14678
          byName.put(field.getFieldName(), field);
14679
        }
14680
      }
14681
 
14682
      /**
14683
       * Find the _Fields constant that matches fieldId, or null if its not found.
14684
       */
14685
      public static _Fields findByThriftId(int fieldId) {
14686
        switch(fieldId) {
14687
          case 1: // ID
14688
            return ID;
14689
          default:
14690
            return null;
14691
        }
14692
      }
14693
 
14694
      /**
14695
       * Find the _Fields constant that matches fieldId, throwing an exception
14696
       * if it is not found.
14697
       */
14698
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14699
        _Fields fields = findByThriftId(fieldId);
14700
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14701
        return fields;
14702
      }
14703
 
14704
      /**
14705
       * Find the _Fields constant that matches name, or null if its not found.
14706
       */
14707
      public static _Fields findByName(String name) {
14708
        return byName.get(name);
14709
      }
14710
 
14711
      private final short _thriftId;
14712
      private final String _fieldName;
14713
 
14714
      _Fields(short thriftId, String fieldName) {
14715
        _thriftId = thriftId;
14716
        _fieldName = fieldName;
14717
      }
14718
 
14719
      public short getThriftFieldId() {
14720
        return _thriftId;
14721
      }
14722
 
14723
      public String getFieldName() {
14724
        return _fieldName;
14725
      }
14726
    }
14727
 
14728
    // isset id assignments
14729
    private static final int __ID_ISSET_ID = 0;
14730
    private BitSet __isset_bit_vector = new BitSet(1);
14731
 
14732
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14733
    static {
14734
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14735
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14736
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14737
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14738
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
14739
    }
14740
 
14741
    public settlePurchaseReturn_args() {
14742
    }
14743
 
14744
    public settlePurchaseReturn_args(
14745
      long id)
14746
    {
14747
      this();
14748
      this.id = id;
14749
      setIdIsSet(true);
14750
    }
14751
 
14752
    /**
14753
     * Performs a deep copy on <i>other</i>.
14754
     */
14755
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
14756
      __isset_bit_vector.clear();
14757
      __isset_bit_vector.or(other.__isset_bit_vector);
14758
      this.id = other.id;
14759
    }
14760
 
14761
    public settlePurchaseReturn_args deepCopy() {
14762
      return new settlePurchaseReturn_args(this);
14763
    }
14764
 
14765
    @Override
14766
    public void clear() {
14767
      setIdIsSet(false);
14768
      this.id = 0;
14769
    }
14770
 
14771
    public long getId() {
14772
      return this.id;
14773
    }
14774
 
14775
    public void setId(long id) {
14776
      this.id = id;
14777
      setIdIsSet(true);
14778
    }
14779
 
14780
    public void unsetId() {
14781
      __isset_bit_vector.clear(__ID_ISSET_ID);
14782
    }
14783
 
14784
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
14785
    public boolean isSetId() {
14786
      return __isset_bit_vector.get(__ID_ISSET_ID);
14787
    }
14788
 
14789
    public void setIdIsSet(boolean value) {
14790
      __isset_bit_vector.set(__ID_ISSET_ID, value);
14791
    }
14792
 
14793
    public void setFieldValue(_Fields field, Object value) {
14794
      switch (field) {
14795
      case ID:
14796
        if (value == null) {
14797
          unsetId();
14798
        } else {
14799
          setId((Long)value);
14800
        }
14801
        break;
14802
 
14803
      }
14804
    }
14805
 
14806
    public Object getFieldValue(_Fields field) {
14807
      switch (field) {
14808
      case ID:
14809
        return Long.valueOf(getId());
14810
 
14811
      }
14812
      throw new IllegalStateException();
14813
    }
14814
 
14815
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14816
    public boolean isSet(_Fields field) {
14817
      if (field == null) {
14818
        throw new IllegalArgumentException();
14819
      }
14820
 
14821
      switch (field) {
14822
      case ID:
14823
        return isSetId();
14824
      }
14825
      throw new IllegalStateException();
14826
    }
14827
 
14828
    @Override
14829
    public boolean equals(Object that) {
14830
      if (that == null)
14831
        return false;
14832
      if (that instanceof settlePurchaseReturn_args)
14833
        return this.equals((settlePurchaseReturn_args)that);
14834
      return false;
14835
    }
14836
 
14837
    public boolean equals(settlePurchaseReturn_args that) {
14838
      if (that == null)
14839
        return false;
14840
 
14841
      boolean this_present_id = true;
14842
      boolean that_present_id = true;
14843
      if (this_present_id || that_present_id) {
14844
        if (!(this_present_id && that_present_id))
14845
          return false;
14846
        if (this.id != that.id)
14847
          return false;
14848
      }
14849
 
14850
      return true;
14851
    }
14852
 
14853
    @Override
14854
    public int hashCode() {
14855
      return 0;
14856
    }
14857
 
14858
    public int compareTo(settlePurchaseReturn_args other) {
14859
      if (!getClass().equals(other.getClass())) {
14860
        return getClass().getName().compareTo(other.getClass().getName());
14861
      }
14862
 
14863
      int lastComparison = 0;
14864
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
14865
 
14866
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
14867
      if (lastComparison != 0) {
14868
        return lastComparison;
14869
      }
14870
      if (isSetId()) {
14871
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
14872
        if (lastComparison != 0) {
14873
          return lastComparison;
14874
        }
14875
      }
14876
      return 0;
14877
    }
14878
 
14879
    public _Fields fieldForId(int fieldId) {
14880
      return _Fields.findByThriftId(fieldId);
14881
    }
14882
 
14883
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14884
      org.apache.thrift.protocol.TField field;
14885
      iprot.readStructBegin();
14886
      while (true)
14887
      {
14888
        field = iprot.readFieldBegin();
14889
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14890
          break;
14891
        }
14892
        switch (field.id) {
14893
          case 1: // ID
14894
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14895
              this.id = iprot.readI64();
14896
              setIdIsSet(true);
14897
            } else { 
14898
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14899
            }
14900
            break;
14901
          default:
14902
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14903
        }
14904
        iprot.readFieldEnd();
14905
      }
14906
      iprot.readStructEnd();
14907
      validate();
14908
    }
14909
 
14910
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14911
      validate();
14912
 
14913
      oprot.writeStructBegin(STRUCT_DESC);
14914
      oprot.writeFieldBegin(ID_FIELD_DESC);
14915
      oprot.writeI64(this.id);
14916
      oprot.writeFieldEnd();
14917
      oprot.writeFieldStop();
14918
      oprot.writeStructEnd();
14919
    }
14920
 
14921
    @Override
14922
    public String toString() {
14923
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
14924
      boolean first = true;
14925
 
14926
      sb.append("id:");
14927
      sb.append(this.id);
14928
      first = false;
14929
      sb.append(")");
14930
      return sb.toString();
14931
    }
14932
 
14933
    public void validate() throws org.apache.thrift.TException {
14934
      // check for required fields
14935
    }
14936
 
14937
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14938
      try {
14939
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14940
      } catch (org.apache.thrift.TException te) {
14941
        throw new java.io.IOException(te);
14942
      }
14943
    }
14944
 
14945
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14946
      try {
14947
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
14948
        __isset_bit_vector = new BitSet(1);
14949
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14950
      } catch (org.apache.thrift.TException te) {
14951
        throw new java.io.IOException(te);
14952
      }
14953
    }
14954
 
14955
  }
14956
 
14957
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14958
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
14959
 
14960
 
14961
 
14962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14963
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14964
;
14965
 
14966
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14967
 
14968
      static {
14969
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14970
          byName.put(field.getFieldName(), field);
14971
        }
14972
      }
14973
 
14974
      /**
14975
       * Find the _Fields constant that matches fieldId, or null if its not found.
14976
       */
14977
      public static _Fields findByThriftId(int fieldId) {
14978
        switch(fieldId) {
14979
          default:
14980
            return null;
14981
        }
14982
      }
14983
 
14984
      /**
14985
       * Find the _Fields constant that matches fieldId, throwing an exception
14986
       * if it is not found.
14987
       */
14988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14989
        _Fields fields = findByThriftId(fieldId);
14990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14991
        return fields;
14992
      }
14993
 
14994
      /**
14995
       * Find the _Fields constant that matches name, or null if its not found.
14996
       */
14997
      public static _Fields findByName(String name) {
14998
        return byName.get(name);
14999
      }
15000
 
15001
      private final short _thriftId;
15002
      private final String _fieldName;
15003
 
15004
      _Fields(short thriftId, String fieldName) {
15005
        _thriftId = thriftId;
15006
        _fieldName = fieldName;
15007
      }
15008
 
15009
      public short getThriftFieldId() {
15010
        return _thriftId;
15011
      }
15012
 
15013
      public String getFieldName() {
15014
        return _fieldName;
15015
      }
15016
    }
15017
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15018
    static {
15019
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15020
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15021
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
15022
    }
15023
 
15024
    public settlePurchaseReturn_result() {
15025
    }
15026
 
15027
    /**
15028
     * Performs a deep copy on <i>other</i>.
15029
     */
15030
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
15031
    }
15032
 
15033
    public settlePurchaseReturn_result deepCopy() {
15034
      return new settlePurchaseReturn_result(this);
15035
    }
15036
 
15037
    @Override
15038
    public void clear() {
15039
    }
15040
 
15041
    public void setFieldValue(_Fields field, Object value) {
15042
      switch (field) {
15043
      }
15044
    }
15045
 
15046
    public Object getFieldValue(_Fields field) {
15047
      switch (field) {
15048
      }
15049
      throw new IllegalStateException();
15050
    }
15051
 
15052
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15053
    public boolean isSet(_Fields field) {
15054
      if (field == null) {
15055
        throw new IllegalArgumentException();
15056
      }
15057
 
15058
      switch (field) {
15059
      }
15060
      throw new IllegalStateException();
15061
    }
15062
 
15063
    @Override
15064
    public boolean equals(Object that) {
15065
      if (that == null)
15066
        return false;
15067
      if (that instanceof settlePurchaseReturn_result)
15068
        return this.equals((settlePurchaseReturn_result)that);
15069
      return false;
15070
    }
15071
 
15072
    public boolean equals(settlePurchaseReturn_result that) {
15073
      if (that == null)
15074
        return false;
15075
 
15076
      return true;
15077
    }
15078
 
15079
    @Override
15080
    public int hashCode() {
15081
      return 0;
15082
    }
15083
 
15084
    public int compareTo(settlePurchaseReturn_result other) {
15085
      if (!getClass().equals(other.getClass())) {
15086
        return getClass().getName().compareTo(other.getClass().getName());
15087
      }
15088
 
15089
      int lastComparison = 0;
15090
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
15091
 
15092
      return 0;
15093
    }
15094
 
15095
    public _Fields fieldForId(int fieldId) {
15096
      return _Fields.findByThriftId(fieldId);
15097
    }
15098
 
15099
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15100
      org.apache.thrift.protocol.TField field;
15101
      iprot.readStructBegin();
15102
      while (true)
15103
      {
15104
        field = iprot.readFieldBegin();
15105
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15106
          break;
15107
        }
15108
        switch (field.id) {
15109
          default:
15110
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15111
        }
15112
        iprot.readFieldEnd();
15113
      }
15114
      iprot.readStructEnd();
15115
      validate();
15116
    }
15117
 
15118
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15119
      oprot.writeStructBegin(STRUCT_DESC);
15120
 
15121
      oprot.writeFieldStop();
15122
      oprot.writeStructEnd();
15123
    }
15124
 
15125
    @Override
15126
    public String toString() {
15127
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
15128
      boolean first = true;
15129
 
15130
      sb.append(")");
15131
      return sb.toString();
15132
    }
15133
 
15134
    public void validate() throws org.apache.thrift.TException {
15135
      // check for required fields
15136
    }
15137
 
15138
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15139
      try {
15140
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15141
      } catch (org.apache.thrift.TException te) {
15142
        throw new java.io.IOException(te);
15143
      }
15144
    }
15145
 
15146
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15147
      try {
15148
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15149
      } catch (org.apache.thrift.TException te) {
15150
        throw new java.io.IOException(te);
15151
      }
15152
    }
15153
 
15154
  }
15155
 
15156
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
15157
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
15158
 
15159
 
15160
 
15161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15162
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15163
;
15164
 
15165
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15166
 
15167
      static {
15168
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15169
          byName.put(field.getFieldName(), field);
15170
        }
15171
      }
15172
 
15173
      /**
15174
       * Find the _Fields constant that matches fieldId, or null if its not found.
15175
       */
15176
      public static _Fields findByThriftId(int fieldId) {
15177
        switch(fieldId) {
15178
          default:
15179
            return null;
15180
        }
15181
      }
15182
 
15183
      /**
15184
       * Find the _Fields constant that matches fieldId, throwing an exception
15185
       * if it is not found.
15186
       */
15187
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15188
        _Fields fields = findByThriftId(fieldId);
15189
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15190
        return fields;
15191
      }
15192
 
15193
      /**
15194
       * Find the _Fields constant that matches name, or null if its not found.
15195
       */
15196
      public static _Fields findByName(String name) {
15197
        return byName.get(name);
15198
      }
15199
 
15200
      private final short _thriftId;
15201
      private final String _fieldName;
15202
 
15203
      _Fields(short thriftId, String fieldName) {
15204
        _thriftId = thriftId;
15205
        _fieldName = fieldName;
15206
      }
15207
 
15208
      public short getThriftFieldId() {
15209
        return _thriftId;
15210
      }
15211
 
15212
      public String getFieldName() {
15213
        return _fieldName;
15214
      }
15215
    }
15216
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15217
    static {
15218
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15219
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15220
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
15221
    }
15222
 
15223
    public getUnsettledPurchaseReturns_args() {
15224
    }
15225
 
15226
    /**
15227
     * Performs a deep copy on <i>other</i>.
15228
     */
15229
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
15230
    }
15231
 
15232
    public getUnsettledPurchaseReturns_args deepCopy() {
15233
      return new getUnsettledPurchaseReturns_args(this);
15234
    }
15235
 
15236
    @Override
15237
    public void clear() {
15238
    }
15239
 
15240
    public void setFieldValue(_Fields field, Object value) {
15241
      switch (field) {
15242
      }
15243
    }
15244
 
15245
    public Object getFieldValue(_Fields field) {
15246
      switch (field) {
15247
      }
15248
      throw new IllegalStateException();
15249
    }
15250
 
15251
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15252
    public boolean isSet(_Fields field) {
15253
      if (field == null) {
15254
        throw new IllegalArgumentException();
15255
      }
15256
 
15257
      switch (field) {
15258
      }
15259
      throw new IllegalStateException();
15260
    }
15261
 
15262
    @Override
15263
    public boolean equals(Object that) {
15264
      if (that == null)
15265
        return false;
15266
      if (that instanceof getUnsettledPurchaseReturns_args)
15267
        return this.equals((getUnsettledPurchaseReturns_args)that);
15268
      return false;
15269
    }
15270
 
15271
    public boolean equals(getUnsettledPurchaseReturns_args that) {
15272
      if (that == null)
15273
        return false;
15274
 
15275
      return true;
15276
    }
15277
 
15278
    @Override
15279
    public int hashCode() {
15280
      return 0;
15281
    }
15282
 
15283
    public int compareTo(getUnsettledPurchaseReturns_args other) {
15284
      if (!getClass().equals(other.getClass())) {
15285
        return getClass().getName().compareTo(other.getClass().getName());
15286
      }
15287
 
15288
      int lastComparison = 0;
15289
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
15290
 
15291
      return 0;
15292
    }
15293
 
15294
    public _Fields fieldForId(int fieldId) {
15295
      return _Fields.findByThriftId(fieldId);
15296
    }
15297
 
15298
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15299
      org.apache.thrift.protocol.TField field;
15300
      iprot.readStructBegin();
15301
      while (true)
15302
      {
15303
        field = iprot.readFieldBegin();
15304
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15305
          break;
15306
        }
15307
        switch (field.id) {
15308
          default:
15309
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15310
        }
15311
        iprot.readFieldEnd();
15312
      }
15313
      iprot.readStructEnd();
15314
      validate();
15315
    }
15316
 
15317
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15318
      validate();
15319
 
15320
      oprot.writeStructBegin(STRUCT_DESC);
15321
      oprot.writeFieldStop();
15322
      oprot.writeStructEnd();
15323
    }
15324
 
15325
    @Override
15326
    public String toString() {
15327
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
15328
      boolean first = true;
15329
 
15330
      sb.append(")");
15331
      return sb.toString();
15332
    }
15333
 
15334
    public void validate() throws org.apache.thrift.TException {
15335
      // check for required fields
15336
    }
15337
 
15338
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15339
      try {
15340
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15341
      } catch (org.apache.thrift.TException te) {
15342
        throw new java.io.IOException(te);
15343
      }
15344
    }
15345
 
15346
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15347
      try {
15348
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15349
      } catch (org.apache.thrift.TException te) {
15350
        throw new java.io.IOException(te);
15351
      }
15352
    }
15353
 
15354
  }
15355
 
15356
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
15357
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
15358
 
15359
    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);
15360
 
15361
    private List<PurchaseReturn> success; // required
15362
 
15363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15364
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15365
      SUCCESS((short)0, "success");
15366
 
15367
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15368
 
15369
      static {
15370
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15371
          byName.put(field.getFieldName(), field);
15372
        }
15373
      }
15374
 
15375
      /**
15376
       * Find the _Fields constant that matches fieldId, or null if its not found.
15377
       */
15378
      public static _Fields findByThriftId(int fieldId) {
15379
        switch(fieldId) {
15380
          case 0: // SUCCESS
15381
            return SUCCESS;
15382
          default:
15383
            return null;
15384
        }
15385
      }
15386
 
15387
      /**
15388
       * Find the _Fields constant that matches fieldId, throwing an exception
15389
       * if it is not found.
15390
       */
15391
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15392
        _Fields fields = findByThriftId(fieldId);
15393
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15394
        return fields;
15395
      }
15396
 
15397
      /**
15398
       * Find the _Fields constant that matches name, or null if its not found.
15399
       */
15400
      public static _Fields findByName(String name) {
15401
        return byName.get(name);
15402
      }
15403
 
15404
      private final short _thriftId;
15405
      private final String _fieldName;
15406
 
15407
      _Fields(short thriftId, String fieldName) {
15408
        _thriftId = thriftId;
15409
        _fieldName = fieldName;
15410
      }
15411
 
15412
      public short getThriftFieldId() {
15413
        return _thriftId;
15414
      }
15415
 
15416
      public String getFieldName() {
15417
        return _fieldName;
15418
      }
15419
    }
15420
 
15421
    // isset id assignments
15422
 
15423
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15424
    static {
15425
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15426
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15427
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15428
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
15429
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15430
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
15431
    }
15432
 
15433
    public getUnsettledPurchaseReturns_result() {
15434
    }
15435
 
15436
    public getUnsettledPurchaseReturns_result(
15437
      List<PurchaseReturn> success)
15438
    {
15439
      this();
15440
      this.success = success;
15441
    }
15442
 
15443
    /**
15444
     * Performs a deep copy on <i>other</i>.
15445
     */
15446
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
15447
      if (other.isSetSuccess()) {
15448
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
15449
        for (PurchaseReturn other_element : other.success) {
15450
          __this__success.add(new PurchaseReturn(other_element));
15451
        }
15452
        this.success = __this__success;
15453
      }
15454
    }
15455
 
15456
    public getUnsettledPurchaseReturns_result deepCopy() {
15457
      return new getUnsettledPurchaseReturns_result(this);
15458
    }
15459
 
15460
    @Override
15461
    public void clear() {
15462
      this.success = null;
15463
    }
15464
 
15465
    public int getSuccessSize() {
15466
      return (this.success == null) ? 0 : this.success.size();
15467
    }
15468
 
15469
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
15470
      return (this.success == null) ? null : this.success.iterator();
15471
    }
15472
 
15473
    public void addToSuccess(PurchaseReturn elem) {
15474
      if (this.success == null) {
15475
        this.success = new ArrayList<PurchaseReturn>();
15476
      }
15477
      this.success.add(elem);
15478
    }
15479
 
15480
    public List<PurchaseReturn> getSuccess() {
15481
      return this.success;
15482
    }
15483
 
15484
    public void setSuccess(List<PurchaseReturn> success) {
15485
      this.success = success;
15486
    }
15487
 
15488
    public void unsetSuccess() {
15489
      this.success = null;
15490
    }
15491
 
15492
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15493
    public boolean isSetSuccess() {
15494
      return this.success != null;
15495
    }
15496
 
15497
    public void setSuccessIsSet(boolean value) {
15498
      if (!value) {
15499
        this.success = null;
15500
      }
15501
    }
15502
 
15503
    public void setFieldValue(_Fields field, Object value) {
15504
      switch (field) {
15505
      case SUCCESS:
15506
        if (value == null) {
15507
          unsetSuccess();
15508
        } else {
15509
          setSuccess((List<PurchaseReturn>)value);
15510
        }
15511
        break;
15512
 
15513
      }
15514
    }
15515
 
15516
    public Object getFieldValue(_Fields field) {
15517
      switch (field) {
15518
      case SUCCESS:
15519
        return getSuccess();
15520
 
15521
      }
15522
      throw new IllegalStateException();
15523
    }
15524
 
15525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15526
    public boolean isSet(_Fields field) {
15527
      if (field == null) {
15528
        throw new IllegalArgumentException();
15529
      }
15530
 
15531
      switch (field) {
15532
      case SUCCESS:
15533
        return isSetSuccess();
15534
      }
15535
      throw new IllegalStateException();
15536
    }
15537
 
15538
    @Override
15539
    public boolean equals(Object that) {
15540
      if (that == null)
15541
        return false;
15542
      if (that instanceof getUnsettledPurchaseReturns_result)
15543
        return this.equals((getUnsettledPurchaseReturns_result)that);
15544
      return false;
15545
    }
15546
 
15547
    public boolean equals(getUnsettledPurchaseReturns_result that) {
15548
      if (that == null)
15549
        return false;
15550
 
15551
      boolean this_present_success = true && this.isSetSuccess();
15552
      boolean that_present_success = true && that.isSetSuccess();
15553
      if (this_present_success || that_present_success) {
15554
        if (!(this_present_success && that_present_success))
15555
          return false;
15556
        if (!this.success.equals(that.success))
15557
          return false;
15558
      }
15559
 
15560
      return true;
15561
    }
15562
 
15563
    @Override
15564
    public int hashCode() {
15565
      return 0;
15566
    }
15567
 
15568
    public int compareTo(getUnsettledPurchaseReturns_result other) {
15569
      if (!getClass().equals(other.getClass())) {
15570
        return getClass().getName().compareTo(other.getClass().getName());
15571
      }
15572
 
15573
      int lastComparison = 0;
15574
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
15575
 
15576
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15577
      if (lastComparison != 0) {
15578
        return lastComparison;
15579
      }
15580
      if (isSetSuccess()) {
15581
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15582
        if (lastComparison != 0) {
15583
          return lastComparison;
15584
        }
15585
      }
15586
      return 0;
15587
    }
15588
 
15589
    public _Fields fieldForId(int fieldId) {
15590
      return _Fields.findByThriftId(fieldId);
15591
    }
15592
 
15593
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15594
      org.apache.thrift.protocol.TField field;
15595
      iprot.readStructBegin();
15596
      while (true)
15597
      {
15598
        field = iprot.readFieldBegin();
15599
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15600
          break;
15601
        }
15602
        switch (field.id) {
15603
          case 0: // SUCCESS
15604
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15605
              {
15606
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
15607
                this.success = new ArrayList<PurchaseReturn>(_list28.size);
15608
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
15609
                {
15610
                  PurchaseReturn _elem30; // required
15611
                  _elem30 = new PurchaseReturn();
15612
                  _elem30.read(iprot);
15613
                  this.success.add(_elem30);
15614
                }
15615
                iprot.readListEnd();
15616
              }
15617
            } else { 
15618
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15619
            }
15620
            break;
15621
          default:
15622
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15623
        }
15624
        iprot.readFieldEnd();
15625
      }
15626
      iprot.readStructEnd();
15627
      validate();
15628
    }
15629
 
15630
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15631
      oprot.writeStructBegin(STRUCT_DESC);
15632
 
15633
      if (this.isSetSuccess()) {
15634
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15635
        {
15636
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
15637
          for (PurchaseReturn _iter31 : this.success)
15638
          {
15639
            _iter31.write(oprot);
15640
          }
15641
          oprot.writeListEnd();
15642
        }
15643
        oprot.writeFieldEnd();
15644
      }
15645
      oprot.writeFieldStop();
15646
      oprot.writeStructEnd();
15647
    }
15648
 
15649
    @Override
15650
    public String toString() {
15651
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
15652
      boolean first = true;
15653
 
15654
      sb.append("success:");
15655
      if (this.success == null) {
15656
        sb.append("null");
15657
      } else {
15658
        sb.append(this.success);
15659
      }
15660
      first = false;
15661
      sb.append(")");
15662
      return sb.toString();
15663
    }
15664
 
15665
    public void validate() throws org.apache.thrift.TException {
15666
      // check for required fields
15667
    }
15668
 
15669
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15670
      try {
15671
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15672
      } catch (org.apache.thrift.TException te) {
15673
        throw new java.io.IOException(te);
15674
      }
15675
    }
15676
 
15677
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15678
      try {
15679
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15680
      } catch (org.apache.thrift.TException te) {
15681
        throw new java.io.IOException(te);
15682
      }
15683
    }
15684
 
15685
  }
15686
 
6630 amar.kumar 15687
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
15688
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
15689
 
15690
    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);
15691
    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);
15692
 
15693
    private String invoiceNumber; // required
15694
    private long supplierId; // required
15695
 
15696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15697
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15698
      INVOICE_NUMBER((short)1, "invoiceNumber"),
15699
      SUPPLIER_ID((short)2, "supplierId");
15700
 
15701
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15702
 
15703
      static {
15704
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15705
          byName.put(field.getFieldName(), field);
15706
        }
15707
      }
15708
 
15709
      /**
15710
       * Find the _Fields constant that matches fieldId, or null if its not found.
15711
       */
15712
      public static _Fields findByThriftId(int fieldId) {
15713
        switch(fieldId) {
15714
          case 1: // INVOICE_NUMBER
15715
            return INVOICE_NUMBER;
15716
          case 2: // SUPPLIER_ID
15717
            return SUPPLIER_ID;
15718
          default:
15719
            return null;
15720
        }
15721
      }
15722
 
15723
      /**
15724
       * Find the _Fields constant that matches fieldId, throwing an exception
15725
       * if it is not found.
15726
       */
15727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15728
        _Fields fields = findByThriftId(fieldId);
15729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15730
        return fields;
15731
      }
15732
 
15733
      /**
15734
       * Find the _Fields constant that matches name, or null if its not found.
15735
       */
15736
      public static _Fields findByName(String name) {
15737
        return byName.get(name);
15738
      }
15739
 
15740
      private final short _thriftId;
15741
      private final String _fieldName;
15742
 
15743
      _Fields(short thriftId, String fieldName) {
15744
        _thriftId = thriftId;
15745
        _fieldName = fieldName;
15746
      }
15747
 
15748
      public short getThriftFieldId() {
15749
        return _thriftId;
15750
      }
15751
 
15752
      public String getFieldName() {
15753
        return _fieldName;
15754
      }
15755
    }
15756
 
15757
    // isset id assignments
15758
    private static final int __SUPPLIERID_ISSET_ID = 0;
15759
    private BitSet __isset_bit_vector = new BitSet(1);
15760
 
15761
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15762
    static {
15763
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15764
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
15766
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15767
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15768
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15769
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
15770
    }
15771
 
15772
    public getInvoice_args() {
15773
    }
15774
 
15775
    public getInvoice_args(
15776
      String invoiceNumber,
15777
      long supplierId)
15778
    {
15779
      this();
15780
      this.invoiceNumber = invoiceNumber;
15781
      this.supplierId = supplierId;
15782
      setSupplierIdIsSet(true);
15783
    }
15784
 
15785
    /**
15786
     * Performs a deep copy on <i>other</i>.
15787
     */
15788
    public getInvoice_args(getInvoice_args other) {
15789
      __isset_bit_vector.clear();
15790
      __isset_bit_vector.or(other.__isset_bit_vector);
15791
      if (other.isSetInvoiceNumber()) {
15792
        this.invoiceNumber = other.invoiceNumber;
15793
      }
15794
      this.supplierId = other.supplierId;
15795
    }
15796
 
15797
    public getInvoice_args deepCopy() {
15798
      return new getInvoice_args(this);
15799
    }
15800
 
15801
    @Override
15802
    public void clear() {
15803
      this.invoiceNumber = null;
15804
      setSupplierIdIsSet(false);
15805
      this.supplierId = 0;
15806
    }
15807
 
15808
    public String getInvoiceNumber() {
15809
      return this.invoiceNumber;
15810
    }
15811
 
15812
    public void setInvoiceNumber(String invoiceNumber) {
15813
      this.invoiceNumber = invoiceNumber;
15814
    }
15815
 
15816
    public void unsetInvoiceNumber() {
15817
      this.invoiceNumber = null;
15818
    }
15819
 
15820
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
15821
    public boolean isSetInvoiceNumber() {
15822
      return this.invoiceNumber != null;
15823
    }
15824
 
15825
    public void setInvoiceNumberIsSet(boolean value) {
15826
      if (!value) {
15827
        this.invoiceNumber = null;
15828
      }
15829
    }
15830
 
15831
    public long getSupplierId() {
15832
      return this.supplierId;
15833
    }
15834
 
15835
    public void setSupplierId(long supplierId) {
15836
      this.supplierId = supplierId;
15837
      setSupplierIdIsSet(true);
15838
    }
15839
 
15840
    public void unsetSupplierId() {
15841
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
15842
    }
15843
 
15844
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
15845
    public boolean isSetSupplierId() {
15846
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
15847
    }
15848
 
15849
    public void setSupplierIdIsSet(boolean value) {
15850
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
15851
    }
15852
 
15853
    public void setFieldValue(_Fields field, Object value) {
15854
      switch (field) {
15855
      case INVOICE_NUMBER:
15856
        if (value == null) {
15857
          unsetInvoiceNumber();
15858
        } else {
15859
          setInvoiceNumber((String)value);
15860
        }
15861
        break;
15862
 
15863
      case SUPPLIER_ID:
15864
        if (value == null) {
15865
          unsetSupplierId();
15866
        } else {
15867
          setSupplierId((Long)value);
15868
        }
15869
        break;
15870
 
15871
      }
15872
    }
15873
 
15874
    public Object getFieldValue(_Fields field) {
15875
      switch (field) {
15876
      case INVOICE_NUMBER:
15877
        return getInvoiceNumber();
15878
 
15879
      case SUPPLIER_ID:
15880
        return Long.valueOf(getSupplierId());
15881
 
15882
      }
15883
      throw new IllegalStateException();
15884
    }
15885
 
15886
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15887
    public boolean isSet(_Fields field) {
15888
      if (field == null) {
15889
        throw new IllegalArgumentException();
15890
      }
15891
 
15892
      switch (field) {
15893
      case INVOICE_NUMBER:
15894
        return isSetInvoiceNumber();
15895
      case SUPPLIER_ID:
15896
        return isSetSupplierId();
15897
      }
15898
      throw new IllegalStateException();
15899
    }
15900
 
15901
    @Override
15902
    public boolean equals(Object that) {
15903
      if (that == null)
15904
        return false;
15905
      if (that instanceof getInvoice_args)
15906
        return this.equals((getInvoice_args)that);
15907
      return false;
15908
    }
15909
 
15910
    public boolean equals(getInvoice_args that) {
15911
      if (that == null)
15912
        return false;
15913
 
15914
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
15915
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
15916
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
15917
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
15918
          return false;
15919
        if (!this.invoiceNumber.equals(that.invoiceNumber))
15920
          return false;
15921
      }
15922
 
15923
      boolean this_present_supplierId = true;
15924
      boolean that_present_supplierId = true;
15925
      if (this_present_supplierId || that_present_supplierId) {
15926
        if (!(this_present_supplierId && that_present_supplierId))
15927
          return false;
15928
        if (this.supplierId != that.supplierId)
15929
          return false;
15930
      }
15931
 
15932
      return true;
15933
    }
15934
 
15935
    @Override
15936
    public int hashCode() {
15937
      return 0;
15938
    }
15939
 
15940
    public int compareTo(getInvoice_args other) {
15941
      if (!getClass().equals(other.getClass())) {
15942
        return getClass().getName().compareTo(other.getClass().getName());
15943
      }
15944
 
15945
      int lastComparison = 0;
15946
      getInvoice_args typedOther = (getInvoice_args)other;
15947
 
15948
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
15949
      if (lastComparison != 0) {
15950
        return lastComparison;
15951
      }
15952
      if (isSetInvoiceNumber()) {
15953
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
15954
        if (lastComparison != 0) {
15955
          return lastComparison;
15956
        }
15957
      }
15958
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
15959
      if (lastComparison != 0) {
15960
        return lastComparison;
15961
      }
15962
      if (isSetSupplierId()) {
15963
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
15964
        if (lastComparison != 0) {
15965
          return lastComparison;
15966
        }
15967
      }
15968
      return 0;
15969
    }
15970
 
15971
    public _Fields fieldForId(int fieldId) {
15972
      return _Fields.findByThriftId(fieldId);
15973
    }
15974
 
15975
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15976
      org.apache.thrift.protocol.TField field;
15977
      iprot.readStructBegin();
15978
      while (true)
15979
      {
15980
        field = iprot.readFieldBegin();
15981
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15982
          break;
15983
        }
15984
        switch (field.id) {
15985
          case 1: // INVOICE_NUMBER
15986
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
15987
              this.invoiceNumber = iprot.readString();
15988
            } else { 
15989
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15990
            }
15991
            break;
15992
          case 2: // SUPPLIER_ID
15993
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15994
              this.supplierId = iprot.readI64();
15995
              setSupplierIdIsSet(true);
15996
            } else { 
15997
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15998
            }
15999
            break;
16000
          default:
16001
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16002
        }
16003
        iprot.readFieldEnd();
16004
      }
16005
      iprot.readStructEnd();
16006
      validate();
16007
    }
16008
 
16009
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16010
      validate();
16011
 
16012
      oprot.writeStructBegin(STRUCT_DESC);
16013
      if (this.invoiceNumber != null) {
16014
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
16015
        oprot.writeString(this.invoiceNumber);
16016
        oprot.writeFieldEnd();
16017
      }
16018
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
16019
      oprot.writeI64(this.supplierId);
16020
      oprot.writeFieldEnd();
16021
      oprot.writeFieldStop();
16022
      oprot.writeStructEnd();
16023
    }
16024
 
16025
    @Override
16026
    public String toString() {
16027
      StringBuilder sb = new StringBuilder("getInvoice_args(");
16028
      boolean first = true;
16029
 
16030
      sb.append("invoiceNumber:");
16031
      if (this.invoiceNumber == null) {
16032
        sb.append("null");
16033
      } else {
16034
        sb.append(this.invoiceNumber);
16035
      }
16036
      first = false;
16037
      if (!first) sb.append(", ");
16038
      sb.append("supplierId:");
16039
      sb.append(this.supplierId);
16040
      first = false;
16041
      sb.append(")");
16042
      return sb.toString();
16043
    }
16044
 
16045
    public void validate() throws org.apache.thrift.TException {
16046
      // check for required fields
16047
    }
16048
 
16049
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16050
      try {
16051
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16052
      } catch (org.apache.thrift.TException te) {
16053
        throw new java.io.IOException(te);
16054
      }
16055
    }
16056
 
16057
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16058
      try {
16059
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16060
      } catch (org.apache.thrift.TException te) {
16061
        throw new java.io.IOException(te);
16062
      }
16063
    }
16064
 
16065
  }
16066
 
16067
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
16068
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
16069
 
16070
    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);
16071
 
16072
    private List<PurchaseReturn> success; // required
16073
 
16074
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16075
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16076
      SUCCESS((short)0, "success");
16077
 
16078
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16079
 
16080
      static {
16081
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16082
          byName.put(field.getFieldName(), field);
16083
        }
16084
      }
16085
 
16086
      /**
16087
       * Find the _Fields constant that matches fieldId, or null if its not found.
16088
       */
16089
      public static _Fields findByThriftId(int fieldId) {
16090
        switch(fieldId) {
16091
          case 0: // SUCCESS
16092
            return SUCCESS;
16093
          default:
16094
            return null;
16095
        }
16096
      }
16097
 
16098
      /**
16099
       * Find the _Fields constant that matches fieldId, throwing an exception
16100
       * if it is not found.
16101
       */
16102
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16103
        _Fields fields = findByThriftId(fieldId);
16104
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16105
        return fields;
16106
      }
16107
 
16108
      /**
16109
       * Find the _Fields constant that matches name, or null if its not found.
16110
       */
16111
      public static _Fields findByName(String name) {
16112
        return byName.get(name);
16113
      }
16114
 
16115
      private final short _thriftId;
16116
      private final String _fieldName;
16117
 
16118
      _Fields(short thriftId, String fieldName) {
16119
        _thriftId = thriftId;
16120
        _fieldName = fieldName;
16121
      }
16122
 
16123
      public short getThriftFieldId() {
16124
        return _thriftId;
16125
      }
16126
 
16127
      public String getFieldName() {
16128
        return _fieldName;
16129
      }
16130
    }
16131
 
16132
    // isset id assignments
16133
 
16134
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16135
    static {
16136
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16137
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16138
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16139
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
16140
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16141
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
16142
    }
16143
 
16144
    public getInvoice_result() {
16145
    }
16146
 
16147
    public getInvoice_result(
16148
      List<PurchaseReturn> success)
16149
    {
16150
      this();
16151
      this.success = success;
16152
    }
16153
 
16154
    /**
16155
     * Performs a deep copy on <i>other</i>.
16156
     */
16157
    public getInvoice_result(getInvoice_result other) {
16158
      if (other.isSetSuccess()) {
16159
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
16160
        for (PurchaseReturn other_element : other.success) {
16161
          __this__success.add(new PurchaseReturn(other_element));
16162
        }
16163
        this.success = __this__success;
16164
      }
16165
    }
16166
 
16167
    public getInvoice_result deepCopy() {
16168
      return new getInvoice_result(this);
16169
    }
16170
 
16171
    @Override
16172
    public void clear() {
16173
      this.success = null;
16174
    }
16175
 
16176
    public int getSuccessSize() {
16177
      return (this.success == null) ? 0 : this.success.size();
16178
    }
16179
 
16180
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
16181
      return (this.success == null) ? null : this.success.iterator();
16182
    }
16183
 
16184
    public void addToSuccess(PurchaseReturn elem) {
16185
      if (this.success == null) {
16186
        this.success = new ArrayList<PurchaseReturn>();
16187
      }
16188
      this.success.add(elem);
16189
    }
16190
 
16191
    public List<PurchaseReturn> getSuccess() {
16192
      return this.success;
16193
    }
16194
 
16195
    public void setSuccess(List<PurchaseReturn> success) {
16196
      this.success = success;
16197
    }
16198
 
16199
    public void unsetSuccess() {
16200
      this.success = null;
16201
    }
16202
 
16203
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16204
    public boolean isSetSuccess() {
16205
      return this.success != null;
16206
    }
16207
 
16208
    public void setSuccessIsSet(boolean value) {
16209
      if (!value) {
16210
        this.success = null;
16211
      }
16212
    }
16213
 
16214
    public void setFieldValue(_Fields field, Object value) {
16215
      switch (field) {
16216
      case SUCCESS:
16217
        if (value == null) {
16218
          unsetSuccess();
16219
        } else {
16220
          setSuccess((List<PurchaseReturn>)value);
16221
        }
16222
        break;
16223
 
16224
      }
16225
    }
16226
 
16227
    public Object getFieldValue(_Fields field) {
16228
      switch (field) {
16229
      case SUCCESS:
16230
        return getSuccess();
16231
 
16232
      }
16233
      throw new IllegalStateException();
16234
    }
16235
 
16236
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16237
    public boolean isSet(_Fields field) {
16238
      if (field == null) {
16239
        throw new IllegalArgumentException();
16240
      }
16241
 
16242
      switch (field) {
16243
      case SUCCESS:
16244
        return isSetSuccess();
16245
      }
16246
      throw new IllegalStateException();
16247
    }
16248
 
16249
    @Override
16250
    public boolean equals(Object that) {
16251
      if (that == null)
16252
        return false;
16253
      if (that instanceof getInvoice_result)
16254
        return this.equals((getInvoice_result)that);
16255
      return false;
16256
    }
16257
 
16258
    public boolean equals(getInvoice_result that) {
16259
      if (that == null)
16260
        return false;
16261
 
16262
      boolean this_present_success = true && this.isSetSuccess();
16263
      boolean that_present_success = true && that.isSetSuccess();
16264
      if (this_present_success || that_present_success) {
16265
        if (!(this_present_success && that_present_success))
16266
          return false;
16267
        if (!this.success.equals(that.success))
16268
          return false;
16269
      }
16270
 
16271
      return true;
16272
    }
16273
 
16274
    @Override
16275
    public int hashCode() {
16276
      return 0;
16277
    }
16278
 
16279
    public int compareTo(getInvoice_result other) {
16280
      if (!getClass().equals(other.getClass())) {
16281
        return getClass().getName().compareTo(other.getClass().getName());
16282
      }
16283
 
16284
      int lastComparison = 0;
16285
      getInvoice_result typedOther = (getInvoice_result)other;
16286
 
16287
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16288
      if (lastComparison != 0) {
16289
        return lastComparison;
16290
      }
16291
      if (isSetSuccess()) {
16292
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16293
        if (lastComparison != 0) {
16294
          return lastComparison;
16295
        }
16296
      }
16297
      return 0;
16298
    }
16299
 
16300
    public _Fields fieldForId(int fieldId) {
16301
      return _Fields.findByThriftId(fieldId);
16302
    }
16303
 
16304
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16305
      org.apache.thrift.protocol.TField field;
16306
      iprot.readStructBegin();
16307
      while (true)
16308
      {
16309
        field = iprot.readFieldBegin();
16310
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16311
          break;
16312
        }
16313
        switch (field.id) {
16314
          case 0: // SUCCESS
16315
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16316
              {
16317
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
16318
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
16319
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
16320
                {
16321
                  PurchaseReturn _elem34; // required
16322
                  _elem34 = new PurchaseReturn();
16323
                  _elem34.read(iprot);
16324
                  this.success.add(_elem34);
16325
                }
16326
                iprot.readListEnd();
16327
              }
16328
            } else { 
16329
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16330
            }
16331
            break;
16332
          default:
16333
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16334
        }
16335
        iprot.readFieldEnd();
16336
      }
16337
      iprot.readStructEnd();
16338
      validate();
16339
    }
16340
 
16341
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16342
      oprot.writeStructBegin(STRUCT_DESC);
16343
 
16344
      if (this.isSetSuccess()) {
16345
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16346
        {
16347
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16348
          for (PurchaseReturn _iter35 : this.success)
16349
          {
16350
            _iter35.write(oprot);
16351
          }
16352
          oprot.writeListEnd();
16353
        }
16354
        oprot.writeFieldEnd();
16355
      }
16356
      oprot.writeFieldStop();
16357
      oprot.writeStructEnd();
16358
    }
16359
 
16360
    @Override
16361
    public String toString() {
16362
      StringBuilder sb = new StringBuilder("getInvoice_result(");
16363
      boolean first = true;
16364
 
16365
      sb.append("success:");
16366
      if (this.success == null) {
16367
        sb.append("null");
16368
      } else {
16369
        sb.append(this.success);
16370
      }
16371
      first = false;
16372
      sb.append(")");
16373
      return sb.toString();
16374
    }
16375
 
16376
    public void validate() throws org.apache.thrift.TException {
16377
      // check for required fields
16378
    }
16379
 
16380
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16381
      try {
16382
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16383
      } catch (org.apache.thrift.TException te) {
16384
        throw new java.io.IOException(te);
16385
      }
16386
    }
16387
 
16388
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16389
      try {
16390
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16391
      } catch (org.apache.thrift.TException te) {
16392
        throw new java.io.IOException(te);
16393
      }
16394
    }
16395
 
16396
  }
16397
 
4496 mandeep.dh 16398
}