Subversion Repositories SmartDukaan

Rev

Rev 6385 | Rev 6630 | 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
 
4496 mandeep.dh 180
  }
181
 
182
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
183
 
184
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
185
 
186
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
187
 
188
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
189
 
190
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
191
 
192
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
193
 
194
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
195
 
196
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
197
 
6385 amar.kumar 198
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException;
199
 
4555 mandeep.dh 200
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 201
 
4754 mandeep.dh 202
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
203
 
204
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
205
 
206
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
207
 
208
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
209
 
5185 mandeep.dh 210
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
211
 
5443 mandeep.dh 212
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
213
 
214
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
215
 
5591 mandeep.dh 216
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
217
 
218
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
219
 
6467 amar.kumar 220
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
221
 
222
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
223
 
224
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
225
 
4496 mandeep.dh 226
  }
227
 
228
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
229
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
230
      public Factory() {}
231
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
232
        return new Client(prot);
233
      }
234
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
235
        return new Client(iprot, oprot);
236
      }
237
    }
238
 
239
    public Client(org.apache.thrift.protocol.TProtocol prot)
240
    {
241
      super(prot, prot);
242
    }
243
 
244
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
245
      super(iprot, oprot);
246
    }
247
 
248
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
249
    {
250
      send_createPurchaseOrder(purchaseOrder);
251
      return recv_createPurchaseOrder();
252
    }
253
 
254
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
255
    {
256
      createPurchaseOrder_args args = new createPurchaseOrder_args();
257
      args.setPurchaseOrder(purchaseOrder);
258
      sendBase("createPurchaseOrder", args);
259
    }
260
 
261
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
262
    {
263
      createPurchaseOrder_result result = new createPurchaseOrder_result();
264
      receiveBase(result, "createPurchaseOrder");
265
      if (result.isSetSuccess()) {
266
        return result.success;
267
      }
268
      if (result.e != null) {
269
        throw result.e;
270
      }
271
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
272
    }
273
 
274
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
275
    {
276
      send_getPurchaseOrder(id);
277
      return recv_getPurchaseOrder();
278
    }
279
 
280
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
281
    {
282
      getPurchaseOrder_args args = new getPurchaseOrder_args();
283
      args.setId(id);
284
      sendBase("getPurchaseOrder", args);
285
    }
286
 
287
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
288
    {
289
      getPurchaseOrder_result result = new getPurchaseOrder_result();
290
      receiveBase(result, "getPurchaseOrder");
291
      if (result.isSetSuccess()) {
292
        return result.success;
293
      }
294
      if (result.e != null) {
295
        throw result.e;
296
      }
297
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
298
    }
299
 
300
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
301
    {
302
      send_getAllPurchaseOrders(status);
303
      return recv_getAllPurchaseOrders();
304
    }
305
 
306
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
307
    {
308
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
309
      args.setStatus(status);
310
      sendBase("getAllPurchaseOrders", args);
311
    }
312
 
313
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
314
    {
315
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
316
      receiveBase(result, "getAllPurchaseOrders");
317
      if (result.isSetSuccess()) {
318
        return result.success;
319
      }
320
      if (result.e != null) {
321
        throw result.e;
322
      }
323
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
324
    }
325
 
326
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
327
    {
328
      send_getSupplier(id);
329
      return recv_getSupplier();
330
    }
331
 
332
    public void send_getSupplier(long id) throws org.apache.thrift.TException
333
    {
334
      getSupplier_args args = new getSupplier_args();
335
      args.setId(id);
336
      sendBase("getSupplier", args);
337
    }
338
 
339
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
340
    {
341
      getSupplier_result result = new getSupplier_result();
342
      receiveBase(result, "getSupplier");
343
      if (result.isSetSuccess()) {
344
        return result.success;
345
      }
346
      if (result.e != null) {
347
        throw result.e;
348
      }
349
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
350
    }
351
 
352
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
353
    {
354
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
355
      return recv_startPurchase();
356
    }
357
 
358
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
359
    {
360
      startPurchase_args args = new startPurchase_args();
361
      args.setPurchaseOrderId(purchaseOrderId);
362
      args.setInvoiceNumber(invoiceNumber);
363
      args.setFreightCharges(freightCharges);
364
      sendBase("startPurchase", args);
365
    }
366
 
367
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
368
    {
369
      startPurchase_result result = new startPurchase_result();
370
      receiveBase(result, "startPurchase");
371
      if (result.isSetSuccess()) {
372
        return result.success;
373
      }
374
      if (result.e != null) {
375
        throw result.e;
376
      }
377
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
378
    }
379
 
380
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
381
    {
382
      send_closePurchase(purchaseId);
383
      return recv_closePurchase();
384
    }
385
 
386
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
387
    {
388
      closePurchase_args args = new closePurchase_args();
389
      args.setPurchaseId(purchaseId);
390
      sendBase("closePurchase", args);
391
    }
392
 
393
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
394
    {
395
      closePurchase_result result = new closePurchase_result();
396
      receiveBase(result, "closePurchase");
397
      if (result.isSetSuccess()) {
398
        return result.success;
399
      }
400
      if (result.e != null) {
401
        throw result.e;
402
      }
403
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
404
    }
405
 
406
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
407
    {
408
      send_getAllPurchases(purchaseOrderId, open);
409
      return recv_getAllPurchases();
410
    }
411
 
412
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
413
    {
414
      getAllPurchases_args args = new getAllPurchases_args();
415
      args.setPurchaseOrderId(purchaseOrderId);
416
      args.setOpen(open);
417
      sendBase("getAllPurchases", args);
418
    }
419
 
420
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
421
    {
422
      getAllPurchases_result result = new getAllPurchases_result();
423
      receiveBase(result, "getAllPurchases");
424
      if (result.isSetSuccess()) {
425
        return result.success;
426
      }
427
      if (result.e != null) {
428
        throw result.e;
429
      }
430
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
431
    }
432
 
6385 amar.kumar 433
    public List<Purchase> getPurchasesForPO(long purchaseOrderId) throws PurchaseServiceException, org.apache.thrift.TException
434
    {
435
      send_getPurchasesForPO(purchaseOrderId);
436
      return recv_getPurchasesForPO();
437
    }
438
 
439
    public void send_getPurchasesForPO(long purchaseOrderId) throws org.apache.thrift.TException
440
    {
441
      getPurchasesForPO_args args = new getPurchasesForPO_args();
442
      args.setPurchaseOrderId(purchaseOrderId);
443
      sendBase("getPurchasesForPO", args);
444
    }
445
 
446
    public List<Purchase> recv_getPurchasesForPO() throws PurchaseServiceException, org.apache.thrift.TException
447
    {
448
      getPurchasesForPO_result result = new getPurchasesForPO_result();
449
      receiveBase(result, "getPurchasesForPO");
450
      if (result.isSetSuccess()) {
451
        return result.success;
452
      }
453
      if (result.e != null) {
454
        throw result.e;
455
      }
456
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
457
    }
458
 
4555 mandeep.dh 459
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 460
    {
4555 mandeep.dh 461
      send_getPurchaseOrderForPurchase(purchaseId);
462
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 463
    }
464
 
4555 mandeep.dh 465
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 466
    {
4555 mandeep.dh 467
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 468
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 469
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 470
    }
471
 
4555 mandeep.dh 472
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 473
    {
4555 mandeep.dh 474
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
475
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 476
      if (result.isSetSuccess()) {
477
        return result.success;
478
      }
4555 mandeep.dh 479
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 480
    }
481
 
4754 mandeep.dh 482
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
483
    {
484
      send_getPendingPurchaseOrders(warehouseId);
485
      return recv_getPendingPurchaseOrders();
486
    }
487
 
488
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
489
    {
490
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
491
      args.setWarehouseId(warehouseId);
492
      sendBase("getPendingPurchaseOrders", args);
493
    }
494
 
495
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
496
    {
497
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
498
      receiveBase(result, "getPendingPurchaseOrders");
499
      if (result.isSetSuccess()) {
500
        return result.success;
501
      }
502
      if (result.e != null) {
503
        throw result.e;
504
      }
505
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
506
    }
507
 
508
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
509
    {
510
      send_getSuppliers();
511
      return recv_getSuppliers();
512
    }
513
 
514
    public void send_getSuppliers() throws org.apache.thrift.TException
515
    {
516
      getSuppliers_args args = new getSuppliers_args();
517
      sendBase("getSuppliers", args);
518
    }
519
 
520
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
521
    {
522
      getSuppliers_result result = new getSuppliers_result();
523
      receiveBase(result, "getSuppliers");
524
      if (result.isSetSuccess()) {
525
        return result.success;
526
      }
527
      if (result.e != null) {
528
        throw result.e;
529
      }
530
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
531
    }
532
 
533
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
534
    {
535
      send_fulfillPO(purchaseOrderId, itemId, quantity);
536
      recv_fulfillPO();
537
    }
538
 
539
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
540
    {
541
      fulfillPO_args args = new fulfillPO_args();
542
      args.setPurchaseOrderId(purchaseOrderId);
543
      args.setItemId(itemId);
544
      args.setQuantity(quantity);
545
      sendBase("fulfillPO", args);
546
    }
547
 
548
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
549
    {
550
      fulfillPO_result result = new fulfillPO_result();
551
      receiveBase(result, "fulfillPO");
552
      if (result.e != null) {
553
        throw result.e;
554
      }
555
      return;
556
    }
557
 
558
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
559
    {
560
      send_updatePurchaseOrder(purchaseOrder);
561
      recv_updatePurchaseOrder();
562
    }
563
 
564
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
565
    {
566
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
567
      args.setPurchaseOrder(purchaseOrder);
568
      sendBase("updatePurchaseOrder", args);
569
    }
570
 
571
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
572
    {
573
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
574
      receiveBase(result, "updatePurchaseOrder");
575
      if (result.e != null) {
576
        throw result.e;
577
      }
578
      return;
579
    }
580
 
5185 mandeep.dh 581
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
582
    {
583
      send_unFulfillPO(purchaseId, itemId, quantity);
584
      recv_unFulfillPO();
585
    }
586
 
587
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
588
    {
589
      unFulfillPO_args args = new unFulfillPO_args();
590
      args.setPurchaseId(purchaseId);
591
      args.setItemId(itemId);
592
      args.setQuantity(quantity);
593
      sendBase("unFulfillPO", args);
594
    }
595
 
596
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
597
    {
598
      unFulfillPO_result result = new unFulfillPO_result();
599
      receiveBase(result, "unFulfillPO");
600
      if (result.e != null) {
601
        throw result.e;
602
      }
603
      return;
604
    }
605
 
5443 mandeep.dh 606
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
607
    {
608
      send_getInvoices(date);
609
      return recv_getInvoices();
610
    }
611
 
612
    public void send_getInvoices(long date) throws org.apache.thrift.TException
613
    {
614
      getInvoices_args args = new getInvoices_args();
615
      args.setDate(date);
616
      sendBase("getInvoices", args);
617
    }
618
 
619
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
620
    {
621
      getInvoices_result result = new getInvoices_result();
622
      receiveBase(result, "getInvoices");
623
      if (result.isSetSuccess()) {
624
        return result.success;
625
      }
626
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
627
    }
628
 
629
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
630
    {
631
      send_createInvoice(invoice);
632
      recv_createInvoice();
633
    }
634
 
635
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
636
    {
637
      createInvoice_args args = new createInvoice_args();
638
      args.setInvoice(invoice);
639
      sendBase("createInvoice", args);
640
    }
641
 
642
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
643
    {
644
      createInvoice_result result = new createInvoice_result();
645
      receiveBase(result, "createInvoice");
646
      if (result.e != null) {
647
        throw result.e;
648
      }
649
      return;
650
    }
651
 
5591 mandeep.dh 652
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
653
    {
654
      send_addSupplier(supplier);
655
      return recv_addSupplier();
656
    }
657
 
658
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
659
    {
660
      addSupplier_args args = new addSupplier_args();
661
      args.setSupplier(supplier);
662
      sendBase("addSupplier", args);
663
    }
664
 
665
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
666
    {
667
      addSupplier_result result = new addSupplier_result();
668
      receiveBase(result, "addSupplier");
669
      if (result.isSetSuccess()) {
670
        return result.success;
671
      }
672
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
673
    }
674
 
675
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
676
    {
677
      send_updateSupplier(supplier);
678
      recv_updateSupplier();
679
    }
680
 
681
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
682
    {
683
      updateSupplier_args args = new updateSupplier_args();
684
      args.setSupplier(supplier);
685
      sendBase("updateSupplier", args);
686
    }
687
 
688
    public void recv_updateSupplier() throws org.apache.thrift.TException
689
    {
690
      updateSupplier_result result = new updateSupplier_result();
691
      receiveBase(result, "updateSupplier");
692
      return;
693
    }
694
 
6467 amar.kumar 695
    public long createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
696
    {
697
      send_createPurchaseReturn(purchaseReturn);
698
      return recv_createPurchaseReturn();
699
    }
700
 
701
    public void send_createPurchaseReturn(PurchaseReturn purchaseReturn) throws org.apache.thrift.TException
702
    {
703
      createPurchaseReturn_args args = new createPurchaseReturn_args();
704
      args.setPurchaseReturn(purchaseReturn);
705
      sendBase("createPurchaseReturn", args);
706
    }
707
 
708
    public long recv_createPurchaseReturn() throws org.apache.thrift.TException
709
    {
710
      createPurchaseReturn_result result = new createPurchaseReturn_result();
711
      receiveBase(result, "createPurchaseReturn");
712
      if (result.isSetSuccess()) {
713
        return result.success;
714
      }
715
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
716
    }
717
 
718
    public void settlePurchaseReturn(long id) throws org.apache.thrift.TException
719
    {
720
      send_settlePurchaseReturn(id);
721
      recv_settlePurchaseReturn();
722
    }
723
 
724
    public void send_settlePurchaseReturn(long id) throws org.apache.thrift.TException
725
    {
726
      settlePurchaseReturn_args args = new settlePurchaseReturn_args();
727
      args.setId(id);
728
      sendBase("settlePurchaseReturn", args);
729
    }
730
 
731
    public void recv_settlePurchaseReturn() throws org.apache.thrift.TException
732
    {
733
      settlePurchaseReturn_result result = new settlePurchaseReturn_result();
734
      receiveBase(result, "settlePurchaseReturn");
735
      return;
736
    }
737
 
738
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException
739
    {
740
      send_getUnsettledPurchaseReturns();
741
      return recv_getUnsettledPurchaseReturns();
742
    }
743
 
744
    public void send_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
745
    {
746
      getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
747
      sendBase("getUnsettledPurchaseReturns", args);
748
    }
749
 
750
    public List<PurchaseReturn> recv_getUnsettledPurchaseReturns() throws org.apache.thrift.TException
751
    {
752
      getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
753
      receiveBase(result, "getUnsettledPurchaseReturns");
754
      if (result.isSetSuccess()) {
755
        return result.success;
756
      }
757
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
758
    }
759
 
4496 mandeep.dh 760
  }
761
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
762
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
763
      private org.apache.thrift.async.TAsyncClientManager clientManager;
764
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
765
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
766
        this.clientManager = clientManager;
767
        this.protocolFactory = protocolFactory;
768
      }
769
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
770
        return new AsyncClient(protocolFactory, clientManager, transport);
771
      }
772
    }
773
 
774
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
775
      super(protocolFactory, clientManager, transport);
776
    }
777
 
778
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
779
      checkReady();
780
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
781
      this.___currentMethod = method_call;
782
      ___manager.call(method_call);
783
    }
784
 
785
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
786
      private PurchaseOrder purchaseOrder;
787
      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 {
788
        super(client, protocolFactory, transport, resultHandler, false);
789
        this.purchaseOrder = purchaseOrder;
790
      }
791
 
792
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
793
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
794
        createPurchaseOrder_args args = new createPurchaseOrder_args();
795
        args.setPurchaseOrder(purchaseOrder);
796
        args.write(prot);
797
        prot.writeMessageEnd();
798
      }
799
 
800
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
801
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
802
          throw new IllegalStateException("Method call not finished!");
803
        }
804
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
805
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
806
        return (new Client(prot)).recv_createPurchaseOrder();
807
      }
808
    }
809
 
810
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
811
      checkReady();
812
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
813
      this.___currentMethod = method_call;
814
      ___manager.call(method_call);
815
    }
816
 
817
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
818
      private long id;
819
      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 {
820
        super(client, protocolFactory, transport, resultHandler, false);
821
        this.id = id;
822
      }
823
 
824
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
825
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
826
        getPurchaseOrder_args args = new getPurchaseOrder_args();
827
        args.setId(id);
828
        args.write(prot);
829
        prot.writeMessageEnd();
830
      }
831
 
832
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
833
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
834
          throw new IllegalStateException("Method call not finished!");
835
        }
836
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
837
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
838
        return (new Client(prot)).recv_getPurchaseOrder();
839
      }
840
    }
841
 
842
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
843
      checkReady();
844
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
845
      this.___currentMethod = method_call;
846
      ___manager.call(method_call);
847
    }
848
 
849
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
850
      private POStatus status;
851
      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 {
852
        super(client, protocolFactory, transport, resultHandler, false);
853
        this.status = status;
854
      }
855
 
856
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
857
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
858
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
859
        args.setStatus(status);
860
        args.write(prot);
861
        prot.writeMessageEnd();
862
      }
863
 
864
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
865
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
866
          throw new IllegalStateException("Method call not finished!");
867
        }
868
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
869
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
870
        return (new Client(prot)).recv_getAllPurchaseOrders();
871
      }
872
    }
873
 
874
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
875
      checkReady();
876
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
877
      this.___currentMethod = method_call;
878
      ___manager.call(method_call);
879
    }
880
 
881
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
882
      private long id;
883
      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 {
884
        super(client, protocolFactory, transport, resultHandler, false);
885
        this.id = id;
886
      }
887
 
888
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
889
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
890
        getSupplier_args args = new getSupplier_args();
891
        args.setId(id);
892
        args.write(prot);
893
        prot.writeMessageEnd();
894
      }
895
 
896
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
897
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
898
          throw new IllegalStateException("Method call not finished!");
899
        }
900
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
901
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
902
        return (new Client(prot)).recv_getSupplier();
903
      }
904
    }
905
 
906
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
907
      checkReady();
908
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
909
      this.___currentMethod = method_call;
910
      ___manager.call(method_call);
911
    }
912
 
913
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
914
      private long purchaseOrderId;
915
      private String invoiceNumber;
916
      private double freightCharges;
917
      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 {
918
        super(client, protocolFactory, transport, resultHandler, false);
919
        this.purchaseOrderId = purchaseOrderId;
920
        this.invoiceNumber = invoiceNumber;
921
        this.freightCharges = freightCharges;
922
      }
923
 
924
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
925
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
926
        startPurchase_args args = new startPurchase_args();
927
        args.setPurchaseOrderId(purchaseOrderId);
928
        args.setInvoiceNumber(invoiceNumber);
929
        args.setFreightCharges(freightCharges);
930
        args.write(prot);
931
        prot.writeMessageEnd();
932
      }
933
 
934
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
935
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
936
          throw new IllegalStateException("Method call not finished!");
937
        }
938
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
939
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
940
        return (new Client(prot)).recv_startPurchase();
941
      }
942
    }
943
 
944
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
945
      checkReady();
946
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
947
      this.___currentMethod = method_call;
948
      ___manager.call(method_call);
949
    }
950
 
951
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
952
      private long purchaseId;
953
      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 {
954
        super(client, protocolFactory, transport, resultHandler, false);
955
        this.purchaseId = purchaseId;
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("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
960
        closePurchase_args args = new closePurchase_args();
961
        args.setPurchaseId(purchaseId);
962
        args.write(prot);
963
        prot.writeMessageEnd();
964
      }
965
 
966
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
967
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
968
          throw new IllegalStateException("Method call not finished!");
969
        }
970
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
971
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
972
        return (new Client(prot)).recv_closePurchase();
973
      }
974
    }
975
 
976
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
977
      checkReady();
978
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
979
      this.___currentMethod = method_call;
980
      ___manager.call(method_call);
981
    }
982
 
983
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
984
      private long purchaseOrderId;
985
      private boolean open;
986
      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 {
987
        super(client, protocolFactory, transport, resultHandler, false);
988
        this.purchaseOrderId = purchaseOrderId;
989
        this.open = open;
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("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
994
        getAllPurchases_args args = new getAllPurchases_args();
995
        args.setPurchaseOrderId(purchaseOrderId);
996
        args.setOpen(open);
997
        args.write(prot);
998
        prot.writeMessageEnd();
999
      }
1000
 
1001
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1002
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1003
          throw new IllegalStateException("Method call not finished!");
1004
        }
1005
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1006
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1007
        return (new Client(prot)).recv_getAllPurchases();
1008
      }
1009
    }
1010
 
6385 amar.kumar 1011
    public void getPurchasesForPO(long purchaseOrderId, org.apache.thrift.async.AsyncMethodCallback<getPurchasesForPO_call> resultHandler) throws org.apache.thrift.TException {
1012
      checkReady();
1013
      getPurchasesForPO_call method_call = new getPurchasesForPO_call(purchaseOrderId, resultHandler, this, ___protocolFactory, ___transport);
1014
      this.___currentMethod = method_call;
1015
      ___manager.call(method_call);
1016
    }
1017
 
1018
    public static class getPurchasesForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1019
      private long purchaseOrderId;
1020
      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 {
1021
        super(client, protocolFactory, transport, resultHandler, false);
1022
        this.purchaseOrderId = purchaseOrderId;
1023
      }
1024
 
1025
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1026
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchasesForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1027
        getPurchasesForPO_args args = new getPurchasesForPO_args();
1028
        args.setPurchaseOrderId(purchaseOrderId);
1029
        args.write(prot);
1030
        prot.writeMessageEnd();
1031
      }
1032
 
1033
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1034
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1035
          throw new IllegalStateException("Method call not finished!");
1036
        }
1037
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1038
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1039
        return (new Client(prot)).recv_getPurchasesForPO();
1040
      }
1041
    }
1042
 
4555 mandeep.dh 1043
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1044
      checkReady();
4555 mandeep.dh 1045
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1046
      this.___currentMethod = method_call;
1047
      ___manager.call(method_call);
1048
    }
1049
 
4555 mandeep.dh 1050
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 1051
      private long purchaseId;
4555 mandeep.dh 1052
      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 1053
        super(client, protocolFactory, transport, resultHandler, false);
1054
        this.purchaseId = purchaseId;
1055
      }
1056
 
1057
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 1058
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1059
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1060
        args.setPurchaseId(purchaseId);
1061
        args.write(prot);
1062
        prot.writeMessageEnd();
1063
      }
1064
 
4555 mandeep.dh 1065
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 1066
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1067
          throw new IllegalStateException("Method call not finished!");
1068
        }
1069
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1070
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 1071
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 1072
      }
1073
    }
1074
 
4754 mandeep.dh 1075
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
1076
      checkReady();
1077
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
1078
      this.___currentMethod = method_call;
1079
      ___manager.call(method_call);
1080
    }
1081
 
1082
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
1083
      private long warehouseId;
1084
      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 {
1085
        super(client, protocolFactory, transport, resultHandler, false);
1086
        this.warehouseId = warehouseId;
1087
      }
1088
 
1089
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1090
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
1091
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
1092
        args.setWarehouseId(warehouseId);
1093
        args.write(prot);
1094
        prot.writeMessageEnd();
1095
      }
1096
 
1097
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1098
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1099
          throw new IllegalStateException("Method call not finished!");
1100
        }
1101
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1102
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1103
        return (new Client(prot)).recv_getPendingPurchaseOrders();
1104
      }
1105
    }
1106
 
1107
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
1108
      checkReady();
1109
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
1110
      this.___currentMethod = method_call;
1111
      ___manager.call(method_call);
1112
    }
1113
 
1114
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
1115
      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 {
1116
        super(client, protocolFactory, transport, resultHandler, false);
1117
      }
1118
 
1119
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1120
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1121
        getSuppliers_args args = new getSuppliers_args();
1122
        args.write(prot);
1123
        prot.writeMessageEnd();
1124
      }
1125
 
1126
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1127
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1128
          throw new IllegalStateException("Method call not finished!");
1129
        }
1130
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1131
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1132
        return (new Client(prot)).recv_getSuppliers();
1133
      }
1134
    }
1135
 
1136
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1137
      checkReady();
1138
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1139
      this.___currentMethod = method_call;
1140
      ___manager.call(method_call);
1141
    }
1142
 
1143
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1144
      private long purchaseOrderId;
1145
      private long itemId;
1146
      private long quantity;
1147
      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 {
1148
        super(client, protocolFactory, transport, resultHandler, false);
1149
        this.purchaseOrderId = purchaseOrderId;
1150
        this.itemId = itemId;
1151
        this.quantity = quantity;
1152
      }
1153
 
1154
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1155
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1156
        fulfillPO_args args = new fulfillPO_args();
1157
        args.setPurchaseOrderId(purchaseOrderId);
1158
        args.setItemId(itemId);
1159
        args.setQuantity(quantity);
1160
        args.write(prot);
1161
        prot.writeMessageEnd();
1162
      }
1163
 
1164
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1165
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1166
          throw new IllegalStateException("Method call not finished!");
1167
        }
1168
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1169
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1170
        (new Client(prot)).recv_fulfillPO();
1171
      }
1172
    }
1173
 
1174
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1175
      checkReady();
1176
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1177
      this.___currentMethod = method_call;
1178
      ___manager.call(method_call);
1179
    }
1180
 
1181
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1182
      private PurchaseOrder purchaseOrder;
1183
      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 {
1184
        super(client, protocolFactory, transport, resultHandler, false);
1185
        this.purchaseOrder = purchaseOrder;
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("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1190
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1191
        args.setPurchaseOrder(purchaseOrder);
1192
        args.write(prot);
1193
        prot.writeMessageEnd();
1194
      }
1195
 
1196
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1197
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1198
          throw new IllegalStateException("Method call not finished!");
1199
        }
1200
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1201
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1202
        (new Client(prot)).recv_updatePurchaseOrder();
1203
      }
1204
    }
1205
 
5185 mandeep.dh 1206
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1207
      checkReady();
1208
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1209
      this.___currentMethod = method_call;
1210
      ___manager.call(method_call);
1211
    }
1212
 
1213
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1214
      private long purchaseId;
1215
      private long itemId;
1216
      private long quantity;
1217
      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 {
1218
        super(client, protocolFactory, transport, resultHandler, false);
1219
        this.purchaseId = purchaseId;
1220
        this.itemId = itemId;
1221
        this.quantity = quantity;
1222
      }
1223
 
1224
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1225
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1226
        unFulfillPO_args args = new unFulfillPO_args();
1227
        args.setPurchaseId(purchaseId);
1228
        args.setItemId(itemId);
1229
        args.setQuantity(quantity);
1230
        args.write(prot);
1231
        prot.writeMessageEnd();
1232
      }
1233
 
1234
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1235
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1236
          throw new IllegalStateException("Method call not finished!");
1237
        }
1238
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1239
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1240
        (new Client(prot)).recv_unFulfillPO();
1241
      }
1242
    }
1243
 
5443 mandeep.dh 1244
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1245
      checkReady();
1246
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1247
      this.___currentMethod = method_call;
1248
      ___manager.call(method_call);
1249
    }
1250
 
1251
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1252
      private long date;
1253
      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 {
1254
        super(client, protocolFactory, transport, resultHandler, false);
1255
        this.date = date;
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("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1260
        getInvoices_args args = new getInvoices_args();
1261
        args.setDate(date);
1262
        args.write(prot);
1263
        prot.writeMessageEnd();
1264
      }
1265
 
1266
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1267
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1268
          throw new IllegalStateException("Method call not finished!");
1269
        }
1270
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1271
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1272
        return (new Client(prot)).recv_getInvoices();
1273
      }
1274
    }
1275
 
1276
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1277
      checkReady();
1278
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1279
      this.___currentMethod = method_call;
1280
      ___manager.call(method_call);
1281
    }
1282
 
1283
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1284
      private Invoice invoice;
1285
      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 {
1286
        super(client, protocolFactory, transport, resultHandler, false);
1287
        this.invoice = invoice;
1288
      }
1289
 
1290
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1291
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1292
        createInvoice_args args = new createInvoice_args();
1293
        args.setInvoice(invoice);
1294
        args.write(prot);
1295
        prot.writeMessageEnd();
1296
      }
1297
 
1298
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1299
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1300
          throw new IllegalStateException("Method call not finished!");
1301
        }
1302
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1303
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1304
        (new Client(prot)).recv_createInvoice();
1305
      }
1306
    }
1307
 
5591 mandeep.dh 1308
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1309
      checkReady();
1310
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1311
      this.___currentMethod = method_call;
1312
      ___manager.call(method_call);
1313
    }
1314
 
1315
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1316
      private Supplier supplier;
1317
      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 {
1318
        super(client, protocolFactory, transport, resultHandler, false);
1319
        this.supplier = supplier;
1320
      }
1321
 
1322
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1323
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1324
        addSupplier_args args = new addSupplier_args();
1325
        args.setSupplier(supplier);
1326
        args.write(prot);
1327
        prot.writeMessageEnd();
1328
      }
1329
 
1330
      public Supplier getResult() throws org.apache.thrift.TException {
1331
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1332
          throw new IllegalStateException("Method call not finished!");
1333
        }
1334
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1335
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1336
        return (new Client(prot)).recv_addSupplier();
1337
      }
1338
    }
1339
 
1340
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1341
      checkReady();
1342
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1343
      this.___currentMethod = method_call;
1344
      ___manager.call(method_call);
1345
    }
1346
 
1347
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1348
      private Supplier supplier;
1349
      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 {
1350
        super(client, protocolFactory, transport, resultHandler, false);
1351
        this.supplier = supplier;
1352
      }
1353
 
1354
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1355
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1356
        updateSupplier_args args = new updateSupplier_args();
1357
        args.setSupplier(supplier);
1358
        args.write(prot);
1359
        prot.writeMessageEnd();
1360
      }
1361
 
1362
      public void getResult() throws org.apache.thrift.TException {
1363
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1364
          throw new IllegalStateException("Method call not finished!");
1365
        }
1366
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1367
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1368
        (new Client(prot)).recv_updateSupplier();
1369
      }
1370
    }
1371
 
6467 amar.kumar 1372
    public void createPurchaseReturn(PurchaseReturn purchaseReturn, org.apache.thrift.async.AsyncMethodCallback<createPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1373
      checkReady();
1374
      createPurchaseReturn_call method_call = new createPurchaseReturn_call(purchaseReturn, resultHandler, this, ___protocolFactory, ___transport);
1375
      this.___currentMethod = method_call;
1376
      ___manager.call(method_call);
1377
    }
1378
 
1379
    public static class createPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1380
      private PurchaseReturn purchaseReturn;
1381
      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 {
1382
        super(client, protocolFactory, transport, resultHandler, false);
1383
        this.purchaseReturn = purchaseReturn;
1384
      }
1385
 
1386
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1387
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1388
        createPurchaseReturn_args args = new createPurchaseReturn_args();
1389
        args.setPurchaseReturn(purchaseReturn);
1390
        args.write(prot);
1391
        prot.writeMessageEnd();
1392
      }
1393
 
1394
      public long getResult() throws org.apache.thrift.TException {
1395
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1396
          throw new IllegalStateException("Method call not finished!");
1397
        }
1398
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1399
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1400
        return (new Client(prot)).recv_createPurchaseReturn();
1401
      }
1402
    }
1403
 
1404
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1405
      checkReady();
1406
      settlePurchaseReturn_call method_call = new settlePurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
1407
      this.___currentMethod = method_call;
1408
      ___manager.call(method_call);
1409
    }
1410
 
1411
    public static class settlePurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1412
      private long id;
1413
      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 {
1414
        super(client, protocolFactory, transport, resultHandler, false);
1415
        this.id = id;
1416
      }
1417
 
1418
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1419
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("settlePurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1420
        settlePurchaseReturn_args args = new settlePurchaseReturn_args();
1421
        args.setId(id);
1422
        args.write(prot);
1423
        prot.writeMessageEnd();
1424
      }
1425
 
1426
      public void getResult() throws org.apache.thrift.TException {
1427
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1428
          throw new IllegalStateException("Method call not finished!");
1429
        }
1430
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1431
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1432
        (new Client(prot)).recv_settlePurchaseReturn();
1433
      }
1434
    }
1435
 
1436
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException {
1437
      checkReady();
1438
      getUnsettledPurchaseReturns_call method_call = new getUnsettledPurchaseReturns_call(resultHandler, this, ___protocolFactory, ___transport);
1439
      this.___currentMethod = method_call;
1440
      ___manager.call(method_call);
1441
    }
1442
 
1443
    public static class getUnsettledPurchaseReturns_call extends org.apache.thrift.async.TAsyncMethodCall {
1444
      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 {
1445
        super(client, protocolFactory, transport, resultHandler, false);
1446
      }
1447
 
1448
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1449
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUnsettledPurchaseReturns", org.apache.thrift.protocol.TMessageType.CALL, 0));
1450
        getUnsettledPurchaseReturns_args args = new getUnsettledPurchaseReturns_args();
1451
        args.write(prot);
1452
        prot.writeMessageEnd();
1453
      }
1454
 
1455
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
1456
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1457
          throw new IllegalStateException("Method call not finished!");
1458
        }
1459
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1460
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1461
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1462
      }
1463
    }
1464
 
4496 mandeep.dh 1465
  }
1466
 
1467
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1468
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1469
    public Processor(I iface) {
1470
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1471
    }
1472
 
1473
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1474
      super(iface, getProcessMap(processMap));
1475
    }
1476
 
1477
    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) {
1478
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1479
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1480
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1481
      processMap.put("getSupplier", new getSupplier());
1482
      processMap.put("startPurchase", new startPurchase());
1483
      processMap.put("closePurchase", new closePurchase());
1484
      processMap.put("getAllPurchases", new getAllPurchases());
6385 amar.kumar 1485
      processMap.put("getPurchasesForPO", new getPurchasesForPO());
4555 mandeep.dh 1486
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1487
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1488
      processMap.put("getSuppliers", new getSuppliers());
1489
      processMap.put("fulfillPO", new fulfillPO());
1490
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1491
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1492
      processMap.put("getInvoices", new getInvoices());
1493
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1494
      processMap.put("addSupplier", new addSupplier());
1495
      processMap.put("updateSupplier", new updateSupplier());
6467 amar.kumar 1496
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1497
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1498
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
4496 mandeep.dh 1499
      return processMap;
1500
    }
1501
 
1502
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1503
      public createPurchaseOrder() {
1504
        super("createPurchaseOrder");
1505
      }
1506
 
1507
      protected createPurchaseOrder_args getEmptyArgsInstance() {
1508
        return new createPurchaseOrder_args();
1509
      }
1510
 
1511
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1512
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1513
        try {
1514
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1515
          result.setSuccessIsSet(true);
1516
        } catch (PurchaseServiceException e) {
1517
          result.e = e;
1518
        }
1519
        return result;
1520
      }
1521
    }
1522
 
1523
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1524
      public getPurchaseOrder() {
1525
        super("getPurchaseOrder");
1526
      }
1527
 
1528
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1529
        return new getPurchaseOrder_args();
1530
      }
1531
 
1532
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1533
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1534
        try {
1535
          result.success = iface.getPurchaseOrder(args.id);
1536
        } catch (PurchaseServiceException e) {
1537
          result.e = e;
1538
        }
1539
        return result;
1540
      }
1541
    }
1542
 
1543
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1544
      public getAllPurchaseOrders() {
1545
        super("getAllPurchaseOrders");
1546
      }
1547
 
1548
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1549
        return new getAllPurchaseOrders_args();
1550
      }
1551
 
1552
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1553
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1554
        try {
1555
          result.success = iface.getAllPurchaseOrders(args.status);
1556
        } catch (PurchaseServiceException e) {
1557
          result.e = e;
1558
        }
1559
        return result;
1560
      }
1561
    }
1562
 
1563
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1564
      public getSupplier() {
1565
        super("getSupplier");
1566
      }
1567
 
1568
      protected getSupplier_args getEmptyArgsInstance() {
1569
        return new getSupplier_args();
1570
      }
1571
 
1572
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1573
        getSupplier_result result = new getSupplier_result();
1574
        try {
1575
          result.success = iface.getSupplier(args.id);
1576
        } catch (PurchaseServiceException e) {
1577
          result.e = e;
1578
        }
1579
        return result;
1580
      }
1581
    }
1582
 
1583
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
1584
      public startPurchase() {
1585
        super("startPurchase");
1586
      }
1587
 
1588
      protected startPurchase_args getEmptyArgsInstance() {
1589
        return new startPurchase_args();
1590
      }
1591
 
1592
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
1593
        startPurchase_result result = new startPurchase_result();
1594
        try {
1595
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
1596
          result.setSuccessIsSet(true);
1597
        } catch (PurchaseServiceException e) {
1598
          result.e = e;
1599
        }
1600
        return result;
1601
      }
1602
    }
1603
 
1604
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
1605
      public closePurchase() {
1606
        super("closePurchase");
1607
      }
1608
 
1609
      protected closePurchase_args getEmptyArgsInstance() {
1610
        return new closePurchase_args();
1611
      }
1612
 
1613
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
1614
        closePurchase_result result = new closePurchase_result();
1615
        try {
1616
          result.success = iface.closePurchase(args.purchaseId);
1617
          result.setSuccessIsSet(true);
1618
        } catch (PurchaseServiceException e) {
1619
          result.e = e;
1620
        }
1621
        return result;
1622
      }
1623
    }
1624
 
1625
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
1626
      public getAllPurchases() {
1627
        super("getAllPurchases");
1628
      }
1629
 
1630
      protected getAllPurchases_args getEmptyArgsInstance() {
1631
        return new getAllPurchases_args();
1632
      }
1633
 
1634
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
1635
        getAllPurchases_result result = new getAllPurchases_result();
1636
        try {
1637
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
1638
        } catch (PurchaseServiceException e) {
1639
          result.e = e;
1640
        }
1641
        return result;
1642
      }
1643
    }
1644
 
6385 amar.kumar 1645
    private static class getPurchasesForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchasesForPO_args> {
1646
      public getPurchasesForPO() {
1647
        super("getPurchasesForPO");
1648
      }
1649
 
1650
      protected getPurchasesForPO_args getEmptyArgsInstance() {
1651
        return new getPurchasesForPO_args();
1652
      }
1653
 
1654
      protected getPurchasesForPO_result getResult(I iface, getPurchasesForPO_args args) throws org.apache.thrift.TException {
1655
        getPurchasesForPO_result result = new getPurchasesForPO_result();
1656
        try {
1657
          result.success = iface.getPurchasesForPO(args.purchaseOrderId);
1658
        } catch (PurchaseServiceException e) {
1659
          result.e = e;
1660
        }
1661
        return result;
1662
      }
1663
    }
1664
 
4555 mandeep.dh 1665
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
1666
      public getPurchaseOrderForPurchase() {
1667
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 1668
      }
1669
 
4555 mandeep.dh 1670
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
1671
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1672
      }
1673
 
4555 mandeep.dh 1674
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
1675
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
1676
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 1677
        return result;
1678
      }
1679
    }
1680
 
4754 mandeep.dh 1681
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
1682
      public getPendingPurchaseOrders() {
1683
        super("getPendingPurchaseOrders");
1684
      }
1685
 
1686
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
1687
        return new getPendingPurchaseOrders_args();
1688
      }
1689
 
1690
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
1691
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
1692
        try {
1693
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
1694
        } catch (PurchaseServiceException e) {
1695
          result.e = e;
1696
        }
1697
        return result;
1698
      }
1699
    }
1700
 
1701
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
1702
      public getSuppliers() {
1703
        super("getSuppliers");
1704
      }
1705
 
1706
      protected getSuppliers_args getEmptyArgsInstance() {
1707
        return new getSuppliers_args();
1708
      }
1709
 
1710
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
1711
        getSuppliers_result result = new getSuppliers_result();
1712
        try {
1713
          result.success = iface.getSuppliers();
1714
        } catch (PurchaseServiceException e) {
1715
          result.e = e;
1716
        }
1717
        return result;
1718
      }
1719
    }
1720
 
1721
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
1722
      public fulfillPO() {
1723
        super("fulfillPO");
1724
      }
1725
 
1726
      protected fulfillPO_args getEmptyArgsInstance() {
1727
        return new fulfillPO_args();
1728
      }
1729
 
1730
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
1731
        fulfillPO_result result = new fulfillPO_result();
1732
        try {
1733
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
1734
        } catch (PurchaseServiceException e) {
1735
          result.e = e;
1736
        }
1737
        return result;
1738
      }
1739
    }
1740
 
1741
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
1742
      public updatePurchaseOrder() {
1743
        super("updatePurchaseOrder");
1744
      }
1745
 
1746
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
1747
        return new updatePurchaseOrder_args();
1748
      }
1749
 
1750
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
1751
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
1752
        try {
1753
          iface.updatePurchaseOrder(args.purchaseOrder);
1754
        } catch (PurchaseServiceException e) {
1755
          result.e = e;
1756
        }
1757
        return result;
1758
      }
1759
    }
1760
 
5185 mandeep.dh 1761
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
1762
      public unFulfillPO() {
1763
        super("unFulfillPO");
1764
      }
1765
 
1766
      protected unFulfillPO_args getEmptyArgsInstance() {
1767
        return new unFulfillPO_args();
1768
      }
1769
 
1770
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
1771
        unFulfillPO_result result = new unFulfillPO_result();
1772
        try {
1773
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
1774
        } catch (PurchaseServiceException e) {
1775
          result.e = e;
1776
        }
1777
        return result;
1778
      }
1779
    }
1780
 
5443 mandeep.dh 1781
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
1782
      public getInvoices() {
1783
        super("getInvoices");
1784
      }
1785
 
1786
      protected getInvoices_args getEmptyArgsInstance() {
1787
        return new getInvoices_args();
1788
      }
1789
 
1790
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
1791
        getInvoices_result result = new getInvoices_result();
1792
        result.success = iface.getInvoices(args.date);
1793
        return result;
1794
      }
1795
    }
1796
 
1797
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
1798
      public createInvoice() {
1799
        super("createInvoice");
1800
      }
1801
 
1802
      protected createInvoice_args getEmptyArgsInstance() {
1803
        return new createInvoice_args();
1804
      }
1805
 
1806
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
1807
        createInvoice_result result = new createInvoice_result();
1808
        try {
1809
          iface.createInvoice(args.invoice);
1810
        } catch (PurchaseServiceException e) {
1811
          result.e = e;
1812
        }
1813
        return result;
1814
      }
1815
    }
1816
 
5591 mandeep.dh 1817
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
1818
      public addSupplier() {
1819
        super("addSupplier");
1820
      }
1821
 
1822
      protected addSupplier_args getEmptyArgsInstance() {
1823
        return new addSupplier_args();
1824
      }
1825
 
1826
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
1827
        addSupplier_result result = new addSupplier_result();
1828
        result.success = iface.addSupplier(args.supplier);
1829
        return result;
1830
      }
1831
    }
1832
 
1833
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
1834
      public updateSupplier() {
1835
        super("updateSupplier");
1836
      }
1837
 
1838
      protected updateSupplier_args getEmptyArgsInstance() {
1839
        return new updateSupplier_args();
1840
      }
1841
 
1842
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
1843
        updateSupplier_result result = new updateSupplier_result();
1844
        iface.updateSupplier(args.supplier);
1845
        return result;
1846
      }
1847
    }
1848
 
6467 amar.kumar 1849
    private static class createPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseReturn_args> {
1850
      public createPurchaseReturn() {
1851
        super("createPurchaseReturn");
1852
      }
1853
 
1854
      protected createPurchaseReturn_args getEmptyArgsInstance() {
1855
        return new createPurchaseReturn_args();
1856
      }
1857
 
1858
      protected createPurchaseReturn_result getResult(I iface, createPurchaseReturn_args args) throws org.apache.thrift.TException {
1859
        createPurchaseReturn_result result = new createPurchaseReturn_result();
1860
        result.success = iface.createPurchaseReturn(args.purchaseReturn);
1861
        result.setSuccessIsSet(true);
1862
        return result;
1863
      }
1864
    }
1865
 
1866
    private static class settlePurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, settlePurchaseReturn_args> {
1867
      public settlePurchaseReturn() {
1868
        super("settlePurchaseReturn");
1869
      }
1870
 
1871
      protected settlePurchaseReturn_args getEmptyArgsInstance() {
1872
        return new settlePurchaseReturn_args();
1873
      }
1874
 
1875
      protected settlePurchaseReturn_result getResult(I iface, settlePurchaseReturn_args args) throws org.apache.thrift.TException {
1876
        settlePurchaseReturn_result result = new settlePurchaseReturn_result();
1877
        iface.settlePurchaseReturn(args.id);
1878
        return result;
1879
      }
1880
    }
1881
 
1882
    private static class getUnsettledPurchaseReturns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUnsettledPurchaseReturns_args> {
1883
      public getUnsettledPurchaseReturns() {
1884
        super("getUnsettledPurchaseReturns");
1885
      }
1886
 
1887
      protected getUnsettledPurchaseReturns_args getEmptyArgsInstance() {
1888
        return new getUnsettledPurchaseReturns_args();
1889
      }
1890
 
1891
      protected getUnsettledPurchaseReturns_result getResult(I iface, getUnsettledPurchaseReturns_args args) throws org.apache.thrift.TException {
1892
        getUnsettledPurchaseReturns_result result = new getUnsettledPurchaseReturns_result();
1893
        result.success = iface.getUnsettledPurchaseReturns();
1894
        return result;
1895
      }
1896
    }
1897
 
4496 mandeep.dh 1898
  }
1899
 
1900
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1902
 
1903
    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);
1904
 
1905
    private PurchaseOrder purchaseOrder; // required
1906
 
1907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1908
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1909
      PURCHASE_ORDER((short)1, "purchaseOrder");
1910
 
1911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1912
 
1913
      static {
1914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1915
          byName.put(field.getFieldName(), field);
1916
        }
1917
      }
1918
 
1919
      /**
1920
       * Find the _Fields constant that matches fieldId, or null if its not found.
1921
       */
1922
      public static _Fields findByThriftId(int fieldId) {
1923
        switch(fieldId) {
1924
          case 1: // PURCHASE_ORDER
1925
            return PURCHASE_ORDER;
1926
          default:
1927
            return null;
1928
        }
1929
      }
1930
 
1931
      /**
1932
       * Find the _Fields constant that matches fieldId, throwing an exception
1933
       * if it is not found.
1934
       */
1935
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1936
        _Fields fields = findByThriftId(fieldId);
1937
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1938
        return fields;
1939
      }
1940
 
1941
      /**
1942
       * Find the _Fields constant that matches name, or null if its not found.
1943
       */
1944
      public static _Fields findByName(String name) {
1945
        return byName.get(name);
1946
      }
1947
 
1948
      private final short _thriftId;
1949
      private final String _fieldName;
1950
 
1951
      _Fields(short thriftId, String fieldName) {
1952
        _thriftId = thriftId;
1953
        _fieldName = fieldName;
1954
      }
1955
 
1956
      public short getThriftFieldId() {
1957
        return _thriftId;
1958
      }
1959
 
1960
      public String getFieldName() {
1961
        return _fieldName;
1962
      }
1963
    }
1964
 
1965
    // isset id assignments
1966
 
1967
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1968
    static {
1969
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1970
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1971
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
1972
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1973
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
1974
    }
1975
 
1976
    public createPurchaseOrder_args() {
1977
    }
1978
 
1979
    public createPurchaseOrder_args(
1980
      PurchaseOrder purchaseOrder)
1981
    {
1982
      this();
1983
      this.purchaseOrder = purchaseOrder;
1984
    }
1985
 
1986
    /**
1987
     * Performs a deep copy on <i>other</i>.
1988
     */
1989
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
1990
      if (other.isSetPurchaseOrder()) {
1991
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
1992
      }
1993
    }
1994
 
1995
    public createPurchaseOrder_args deepCopy() {
1996
      return new createPurchaseOrder_args(this);
1997
    }
1998
 
1999
    @Override
2000
    public void clear() {
2001
      this.purchaseOrder = null;
2002
    }
2003
 
2004
    public PurchaseOrder getPurchaseOrder() {
2005
      return this.purchaseOrder;
2006
    }
2007
 
2008
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
2009
      this.purchaseOrder = purchaseOrder;
2010
    }
2011
 
2012
    public void unsetPurchaseOrder() {
2013
      this.purchaseOrder = null;
2014
    }
2015
 
2016
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
2017
    public boolean isSetPurchaseOrder() {
2018
      return this.purchaseOrder != null;
2019
    }
2020
 
2021
    public void setPurchaseOrderIsSet(boolean value) {
2022
      if (!value) {
2023
        this.purchaseOrder = null;
2024
      }
2025
    }
2026
 
2027
    public void setFieldValue(_Fields field, Object value) {
2028
      switch (field) {
2029
      case PURCHASE_ORDER:
2030
        if (value == null) {
2031
          unsetPurchaseOrder();
2032
        } else {
2033
          setPurchaseOrder((PurchaseOrder)value);
2034
        }
2035
        break;
2036
 
2037
      }
2038
    }
2039
 
2040
    public Object getFieldValue(_Fields field) {
2041
      switch (field) {
2042
      case PURCHASE_ORDER:
2043
        return getPurchaseOrder();
2044
 
2045
      }
2046
      throw new IllegalStateException();
2047
    }
2048
 
2049
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2050
    public boolean isSet(_Fields field) {
2051
      if (field == null) {
2052
        throw new IllegalArgumentException();
2053
      }
2054
 
2055
      switch (field) {
2056
      case PURCHASE_ORDER:
2057
        return isSetPurchaseOrder();
2058
      }
2059
      throw new IllegalStateException();
2060
    }
2061
 
2062
    @Override
2063
    public boolean equals(Object that) {
2064
      if (that == null)
2065
        return false;
2066
      if (that instanceof createPurchaseOrder_args)
2067
        return this.equals((createPurchaseOrder_args)that);
2068
      return false;
2069
    }
2070
 
2071
    public boolean equals(createPurchaseOrder_args that) {
2072
      if (that == null)
2073
        return false;
2074
 
2075
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
2076
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
2077
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
2078
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
2079
          return false;
2080
        if (!this.purchaseOrder.equals(that.purchaseOrder))
2081
          return false;
2082
      }
2083
 
2084
      return true;
2085
    }
2086
 
2087
    @Override
2088
    public int hashCode() {
2089
      return 0;
2090
    }
2091
 
2092
    public int compareTo(createPurchaseOrder_args other) {
2093
      if (!getClass().equals(other.getClass())) {
2094
        return getClass().getName().compareTo(other.getClass().getName());
2095
      }
2096
 
2097
      int lastComparison = 0;
2098
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
2099
 
2100
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
2101
      if (lastComparison != 0) {
2102
        return lastComparison;
2103
      }
2104
      if (isSetPurchaseOrder()) {
2105
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
2106
        if (lastComparison != 0) {
2107
          return lastComparison;
2108
        }
2109
      }
2110
      return 0;
2111
    }
2112
 
2113
    public _Fields fieldForId(int fieldId) {
2114
      return _Fields.findByThriftId(fieldId);
2115
    }
2116
 
2117
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2118
      org.apache.thrift.protocol.TField field;
2119
      iprot.readStructBegin();
2120
      while (true)
2121
      {
2122
        field = iprot.readFieldBegin();
2123
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2124
          break;
2125
        }
2126
        switch (field.id) {
2127
          case 1: // PURCHASE_ORDER
2128
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2129
              this.purchaseOrder = new PurchaseOrder();
2130
              this.purchaseOrder.read(iprot);
2131
            } else { 
2132
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2133
            }
2134
            break;
2135
          default:
2136
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2137
        }
2138
        iprot.readFieldEnd();
2139
      }
2140
      iprot.readStructEnd();
2141
      validate();
2142
    }
2143
 
2144
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2145
      validate();
2146
 
2147
      oprot.writeStructBegin(STRUCT_DESC);
2148
      if (this.purchaseOrder != null) {
2149
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
2150
        this.purchaseOrder.write(oprot);
2151
        oprot.writeFieldEnd();
2152
      }
2153
      oprot.writeFieldStop();
2154
      oprot.writeStructEnd();
2155
    }
2156
 
2157
    @Override
2158
    public String toString() {
2159
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
2160
      boolean first = true;
2161
 
2162
      sb.append("purchaseOrder:");
2163
      if (this.purchaseOrder == null) {
2164
        sb.append("null");
2165
      } else {
2166
        sb.append(this.purchaseOrder);
2167
      }
2168
      first = false;
2169
      sb.append(")");
2170
      return sb.toString();
2171
    }
2172
 
2173
    public void validate() throws org.apache.thrift.TException {
2174
      // check for required fields
2175
    }
2176
 
2177
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2178
      try {
2179
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2180
      } catch (org.apache.thrift.TException te) {
2181
        throw new java.io.IOException(te);
2182
      }
2183
    }
2184
 
2185
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2186
      try {
2187
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2188
      } catch (org.apache.thrift.TException te) {
2189
        throw new java.io.IOException(te);
2190
      }
2191
    }
2192
 
2193
  }
2194
 
2195
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2196
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
2197
 
2198
    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);
2199
    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);
2200
 
2201
    private long success; // required
2202
    private PurchaseServiceException e; // required
2203
 
2204
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2205
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2206
      SUCCESS((short)0, "success"),
2207
      E((short)1, "e");
2208
 
2209
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2210
 
2211
      static {
2212
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2213
          byName.put(field.getFieldName(), field);
2214
        }
2215
      }
2216
 
2217
      /**
2218
       * Find the _Fields constant that matches fieldId, or null if its not found.
2219
       */
2220
      public static _Fields findByThriftId(int fieldId) {
2221
        switch(fieldId) {
2222
          case 0: // SUCCESS
2223
            return SUCCESS;
2224
          case 1: // E
2225
            return E;
2226
          default:
2227
            return null;
2228
        }
2229
      }
2230
 
2231
      /**
2232
       * Find the _Fields constant that matches fieldId, throwing an exception
2233
       * if it is not found.
2234
       */
2235
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2236
        _Fields fields = findByThriftId(fieldId);
2237
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2238
        return fields;
2239
      }
2240
 
2241
      /**
2242
       * Find the _Fields constant that matches name, or null if its not found.
2243
       */
2244
      public static _Fields findByName(String name) {
2245
        return byName.get(name);
2246
      }
2247
 
2248
      private final short _thriftId;
2249
      private final String _fieldName;
2250
 
2251
      _Fields(short thriftId, String fieldName) {
2252
        _thriftId = thriftId;
2253
        _fieldName = fieldName;
2254
      }
2255
 
2256
      public short getThriftFieldId() {
2257
        return _thriftId;
2258
      }
2259
 
2260
      public String getFieldName() {
2261
        return _fieldName;
2262
      }
2263
    }
2264
 
2265
    // isset id assignments
2266
    private static final int __SUCCESS_ISSET_ID = 0;
2267
    private BitSet __isset_bit_vector = new BitSet(1);
2268
 
2269
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2270
    static {
2271
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2272
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2273
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2274
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2275
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2276
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2277
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
2278
    }
2279
 
2280
    public createPurchaseOrder_result() {
2281
    }
2282
 
2283
    public createPurchaseOrder_result(
2284
      long success,
2285
      PurchaseServiceException e)
2286
    {
2287
      this();
2288
      this.success = success;
2289
      setSuccessIsSet(true);
2290
      this.e = e;
2291
    }
2292
 
2293
    /**
2294
     * Performs a deep copy on <i>other</i>.
2295
     */
2296
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
2297
      __isset_bit_vector.clear();
2298
      __isset_bit_vector.or(other.__isset_bit_vector);
2299
      this.success = other.success;
2300
      if (other.isSetE()) {
2301
        this.e = new PurchaseServiceException(other.e);
2302
      }
2303
    }
2304
 
2305
    public createPurchaseOrder_result deepCopy() {
2306
      return new createPurchaseOrder_result(this);
2307
    }
2308
 
2309
    @Override
2310
    public void clear() {
2311
      setSuccessIsSet(false);
2312
      this.success = 0;
2313
      this.e = null;
2314
    }
2315
 
2316
    public long getSuccess() {
2317
      return this.success;
2318
    }
2319
 
2320
    public void setSuccess(long success) {
2321
      this.success = success;
2322
      setSuccessIsSet(true);
2323
    }
2324
 
2325
    public void unsetSuccess() {
2326
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2327
    }
2328
 
2329
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2330
    public boolean isSetSuccess() {
2331
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2332
    }
2333
 
2334
    public void setSuccessIsSet(boolean value) {
2335
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2336
    }
2337
 
2338
    public PurchaseServiceException getE() {
2339
      return this.e;
2340
    }
2341
 
2342
    public void setE(PurchaseServiceException e) {
2343
      this.e = e;
2344
    }
2345
 
2346
    public void unsetE() {
2347
      this.e = null;
2348
    }
2349
 
2350
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2351
    public boolean isSetE() {
2352
      return this.e != null;
2353
    }
2354
 
2355
    public void setEIsSet(boolean value) {
2356
      if (!value) {
2357
        this.e = null;
2358
      }
2359
    }
2360
 
2361
    public void setFieldValue(_Fields field, Object value) {
2362
      switch (field) {
2363
      case SUCCESS:
2364
        if (value == null) {
2365
          unsetSuccess();
2366
        } else {
2367
          setSuccess((Long)value);
2368
        }
2369
        break;
2370
 
2371
      case E:
2372
        if (value == null) {
2373
          unsetE();
2374
        } else {
2375
          setE((PurchaseServiceException)value);
2376
        }
2377
        break;
2378
 
2379
      }
2380
    }
2381
 
2382
    public Object getFieldValue(_Fields field) {
2383
      switch (field) {
2384
      case SUCCESS:
2385
        return Long.valueOf(getSuccess());
2386
 
2387
      case E:
2388
        return getE();
2389
 
2390
      }
2391
      throw new IllegalStateException();
2392
    }
2393
 
2394
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2395
    public boolean isSet(_Fields field) {
2396
      if (field == null) {
2397
        throw new IllegalArgumentException();
2398
      }
2399
 
2400
      switch (field) {
2401
      case SUCCESS:
2402
        return isSetSuccess();
2403
      case E:
2404
        return isSetE();
2405
      }
2406
      throw new IllegalStateException();
2407
    }
2408
 
2409
    @Override
2410
    public boolean equals(Object that) {
2411
      if (that == null)
2412
        return false;
2413
      if (that instanceof createPurchaseOrder_result)
2414
        return this.equals((createPurchaseOrder_result)that);
2415
      return false;
2416
    }
2417
 
2418
    public boolean equals(createPurchaseOrder_result that) {
2419
      if (that == null)
2420
        return false;
2421
 
2422
      boolean this_present_success = true;
2423
      boolean that_present_success = true;
2424
      if (this_present_success || that_present_success) {
2425
        if (!(this_present_success && that_present_success))
2426
          return false;
2427
        if (this.success != that.success)
2428
          return false;
2429
      }
2430
 
2431
      boolean this_present_e = true && this.isSetE();
2432
      boolean that_present_e = true && that.isSetE();
2433
      if (this_present_e || that_present_e) {
2434
        if (!(this_present_e && that_present_e))
2435
          return false;
2436
        if (!this.e.equals(that.e))
2437
          return false;
2438
      }
2439
 
2440
      return true;
2441
    }
2442
 
2443
    @Override
2444
    public int hashCode() {
2445
      return 0;
2446
    }
2447
 
2448
    public int compareTo(createPurchaseOrder_result other) {
2449
      if (!getClass().equals(other.getClass())) {
2450
        return getClass().getName().compareTo(other.getClass().getName());
2451
      }
2452
 
2453
      int lastComparison = 0;
2454
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
2455
 
2456
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2457
      if (lastComparison != 0) {
2458
        return lastComparison;
2459
      }
2460
      if (isSetSuccess()) {
2461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2462
        if (lastComparison != 0) {
2463
          return lastComparison;
2464
        }
2465
      }
2466
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2467
      if (lastComparison != 0) {
2468
        return lastComparison;
2469
      }
2470
      if (isSetE()) {
2471
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2472
        if (lastComparison != 0) {
2473
          return lastComparison;
2474
        }
2475
      }
2476
      return 0;
2477
    }
2478
 
2479
    public _Fields fieldForId(int fieldId) {
2480
      return _Fields.findByThriftId(fieldId);
2481
    }
2482
 
2483
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2484
      org.apache.thrift.protocol.TField field;
2485
      iprot.readStructBegin();
2486
      while (true)
2487
      {
2488
        field = iprot.readFieldBegin();
2489
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2490
          break;
2491
        }
2492
        switch (field.id) {
2493
          case 0: // SUCCESS
2494
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2495
              this.success = iprot.readI64();
2496
              setSuccessIsSet(true);
2497
            } else { 
2498
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2499
            }
2500
            break;
2501
          case 1: // E
2502
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2503
              this.e = new PurchaseServiceException();
2504
              this.e.read(iprot);
2505
            } else { 
2506
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2507
            }
2508
            break;
2509
          default:
2510
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2511
        }
2512
        iprot.readFieldEnd();
2513
      }
2514
      iprot.readStructEnd();
2515
      validate();
2516
    }
2517
 
2518
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2519
      oprot.writeStructBegin(STRUCT_DESC);
2520
 
2521
      if (this.isSetSuccess()) {
2522
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2523
        oprot.writeI64(this.success);
2524
        oprot.writeFieldEnd();
2525
      } else if (this.isSetE()) {
2526
        oprot.writeFieldBegin(E_FIELD_DESC);
2527
        this.e.write(oprot);
2528
        oprot.writeFieldEnd();
2529
      }
2530
      oprot.writeFieldStop();
2531
      oprot.writeStructEnd();
2532
    }
2533
 
2534
    @Override
2535
    public String toString() {
2536
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
2537
      boolean first = true;
2538
 
2539
      sb.append("success:");
2540
      sb.append(this.success);
2541
      first = false;
2542
      if (!first) sb.append(", ");
2543
      sb.append("e:");
2544
      if (this.e == null) {
2545
        sb.append("null");
2546
      } else {
2547
        sb.append(this.e);
2548
      }
2549
      first = false;
2550
      sb.append(")");
2551
      return sb.toString();
2552
    }
2553
 
2554
    public void validate() throws org.apache.thrift.TException {
2555
      // check for required fields
2556
    }
2557
 
2558
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2559
      try {
2560
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2561
      } catch (org.apache.thrift.TException te) {
2562
        throw new java.io.IOException(te);
2563
      }
2564
    }
2565
 
2566
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2567
      try {
2568
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2569
      } catch (org.apache.thrift.TException te) {
2570
        throw new java.io.IOException(te);
2571
      }
2572
    }
2573
 
2574
  }
2575
 
2576
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2577
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
2578
 
2579
    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);
2580
 
2581
    private long id; // required
2582
 
2583
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2584
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2585
      ID((short)1, "id");
2586
 
2587
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2588
 
2589
      static {
2590
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2591
          byName.put(field.getFieldName(), field);
2592
        }
2593
      }
2594
 
2595
      /**
2596
       * Find the _Fields constant that matches fieldId, or null if its not found.
2597
       */
2598
      public static _Fields findByThriftId(int fieldId) {
2599
        switch(fieldId) {
2600
          case 1: // ID
2601
            return ID;
2602
          default:
2603
            return null;
2604
        }
2605
      }
2606
 
2607
      /**
2608
       * Find the _Fields constant that matches fieldId, throwing an exception
2609
       * if it is not found.
2610
       */
2611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2612
        _Fields fields = findByThriftId(fieldId);
2613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2614
        return fields;
2615
      }
2616
 
2617
      /**
2618
       * Find the _Fields constant that matches name, or null if its not found.
2619
       */
2620
      public static _Fields findByName(String name) {
2621
        return byName.get(name);
2622
      }
2623
 
2624
      private final short _thriftId;
2625
      private final String _fieldName;
2626
 
2627
      _Fields(short thriftId, String fieldName) {
2628
        _thriftId = thriftId;
2629
        _fieldName = fieldName;
2630
      }
2631
 
2632
      public short getThriftFieldId() {
2633
        return _thriftId;
2634
      }
2635
 
2636
      public String getFieldName() {
2637
        return _fieldName;
2638
      }
2639
    }
2640
 
2641
    // isset id assignments
2642
    private static final int __ID_ISSET_ID = 0;
2643
    private BitSet __isset_bit_vector = new BitSet(1);
2644
 
2645
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2646
    static {
2647
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2648
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2649
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2650
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2651
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
2652
    }
2653
 
2654
    public getPurchaseOrder_args() {
2655
    }
2656
 
2657
    public getPurchaseOrder_args(
2658
      long id)
2659
    {
2660
      this();
2661
      this.id = id;
2662
      setIdIsSet(true);
2663
    }
2664
 
2665
    /**
2666
     * Performs a deep copy on <i>other</i>.
2667
     */
2668
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
2669
      __isset_bit_vector.clear();
2670
      __isset_bit_vector.or(other.__isset_bit_vector);
2671
      this.id = other.id;
2672
    }
2673
 
2674
    public getPurchaseOrder_args deepCopy() {
2675
      return new getPurchaseOrder_args(this);
2676
    }
2677
 
2678
    @Override
2679
    public void clear() {
2680
      setIdIsSet(false);
2681
      this.id = 0;
2682
    }
2683
 
2684
    public long getId() {
2685
      return this.id;
2686
    }
2687
 
2688
    public void setId(long id) {
2689
      this.id = id;
2690
      setIdIsSet(true);
2691
    }
2692
 
2693
    public void unsetId() {
2694
      __isset_bit_vector.clear(__ID_ISSET_ID);
2695
    }
2696
 
2697
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
2698
    public boolean isSetId() {
2699
      return __isset_bit_vector.get(__ID_ISSET_ID);
2700
    }
2701
 
2702
    public void setIdIsSet(boolean value) {
2703
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2704
    }
2705
 
2706
    public void setFieldValue(_Fields field, Object value) {
2707
      switch (field) {
2708
      case ID:
2709
        if (value == null) {
2710
          unsetId();
2711
        } else {
2712
          setId((Long)value);
2713
        }
2714
        break;
2715
 
2716
      }
2717
    }
2718
 
2719
    public Object getFieldValue(_Fields field) {
2720
      switch (field) {
2721
      case ID:
2722
        return Long.valueOf(getId());
2723
 
2724
      }
2725
      throw new IllegalStateException();
2726
    }
2727
 
2728
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2729
    public boolean isSet(_Fields field) {
2730
      if (field == null) {
2731
        throw new IllegalArgumentException();
2732
      }
2733
 
2734
      switch (field) {
2735
      case ID:
2736
        return isSetId();
2737
      }
2738
      throw new IllegalStateException();
2739
    }
2740
 
2741
    @Override
2742
    public boolean equals(Object that) {
2743
      if (that == null)
2744
        return false;
2745
      if (that instanceof getPurchaseOrder_args)
2746
        return this.equals((getPurchaseOrder_args)that);
2747
      return false;
2748
    }
2749
 
2750
    public boolean equals(getPurchaseOrder_args that) {
2751
      if (that == null)
2752
        return false;
2753
 
2754
      boolean this_present_id = true;
2755
      boolean that_present_id = true;
2756
      if (this_present_id || that_present_id) {
2757
        if (!(this_present_id && that_present_id))
2758
          return false;
2759
        if (this.id != that.id)
2760
          return false;
2761
      }
2762
 
2763
      return true;
2764
    }
2765
 
2766
    @Override
2767
    public int hashCode() {
2768
      return 0;
2769
    }
2770
 
2771
    public int compareTo(getPurchaseOrder_args other) {
2772
      if (!getClass().equals(other.getClass())) {
2773
        return getClass().getName().compareTo(other.getClass().getName());
2774
      }
2775
 
2776
      int lastComparison = 0;
2777
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
2778
 
2779
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
2780
      if (lastComparison != 0) {
2781
        return lastComparison;
2782
      }
2783
      if (isSetId()) {
2784
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
2785
        if (lastComparison != 0) {
2786
          return lastComparison;
2787
        }
2788
      }
2789
      return 0;
2790
    }
2791
 
2792
    public _Fields fieldForId(int fieldId) {
2793
      return _Fields.findByThriftId(fieldId);
2794
    }
2795
 
2796
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2797
      org.apache.thrift.protocol.TField field;
2798
      iprot.readStructBegin();
2799
      while (true)
2800
      {
2801
        field = iprot.readFieldBegin();
2802
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2803
          break;
2804
        }
2805
        switch (field.id) {
2806
          case 1: // ID
2807
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2808
              this.id = iprot.readI64();
2809
              setIdIsSet(true);
2810
            } else { 
2811
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2812
            }
2813
            break;
2814
          default:
2815
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2816
        }
2817
        iprot.readFieldEnd();
2818
      }
2819
      iprot.readStructEnd();
2820
      validate();
2821
    }
2822
 
2823
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2824
      validate();
2825
 
2826
      oprot.writeStructBegin(STRUCT_DESC);
2827
      oprot.writeFieldBegin(ID_FIELD_DESC);
2828
      oprot.writeI64(this.id);
2829
      oprot.writeFieldEnd();
2830
      oprot.writeFieldStop();
2831
      oprot.writeStructEnd();
2832
    }
2833
 
2834
    @Override
2835
    public String toString() {
2836
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
2837
      boolean first = true;
2838
 
2839
      sb.append("id:");
2840
      sb.append(this.id);
2841
      first = false;
2842
      sb.append(")");
2843
      return sb.toString();
2844
    }
2845
 
2846
    public void validate() throws org.apache.thrift.TException {
2847
      // check for required fields
2848
    }
2849
 
2850
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2851
      try {
2852
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2853
      } catch (org.apache.thrift.TException te) {
2854
        throw new java.io.IOException(te);
2855
      }
2856
    }
2857
 
2858
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2859
      try {
2860
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2861
      } catch (org.apache.thrift.TException te) {
2862
        throw new java.io.IOException(te);
2863
      }
2864
    }
2865
 
2866
  }
2867
 
2868
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2869
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
2870
 
2871
    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);
2872
    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);
2873
 
2874
    private PurchaseOrder success; // required
2875
    private PurchaseServiceException e; // required
2876
 
2877
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2878
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2879
      SUCCESS((short)0, "success"),
2880
      E((short)1, "e");
2881
 
2882
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2883
 
2884
      static {
2885
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2886
          byName.put(field.getFieldName(), field);
2887
        }
2888
      }
2889
 
2890
      /**
2891
       * Find the _Fields constant that matches fieldId, or null if its not found.
2892
       */
2893
      public static _Fields findByThriftId(int fieldId) {
2894
        switch(fieldId) {
2895
          case 0: // SUCCESS
2896
            return SUCCESS;
2897
          case 1: // E
2898
            return E;
2899
          default:
2900
            return null;
2901
        }
2902
      }
2903
 
2904
      /**
2905
       * Find the _Fields constant that matches fieldId, throwing an exception
2906
       * if it is not found.
2907
       */
2908
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2909
        _Fields fields = findByThriftId(fieldId);
2910
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2911
        return fields;
2912
      }
2913
 
2914
      /**
2915
       * Find the _Fields constant that matches name, or null if its not found.
2916
       */
2917
      public static _Fields findByName(String name) {
2918
        return byName.get(name);
2919
      }
2920
 
2921
      private final short _thriftId;
2922
      private final String _fieldName;
2923
 
2924
      _Fields(short thriftId, String fieldName) {
2925
        _thriftId = thriftId;
2926
        _fieldName = fieldName;
2927
      }
2928
 
2929
      public short getThriftFieldId() {
2930
        return _thriftId;
2931
      }
2932
 
2933
      public String getFieldName() {
2934
        return _fieldName;
2935
      }
2936
    }
2937
 
2938
    // isset id assignments
2939
 
2940
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2941
    static {
2942
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2943
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2944
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2945
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2946
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2947
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2948
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
2949
    }
2950
 
2951
    public getPurchaseOrder_result() {
2952
    }
2953
 
2954
    public getPurchaseOrder_result(
2955
      PurchaseOrder success,
2956
      PurchaseServiceException e)
2957
    {
2958
      this();
2959
      this.success = success;
2960
      this.e = e;
2961
    }
2962
 
2963
    /**
2964
     * Performs a deep copy on <i>other</i>.
2965
     */
2966
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
2967
      if (other.isSetSuccess()) {
2968
        this.success = new PurchaseOrder(other.success);
2969
      }
2970
      if (other.isSetE()) {
2971
        this.e = new PurchaseServiceException(other.e);
2972
      }
2973
    }
2974
 
2975
    public getPurchaseOrder_result deepCopy() {
2976
      return new getPurchaseOrder_result(this);
2977
    }
2978
 
2979
    @Override
2980
    public void clear() {
2981
      this.success = null;
2982
      this.e = null;
2983
    }
2984
 
2985
    public PurchaseOrder getSuccess() {
2986
      return this.success;
2987
    }
2988
 
2989
    public void setSuccess(PurchaseOrder success) {
2990
      this.success = success;
2991
    }
2992
 
2993
    public void unsetSuccess() {
2994
      this.success = null;
2995
    }
2996
 
2997
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2998
    public boolean isSetSuccess() {
2999
      return this.success != null;
3000
    }
3001
 
3002
    public void setSuccessIsSet(boolean value) {
3003
      if (!value) {
3004
        this.success = null;
3005
      }
3006
    }
3007
 
3008
    public PurchaseServiceException getE() {
3009
      return this.e;
3010
    }
3011
 
3012
    public void setE(PurchaseServiceException e) {
3013
      this.e = e;
3014
    }
3015
 
3016
    public void unsetE() {
3017
      this.e = null;
3018
    }
3019
 
3020
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3021
    public boolean isSetE() {
3022
      return this.e != null;
3023
    }
3024
 
3025
    public void setEIsSet(boolean value) {
3026
      if (!value) {
3027
        this.e = null;
3028
      }
3029
    }
3030
 
3031
    public void setFieldValue(_Fields field, Object value) {
3032
      switch (field) {
3033
      case SUCCESS:
3034
        if (value == null) {
3035
          unsetSuccess();
3036
        } else {
3037
          setSuccess((PurchaseOrder)value);
3038
        }
3039
        break;
3040
 
3041
      case E:
3042
        if (value == null) {
3043
          unsetE();
3044
        } else {
3045
          setE((PurchaseServiceException)value);
3046
        }
3047
        break;
3048
 
3049
      }
3050
    }
3051
 
3052
    public Object getFieldValue(_Fields field) {
3053
      switch (field) {
3054
      case SUCCESS:
3055
        return getSuccess();
3056
 
3057
      case E:
3058
        return getE();
3059
 
3060
      }
3061
      throw new IllegalStateException();
3062
    }
3063
 
3064
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3065
    public boolean isSet(_Fields field) {
3066
      if (field == null) {
3067
        throw new IllegalArgumentException();
3068
      }
3069
 
3070
      switch (field) {
3071
      case SUCCESS:
3072
        return isSetSuccess();
3073
      case E:
3074
        return isSetE();
3075
      }
3076
      throw new IllegalStateException();
3077
    }
3078
 
3079
    @Override
3080
    public boolean equals(Object that) {
3081
      if (that == null)
3082
        return false;
3083
      if (that instanceof getPurchaseOrder_result)
3084
        return this.equals((getPurchaseOrder_result)that);
3085
      return false;
3086
    }
3087
 
3088
    public boolean equals(getPurchaseOrder_result that) {
3089
      if (that == null)
3090
        return false;
3091
 
3092
      boolean this_present_success = true && this.isSetSuccess();
3093
      boolean that_present_success = true && that.isSetSuccess();
3094
      if (this_present_success || that_present_success) {
3095
        if (!(this_present_success && that_present_success))
3096
          return false;
3097
        if (!this.success.equals(that.success))
3098
          return false;
3099
      }
3100
 
3101
      boolean this_present_e = true && this.isSetE();
3102
      boolean that_present_e = true && that.isSetE();
3103
      if (this_present_e || that_present_e) {
3104
        if (!(this_present_e && that_present_e))
3105
          return false;
3106
        if (!this.e.equals(that.e))
3107
          return false;
3108
      }
3109
 
3110
      return true;
3111
    }
3112
 
3113
    @Override
3114
    public int hashCode() {
3115
      return 0;
3116
    }
3117
 
3118
    public int compareTo(getPurchaseOrder_result other) {
3119
      if (!getClass().equals(other.getClass())) {
3120
        return getClass().getName().compareTo(other.getClass().getName());
3121
      }
3122
 
3123
      int lastComparison = 0;
3124
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
3125
 
3126
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3127
      if (lastComparison != 0) {
3128
        return lastComparison;
3129
      }
3130
      if (isSetSuccess()) {
3131
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3132
        if (lastComparison != 0) {
3133
          return lastComparison;
3134
        }
3135
      }
3136
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3137
      if (lastComparison != 0) {
3138
        return lastComparison;
3139
      }
3140
      if (isSetE()) {
3141
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3142
        if (lastComparison != 0) {
3143
          return lastComparison;
3144
        }
3145
      }
3146
      return 0;
3147
    }
3148
 
3149
    public _Fields fieldForId(int fieldId) {
3150
      return _Fields.findByThriftId(fieldId);
3151
    }
3152
 
3153
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3154
      org.apache.thrift.protocol.TField field;
3155
      iprot.readStructBegin();
3156
      while (true)
3157
      {
3158
        field = iprot.readFieldBegin();
3159
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3160
          break;
3161
        }
3162
        switch (field.id) {
3163
          case 0: // SUCCESS
3164
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3165
              this.success = new PurchaseOrder();
3166
              this.success.read(iprot);
3167
            } else { 
3168
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3169
            }
3170
            break;
3171
          case 1: // E
3172
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3173
              this.e = new PurchaseServiceException();
3174
              this.e.read(iprot);
3175
            } else { 
3176
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3177
            }
3178
            break;
3179
          default:
3180
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3181
        }
3182
        iprot.readFieldEnd();
3183
      }
3184
      iprot.readStructEnd();
3185
      validate();
3186
    }
3187
 
3188
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3189
      oprot.writeStructBegin(STRUCT_DESC);
3190
 
3191
      if (this.isSetSuccess()) {
3192
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3193
        this.success.write(oprot);
3194
        oprot.writeFieldEnd();
3195
      } else if (this.isSetE()) {
3196
        oprot.writeFieldBegin(E_FIELD_DESC);
3197
        this.e.write(oprot);
3198
        oprot.writeFieldEnd();
3199
      }
3200
      oprot.writeFieldStop();
3201
      oprot.writeStructEnd();
3202
    }
3203
 
3204
    @Override
3205
    public String toString() {
3206
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
3207
      boolean first = true;
3208
 
3209
      sb.append("success:");
3210
      if (this.success == null) {
3211
        sb.append("null");
3212
      } else {
3213
        sb.append(this.success);
3214
      }
3215
      first = false;
3216
      if (!first) sb.append(", ");
3217
      sb.append("e:");
3218
      if (this.e == null) {
3219
        sb.append("null");
3220
      } else {
3221
        sb.append(this.e);
3222
      }
3223
      first = false;
3224
      sb.append(")");
3225
      return sb.toString();
3226
    }
3227
 
3228
    public void validate() throws org.apache.thrift.TException {
3229
      // check for required fields
3230
    }
3231
 
3232
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3233
      try {
3234
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3235
      } catch (org.apache.thrift.TException te) {
3236
        throw new java.io.IOException(te);
3237
      }
3238
    }
3239
 
3240
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3241
      try {
3242
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3243
      } catch (org.apache.thrift.TException te) {
3244
        throw new java.io.IOException(te);
3245
      }
3246
    }
3247
 
3248
  }
3249
 
3250
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
3251
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
3252
 
3253
    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);
3254
 
3255
    private POStatus status; // required
3256
 
3257
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3258
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3259
      /**
3260
       * 
3261
       * @see POStatus
3262
       */
3263
      STATUS((short)1, "status");
3264
 
3265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3266
 
3267
      static {
3268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3269
          byName.put(field.getFieldName(), field);
3270
        }
3271
      }
3272
 
3273
      /**
3274
       * Find the _Fields constant that matches fieldId, or null if its not found.
3275
       */
3276
      public static _Fields findByThriftId(int fieldId) {
3277
        switch(fieldId) {
3278
          case 1: // STATUS
3279
            return STATUS;
3280
          default:
3281
            return null;
3282
        }
3283
      }
3284
 
3285
      /**
3286
       * Find the _Fields constant that matches fieldId, throwing an exception
3287
       * if it is not found.
3288
       */
3289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3290
        _Fields fields = findByThriftId(fieldId);
3291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3292
        return fields;
3293
      }
3294
 
3295
      /**
3296
       * Find the _Fields constant that matches name, or null if its not found.
3297
       */
3298
      public static _Fields findByName(String name) {
3299
        return byName.get(name);
3300
      }
3301
 
3302
      private final short _thriftId;
3303
      private final String _fieldName;
3304
 
3305
      _Fields(short thriftId, String fieldName) {
3306
        _thriftId = thriftId;
3307
        _fieldName = fieldName;
3308
      }
3309
 
3310
      public short getThriftFieldId() {
3311
        return _thriftId;
3312
      }
3313
 
3314
      public String getFieldName() {
3315
        return _fieldName;
3316
      }
3317
    }
3318
 
3319
    // isset id assignments
3320
 
3321
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3322
    static {
3323
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3324
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3325
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3326
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3327
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3328
    }
3329
 
3330
    public getAllPurchaseOrders_args() {
3331
    }
3332
 
3333
    public getAllPurchaseOrders_args(
3334
      POStatus status)
3335
    {
3336
      this();
3337
      this.status = status;
3338
    }
3339
 
3340
    /**
3341
     * Performs a deep copy on <i>other</i>.
3342
     */
3343
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3344
      if (other.isSetStatus()) {
3345
        this.status = other.status;
3346
      }
3347
    }
3348
 
3349
    public getAllPurchaseOrders_args deepCopy() {
3350
      return new getAllPurchaseOrders_args(this);
3351
    }
3352
 
3353
    @Override
3354
    public void clear() {
3355
      this.status = null;
3356
    }
3357
 
3358
    /**
3359
     * 
3360
     * @see POStatus
3361
     */
3362
    public POStatus getStatus() {
3363
      return this.status;
3364
    }
3365
 
3366
    /**
3367
     * 
3368
     * @see POStatus
3369
     */
3370
    public void setStatus(POStatus status) {
3371
      this.status = status;
3372
    }
3373
 
3374
    public void unsetStatus() {
3375
      this.status = null;
3376
    }
3377
 
3378
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3379
    public boolean isSetStatus() {
3380
      return this.status != null;
3381
    }
3382
 
3383
    public void setStatusIsSet(boolean value) {
3384
      if (!value) {
3385
        this.status = null;
3386
      }
3387
    }
3388
 
3389
    public void setFieldValue(_Fields field, Object value) {
3390
      switch (field) {
3391
      case STATUS:
3392
        if (value == null) {
3393
          unsetStatus();
3394
        } else {
3395
          setStatus((POStatus)value);
3396
        }
3397
        break;
3398
 
3399
      }
3400
    }
3401
 
3402
    public Object getFieldValue(_Fields field) {
3403
      switch (field) {
3404
      case STATUS:
3405
        return getStatus();
3406
 
3407
      }
3408
      throw new IllegalStateException();
3409
    }
3410
 
3411
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3412
    public boolean isSet(_Fields field) {
3413
      if (field == null) {
3414
        throw new IllegalArgumentException();
3415
      }
3416
 
3417
      switch (field) {
3418
      case STATUS:
3419
        return isSetStatus();
3420
      }
3421
      throw new IllegalStateException();
3422
    }
3423
 
3424
    @Override
3425
    public boolean equals(Object that) {
3426
      if (that == null)
3427
        return false;
3428
      if (that instanceof getAllPurchaseOrders_args)
3429
        return this.equals((getAllPurchaseOrders_args)that);
3430
      return false;
3431
    }
3432
 
3433
    public boolean equals(getAllPurchaseOrders_args that) {
3434
      if (that == null)
3435
        return false;
3436
 
3437
      boolean this_present_status = true && this.isSetStatus();
3438
      boolean that_present_status = true && that.isSetStatus();
3439
      if (this_present_status || that_present_status) {
3440
        if (!(this_present_status && that_present_status))
3441
          return false;
3442
        if (!this.status.equals(that.status))
3443
          return false;
3444
      }
3445
 
3446
      return true;
3447
    }
3448
 
3449
    @Override
3450
    public int hashCode() {
3451
      return 0;
3452
    }
3453
 
3454
    public int compareTo(getAllPurchaseOrders_args other) {
3455
      if (!getClass().equals(other.getClass())) {
3456
        return getClass().getName().compareTo(other.getClass().getName());
3457
      }
3458
 
3459
      int lastComparison = 0;
3460
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
3461
 
3462
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
3463
      if (lastComparison != 0) {
3464
        return lastComparison;
3465
      }
3466
      if (isSetStatus()) {
3467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3468
        if (lastComparison != 0) {
3469
          return lastComparison;
3470
        }
3471
      }
3472
      return 0;
3473
    }
3474
 
3475
    public _Fields fieldForId(int fieldId) {
3476
      return _Fields.findByThriftId(fieldId);
3477
    }
3478
 
3479
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3480
      org.apache.thrift.protocol.TField field;
3481
      iprot.readStructBegin();
3482
      while (true)
3483
      {
3484
        field = iprot.readFieldBegin();
3485
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3486
          break;
3487
        }
3488
        switch (field.id) {
3489
          case 1: // STATUS
3490
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3491
              this.status = POStatus.findByValue(iprot.readI32());
3492
            } else { 
3493
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3494
            }
3495
            break;
3496
          default:
3497
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3498
        }
3499
        iprot.readFieldEnd();
3500
      }
3501
      iprot.readStructEnd();
3502
      validate();
3503
    }
3504
 
3505
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3506
      validate();
3507
 
3508
      oprot.writeStructBegin(STRUCT_DESC);
3509
      if (this.status != null) {
3510
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3511
        oprot.writeI32(this.status.getValue());
3512
        oprot.writeFieldEnd();
3513
      }
3514
      oprot.writeFieldStop();
3515
      oprot.writeStructEnd();
3516
    }
3517
 
3518
    @Override
3519
    public String toString() {
3520
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
3521
      boolean first = true;
3522
 
3523
      sb.append("status:");
3524
      if (this.status == null) {
3525
        sb.append("null");
3526
      } else {
3527
        sb.append(this.status);
3528
      }
3529
      first = false;
3530
      sb.append(")");
3531
      return sb.toString();
3532
    }
3533
 
3534
    public void validate() throws org.apache.thrift.TException {
3535
      // check for required fields
3536
    }
3537
 
3538
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3539
      try {
3540
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3541
      } catch (org.apache.thrift.TException te) {
3542
        throw new java.io.IOException(te);
3543
      }
3544
    }
3545
 
3546
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3547
      try {
3548
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3549
      } catch (org.apache.thrift.TException te) {
3550
        throw new java.io.IOException(te);
3551
      }
3552
    }
3553
 
3554
  }
3555
 
3556
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
3557
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
3558
 
3559
    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);
3560
    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);
3561
 
3562
    private List<PurchaseOrder> success; // required
3563
    private PurchaseServiceException e; // required
3564
 
3565
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3566
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3567
      SUCCESS((short)0, "success"),
3568
      E((short)1, "e");
3569
 
3570
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3571
 
3572
      static {
3573
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3574
          byName.put(field.getFieldName(), field);
3575
        }
3576
      }
3577
 
3578
      /**
3579
       * Find the _Fields constant that matches fieldId, or null if its not found.
3580
       */
3581
      public static _Fields findByThriftId(int fieldId) {
3582
        switch(fieldId) {
3583
          case 0: // SUCCESS
3584
            return SUCCESS;
3585
          case 1: // E
3586
            return E;
3587
          default:
3588
            return null;
3589
        }
3590
      }
3591
 
3592
      /**
3593
       * Find the _Fields constant that matches fieldId, throwing an exception
3594
       * if it is not found.
3595
       */
3596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3597
        _Fields fields = findByThriftId(fieldId);
3598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3599
        return fields;
3600
      }
3601
 
3602
      /**
3603
       * Find the _Fields constant that matches name, or null if its not found.
3604
       */
3605
      public static _Fields findByName(String name) {
3606
        return byName.get(name);
3607
      }
3608
 
3609
      private final short _thriftId;
3610
      private final String _fieldName;
3611
 
3612
      _Fields(short thriftId, String fieldName) {
3613
        _thriftId = thriftId;
3614
        _fieldName = fieldName;
3615
      }
3616
 
3617
      public short getThriftFieldId() {
3618
        return _thriftId;
3619
      }
3620
 
3621
      public String getFieldName() {
3622
        return _fieldName;
3623
      }
3624
    }
3625
 
3626
    // isset id assignments
3627
 
3628
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3629
    static {
3630
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3631
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3632
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3633
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
3634
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3635
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3636
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3637
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
3638
    }
3639
 
3640
    public getAllPurchaseOrders_result() {
3641
    }
3642
 
3643
    public getAllPurchaseOrders_result(
3644
      List<PurchaseOrder> success,
3645
      PurchaseServiceException e)
3646
    {
3647
      this();
3648
      this.success = success;
3649
      this.e = e;
3650
    }
3651
 
3652
    /**
3653
     * Performs a deep copy on <i>other</i>.
3654
     */
3655
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
3656
      if (other.isSetSuccess()) {
3657
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
3658
        for (PurchaseOrder other_element : other.success) {
3659
          __this__success.add(new PurchaseOrder(other_element));
3660
        }
3661
        this.success = __this__success;
3662
      }
3663
      if (other.isSetE()) {
3664
        this.e = new PurchaseServiceException(other.e);
3665
      }
3666
    }
3667
 
3668
    public getAllPurchaseOrders_result deepCopy() {
3669
      return new getAllPurchaseOrders_result(this);
3670
    }
3671
 
3672
    @Override
3673
    public void clear() {
3674
      this.success = null;
3675
      this.e = null;
3676
    }
3677
 
3678
    public int getSuccessSize() {
3679
      return (this.success == null) ? 0 : this.success.size();
3680
    }
3681
 
3682
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
3683
      return (this.success == null) ? null : this.success.iterator();
3684
    }
3685
 
3686
    public void addToSuccess(PurchaseOrder elem) {
3687
      if (this.success == null) {
3688
        this.success = new ArrayList<PurchaseOrder>();
3689
      }
3690
      this.success.add(elem);
3691
    }
3692
 
3693
    public List<PurchaseOrder> getSuccess() {
3694
      return this.success;
3695
    }
3696
 
3697
    public void setSuccess(List<PurchaseOrder> success) {
3698
      this.success = success;
3699
    }
3700
 
3701
    public void unsetSuccess() {
3702
      this.success = null;
3703
    }
3704
 
3705
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3706
    public boolean isSetSuccess() {
3707
      return this.success != null;
3708
    }
3709
 
3710
    public void setSuccessIsSet(boolean value) {
3711
      if (!value) {
3712
        this.success = null;
3713
      }
3714
    }
3715
 
3716
    public PurchaseServiceException getE() {
3717
      return this.e;
3718
    }
3719
 
3720
    public void setE(PurchaseServiceException e) {
3721
      this.e = e;
3722
    }
3723
 
3724
    public void unsetE() {
3725
      this.e = null;
3726
    }
3727
 
3728
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3729
    public boolean isSetE() {
3730
      return this.e != null;
3731
    }
3732
 
3733
    public void setEIsSet(boolean value) {
3734
      if (!value) {
3735
        this.e = null;
3736
      }
3737
    }
3738
 
3739
    public void setFieldValue(_Fields field, Object value) {
3740
      switch (field) {
3741
      case SUCCESS:
3742
        if (value == null) {
3743
          unsetSuccess();
3744
        } else {
3745
          setSuccess((List<PurchaseOrder>)value);
3746
        }
3747
        break;
3748
 
3749
      case E:
3750
        if (value == null) {
3751
          unsetE();
3752
        } else {
3753
          setE((PurchaseServiceException)value);
3754
        }
3755
        break;
3756
 
3757
      }
3758
    }
3759
 
3760
    public Object getFieldValue(_Fields field) {
3761
      switch (field) {
3762
      case SUCCESS:
3763
        return getSuccess();
3764
 
3765
      case E:
3766
        return getE();
3767
 
3768
      }
3769
      throw new IllegalStateException();
3770
    }
3771
 
3772
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3773
    public boolean isSet(_Fields field) {
3774
      if (field == null) {
3775
        throw new IllegalArgumentException();
3776
      }
3777
 
3778
      switch (field) {
3779
      case SUCCESS:
3780
        return isSetSuccess();
3781
      case E:
3782
        return isSetE();
3783
      }
3784
      throw new IllegalStateException();
3785
    }
3786
 
3787
    @Override
3788
    public boolean equals(Object that) {
3789
      if (that == null)
3790
        return false;
3791
      if (that instanceof getAllPurchaseOrders_result)
3792
        return this.equals((getAllPurchaseOrders_result)that);
3793
      return false;
3794
    }
3795
 
3796
    public boolean equals(getAllPurchaseOrders_result that) {
3797
      if (that == null)
3798
        return false;
3799
 
3800
      boolean this_present_success = true && this.isSetSuccess();
3801
      boolean that_present_success = true && that.isSetSuccess();
3802
      if (this_present_success || that_present_success) {
3803
        if (!(this_present_success && that_present_success))
3804
          return false;
3805
        if (!this.success.equals(that.success))
3806
          return false;
3807
      }
3808
 
3809
      boolean this_present_e = true && this.isSetE();
3810
      boolean that_present_e = true && that.isSetE();
3811
      if (this_present_e || that_present_e) {
3812
        if (!(this_present_e && that_present_e))
3813
          return false;
3814
        if (!this.e.equals(that.e))
3815
          return false;
3816
      }
3817
 
3818
      return true;
3819
    }
3820
 
3821
    @Override
3822
    public int hashCode() {
3823
      return 0;
3824
    }
3825
 
3826
    public int compareTo(getAllPurchaseOrders_result other) {
3827
      if (!getClass().equals(other.getClass())) {
3828
        return getClass().getName().compareTo(other.getClass().getName());
3829
      }
3830
 
3831
      int lastComparison = 0;
3832
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
3833
 
3834
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3835
      if (lastComparison != 0) {
3836
        return lastComparison;
3837
      }
3838
      if (isSetSuccess()) {
3839
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3840
        if (lastComparison != 0) {
3841
          return lastComparison;
3842
        }
3843
      }
3844
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3845
      if (lastComparison != 0) {
3846
        return lastComparison;
3847
      }
3848
      if (isSetE()) {
3849
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3850
        if (lastComparison != 0) {
3851
          return lastComparison;
3852
        }
3853
      }
3854
      return 0;
3855
    }
3856
 
3857
    public _Fields fieldForId(int fieldId) {
3858
      return _Fields.findByThriftId(fieldId);
3859
    }
3860
 
3861
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3862
      org.apache.thrift.protocol.TField field;
3863
      iprot.readStructBegin();
3864
      while (true)
3865
      {
3866
        field = iprot.readFieldBegin();
3867
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3868
          break;
3869
        }
3870
        switch (field.id) {
3871
          case 0: // SUCCESS
3872
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
3873
              {
3874
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
3875
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
3876
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
3877
                {
3878
                  PurchaseOrder _elem6; // required
3879
                  _elem6 = new PurchaseOrder();
3880
                  _elem6.read(iprot);
3881
                  this.success.add(_elem6);
3882
                }
3883
                iprot.readListEnd();
3884
              }
3885
            } else { 
3886
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3887
            }
3888
            break;
3889
          case 1: // E
3890
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3891
              this.e = new PurchaseServiceException();
3892
              this.e.read(iprot);
3893
            } else { 
3894
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3895
            }
3896
            break;
3897
          default:
3898
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3899
        }
3900
        iprot.readFieldEnd();
3901
      }
3902
      iprot.readStructEnd();
3903
      validate();
3904
    }
3905
 
3906
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3907
      oprot.writeStructBegin(STRUCT_DESC);
3908
 
3909
      if (this.isSetSuccess()) {
3910
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3911
        {
3912
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
3913
          for (PurchaseOrder _iter7 : this.success)
3914
          {
3915
            _iter7.write(oprot);
3916
          }
3917
          oprot.writeListEnd();
3918
        }
3919
        oprot.writeFieldEnd();
3920
      } else if (this.isSetE()) {
3921
        oprot.writeFieldBegin(E_FIELD_DESC);
3922
        this.e.write(oprot);
3923
        oprot.writeFieldEnd();
3924
      }
3925
      oprot.writeFieldStop();
3926
      oprot.writeStructEnd();
3927
    }
3928
 
3929
    @Override
3930
    public String toString() {
3931
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
3932
      boolean first = true;
3933
 
3934
      sb.append("success:");
3935
      if (this.success == null) {
3936
        sb.append("null");
3937
      } else {
3938
        sb.append(this.success);
3939
      }
3940
      first = false;
3941
      if (!first) sb.append(", ");
3942
      sb.append("e:");
3943
      if (this.e == null) {
3944
        sb.append("null");
3945
      } else {
3946
        sb.append(this.e);
3947
      }
3948
      first = false;
3949
      sb.append(")");
3950
      return sb.toString();
3951
    }
3952
 
3953
    public void validate() throws org.apache.thrift.TException {
3954
      // check for required fields
3955
    }
3956
 
3957
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3958
      try {
3959
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3960
      } catch (org.apache.thrift.TException te) {
3961
        throw new java.io.IOException(te);
3962
      }
3963
    }
3964
 
3965
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3966
      try {
3967
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3968
      } catch (org.apache.thrift.TException te) {
3969
        throw new java.io.IOException(te);
3970
      }
3971
    }
3972
 
3973
  }
3974
 
3975
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
3976
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
3977
 
3978
    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);
3979
 
3980
    private long id; // required
3981
 
3982
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3983
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3984
      ID((short)1, "id");
3985
 
3986
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3987
 
3988
      static {
3989
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3990
          byName.put(field.getFieldName(), field);
3991
        }
3992
      }
3993
 
3994
      /**
3995
       * Find the _Fields constant that matches fieldId, or null if its not found.
3996
       */
3997
      public static _Fields findByThriftId(int fieldId) {
3998
        switch(fieldId) {
3999
          case 1: // ID
4000
            return ID;
4001
          default:
4002
            return null;
4003
        }
4004
      }
4005
 
4006
      /**
4007
       * Find the _Fields constant that matches fieldId, throwing an exception
4008
       * if it is not found.
4009
       */
4010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4011
        _Fields fields = findByThriftId(fieldId);
4012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4013
        return fields;
4014
      }
4015
 
4016
      /**
4017
       * Find the _Fields constant that matches name, or null if its not found.
4018
       */
4019
      public static _Fields findByName(String name) {
4020
        return byName.get(name);
4021
      }
4022
 
4023
      private final short _thriftId;
4024
      private final String _fieldName;
4025
 
4026
      _Fields(short thriftId, String fieldName) {
4027
        _thriftId = thriftId;
4028
        _fieldName = fieldName;
4029
      }
4030
 
4031
      public short getThriftFieldId() {
4032
        return _thriftId;
4033
      }
4034
 
4035
      public String getFieldName() {
4036
        return _fieldName;
4037
      }
4038
    }
4039
 
4040
    // isset id assignments
4041
    private static final int __ID_ISSET_ID = 0;
4042
    private BitSet __isset_bit_vector = new BitSet(1);
4043
 
4044
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4045
    static {
4046
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4047
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4048
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4049
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4050
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
4051
    }
4052
 
4053
    public getSupplier_args() {
4054
    }
4055
 
4056
    public getSupplier_args(
4057
      long id)
4058
    {
4059
      this();
4060
      this.id = id;
4061
      setIdIsSet(true);
4062
    }
4063
 
4064
    /**
4065
     * Performs a deep copy on <i>other</i>.
4066
     */
4067
    public getSupplier_args(getSupplier_args other) {
4068
      __isset_bit_vector.clear();
4069
      __isset_bit_vector.or(other.__isset_bit_vector);
4070
      this.id = other.id;
4071
    }
4072
 
4073
    public getSupplier_args deepCopy() {
4074
      return new getSupplier_args(this);
4075
    }
4076
 
4077
    @Override
4078
    public void clear() {
4079
      setIdIsSet(false);
4080
      this.id = 0;
4081
    }
4082
 
4083
    public long getId() {
4084
      return this.id;
4085
    }
4086
 
4087
    public void setId(long id) {
4088
      this.id = id;
4089
      setIdIsSet(true);
4090
    }
4091
 
4092
    public void unsetId() {
4093
      __isset_bit_vector.clear(__ID_ISSET_ID);
4094
    }
4095
 
4096
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
4097
    public boolean isSetId() {
4098
      return __isset_bit_vector.get(__ID_ISSET_ID);
4099
    }
4100
 
4101
    public void setIdIsSet(boolean value) {
4102
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4103
    }
4104
 
4105
    public void setFieldValue(_Fields field, Object value) {
4106
      switch (field) {
4107
      case ID:
4108
        if (value == null) {
4109
          unsetId();
4110
        } else {
4111
          setId((Long)value);
4112
        }
4113
        break;
4114
 
4115
      }
4116
    }
4117
 
4118
    public Object getFieldValue(_Fields field) {
4119
      switch (field) {
4120
      case ID:
4121
        return Long.valueOf(getId());
4122
 
4123
      }
4124
      throw new IllegalStateException();
4125
    }
4126
 
4127
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4128
    public boolean isSet(_Fields field) {
4129
      if (field == null) {
4130
        throw new IllegalArgumentException();
4131
      }
4132
 
4133
      switch (field) {
4134
      case ID:
4135
        return isSetId();
4136
      }
4137
      throw new IllegalStateException();
4138
    }
4139
 
4140
    @Override
4141
    public boolean equals(Object that) {
4142
      if (that == null)
4143
        return false;
4144
      if (that instanceof getSupplier_args)
4145
        return this.equals((getSupplier_args)that);
4146
      return false;
4147
    }
4148
 
4149
    public boolean equals(getSupplier_args that) {
4150
      if (that == null)
4151
        return false;
4152
 
4153
      boolean this_present_id = true;
4154
      boolean that_present_id = true;
4155
      if (this_present_id || that_present_id) {
4156
        if (!(this_present_id && that_present_id))
4157
          return false;
4158
        if (this.id != that.id)
4159
          return false;
4160
      }
4161
 
4162
      return true;
4163
    }
4164
 
4165
    @Override
4166
    public int hashCode() {
4167
      return 0;
4168
    }
4169
 
4170
    public int compareTo(getSupplier_args other) {
4171
      if (!getClass().equals(other.getClass())) {
4172
        return getClass().getName().compareTo(other.getClass().getName());
4173
      }
4174
 
4175
      int lastComparison = 0;
4176
      getSupplier_args typedOther = (getSupplier_args)other;
4177
 
4178
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
4179
      if (lastComparison != 0) {
4180
        return lastComparison;
4181
      }
4182
      if (isSetId()) {
4183
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
4184
        if (lastComparison != 0) {
4185
          return lastComparison;
4186
        }
4187
      }
4188
      return 0;
4189
    }
4190
 
4191
    public _Fields fieldForId(int fieldId) {
4192
      return _Fields.findByThriftId(fieldId);
4193
    }
4194
 
4195
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4196
      org.apache.thrift.protocol.TField field;
4197
      iprot.readStructBegin();
4198
      while (true)
4199
      {
4200
        field = iprot.readFieldBegin();
4201
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4202
          break;
4203
        }
4204
        switch (field.id) {
4205
          case 1: // ID
4206
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4207
              this.id = iprot.readI64();
4208
              setIdIsSet(true);
4209
            } else { 
4210
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4211
            }
4212
            break;
4213
          default:
4214
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4215
        }
4216
        iprot.readFieldEnd();
4217
      }
4218
      iprot.readStructEnd();
4219
      validate();
4220
    }
4221
 
4222
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4223
      validate();
4224
 
4225
      oprot.writeStructBegin(STRUCT_DESC);
4226
      oprot.writeFieldBegin(ID_FIELD_DESC);
4227
      oprot.writeI64(this.id);
4228
      oprot.writeFieldEnd();
4229
      oprot.writeFieldStop();
4230
      oprot.writeStructEnd();
4231
    }
4232
 
4233
    @Override
4234
    public String toString() {
4235
      StringBuilder sb = new StringBuilder("getSupplier_args(");
4236
      boolean first = true;
4237
 
4238
      sb.append("id:");
4239
      sb.append(this.id);
4240
      first = false;
4241
      sb.append(")");
4242
      return sb.toString();
4243
    }
4244
 
4245
    public void validate() throws org.apache.thrift.TException {
4246
      // check for required fields
4247
    }
4248
 
4249
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4250
      try {
4251
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4252
      } catch (org.apache.thrift.TException te) {
4253
        throw new java.io.IOException(te);
4254
      }
4255
    }
4256
 
4257
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4258
      try {
4259
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4260
        __isset_bit_vector = new BitSet(1);
4261
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4262
      } catch (org.apache.thrift.TException te) {
4263
        throw new java.io.IOException(te);
4264
      }
4265
    }
4266
 
4267
  }
4268
 
4269
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
4270
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
4271
 
4272
    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);
4273
    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);
4274
 
4275
    private Supplier success; // required
4276
    private PurchaseServiceException e; // required
4277
 
4278
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4279
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4280
      SUCCESS((short)0, "success"),
4281
      E((short)1, "e");
4282
 
4283
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4284
 
4285
      static {
4286
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4287
          byName.put(field.getFieldName(), field);
4288
        }
4289
      }
4290
 
4291
      /**
4292
       * Find the _Fields constant that matches fieldId, or null if its not found.
4293
       */
4294
      public static _Fields findByThriftId(int fieldId) {
4295
        switch(fieldId) {
4296
          case 0: // SUCCESS
4297
            return SUCCESS;
4298
          case 1: // E
4299
            return E;
4300
          default:
4301
            return null;
4302
        }
4303
      }
4304
 
4305
      /**
4306
       * Find the _Fields constant that matches fieldId, throwing an exception
4307
       * if it is not found.
4308
       */
4309
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4310
        _Fields fields = findByThriftId(fieldId);
4311
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4312
        return fields;
4313
      }
4314
 
4315
      /**
4316
       * Find the _Fields constant that matches name, or null if its not found.
4317
       */
4318
      public static _Fields findByName(String name) {
4319
        return byName.get(name);
4320
      }
4321
 
4322
      private final short _thriftId;
4323
      private final String _fieldName;
4324
 
4325
      _Fields(short thriftId, String fieldName) {
4326
        _thriftId = thriftId;
4327
        _fieldName = fieldName;
4328
      }
4329
 
4330
      public short getThriftFieldId() {
4331
        return _thriftId;
4332
      }
4333
 
4334
      public String getFieldName() {
4335
        return _fieldName;
4336
      }
4337
    }
4338
 
4339
    // isset id assignments
4340
 
4341
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4342
    static {
4343
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4344
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4345
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4346
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4347
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4348
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4349
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4350
    }
4351
 
4352
    public getSupplier_result() {
4353
    }
4354
 
4355
    public getSupplier_result(
4356
      Supplier success,
4357
      PurchaseServiceException e)
4358
    {
4359
      this();
4360
      this.success = success;
4361
      this.e = e;
4362
    }
4363
 
4364
    /**
4365
     * Performs a deep copy on <i>other</i>.
4366
     */
4367
    public getSupplier_result(getSupplier_result other) {
4368
      if (other.isSetSuccess()) {
4369
        this.success = new Supplier(other.success);
4370
      }
4371
      if (other.isSetE()) {
4372
        this.e = new PurchaseServiceException(other.e);
4373
      }
4374
    }
4375
 
4376
    public getSupplier_result deepCopy() {
4377
      return new getSupplier_result(this);
4378
    }
4379
 
4380
    @Override
4381
    public void clear() {
4382
      this.success = null;
4383
      this.e = null;
4384
    }
4385
 
4386
    public Supplier getSuccess() {
4387
      return this.success;
4388
    }
4389
 
4390
    public void setSuccess(Supplier success) {
4391
      this.success = success;
4392
    }
4393
 
4394
    public void unsetSuccess() {
4395
      this.success = null;
4396
    }
4397
 
4398
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4399
    public boolean isSetSuccess() {
4400
      return this.success != null;
4401
    }
4402
 
4403
    public void setSuccessIsSet(boolean value) {
4404
      if (!value) {
4405
        this.success = null;
4406
      }
4407
    }
4408
 
4409
    public PurchaseServiceException getE() {
4410
      return this.e;
4411
    }
4412
 
4413
    public void setE(PurchaseServiceException e) {
4414
      this.e = e;
4415
    }
4416
 
4417
    public void unsetE() {
4418
      this.e = null;
4419
    }
4420
 
4421
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4422
    public boolean isSetE() {
4423
      return this.e != null;
4424
    }
4425
 
4426
    public void setEIsSet(boolean value) {
4427
      if (!value) {
4428
        this.e = null;
4429
      }
4430
    }
4431
 
4432
    public void setFieldValue(_Fields field, Object value) {
4433
      switch (field) {
4434
      case SUCCESS:
4435
        if (value == null) {
4436
          unsetSuccess();
4437
        } else {
4438
          setSuccess((Supplier)value);
4439
        }
4440
        break;
4441
 
4442
      case E:
4443
        if (value == null) {
4444
          unsetE();
4445
        } else {
4446
          setE((PurchaseServiceException)value);
4447
        }
4448
        break;
4449
 
4450
      }
4451
    }
4452
 
4453
    public Object getFieldValue(_Fields field) {
4454
      switch (field) {
4455
      case SUCCESS:
4456
        return getSuccess();
4457
 
4458
      case E:
4459
        return getE();
4460
 
4461
      }
4462
      throw new IllegalStateException();
4463
    }
4464
 
4465
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4466
    public boolean isSet(_Fields field) {
4467
      if (field == null) {
4468
        throw new IllegalArgumentException();
4469
      }
4470
 
4471
      switch (field) {
4472
      case SUCCESS:
4473
        return isSetSuccess();
4474
      case E:
4475
        return isSetE();
4476
      }
4477
      throw new IllegalStateException();
4478
    }
4479
 
4480
    @Override
4481
    public boolean equals(Object that) {
4482
      if (that == null)
4483
        return false;
4484
      if (that instanceof getSupplier_result)
4485
        return this.equals((getSupplier_result)that);
4486
      return false;
4487
    }
4488
 
4489
    public boolean equals(getSupplier_result that) {
4490
      if (that == null)
4491
        return false;
4492
 
4493
      boolean this_present_success = true && this.isSetSuccess();
4494
      boolean that_present_success = true && that.isSetSuccess();
4495
      if (this_present_success || that_present_success) {
4496
        if (!(this_present_success && that_present_success))
4497
          return false;
4498
        if (!this.success.equals(that.success))
4499
          return false;
4500
      }
4501
 
4502
      boolean this_present_e = true && this.isSetE();
4503
      boolean that_present_e = true && that.isSetE();
4504
      if (this_present_e || that_present_e) {
4505
        if (!(this_present_e && that_present_e))
4506
          return false;
4507
        if (!this.e.equals(that.e))
4508
          return false;
4509
      }
4510
 
4511
      return true;
4512
    }
4513
 
4514
    @Override
4515
    public int hashCode() {
4516
      return 0;
4517
    }
4518
 
4519
    public int compareTo(getSupplier_result other) {
4520
      if (!getClass().equals(other.getClass())) {
4521
        return getClass().getName().compareTo(other.getClass().getName());
4522
      }
4523
 
4524
      int lastComparison = 0;
4525
      getSupplier_result typedOther = (getSupplier_result)other;
4526
 
4527
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4528
      if (lastComparison != 0) {
4529
        return lastComparison;
4530
      }
4531
      if (isSetSuccess()) {
4532
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4533
        if (lastComparison != 0) {
4534
          return lastComparison;
4535
        }
4536
      }
4537
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4538
      if (lastComparison != 0) {
4539
        return lastComparison;
4540
      }
4541
      if (isSetE()) {
4542
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4543
        if (lastComparison != 0) {
4544
          return lastComparison;
4545
        }
4546
      }
4547
      return 0;
4548
    }
4549
 
4550
    public _Fields fieldForId(int fieldId) {
4551
      return _Fields.findByThriftId(fieldId);
4552
    }
4553
 
4554
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4555
      org.apache.thrift.protocol.TField field;
4556
      iprot.readStructBegin();
4557
      while (true)
4558
      {
4559
        field = iprot.readFieldBegin();
4560
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4561
          break;
4562
        }
4563
        switch (field.id) {
4564
          case 0: // SUCCESS
4565
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4566
              this.success = new Supplier();
4567
              this.success.read(iprot);
4568
            } else { 
4569
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4570
            }
4571
            break;
4572
          case 1: // E
4573
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4574
              this.e = new PurchaseServiceException();
4575
              this.e.read(iprot);
4576
            } else { 
4577
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4578
            }
4579
            break;
4580
          default:
4581
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4582
        }
4583
        iprot.readFieldEnd();
4584
      }
4585
      iprot.readStructEnd();
4586
      validate();
4587
    }
4588
 
4589
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4590
      oprot.writeStructBegin(STRUCT_DESC);
4591
 
4592
      if (this.isSetSuccess()) {
4593
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4594
        this.success.write(oprot);
4595
        oprot.writeFieldEnd();
4596
      } else if (this.isSetE()) {
4597
        oprot.writeFieldBegin(E_FIELD_DESC);
4598
        this.e.write(oprot);
4599
        oprot.writeFieldEnd();
4600
      }
4601
      oprot.writeFieldStop();
4602
      oprot.writeStructEnd();
4603
    }
4604
 
4605
    @Override
4606
    public String toString() {
4607
      StringBuilder sb = new StringBuilder("getSupplier_result(");
4608
      boolean first = true;
4609
 
4610
      sb.append("success:");
4611
      if (this.success == null) {
4612
        sb.append("null");
4613
      } else {
4614
        sb.append(this.success);
4615
      }
4616
      first = false;
4617
      if (!first) sb.append(", ");
4618
      sb.append("e:");
4619
      if (this.e == null) {
4620
        sb.append("null");
4621
      } else {
4622
        sb.append(this.e);
4623
      }
4624
      first = false;
4625
      sb.append(")");
4626
      return sb.toString();
4627
    }
4628
 
4629
    public void validate() throws org.apache.thrift.TException {
4630
      // check for required fields
4631
    }
4632
 
4633
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4634
      try {
4635
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4636
      } catch (org.apache.thrift.TException te) {
4637
        throw new java.io.IOException(te);
4638
      }
4639
    }
4640
 
4641
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4642
      try {
4643
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4644
      } catch (org.apache.thrift.TException te) {
4645
        throw new java.io.IOException(te);
4646
      }
4647
    }
4648
 
4649
  }
4650
 
4651
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
4652
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
4653
 
4654
    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);
4655
    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);
4656
    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);
4657
 
4658
    private long purchaseOrderId; // required
4659
    private String invoiceNumber; // required
4660
    private double freightCharges; // required
4661
 
4662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4663
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4664
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
4665
      INVOICE_NUMBER((short)2, "invoiceNumber"),
4666
      FREIGHT_CHARGES((short)3, "freightCharges");
4667
 
4668
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4669
 
4670
      static {
4671
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4672
          byName.put(field.getFieldName(), field);
4673
        }
4674
      }
4675
 
4676
      /**
4677
       * Find the _Fields constant that matches fieldId, or null if its not found.
4678
       */
4679
      public static _Fields findByThriftId(int fieldId) {
4680
        switch(fieldId) {
4681
          case 1: // PURCHASE_ORDER_ID
4682
            return PURCHASE_ORDER_ID;
4683
          case 2: // INVOICE_NUMBER
4684
            return INVOICE_NUMBER;
4685
          case 3: // FREIGHT_CHARGES
4686
            return FREIGHT_CHARGES;
4687
          default:
4688
            return null;
4689
        }
4690
      }
4691
 
4692
      /**
4693
       * Find the _Fields constant that matches fieldId, throwing an exception
4694
       * if it is not found.
4695
       */
4696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4697
        _Fields fields = findByThriftId(fieldId);
4698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4699
        return fields;
4700
      }
4701
 
4702
      /**
4703
       * Find the _Fields constant that matches name, or null if its not found.
4704
       */
4705
      public static _Fields findByName(String name) {
4706
        return byName.get(name);
4707
      }
4708
 
4709
      private final short _thriftId;
4710
      private final String _fieldName;
4711
 
4712
      _Fields(short thriftId, String fieldName) {
4713
        _thriftId = thriftId;
4714
        _fieldName = fieldName;
4715
      }
4716
 
4717
      public short getThriftFieldId() {
4718
        return _thriftId;
4719
      }
4720
 
4721
      public String getFieldName() {
4722
        return _fieldName;
4723
      }
4724
    }
4725
 
4726
    // isset id assignments
4727
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
4728
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
4729
    private BitSet __isset_bit_vector = new BitSet(2);
4730
 
4731
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4732
    static {
4733
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4734
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4735
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4736
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4737
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4738
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4739
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4740
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4741
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
4742
    }
4743
 
4744
    public startPurchase_args() {
4745
    }
4746
 
4747
    public startPurchase_args(
4748
      long purchaseOrderId,
4749
      String invoiceNumber,
4750
      double freightCharges)
4751
    {
4752
      this();
4753
      this.purchaseOrderId = purchaseOrderId;
4754
      setPurchaseOrderIdIsSet(true);
4755
      this.invoiceNumber = invoiceNumber;
4756
      this.freightCharges = freightCharges;
4757
      setFreightChargesIsSet(true);
4758
    }
4759
 
4760
    /**
4761
     * Performs a deep copy on <i>other</i>.
4762
     */
4763
    public startPurchase_args(startPurchase_args other) {
4764
      __isset_bit_vector.clear();
4765
      __isset_bit_vector.or(other.__isset_bit_vector);
4766
      this.purchaseOrderId = other.purchaseOrderId;
4767
      if (other.isSetInvoiceNumber()) {
4768
        this.invoiceNumber = other.invoiceNumber;
4769
      }
4770
      this.freightCharges = other.freightCharges;
4771
    }
4772
 
4773
    public startPurchase_args deepCopy() {
4774
      return new startPurchase_args(this);
4775
    }
4776
 
4777
    @Override
4778
    public void clear() {
4779
      setPurchaseOrderIdIsSet(false);
4780
      this.purchaseOrderId = 0;
4781
      this.invoiceNumber = null;
4782
      setFreightChargesIsSet(false);
4783
      this.freightCharges = 0.0;
4784
    }
4785
 
4786
    public long getPurchaseOrderId() {
4787
      return this.purchaseOrderId;
4788
    }
4789
 
4790
    public void setPurchaseOrderId(long purchaseOrderId) {
4791
      this.purchaseOrderId = purchaseOrderId;
4792
      setPurchaseOrderIdIsSet(true);
4793
    }
4794
 
4795
    public void unsetPurchaseOrderId() {
4796
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
4797
    }
4798
 
4799
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
4800
    public boolean isSetPurchaseOrderId() {
4801
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
4802
    }
4803
 
4804
    public void setPurchaseOrderIdIsSet(boolean value) {
4805
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
4806
    }
4807
 
4808
    public String getInvoiceNumber() {
4809
      return this.invoiceNumber;
4810
    }
4811
 
4812
    public void setInvoiceNumber(String invoiceNumber) {
4813
      this.invoiceNumber = invoiceNumber;
4814
    }
4815
 
4816
    public void unsetInvoiceNumber() {
4817
      this.invoiceNumber = null;
4818
    }
4819
 
4820
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
4821
    public boolean isSetInvoiceNumber() {
4822
      return this.invoiceNumber != null;
4823
    }
4824
 
4825
    public void setInvoiceNumberIsSet(boolean value) {
4826
      if (!value) {
4827
        this.invoiceNumber = null;
4828
      }
4829
    }
4830
 
4831
    public double getFreightCharges() {
4832
      return this.freightCharges;
4833
    }
4834
 
4835
    public void setFreightCharges(double freightCharges) {
4836
      this.freightCharges = freightCharges;
4837
      setFreightChargesIsSet(true);
4838
    }
4839
 
4840
    public void unsetFreightCharges() {
4841
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
4842
    }
4843
 
4844
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
4845
    public boolean isSetFreightCharges() {
4846
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
4847
    }
4848
 
4849
    public void setFreightChargesIsSet(boolean value) {
4850
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
4851
    }
4852
 
4853
    public void setFieldValue(_Fields field, Object value) {
4854
      switch (field) {
4855
      case PURCHASE_ORDER_ID:
4856
        if (value == null) {
4857
          unsetPurchaseOrderId();
4858
        } else {
4859
          setPurchaseOrderId((Long)value);
4860
        }
4861
        break;
4862
 
4863
      case INVOICE_NUMBER:
4864
        if (value == null) {
4865
          unsetInvoiceNumber();
4866
        } else {
4867
          setInvoiceNumber((String)value);
4868
        }
4869
        break;
4870
 
4871
      case FREIGHT_CHARGES:
4872
        if (value == null) {
4873
          unsetFreightCharges();
4874
        } else {
4875
          setFreightCharges((Double)value);
4876
        }
4877
        break;
4878
 
4879
      }
4880
    }
4881
 
4882
    public Object getFieldValue(_Fields field) {
4883
      switch (field) {
4884
      case PURCHASE_ORDER_ID:
4885
        return Long.valueOf(getPurchaseOrderId());
4886
 
4887
      case INVOICE_NUMBER:
4888
        return getInvoiceNumber();
4889
 
4890
      case FREIGHT_CHARGES:
4891
        return Double.valueOf(getFreightCharges());
4892
 
4893
      }
4894
      throw new IllegalStateException();
4895
    }
4896
 
4897
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4898
    public boolean isSet(_Fields field) {
4899
      if (field == null) {
4900
        throw new IllegalArgumentException();
4901
      }
4902
 
4903
      switch (field) {
4904
      case PURCHASE_ORDER_ID:
4905
        return isSetPurchaseOrderId();
4906
      case INVOICE_NUMBER:
4907
        return isSetInvoiceNumber();
4908
      case FREIGHT_CHARGES:
4909
        return isSetFreightCharges();
4910
      }
4911
      throw new IllegalStateException();
4912
    }
4913
 
4914
    @Override
4915
    public boolean equals(Object that) {
4916
      if (that == null)
4917
        return false;
4918
      if (that instanceof startPurchase_args)
4919
        return this.equals((startPurchase_args)that);
4920
      return false;
4921
    }
4922
 
4923
    public boolean equals(startPurchase_args that) {
4924
      if (that == null)
4925
        return false;
4926
 
4927
      boolean this_present_purchaseOrderId = true;
4928
      boolean that_present_purchaseOrderId = true;
4929
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
4930
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
4931
          return false;
4932
        if (this.purchaseOrderId != that.purchaseOrderId)
4933
          return false;
4934
      }
4935
 
4936
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
4937
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
4938
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
4939
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
4940
          return false;
4941
        if (!this.invoiceNumber.equals(that.invoiceNumber))
4942
          return false;
4943
      }
4944
 
4945
      boolean this_present_freightCharges = true;
4946
      boolean that_present_freightCharges = true;
4947
      if (this_present_freightCharges || that_present_freightCharges) {
4948
        if (!(this_present_freightCharges && that_present_freightCharges))
4949
          return false;
4950
        if (this.freightCharges != that.freightCharges)
4951
          return false;
4952
      }
4953
 
4954
      return true;
4955
    }
4956
 
4957
    @Override
4958
    public int hashCode() {
4959
      return 0;
4960
    }
4961
 
4962
    public int compareTo(startPurchase_args other) {
4963
      if (!getClass().equals(other.getClass())) {
4964
        return getClass().getName().compareTo(other.getClass().getName());
4965
      }
4966
 
4967
      int lastComparison = 0;
4968
      startPurchase_args typedOther = (startPurchase_args)other;
4969
 
4970
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
4971
      if (lastComparison != 0) {
4972
        return lastComparison;
4973
      }
4974
      if (isSetPurchaseOrderId()) {
4975
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
4976
        if (lastComparison != 0) {
4977
          return lastComparison;
4978
        }
4979
      }
4980
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
4981
      if (lastComparison != 0) {
4982
        return lastComparison;
4983
      }
4984
      if (isSetInvoiceNumber()) {
4985
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
4986
        if (lastComparison != 0) {
4987
          return lastComparison;
4988
        }
4989
      }
4990
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
4991
      if (lastComparison != 0) {
4992
        return lastComparison;
4993
      }
4994
      if (isSetFreightCharges()) {
4995
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
4996
        if (lastComparison != 0) {
4997
          return lastComparison;
4998
        }
4999
      }
5000
      return 0;
5001
    }
5002
 
5003
    public _Fields fieldForId(int fieldId) {
5004
      return _Fields.findByThriftId(fieldId);
5005
    }
5006
 
5007
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5008
      org.apache.thrift.protocol.TField field;
5009
      iprot.readStructBegin();
5010
      while (true)
5011
      {
5012
        field = iprot.readFieldBegin();
5013
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5014
          break;
5015
        }
5016
        switch (field.id) {
5017
          case 1: // PURCHASE_ORDER_ID
5018
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5019
              this.purchaseOrderId = iprot.readI64();
5020
              setPurchaseOrderIdIsSet(true);
5021
            } else { 
5022
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5023
            }
5024
            break;
5025
          case 2: // INVOICE_NUMBER
5026
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5027
              this.invoiceNumber = iprot.readString();
5028
            } else { 
5029
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5030
            }
5031
            break;
5032
          case 3: // FREIGHT_CHARGES
5033
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5034
              this.freightCharges = iprot.readDouble();
5035
              setFreightChargesIsSet(true);
5036
            } else { 
5037
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5038
            }
5039
            break;
5040
          default:
5041
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5042
        }
5043
        iprot.readFieldEnd();
5044
      }
5045
      iprot.readStructEnd();
5046
      validate();
5047
    }
5048
 
5049
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5050
      validate();
5051
 
5052
      oprot.writeStructBegin(STRUCT_DESC);
5053
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5054
      oprot.writeI64(this.purchaseOrderId);
5055
      oprot.writeFieldEnd();
5056
      if (this.invoiceNumber != null) {
5057
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
5058
        oprot.writeString(this.invoiceNumber);
5059
        oprot.writeFieldEnd();
5060
      }
5061
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5062
      oprot.writeDouble(this.freightCharges);
5063
      oprot.writeFieldEnd();
5064
      oprot.writeFieldStop();
5065
      oprot.writeStructEnd();
5066
    }
5067
 
5068
    @Override
5069
    public String toString() {
5070
      StringBuilder sb = new StringBuilder("startPurchase_args(");
5071
      boolean first = true;
5072
 
5073
      sb.append("purchaseOrderId:");
5074
      sb.append(this.purchaseOrderId);
5075
      first = false;
5076
      if (!first) sb.append(", ");
5077
      sb.append("invoiceNumber:");
5078
      if (this.invoiceNumber == null) {
5079
        sb.append("null");
5080
      } else {
5081
        sb.append(this.invoiceNumber);
5082
      }
5083
      first = false;
5084
      if (!first) sb.append(", ");
5085
      sb.append("freightCharges:");
5086
      sb.append(this.freightCharges);
5087
      first = false;
5088
      sb.append(")");
5089
      return sb.toString();
5090
    }
5091
 
5092
    public void validate() throws org.apache.thrift.TException {
5093
      // check for required fields
5094
    }
5095
 
5096
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5097
      try {
5098
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5099
      } catch (org.apache.thrift.TException te) {
5100
        throw new java.io.IOException(te);
5101
      }
5102
    }
5103
 
5104
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5105
      try {
5106
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5107
      } catch (org.apache.thrift.TException te) {
5108
        throw new java.io.IOException(te);
5109
      }
5110
    }
5111
 
5112
  }
5113
 
5114
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
5115
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
5116
 
5117
    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);
5118
    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);
5119
 
5120
    private long success; // required
5121
    private PurchaseServiceException e; // required
5122
 
5123
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5124
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5125
      SUCCESS((short)0, "success"),
5126
      E((short)1, "e");
5127
 
5128
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5129
 
5130
      static {
5131
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5132
          byName.put(field.getFieldName(), field);
5133
        }
5134
      }
5135
 
5136
      /**
5137
       * Find the _Fields constant that matches fieldId, or null if its not found.
5138
       */
5139
      public static _Fields findByThriftId(int fieldId) {
5140
        switch(fieldId) {
5141
          case 0: // SUCCESS
5142
            return SUCCESS;
5143
          case 1: // E
5144
            return E;
5145
          default:
5146
            return null;
5147
        }
5148
      }
5149
 
5150
      /**
5151
       * Find the _Fields constant that matches fieldId, throwing an exception
5152
       * if it is not found.
5153
       */
5154
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5155
        _Fields fields = findByThriftId(fieldId);
5156
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5157
        return fields;
5158
      }
5159
 
5160
      /**
5161
       * Find the _Fields constant that matches name, or null if its not found.
5162
       */
5163
      public static _Fields findByName(String name) {
5164
        return byName.get(name);
5165
      }
5166
 
5167
      private final short _thriftId;
5168
      private final String _fieldName;
5169
 
5170
      _Fields(short thriftId, String fieldName) {
5171
        _thriftId = thriftId;
5172
        _fieldName = fieldName;
5173
      }
5174
 
5175
      public short getThriftFieldId() {
5176
        return _thriftId;
5177
      }
5178
 
5179
      public String getFieldName() {
5180
        return _fieldName;
5181
      }
5182
    }
5183
 
5184
    // isset id assignments
5185
    private static final int __SUCCESS_ISSET_ID = 0;
5186
    private BitSet __isset_bit_vector = new BitSet(1);
5187
 
5188
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5189
    static {
5190
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5191
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5192
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5193
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5194
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5195
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5196
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
5197
    }
5198
 
5199
    public startPurchase_result() {
5200
    }
5201
 
5202
    public startPurchase_result(
5203
      long success,
5204
      PurchaseServiceException e)
5205
    {
5206
      this();
5207
      this.success = success;
5208
      setSuccessIsSet(true);
5209
      this.e = e;
5210
    }
5211
 
5212
    /**
5213
     * Performs a deep copy on <i>other</i>.
5214
     */
5215
    public startPurchase_result(startPurchase_result other) {
5216
      __isset_bit_vector.clear();
5217
      __isset_bit_vector.or(other.__isset_bit_vector);
5218
      this.success = other.success;
5219
      if (other.isSetE()) {
5220
        this.e = new PurchaseServiceException(other.e);
5221
      }
5222
    }
5223
 
5224
    public startPurchase_result deepCopy() {
5225
      return new startPurchase_result(this);
5226
    }
5227
 
5228
    @Override
5229
    public void clear() {
5230
      setSuccessIsSet(false);
5231
      this.success = 0;
5232
      this.e = null;
5233
    }
5234
 
5235
    public long getSuccess() {
5236
      return this.success;
5237
    }
5238
 
5239
    public void setSuccess(long success) {
5240
      this.success = success;
5241
      setSuccessIsSet(true);
5242
    }
5243
 
5244
    public void unsetSuccess() {
5245
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5246
    }
5247
 
5248
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5249
    public boolean isSetSuccess() {
5250
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5251
    }
5252
 
5253
    public void setSuccessIsSet(boolean value) {
5254
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5255
    }
5256
 
5257
    public PurchaseServiceException getE() {
5258
      return this.e;
5259
    }
5260
 
5261
    public void setE(PurchaseServiceException e) {
5262
      this.e = e;
5263
    }
5264
 
5265
    public void unsetE() {
5266
      this.e = null;
5267
    }
5268
 
5269
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5270
    public boolean isSetE() {
5271
      return this.e != null;
5272
    }
5273
 
5274
    public void setEIsSet(boolean value) {
5275
      if (!value) {
5276
        this.e = null;
5277
      }
5278
    }
5279
 
5280
    public void setFieldValue(_Fields field, Object value) {
5281
      switch (field) {
5282
      case SUCCESS:
5283
        if (value == null) {
5284
          unsetSuccess();
5285
        } else {
5286
          setSuccess((Long)value);
5287
        }
5288
        break;
5289
 
5290
      case E:
5291
        if (value == null) {
5292
          unsetE();
5293
        } else {
5294
          setE((PurchaseServiceException)value);
5295
        }
5296
        break;
5297
 
5298
      }
5299
    }
5300
 
5301
    public Object getFieldValue(_Fields field) {
5302
      switch (field) {
5303
      case SUCCESS:
5304
        return Long.valueOf(getSuccess());
5305
 
5306
      case E:
5307
        return getE();
5308
 
5309
      }
5310
      throw new IllegalStateException();
5311
    }
5312
 
5313
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5314
    public boolean isSet(_Fields field) {
5315
      if (field == null) {
5316
        throw new IllegalArgumentException();
5317
      }
5318
 
5319
      switch (field) {
5320
      case SUCCESS:
5321
        return isSetSuccess();
5322
      case E:
5323
        return isSetE();
5324
      }
5325
      throw new IllegalStateException();
5326
    }
5327
 
5328
    @Override
5329
    public boolean equals(Object that) {
5330
      if (that == null)
5331
        return false;
5332
      if (that instanceof startPurchase_result)
5333
        return this.equals((startPurchase_result)that);
5334
      return false;
5335
    }
5336
 
5337
    public boolean equals(startPurchase_result that) {
5338
      if (that == null)
5339
        return false;
5340
 
5341
      boolean this_present_success = true;
5342
      boolean that_present_success = true;
5343
      if (this_present_success || that_present_success) {
5344
        if (!(this_present_success && that_present_success))
5345
          return false;
5346
        if (this.success != that.success)
5347
          return false;
5348
      }
5349
 
5350
      boolean this_present_e = true && this.isSetE();
5351
      boolean that_present_e = true && that.isSetE();
5352
      if (this_present_e || that_present_e) {
5353
        if (!(this_present_e && that_present_e))
5354
          return false;
5355
        if (!this.e.equals(that.e))
5356
          return false;
5357
      }
5358
 
5359
      return true;
5360
    }
5361
 
5362
    @Override
5363
    public int hashCode() {
5364
      return 0;
5365
    }
5366
 
5367
    public int compareTo(startPurchase_result other) {
5368
      if (!getClass().equals(other.getClass())) {
5369
        return getClass().getName().compareTo(other.getClass().getName());
5370
      }
5371
 
5372
      int lastComparison = 0;
5373
      startPurchase_result typedOther = (startPurchase_result)other;
5374
 
5375
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5376
      if (lastComparison != 0) {
5377
        return lastComparison;
5378
      }
5379
      if (isSetSuccess()) {
5380
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5381
        if (lastComparison != 0) {
5382
          return lastComparison;
5383
        }
5384
      }
5385
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5386
      if (lastComparison != 0) {
5387
        return lastComparison;
5388
      }
5389
      if (isSetE()) {
5390
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5391
        if (lastComparison != 0) {
5392
          return lastComparison;
5393
        }
5394
      }
5395
      return 0;
5396
    }
5397
 
5398
    public _Fields fieldForId(int fieldId) {
5399
      return _Fields.findByThriftId(fieldId);
5400
    }
5401
 
5402
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5403
      org.apache.thrift.protocol.TField field;
5404
      iprot.readStructBegin();
5405
      while (true)
5406
      {
5407
        field = iprot.readFieldBegin();
5408
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5409
          break;
5410
        }
5411
        switch (field.id) {
5412
          case 0: // SUCCESS
5413
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5414
              this.success = iprot.readI64();
5415
              setSuccessIsSet(true);
5416
            } else { 
5417
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5418
            }
5419
            break;
5420
          case 1: // E
5421
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5422
              this.e = new PurchaseServiceException();
5423
              this.e.read(iprot);
5424
            } else { 
5425
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5426
            }
5427
            break;
5428
          default:
5429
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5430
        }
5431
        iprot.readFieldEnd();
5432
      }
5433
      iprot.readStructEnd();
5434
      validate();
5435
    }
5436
 
5437
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5438
      oprot.writeStructBegin(STRUCT_DESC);
5439
 
5440
      if (this.isSetSuccess()) {
5441
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5442
        oprot.writeI64(this.success);
5443
        oprot.writeFieldEnd();
5444
      } else if (this.isSetE()) {
5445
        oprot.writeFieldBegin(E_FIELD_DESC);
5446
        this.e.write(oprot);
5447
        oprot.writeFieldEnd();
5448
      }
5449
      oprot.writeFieldStop();
5450
      oprot.writeStructEnd();
5451
    }
5452
 
5453
    @Override
5454
    public String toString() {
5455
      StringBuilder sb = new StringBuilder("startPurchase_result(");
5456
      boolean first = true;
5457
 
5458
      sb.append("success:");
5459
      sb.append(this.success);
5460
      first = false;
5461
      if (!first) sb.append(", ");
5462
      sb.append("e:");
5463
      if (this.e == null) {
5464
        sb.append("null");
5465
      } else {
5466
        sb.append(this.e);
5467
      }
5468
      first = false;
5469
      sb.append(")");
5470
      return sb.toString();
5471
    }
5472
 
5473
    public void validate() throws org.apache.thrift.TException {
5474
      // check for required fields
5475
    }
5476
 
5477
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5478
      try {
5479
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5480
      } catch (org.apache.thrift.TException te) {
5481
        throw new java.io.IOException(te);
5482
      }
5483
    }
5484
 
5485
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5486
      try {
5487
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5488
      } catch (org.apache.thrift.TException te) {
5489
        throw new java.io.IOException(te);
5490
      }
5491
    }
5492
 
5493
  }
5494
 
5495
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
5496
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
5497
 
5498
    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);
5499
 
5500
    private long purchaseId; // required
5501
 
5502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5503
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5504
      PURCHASE_ID((short)1, "purchaseId");
5505
 
5506
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5507
 
5508
      static {
5509
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5510
          byName.put(field.getFieldName(), field);
5511
        }
5512
      }
5513
 
5514
      /**
5515
       * Find the _Fields constant that matches fieldId, or null if its not found.
5516
       */
5517
      public static _Fields findByThriftId(int fieldId) {
5518
        switch(fieldId) {
5519
          case 1: // PURCHASE_ID
5520
            return PURCHASE_ID;
5521
          default:
5522
            return null;
5523
        }
5524
      }
5525
 
5526
      /**
5527
       * Find the _Fields constant that matches fieldId, throwing an exception
5528
       * if it is not found.
5529
       */
5530
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5531
        _Fields fields = findByThriftId(fieldId);
5532
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5533
        return fields;
5534
      }
5535
 
5536
      /**
5537
       * Find the _Fields constant that matches name, or null if its not found.
5538
       */
5539
      public static _Fields findByName(String name) {
5540
        return byName.get(name);
5541
      }
5542
 
5543
      private final short _thriftId;
5544
      private final String _fieldName;
5545
 
5546
      _Fields(short thriftId, String fieldName) {
5547
        _thriftId = thriftId;
5548
        _fieldName = fieldName;
5549
      }
5550
 
5551
      public short getThriftFieldId() {
5552
        return _thriftId;
5553
      }
5554
 
5555
      public String getFieldName() {
5556
        return _fieldName;
5557
      }
5558
    }
5559
 
5560
    // isset id assignments
5561
    private static final int __PURCHASEID_ISSET_ID = 0;
5562
    private BitSet __isset_bit_vector = new BitSet(1);
5563
 
5564
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5565
    static {
5566
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5567
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5568
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5569
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5570
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
5571
    }
5572
 
5573
    public closePurchase_args() {
5574
    }
5575
 
5576
    public closePurchase_args(
5577
      long purchaseId)
5578
    {
5579
      this();
5580
      this.purchaseId = purchaseId;
5581
      setPurchaseIdIsSet(true);
5582
    }
5583
 
5584
    /**
5585
     * Performs a deep copy on <i>other</i>.
5586
     */
5587
    public closePurchase_args(closePurchase_args other) {
5588
      __isset_bit_vector.clear();
5589
      __isset_bit_vector.or(other.__isset_bit_vector);
5590
      this.purchaseId = other.purchaseId;
5591
    }
5592
 
5593
    public closePurchase_args deepCopy() {
5594
      return new closePurchase_args(this);
5595
    }
5596
 
5597
    @Override
5598
    public void clear() {
5599
      setPurchaseIdIsSet(false);
5600
      this.purchaseId = 0;
5601
    }
5602
 
5603
    public long getPurchaseId() {
5604
      return this.purchaseId;
5605
    }
5606
 
5607
    public void setPurchaseId(long purchaseId) {
5608
      this.purchaseId = purchaseId;
5609
      setPurchaseIdIsSet(true);
5610
    }
5611
 
5612
    public void unsetPurchaseId() {
5613
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
5614
    }
5615
 
5616
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
5617
    public boolean isSetPurchaseId() {
5618
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
5619
    }
5620
 
5621
    public void setPurchaseIdIsSet(boolean value) {
5622
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
5623
    }
5624
 
5625
    public void setFieldValue(_Fields field, Object value) {
5626
      switch (field) {
5627
      case PURCHASE_ID:
5628
        if (value == null) {
5629
          unsetPurchaseId();
5630
        } else {
5631
          setPurchaseId((Long)value);
5632
        }
5633
        break;
5634
 
5635
      }
5636
    }
5637
 
5638
    public Object getFieldValue(_Fields field) {
5639
      switch (field) {
5640
      case PURCHASE_ID:
5641
        return Long.valueOf(getPurchaseId());
5642
 
5643
      }
5644
      throw new IllegalStateException();
5645
    }
5646
 
5647
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5648
    public boolean isSet(_Fields field) {
5649
      if (field == null) {
5650
        throw new IllegalArgumentException();
5651
      }
5652
 
5653
      switch (field) {
5654
      case PURCHASE_ID:
5655
        return isSetPurchaseId();
5656
      }
5657
      throw new IllegalStateException();
5658
    }
5659
 
5660
    @Override
5661
    public boolean equals(Object that) {
5662
      if (that == null)
5663
        return false;
5664
      if (that instanceof closePurchase_args)
5665
        return this.equals((closePurchase_args)that);
5666
      return false;
5667
    }
5668
 
5669
    public boolean equals(closePurchase_args that) {
5670
      if (that == null)
5671
        return false;
5672
 
5673
      boolean this_present_purchaseId = true;
5674
      boolean that_present_purchaseId = true;
5675
      if (this_present_purchaseId || that_present_purchaseId) {
5676
        if (!(this_present_purchaseId && that_present_purchaseId))
5677
          return false;
5678
        if (this.purchaseId != that.purchaseId)
5679
          return false;
5680
      }
5681
 
5682
      return true;
5683
    }
5684
 
5685
    @Override
5686
    public int hashCode() {
5687
      return 0;
5688
    }
5689
 
5690
    public int compareTo(closePurchase_args other) {
5691
      if (!getClass().equals(other.getClass())) {
5692
        return getClass().getName().compareTo(other.getClass().getName());
5693
      }
5694
 
5695
      int lastComparison = 0;
5696
      closePurchase_args typedOther = (closePurchase_args)other;
5697
 
5698
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
5699
      if (lastComparison != 0) {
5700
        return lastComparison;
5701
      }
5702
      if (isSetPurchaseId()) {
5703
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
5704
        if (lastComparison != 0) {
5705
          return lastComparison;
5706
        }
5707
      }
5708
      return 0;
5709
    }
5710
 
5711
    public _Fields fieldForId(int fieldId) {
5712
      return _Fields.findByThriftId(fieldId);
5713
    }
5714
 
5715
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5716
      org.apache.thrift.protocol.TField field;
5717
      iprot.readStructBegin();
5718
      while (true)
5719
      {
5720
        field = iprot.readFieldBegin();
5721
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5722
          break;
5723
        }
5724
        switch (field.id) {
5725
          case 1: // PURCHASE_ID
5726
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5727
              this.purchaseId = iprot.readI64();
5728
              setPurchaseIdIsSet(true);
5729
            } else { 
5730
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5731
            }
5732
            break;
5733
          default:
5734
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5735
        }
5736
        iprot.readFieldEnd();
5737
      }
5738
      iprot.readStructEnd();
5739
      validate();
5740
    }
5741
 
5742
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5743
      validate();
5744
 
5745
      oprot.writeStructBegin(STRUCT_DESC);
5746
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
5747
      oprot.writeI64(this.purchaseId);
5748
      oprot.writeFieldEnd();
5749
      oprot.writeFieldStop();
5750
      oprot.writeStructEnd();
5751
    }
5752
 
5753
    @Override
5754
    public String toString() {
5755
      StringBuilder sb = new StringBuilder("closePurchase_args(");
5756
      boolean first = true;
5757
 
5758
      sb.append("purchaseId:");
5759
      sb.append(this.purchaseId);
5760
      first = false;
5761
      sb.append(")");
5762
      return sb.toString();
5763
    }
5764
 
5765
    public void validate() throws org.apache.thrift.TException {
5766
      // check for required fields
5767
    }
5768
 
5769
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5770
      try {
5771
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5772
      } catch (org.apache.thrift.TException te) {
5773
        throw new java.io.IOException(te);
5774
      }
5775
    }
5776
 
5777
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5778
      try {
5779
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5780
      } catch (org.apache.thrift.TException te) {
5781
        throw new java.io.IOException(te);
5782
      }
5783
    }
5784
 
5785
  }
5786
 
5787
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
5788
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
5789
 
5790
    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);
5791
    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);
5792
 
5793
    private long success; // required
5794
    private PurchaseServiceException e; // required
5795
 
5796
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5797
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5798
      SUCCESS((short)0, "success"),
5799
      E((short)1, "e");
5800
 
5801
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5802
 
5803
      static {
5804
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5805
          byName.put(field.getFieldName(), field);
5806
        }
5807
      }
5808
 
5809
      /**
5810
       * Find the _Fields constant that matches fieldId, or null if its not found.
5811
       */
5812
      public static _Fields findByThriftId(int fieldId) {
5813
        switch(fieldId) {
5814
          case 0: // SUCCESS
5815
            return SUCCESS;
5816
          case 1: // E
5817
            return E;
5818
          default:
5819
            return null;
5820
        }
5821
      }
5822
 
5823
      /**
5824
       * Find the _Fields constant that matches fieldId, throwing an exception
5825
       * if it is not found.
5826
       */
5827
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5828
        _Fields fields = findByThriftId(fieldId);
5829
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5830
        return fields;
5831
      }
5832
 
5833
      /**
5834
       * Find the _Fields constant that matches name, or null if its not found.
5835
       */
5836
      public static _Fields findByName(String name) {
5837
        return byName.get(name);
5838
      }
5839
 
5840
      private final short _thriftId;
5841
      private final String _fieldName;
5842
 
5843
      _Fields(short thriftId, String fieldName) {
5844
        _thriftId = thriftId;
5845
        _fieldName = fieldName;
5846
      }
5847
 
5848
      public short getThriftFieldId() {
5849
        return _thriftId;
5850
      }
5851
 
5852
      public String getFieldName() {
5853
        return _fieldName;
5854
      }
5855
    }
5856
 
5857
    // isset id assignments
5858
    private static final int __SUCCESS_ISSET_ID = 0;
5859
    private BitSet __isset_bit_vector = new BitSet(1);
5860
 
5861
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5862
    static {
5863
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5864
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5865
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5866
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5867
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5868
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5869
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
5870
    }
5871
 
5872
    public closePurchase_result() {
5873
    }
5874
 
5875
    public closePurchase_result(
5876
      long success,
5877
      PurchaseServiceException e)
5878
    {
5879
      this();
5880
      this.success = success;
5881
      setSuccessIsSet(true);
5882
      this.e = e;
5883
    }
5884
 
5885
    /**
5886
     * Performs a deep copy on <i>other</i>.
5887
     */
5888
    public closePurchase_result(closePurchase_result other) {
5889
      __isset_bit_vector.clear();
5890
      __isset_bit_vector.or(other.__isset_bit_vector);
5891
      this.success = other.success;
5892
      if (other.isSetE()) {
5893
        this.e = new PurchaseServiceException(other.e);
5894
      }
5895
    }
5896
 
5897
    public closePurchase_result deepCopy() {
5898
      return new closePurchase_result(this);
5899
    }
5900
 
5901
    @Override
5902
    public void clear() {
5903
      setSuccessIsSet(false);
5904
      this.success = 0;
5905
      this.e = null;
5906
    }
5907
 
5908
    public long getSuccess() {
5909
      return this.success;
5910
    }
5911
 
5912
    public void setSuccess(long success) {
5913
      this.success = success;
5914
      setSuccessIsSet(true);
5915
    }
5916
 
5917
    public void unsetSuccess() {
5918
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5919
    }
5920
 
5921
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5922
    public boolean isSetSuccess() {
5923
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5924
    }
5925
 
5926
    public void setSuccessIsSet(boolean value) {
5927
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5928
    }
5929
 
5930
    public PurchaseServiceException getE() {
5931
      return this.e;
5932
    }
5933
 
5934
    public void setE(PurchaseServiceException e) {
5935
      this.e = e;
5936
    }
5937
 
5938
    public void unsetE() {
5939
      this.e = null;
5940
    }
5941
 
5942
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5943
    public boolean isSetE() {
5944
      return this.e != null;
5945
    }
5946
 
5947
    public void setEIsSet(boolean value) {
5948
      if (!value) {
5949
        this.e = null;
5950
      }
5951
    }
5952
 
5953
    public void setFieldValue(_Fields field, Object value) {
5954
      switch (field) {
5955
      case SUCCESS:
5956
        if (value == null) {
5957
          unsetSuccess();
5958
        } else {
5959
          setSuccess((Long)value);
5960
        }
5961
        break;
5962
 
5963
      case E:
5964
        if (value == null) {
5965
          unsetE();
5966
        } else {
5967
          setE((PurchaseServiceException)value);
5968
        }
5969
        break;
5970
 
5971
      }
5972
    }
5973
 
5974
    public Object getFieldValue(_Fields field) {
5975
      switch (field) {
5976
      case SUCCESS:
5977
        return Long.valueOf(getSuccess());
5978
 
5979
      case E:
5980
        return getE();
5981
 
5982
      }
5983
      throw new IllegalStateException();
5984
    }
5985
 
5986
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5987
    public boolean isSet(_Fields field) {
5988
      if (field == null) {
5989
        throw new IllegalArgumentException();
5990
      }
5991
 
5992
      switch (field) {
5993
      case SUCCESS:
5994
        return isSetSuccess();
5995
      case E:
5996
        return isSetE();
5997
      }
5998
      throw new IllegalStateException();
5999
    }
6000
 
6001
    @Override
6002
    public boolean equals(Object that) {
6003
      if (that == null)
6004
        return false;
6005
      if (that instanceof closePurchase_result)
6006
        return this.equals((closePurchase_result)that);
6007
      return false;
6008
    }
6009
 
6010
    public boolean equals(closePurchase_result that) {
6011
      if (that == null)
6012
        return false;
6013
 
6014
      boolean this_present_success = true;
6015
      boolean that_present_success = true;
6016
      if (this_present_success || that_present_success) {
6017
        if (!(this_present_success && that_present_success))
6018
          return false;
6019
        if (this.success != that.success)
6020
          return false;
6021
      }
6022
 
6023
      boolean this_present_e = true && this.isSetE();
6024
      boolean that_present_e = true && that.isSetE();
6025
      if (this_present_e || that_present_e) {
6026
        if (!(this_present_e && that_present_e))
6027
          return false;
6028
        if (!this.e.equals(that.e))
6029
          return false;
6030
      }
6031
 
6032
      return true;
6033
    }
6034
 
6035
    @Override
6036
    public int hashCode() {
6037
      return 0;
6038
    }
6039
 
6040
    public int compareTo(closePurchase_result other) {
6041
      if (!getClass().equals(other.getClass())) {
6042
        return getClass().getName().compareTo(other.getClass().getName());
6043
      }
6044
 
6045
      int lastComparison = 0;
6046
      closePurchase_result typedOther = (closePurchase_result)other;
6047
 
6048
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6049
      if (lastComparison != 0) {
6050
        return lastComparison;
6051
      }
6052
      if (isSetSuccess()) {
6053
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6054
        if (lastComparison != 0) {
6055
          return lastComparison;
6056
        }
6057
      }
6058
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6059
      if (lastComparison != 0) {
6060
        return lastComparison;
6061
      }
6062
      if (isSetE()) {
6063
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6064
        if (lastComparison != 0) {
6065
          return lastComparison;
6066
        }
6067
      }
6068
      return 0;
6069
    }
6070
 
6071
    public _Fields fieldForId(int fieldId) {
6072
      return _Fields.findByThriftId(fieldId);
6073
    }
6074
 
6075
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6076
      org.apache.thrift.protocol.TField field;
6077
      iprot.readStructBegin();
6078
      while (true)
6079
      {
6080
        field = iprot.readFieldBegin();
6081
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6082
          break;
6083
        }
6084
        switch (field.id) {
6085
          case 0: // SUCCESS
6086
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6087
              this.success = iprot.readI64();
6088
              setSuccessIsSet(true);
6089
            } else { 
6090
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6091
            }
6092
            break;
6093
          case 1: // E
6094
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6095
              this.e = new PurchaseServiceException();
6096
              this.e.read(iprot);
6097
            } else { 
6098
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6099
            }
6100
            break;
6101
          default:
6102
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6103
        }
6104
        iprot.readFieldEnd();
6105
      }
6106
      iprot.readStructEnd();
6107
      validate();
6108
    }
6109
 
6110
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6111
      oprot.writeStructBegin(STRUCT_DESC);
6112
 
6113
      if (this.isSetSuccess()) {
6114
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6115
        oprot.writeI64(this.success);
6116
        oprot.writeFieldEnd();
6117
      } else if (this.isSetE()) {
6118
        oprot.writeFieldBegin(E_FIELD_DESC);
6119
        this.e.write(oprot);
6120
        oprot.writeFieldEnd();
6121
      }
6122
      oprot.writeFieldStop();
6123
      oprot.writeStructEnd();
6124
    }
6125
 
6126
    @Override
6127
    public String toString() {
6128
      StringBuilder sb = new StringBuilder("closePurchase_result(");
6129
      boolean first = true;
6130
 
6131
      sb.append("success:");
6132
      sb.append(this.success);
6133
      first = false;
6134
      if (!first) sb.append(", ");
6135
      sb.append("e:");
6136
      if (this.e == null) {
6137
        sb.append("null");
6138
      } else {
6139
        sb.append(this.e);
6140
      }
6141
      first = false;
6142
      sb.append(")");
6143
      return sb.toString();
6144
    }
6145
 
6146
    public void validate() throws org.apache.thrift.TException {
6147
      // check for required fields
6148
    }
6149
 
6150
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6151
      try {
6152
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6153
      } catch (org.apache.thrift.TException te) {
6154
        throw new java.io.IOException(te);
6155
      }
6156
    }
6157
 
6158
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6159
      try {
6160
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6161
      } catch (org.apache.thrift.TException te) {
6162
        throw new java.io.IOException(te);
6163
      }
6164
    }
6165
 
6166
  }
6167
 
6168
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
6169
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
6170
 
6171
    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);
6172
    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);
6173
 
6174
    private long purchaseOrderId; // required
6175
    private boolean open; // required
6176
 
6177
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6178
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6179
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
6180
      OPEN((short)2, "open");
6181
 
6182
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6183
 
6184
      static {
6185
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6186
          byName.put(field.getFieldName(), field);
6187
        }
6188
      }
6189
 
6190
      /**
6191
       * Find the _Fields constant that matches fieldId, or null if its not found.
6192
       */
6193
      public static _Fields findByThriftId(int fieldId) {
6194
        switch(fieldId) {
6195
          case 1: // PURCHASE_ORDER_ID
6196
            return PURCHASE_ORDER_ID;
6197
          case 2: // OPEN
6198
            return OPEN;
6199
          default:
6200
            return null;
6201
        }
6202
      }
6203
 
6204
      /**
6205
       * Find the _Fields constant that matches fieldId, throwing an exception
6206
       * if it is not found.
6207
       */
6208
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6209
        _Fields fields = findByThriftId(fieldId);
6210
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6211
        return fields;
6212
      }
6213
 
6214
      /**
6215
       * Find the _Fields constant that matches name, or null if its not found.
6216
       */
6217
      public static _Fields findByName(String name) {
6218
        return byName.get(name);
6219
      }
6220
 
6221
      private final short _thriftId;
6222
      private final String _fieldName;
6223
 
6224
      _Fields(short thriftId, String fieldName) {
6225
        _thriftId = thriftId;
6226
        _fieldName = fieldName;
6227
      }
6228
 
6229
      public short getThriftFieldId() {
6230
        return _thriftId;
6231
      }
6232
 
6233
      public String getFieldName() {
6234
        return _fieldName;
6235
      }
6236
    }
6237
 
6238
    // isset id assignments
6239
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
6240
    private static final int __OPEN_ISSET_ID = 1;
6241
    private BitSet __isset_bit_vector = new BitSet(2);
6242
 
6243
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6244
    static {
6245
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6246
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6247
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6248
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6249
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
6250
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6251
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
6252
    }
6253
 
6254
    public getAllPurchases_args() {
6255
    }
6256
 
6257
    public getAllPurchases_args(
6258
      long purchaseOrderId,
6259
      boolean open)
6260
    {
6261
      this();
6262
      this.purchaseOrderId = purchaseOrderId;
6263
      setPurchaseOrderIdIsSet(true);
6264
      this.open = open;
6265
      setOpenIsSet(true);
6266
    }
6267
 
6268
    /**
6269
     * Performs a deep copy on <i>other</i>.
6270
     */
6271
    public getAllPurchases_args(getAllPurchases_args other) {
6272
      __isset_bit_vector.clear();
6273
      __isset_bit_vector.or(other.__isset_bit_vector);
6274
      this.purchaseOrderId = other.purchaseOrderId;
6275
      this.open = other.open;
6276
    }
6277
 
6278
    public getAllPurchases_args deepCopy() {
6279
      return new getAllPurchases_args(this);
6280
    }
6281
 
6282
    @Override
6283
    public void clear() {
6284
      setPurchaseOrderIdIsSet(false);
6285
      this.purchaseOrderId = 0;
6286
      setOpenIsSet(false);
6287
      this.open = false;
6288
    }
6289
 
6290
    public long getPurchaseOrderId() {
6291
      return this.purchaseOrderId;
6292
    }
6293
 
6294
    public void setPurchaseOrderId(long purchaseOrderId) {
6295
      this.purchaseOrderId = purchaseOrderId;
6296
      setPurchaseOrderIdIsSet(true);
6297
    }
6298
 
6299
    public void unsetPurchaseOrderId() {
6300
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
6301
    }
6302
 
6303
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
6304
    public boolean isSetPurchaseOrderId() {
6305
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
6306
    }
6307
 
6308
    public void setPurchaseOrderIdIsSet(boolean value) {
6309
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
6310
    }
6311
 
6312
    public boolean isOpen() {
6313
      return this.open;
6314
    }
6315
 
6316
    public void setOpen(boolean open) {
6317
      this.open = open;
6318
      setOpenIsSet(true);
6319
    }
6320
 
6321
    public void unsetOpen() {
6322
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6323
    }
6324
 
6325
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6326
    public boolean isSetOpen() {
6327
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6328
    }
6329
 
6330
    public void setOpenIsSet(boolean value) {
6331
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6332
    }
6333
 
6334
    public void setFieldValue(_Fields field, Object value) {
6335
      switch (field) {
6336
      case PURCHASE_ORDER_ID:
6337
        if (value == null) {
6338
          unsetPurchaseOrderId();
6339
        } else {
6340
          setPurchaseOrderId((Long)value);
6341
        }
6342
        break;
6343
 
6344
      case OPEN:
6345
        if (value == null) {
6346
          unsetOpen();
6347
        } else {
6348
          setOpen((Boolean)value);
6349
        }
6350
        break;
6351
 
6352
      }
6353
    }
6354
 
6355
    public Object getFieldValue(_Fields field) {
6356
      switch (field) {
6357
      case PURCHASE_ORDER_ID:
6358
        return Long.valueOf(getPurchaseOrderId());
6359
 
6360
      case OPEN:
6361
        return Boolean.valueOf(isOpen());
6362
 
6363
      }
6364
      throw new IllegalStateException();
6365
    }
6366
 
6367
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6368
    public boolean isSet(_Fields field) {
6369
      if (field == null) {
6370
        throw new IllegalArgumentException();
6371
      }
6372
 
6373
      switch (field) {
6374
      case PURCHASE_ORDER_ID:
6375
        return isSetPurchaseOrderId();
6376
      case OPEN:
6377
        return isSetOpen();
6378
      }
6379
      throw new IllegalStateException();
6380
    }
6381
 
6382
    @Override
6383
    public boolean equals(Object that) {
6384
      if (that == null)
6385
        return false;
6386
      if (that instanceof getAllPurchases_args)
6387
        return this.equals((getAllPurchases_args)that);
6388
      return false;
6389
    }
6390
 
6391
    public boolean equals(getAllPurchases_args that) {
6392
      if (that == null)
6393
        return false;
6394
 
6395
      boolean this_present_purchaseOrderId = true;
6396
      boolean that_present_purchaseOrderId = true;
6397
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6398
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6399
          return false;
6400
        if (this.purchaseOrderId != that.purchaseOrderId)
6401
          return false;
6402
      }
6403
 
6404
      boolean this_present_open = true;
6405
      boolean that_present_open = true;
6406
      if (this_present_open || that_present_open) {
6407
        if (!(this_present_open && that_present_open))
6408
          return false;
6409
        if (this.open != that.open)
6410
          return false;
6411
      }
6412
 
6413
      return true;
6414
    }
6415
 
6416
    @Override
6417
    public int hashCode() {
6418
      return 0;
6419
    }
6420
 
6421
    public int compareTo(getAllPurchases_args other) {
6422
      if (!getClass().equals(other.getClass())) {
6423
        return getClass().getName().compareTo(other.getClass().getName());
6424
      }
6425
 
6426
      int lastComparison = 0;
6427
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
6428
 
6429
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6430
      if (lastComparison != 0) {
6431
        return lastComparison;
6432
      }
6433
      if (isSetPurchaseOrderId()) {
6434
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6435
        if (lastComparison != 0) {
6436
          return lastComparison;
6437
        }
6438
      }
6439
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
6440
      if (lastComparison != 0) {
6441
        return lastComparison;
6442
      }
6443
      if (isSetOpen()) {
6444
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
6445
        if (lastComparison != 0) {
6446
          return lastComparison;
6447
        }
6448
      }
6449
      return 0;
6450
    }
6451
 
6452
    public _Fields fieldForId(int fieldId) {
6453
      return _Fields.findByThriftId(fieldId);
6454
    }
6455
 
6456
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6457
      org.apache.thrift.protocol.TField field;
6458
      iprot.readStructBegin();
6459
      while (true)
6460
      {
6461
        field = iprot.readFieldBegin();
6462
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6463
          break;
6464
        }
6465
        switch (field.id) {
6466
          case 1: // PURCHASE_ORDER_ID
6467
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6468
              this.purchaseOrderId = iprot.readI64();
6469
              setPurchaseOrderIdIsSet(true);
6470
            } else { 
6471
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6472
            }
6473
            break;
6474
          case 2: // OPEN
6475
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
6476
              this.open = iprot.readBool();
6477
              setOpenIsSet(true);
6478
            } else { 
6479
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6480
            }
6481
            break;
6482
          default:
6483
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6484
        }
6485
        iprot.readFieldEnd();
6486
      }
6487
      iprot.readStructEnd();
6488
      validate();
6489
    }
6490
 
6491
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6492
      validate();
6493
 
6494
      oprot.writeStructBegin(STRUCT_DESC);
6495
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6496
      oprot.writeI64(this.purchaseOrderId);
6497
      oprot.writeFieldEnd();
6498
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
6499
      oprot.writeBool(this.open);
6500
      oprot.writeFieldEnd();
6501
      oprot.writeFieldStop();
6502
      oprot.writeStructEnd();
6503
    }
6504
 
6505
    @Override
6506
    public String toString() {
6507
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
6508
      boolean first = true;
6509
 
6510
      sb.append("purchaseOrderId:");
6511
      sb.append(this.purchaseOrderId);
6512
      first = false;
6513
      if (!first) sb.append(", ");
6514
      sb.append("open:");
6515
      sb.append(this.open);
6516
      first = false;
6517
      sb.append(")");
6518
      return sb.toString();
6519
    }
6520
 
6521
    public void validate() throws org.apache.thrift.TException {
6522
      // check for required fields
6523
    }
6524
 
6525
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6526
      try {
6527
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6528
      } catch (org.apache.thrift.TException te) {
6529
        throw new java.io.IOException(te);
6530
      }
6531
    }
6532
 
6533
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6534
      try {
6535
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6536
      } catch (org.apache.thrift.TException te) {
6537
        throw new java.io.IOException(te);
6538
      }
6539
    }
6540
 
6541
  }
6542
 
6543
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
6544
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
6545
 
6546
    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);
6547
    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);
6548
 
6549
    private List<Purchase> success; // required
6550
    private PurchaseServiceException e; // required
6551
 
6552
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6553
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6554
      SUCCESS((short)0, "success"),
6555
      E((short)1, "e");
6556
 
6557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6558
 
6559
      static {
6560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6561
          byName.put(field.getFieldName(), field);
6562
        }
6563
      }
6564
 
6565
      /**
6566
       * Find the _Fields constant that matches fieldId, or null if its not found.
6567
       */
6568
      public static _Fields findByThriftId(int fieldId) {
6569
        switch(fieldId) {
6570
          case 0: // SUCCESS
6571
            return SUCCESS;
6572
          case 1: // E
6573
            return E;
6574
          default:
6575
            return null;
6576
        }
6577
      }
6578
 
6579
      /**
6580
       * Find the _Fields constant that matches fieldId, throwing an exception
6581
       * if it is not found.
6582
       */
6583
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6584
        _Fields fields = findByThriftId(fieldId);
6585
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6586
        return fields;
6587
      }
6588
 
6589
      /**
6590
       * Find the _Fields constant that matches name, or null if its not found.
6591
       */
6592
      public static _Fields findByName(String name) {
6593
        return byName.get(name);
6594
      }
6595
 
6596
      private final short _thriftId;
6597
      private final String _fieldName;
6598
 
6599
      _Fields(short thriftId, String fieldName) {
6600
        _thriftId = thriftId;
6601
        _fieldName = fieldName;
6602
      }
6603
 
6604
      public short getThriftFieldId() {
6605
        return _thriftId;
6606
      }
6607
 
6608
      public String getFieldName() {
6609
        return _fieldName;
6610
      }
6611
    }
6612
 
6613
    // isset id assignments
6614
 
6615
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6616
    static {
6617
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6618
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6619
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6620
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
6621
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6622
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6623
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6624
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
6625
    }
6626
 
6627
    public getAllPurchases_result() {
6628
    }
6629
 
6630
    public getAllPurchases_result(
6631
      List<Purchase> success,
6632
      PurchaseServiceException e)
6633
    {
6634
      this();
6635
      this.success = success;
6636
      this.e = e;
6637
    }
6638
 
6639
    /**
6640
     * Performs a deep copy on <i>other</i>.
6641
     */
6642
    public getAllPurchases_result(getAllPurchases_result other) {
6643
      if (other.isSetSuccess()) {
6644
        List<Purchase> __this__success = new ArrayList<Purchase>();
6645
        for (Purchase other_element : other.success) {
6646
          __this__success.add(new Purchase(other_element));
6647
        }
6648
        this.success = __this__success;
6649
      }
6650
      if (other.isSetE()) {
6651
        this.e = new PurchaseServiceException(other.e);
6652
      }
6653
    }
6654
 
6655
    public getAllPurchases_result deepCopy() {
6656
      return new getAllPurchases_result(this);
6657
    }
6658
 
6659
    @Override
6660
    public void clear() {
6661
      this.success = null;
6662
      this.e = null;
6663
    }
6664
 
6665
    public int getSuccessSize() {
6666
      return (this.success == null) ? 0 : this.success.size();
6667
    }
6668
 
6669
    public java.util.Iterator<Purchase> getSuccessIterator() {
6670
      return (this.success == null) ? null : this.success.iterator();
6671
    }
6672
 
6673
    public void addToSuccess(Purchase elem) {
6674
      if (this.success == null) {
6675
        this.success = new ArrayList<Purchase>();
6676
      }
6677
      this.success.add(elem);
6678
    }
6679
 
6680
    public List<Purchase> getSuccess() {
6681
      return this.success;
6682
    }
6683
 
6684
    public void setSuccess(List<Purchase> success) {
6685
      this.success = success;
6686
    }
6687
 
6688
    public void unsetSuccess() {
6689
      this.success = null;
6690
    }
6691
 
6692
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6693
    public boolean isSetSuccess() {
6694
      return this.success != null;
6695
    }
6696
 
6697
    public void setSuccessIsSet(boolean value) {
6698
      if (!value) {
6699
        this.success = null;
6700
      }
6701
    }
6702
 
6703
    public PurchaseServiceException getE() {
6704
      return this.e;
6705
    }
6706
 
6707
    public void setE(PurchaseServiceException e) {
6708
      this.e = e;
6709
    }
6710
 
6711
    public void unsetE() {
6712
      this.e = null;
6713
    }
6714
 
6715
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6716
    public boolean isSetE() {
6717
      return this.e != null;
6718
    }
6719
 
6720
    public void setEIsSet(boolean value) {
6721
      if (!value) {
6722
        this.e = null;
6723
      }
6724
    }
6725
 
6726
    public void setFieldValue(_Fields field, Object value) {
6727
      switch (field) {
6728
      case SUCCESS:
6729
        if (value == null) {
6730
          unsetSuccess();
6731
        } else {
6732
          setSuccess((List<Purchase>)value);
6733
        }
6734
        break;
6735
 
6736
      case E:
6737
        if (value == null) {
6738
          unsetE();
6739
        } else {
6740
          setE((PurchaseServiceException)value);
6741
        }
6742
        break;
6743
 
6744
      }
6745
    }
6746
 
6747
    public Object getFieldValue(_Fields field) {
6748
      switch (field) {
6749
      case SUCCESS:
6750
        return getSuccess();
6751
 
6752
      case E:
6753
        return getE();
6754
 
6755
      }
6756
      throw new IllegalStateException();
6757
    }
6758
 
6759
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6760
    public boolean isSet(_Fields field) {
6761
      if (field == null) {
6762
        throw new IllegalArgumentException();
6763
      }
6764
 
6765
      switch (field) {
6766
      case SUCCESS:
6767
        return isSetSuccess();
6768
      case E:
6769
        return isSetE();
6770
      }
6771
      throw new IllegalStateException();
6772
    }
6773
 
6774
    @Override
6775
    public boolean equals(Object that) {
6776
      if (that == null)
6777
        return false;
6778
      if (that instanceof getAllPurchases_result)
6779
        return this.equals((getAllPurchases_result)that);
6780
      return false;
6781
    }
6782
 
6783
    public boolean equals(getAllPurchases_result that) {
6784
      if (that == null)
6785
        return false;
6786
 
6787
      boolean this_present_success = true && this.isSetSuccess();
6788
      boolean that_present_success = true && that.isSetSuccess();
6789
      if (this_present_success || that_present_success) {
6790
        if (!(this_present_success && that_present_success))
6791
          return false;
6792
        if (!this.success.equals(that.success))
6793
          return false;
6794
      }
6795
 
6796
      boolean this_present_e = true && this.isSetE();
6797
      boolean that_present_e = true && that.isSetE();
6798
      if (this_present_e || that_present_e) {
6799
        if (!(this_present_e && that_present_e))
6800
          return false;
6801
        if (!this.e.equals(that.e))
6802
          return false;
6803
      }
6804
 
6805
      return true;
6806
    }
6807
 
6808
    @Override
6809
    public int hashCode() {
6810
      return 0;
6811
    }
6812
 
6813
    public int compareTo(getAllPurchases_result other) {
6814
      if (!getClass().equals(other.getClass())) {
6815
        return getClass().getName().compareTo(other.getClass().getName());
6816
      }
6817
 
6818
      int lastComparison = 0;
6819
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
6820
 
6821
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6822
      if (lastComparison != 0) {
6823
        return lastComparison;
6824
      }
6825
      if (isSetSuccess()) {
6826
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6827
        if (lastComparison != 0) {
6828
          return lastComparison;
6829
        }
6830
      }
6831
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6832
      if (lastComparison != 0) {
6833
        return lastComparison;
6834
      }
6835
      if (isSetE()) {
6836
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6837
        if (lastComparison != 0) {
6838
          return lastComparison;
6839
        }
6840
      }
6841
      return 0;
6842
    }
6843
 
6844
    public _Fields fieldForId(int fieldId) {
6845
      return _Fields.findByThriftId(fieldId);
6846
    }
6847
 
6848
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6849
      org.apache.thrift.protocol.TField field;
6850
      iprot.readStructBegin();
6851
      while (true)
6852
      {
6853
        field = iprot.readFieldBegin();
6854
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6855
          break;
6856
        }
6857
        switch (field.id) {
6858
          case 0: // SUCCESS
6859
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6860
              {
6861
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
6862
                this.success = new ArrayList<Purchase>(_list8.size);
6863
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
6864
                {
6865
                  Purchase _elem10; // required
6866
                  _elem10 = new Purchase();
6867
                  _elem10.read(iprot);
6868
                  this.success.add(_elem10);
6869
                }
6870
                iprot.readListEnd();
6871
              }
6872
            } else { 
6873
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6874
            }
6875
            break;
6876
          case 1: // E
6877
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6878
              this.e = new PurchaseServiceException();
6879
              this.e.read(iprot);
6880
            } else { 
6881
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6882
            }
6883
            break;
6884
          default:
6885
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6886
        }
6887
        iprot.readFieldEnd();
6888
      }
6889
      iprot.readStructEnd();
6890
      validate();
6891
    }
6892
 
6893
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6894
      oprot.writeStructBegin(STRUCT_DESC);
6895
 
6896
      if (this.isSetSuccess()) {
6897
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6898
        {
6899
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6900
          for (Purchase _iter11 : this.success)
6901
          {
6902
            _iter11.write(oprot);
6903
          }
6904
          oprot.writeListEnd();
6905
        }
6906
        oprot.writeFieldEnd();
6907
      } else if (this.isSetE()) {
6908
        oprot.writeFieldBegin(E_FIELD_DESC);
6909
        this.e.write(oprot);
6910
        oprot.writeFieldEnd();
6911
      }
6912
      oprot.writeFieldStop();
6913
      oprot.writeStructEnd();
6914
    }
6915
 
6916
    @Override
6917
    public String toString() {
6918
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
6919
      boolean first = true;
6920
 
6921
      sb.append("success:");
6922
      if (this.success == null) {
6923
        sb.append("null");
6924
      } else {
6925
        sb.append(this.success);
6926
      }
6927
      first = false;
6928
      if (!first) sb.append(", ");
6929
      sb.append("e:");
6930
      if (this.e == null) {
6931
        sb.append("null");
6932
      } else {
6933
        sb.append(this.e);
6934
      }
6935
      first = false;
6936
      sb.append(")");
6937
      return sb.toString();
6938
    }
6939
 
6940
    public void validate() throws org.apache.thrift.TException {
6941
      // check for required fields
6942
    }
6943
 
6944
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6945
      try {
6946
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6947
      } catch (org.apache.thrift.TException te) {
6948
        throw new java.io.IOException(te);
6949
      }
6950
    }
6951
 
6952
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6953
      try {
6954
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6955
      } catch (org.apache.thrift.TException te) {
6956
        throw new java.io.IOException(te);
6957
      }
6958
    }
6959
 
6960
  }
6961
 
6385 amar.kumar 6962
  public static class getPurchasesForPO_args implements org.apache.thrift.TBase<getPurchasesForPO_args, getPurchasesForPO_args._Fields>, java.io.Serializable, Cloneable   {
6963
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_args");
6964
 
6965
    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);
6966
 
6967
    private long purchaseOrderId; // required
6968
 
6969
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6970
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6971
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId");
6972
 
6973
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6974
 
6975
      static {
6976
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6977
          byName.put(field.getFieldName(), field);
6978
        }
6979
      }
6980
 
6981
      /**
6982
       * Find the _Fields constant that matches fieldId, or null if its not found.
6983
       */
6984
      public static _Fields findByThriftId(int fieldId) {
6985
        switch(fieldId) {
6986
          case 1: // PURCHASE_ORDER_ID
6987
            return PURCHASE_ORDER_ID;
6988
          default:
6989
            return null;
6990
        }
6991
      }
6992
 
6993
      /**
6994
       * Find the _Fields constant that matches fieldId, throwing an exception
6995
       * if it is not found.
6996
       */
6997
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6998
        _Fields fields = findByThriftId(fieldId);
6999
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7000
        return fields;
7001
      }
7002
 
7003
      /**
7004
       * Find the _Fields constant that matches name, or null if its not found.
7005
       */
7006
      public static _Fields findByName(String name) {
7007
        return byName.get(name);
7008
      }
7009
 
7010
      private final short _thriftId;
7011
      private final String _fieldName;
7012
 
7013
      _Fields(short thriftId, String fieldName) {
7014
        _thriftId = thriftId;
7015
        _fieldName = fieldName;
7016
      }
7017
 
7018
      public short getThriftFieldId() {
7019
        return _thriftId;
7020
      }
7021
 
7022
      public String getFieldName() {
7023
        return _fieldName;
7024
      }
7025
    }
7026
 
7027
    // isset id assignments
7028
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
7029
    private BitSet __isset_bit_vector = new BitSet(1);
7030
 
7031
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7032
    static {
7033
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7034
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7035
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7036
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7037
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_args.class, metaDataMap);
7038
    }
7039
 
7040
    public getPurchasesForPO_args() {
7041
    }
7042
 
7043
    public getPurchasesForPO_args(
7044
      long purchaseOrderId)
7045
    {
7046
      this();
7047
      this.purchaseOrderId = purchaseOrderId;
7048
      setPurchaseOrderIdIsSet(true);
7049
    }
7050
 
7051
    /**
7052
     * Performs a deep copy on <i>other</i>.
7053
     */
7054
    public getPurchasesForPO_args(getPurchasesForPO_args other) {
7055
      __isset_bit_vector.clear();
7056
      __isset_bit_vector.or(other.__isset_bit_vector);
7057
      this.purchaseOrderId = other.purchaseOrderId;
7058
    }
7059
 
7060
    public getPurchasesForPO_args deepCopy() {
7061
      return new getPurchasesForPO_args(this);
7062
    }
7063
 
7064
    @Override
7065
    public void clear() {
7066
      setPurchaseOrderIdIsSet(false);
7067
      this.purchaseOrderId = 0;
7068
    }
7069
 
7070
    public long getPurchaseOrderId() {
7071
      return this.purchaseOrderId;
7072
    }
7073
 
7074
    public void setPurchaseOrderId(long purchaseOrderId) {
7075
      this.purchaseOrderId = purchaseOrderId;
7076
      setPurchaseOrderIdIsSet(true);
7077
    }
7078
 
7079
    public void unsetPurchaseOrderId() {
7080
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
7081
    }
7082
 
7083
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
7084
    public boolean isSetPurchaseOrderId() {
7085
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
7086
    }
7087
 
7088
    public void setPurchaseOrderIdIsSet(boolean value) {
7089
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
7090
    }
7091
 
7092
    public void setFieldValue(_Fields field, Object value) {
7093
      switch (field) {
7094
      case PURCHASE_ORDER_ID:
7095
        if (value == null) {
7096
          unsetPurchaseOrderId();
7097
        } else {
7098
          setPurchaseOrderId((Long)value);
7099
        }
7100
        break;
7101
 
7102
      }
7103
    }
7104
 
7105
    public Object getFieldValue(_Fields field) {
7106
      switch (field) {
7107
      case PURCHASE_ORDER_ID:
7108
        return Long.valueOf(getPurchaseOrderId());
7109
 
7110
      }
7111
      throw new IllegalStateException();
7112
    }
7113
 
7114
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7115
    public boolean isSet(_Fields field) {
7116
      if (field == null) {
7117
        throw new IllegalArgumentException();
7118
      }
7119
 
7120
      switch (field) {
7121
      case PURCHASE_ORDER_ID:
7122
        return isSetPurchaseOrderId();
7123
      }
7124
      throw new IllegalStateException();
7125
    }
7126
 
7127
    @Override
7128
    public boolean equals(Object that) {
7129
      if (that == null)
7130
        return false;
7131
      if (that instanceof getPurchasesForPO_args)
7132
        return this.equals((getPurchasesForPO_args)that);
7133
      return false;
7134
    }
7135
 
7136
    public boolean equals(getPurchasesForPO_args that) {
7137
      if (that == null)
7138
        return false;
7139
 
7140
      boolean this_present_purchaseOrderId = true;
7141
      boolean that_present_purchaseOrderId = true;
7142
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
7143
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
7144
          return false;
7145
        if (this.purchaseOrderId != that.purchaseOrderId)
7146
          return false;
7147
      }
7148
 
7149
      return true;
7150
    }
7151
 
7152
    @Override
7153
    public int hashCode() {
7154
      return 0;
7155
    }
7156
 
7157
    public int compareTo(getPurchasesForPO_args other) {
7158
      if (!getClass().equals(other.getClass())) {
7159
        return getClass().getName().compareTo(other.getClass().getName());
7160
      }
7161
 
7162
      int lastComparison = 0;
7163
      getPurchasesForPO_args typedOther = (getPurchasesForPO_args)other;
7164
 
7165
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
7166
      if (lastComparison != 0) {
7167
        return lastComparison;
7168
      }
7169
      if (isSetPurchaseOrderId()) {
7170
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
7171
        if (lastComparison != 0) {
7172
          return lastComparison;
7173
        }
7174
      }
7175
      return 0;
7176
    }
7177
 
7178
    public _Fields fieldForId(int fieldId) {
7179
      return _Fields.findByThriftId(fieldId);
7180
    }
7181
 
7182
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7183
      org.apache.thrift.protocol.TField field;
7184
      iprot.readStructBegin();
7185
      while (true)
7186
      {
7187
        field = iprot.readFieldBegin();
7188
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7189
          break;
7190
        }
7191
        switch (field.id) {
7192
          case 1: // PURCHASE_ORDER_ID
7193
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7194
              this.purchaseOrderId = iprot.readI64();
7195
              setPurchaseOrderIdIsSet(true);
7196
            } else { 
7197
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7198
            }
7199
            break;
7200
          default:
7201
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7202
        }
7203
        iprot.readFieldEnd();
7204
      }
7205
      iprot.readStructEnd();
7206
      validate();
7207
    }
7208
 
7209
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7210
      validate();
7211
 
7212
      oprot.writeStructBegin(STRUCT_DESC);
7213
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
7214
      oprot.writeI64(this.purchaseOrderId);
7215
      oprot.writeFieldEnd();
7216
      oprot.writeFieldStop();
7217
      oprot.writeStructEnd();
7218
    }
7219
 
7220
    @Override
7221
    public String toString() {
7222
      StringBuilder sb = new StringBuilder("getPurchasesForPO_args(");
7223
      boolean first = true;
7224
 
7225
      sb.append("purchaseOrderId:");
7226
      sb.append(this.purchaseOrderId);
7227
      first = false;
7228
      sb.append(")");
7229
      return sb.toString();
7230
    }
7231
 
7232
    public void validate() throws org.apache.thrift.TException {
7233
      // check for required fields
7234
    }
7235
 
7236
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7237
      try {
7238
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7239
      } catch (org.apache.thrift.TException te) {
7240
        throw new java.io.IOException(te);
7241
      }
7242
    }
7243
 
7244
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7245
      try {
7246
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7247
        __isset_bit_vector = new BitSet(1);
7248
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7249
      } catch (org.apache.thrift.TException te) {
7250
        throw new java.io.IOException(te);
7251
      }
7252
    }
7253
 
7254
  }
7255
 
7256
  public static class getPurchasesForPO_result implements org.apache.thrift.TBase<getPurchasesForPO_result, getPurchasesForPO_result._Fields>, java.io.Serializable, Cloneable   {
7257
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchasesForPO_result");
7258
 
7259
    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);
7260
    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);
7261
 
7262
    private List<Purchase> success; // required
7263
    private PurchaseServiceException e; // required
7264
 
7265
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7266
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7267
      SUCCESS((short)0, "success"),
7268
      E((short)1, "e");
7269
 
7270
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7271
 
7272
      static {
7273
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7274
          byName.put(field.getFieldName(), field);
7275
        }
7276
      }
7277
 
7278
      /**
7279
       * Find the _Fields constant that matches fieldId, or null if its not found.
7280
       */
7281
      public static _Fields findByThriftId(int fieldId) {
7282
        switch(fieldId) {
7283
          case 0: // SUCCESS
7284
            return SUCCESS;
7285
          case 1: // E
7286
            return E;
7287
          default:
7288
            return null;
7289
        }
7290
      }
7291
 
7292
      /**
7293
       * Find the _Fields constant that matches fieldId, throwing an exception
7294
       * if it is not found.
7295
       */
7296
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7297
        _Fields fields = findByThriftId(fieldId);
7298
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7299
        return fields;
7300
      }
7301
 
7302
      /**
7303
       * Find the _Fields constant that matches name, or null if its not found.
7304
       */
7305
      public static _Fields findByName(String name) {
7306
        return byName.get(name);
7307
      }
7308
 
7309
      private final short _thriftId;
7310
      private final String _fieldName;
7311
 
7312
      _Fields(short thriftId, String fieldName) {
7313
        _thriftId = thriftId;
7314
        _fieldName = fieldName;
7315
      }
7316
 
7317
      public short getThriftFieldId() {
7318
        return _thriftId;
7319
      }
7320
 
7321
      public String getFieldName() {
7322
        return _fieldName;
7323
      }
7324
    }
7325
 
7326
    // isset id assignments
7327
 
7328
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7329
    static {
7330
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7331
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7332
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7333
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
7334
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7335
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7336
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7337
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchasesForPO_result.class, metaDataMap);
7338
    }
7339
 
7340
    public getPurchasesForPO_result() {
7341
    }
7342
 
7343
    public getPurchasesForPO_result(
7344
      List<Purchase> success,
7345
      PurchaseServiceException e)
7346
    {
7347
      this();
7348
      this.success = success;
7349
      this.e = e;
7350
    }
7351
 
7352
    /**
7353
     * Performs a deep copy on <i>other</i>.
7354
     */
7355
    public getPurchasesForPO_result(getPurchasesForPO_result other) {
7356
      if (other.isSetSuccess()) {
7357
        List<Purchase> __this__success = new ArrayList<Purchase>();
7358
        for (Purchase other_element : other.success) {
7359
          __this__success.add(new Purchase(other_element));
7360
        }
7361
        this.success = __this__success;
7362
      }
7363
      if (other.isSetE()) {
7364
        this.e = new PurchaseServiceException(other.e);
7365
      }
7366
    }
7367
 
7368
    public getPurchasesForPO_result deepCopy() {
7369
      return new getPurchasesForPO_result(this);
7370
    }
7371
 
7372
    @Override
7373
    public void clear() {
7374
      this.success = null;
7375
      this.e = null;
7376
    }
7377
 
7378
    public int getSuccessSize() {
7379
      return (this.success == null) ? 0 : this.success.size();
7380
    }
7381
 
7382
    public java.util.Iterator<Purchase> getSuccessIterator() {
7383
      return (this.success == null) ? null : this.success.iterator();
7384
    }
7385
 
7386
    public void addToSuccess(Purchase elem) {
7387
      if (this.success == null) {
7388
        this.success = new ArrayList<Purchase>();
7389
      }
7390
      this.success.add(elem);
7391
    }
7392
 
7393
    public List<Purchase> getSuccess() {
7394
      return this.success;
7395
    }
7396
 
7397
    public void setSuccess(List<Purchase> success) {
7398
      this.success = success;
7399
    }
7400
 
7401
    public void unsetSuccess() {
7402
      this.success = null;
7403
    }
7404
 
7405
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7406
    public boolean isSetSuccess() {
7407
      return this.success != null;
7408
    }
7409
 
7410
    public void setSuccessIsSet(boolean value) {
7411
      if (!value) {
7412
        this.success = null;
7413
      }
7414
    }
7415
 
7416
    public PurchaseServiceException getE() {
7417
      return this.e;
7418
    }
7419
 
7420
    public void setE(PurchaseServiceException e) {
7421
      this.e = e;
7422
    }
7423
 
7424
    public void unsetE() {
7425
      this.e = null;
7426
    }
7427
 
7428
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7429
    public boolean isSetE() {
7430
      return this.e != null;
7431
    }
7432
 
7433
    public void setEIsSet(boolean value) {
7434
      if (!value) {
7435
        this.e = null;
7436
      }
7437
    }
7438
 
7439
    public void setFieldValue(_Fields field, Object value) {
7440
      switch (field) {
7441
      case SUCCESS:
7442
        if (value == null) {
7443
          unsetSuccess();
7444
        } else {
7445
          setSuccess((List<Purchase>)value);
7446
        }
7447
        break;
7448
 
7449
      case E:
7450
        if (value == null) {
7451
          unsetE();
7452
        } else {
7453
          setE((PurchaseServiceException)value);
7454
        }
7455
        break;
7456
 
7457
      }
7458
    }
7459
 
7460
    public Object getFieldValue(_Fields field) {
7461
      switch (field) {
7462
      case SUCCESS:
7463
        return getSuccess();
7464
 
7465
      case E:
7466
        return getE();
7467
 
7468
      }
7469
      throw new IllegalStateException();
7470
    }
7471
 
7472
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7473
    public boolean isSet(_Fields field) {
7474
      if (field == null) {
7475
        throw new IllegalArgumentException();
7476
      }
7477
 
7478
      switch (field) {
7479
      case SUCCESS:
7480
        return isSetSuccess();
7481
      case E:
7482
        return isSetE();
7483
      }
7484
      throw new IllegalStateException();
7485
    }
7486
 
7487
    @Override
7488
    public boolean equals(Object that) {
7489
      if (that == null)
7490
        return false;
7491
      if (that instanceof getPurchasesForPO_result)
7492
        return this.equals((getPurchasesForPO_result)that);
7493
      return false;
7494
    }
7495
 
7496
    public boolean equals(getPurchasesForPO_result that) {
7497
      if (that == null)
7498
        return false;
7499
 
7500
      boolean this_present_success = true && this.isSetSuccess();
7501
      boolean that_present_success = true && that.isSetSuccess();
7502
      if (this_present_success || that_present_success) {
7503
        if (!(this_present_success && that_present_success))
7504
          return false;
7505
        if (!this.success.equals(that.success))
7506
          return false;
7507
      }
7508
 
7509
      boolean this_present_e = true && this.isSetE();
7510
      boolean that_present_e = true && that.isSetE();
7511
      if (this_present_e || that_present_e) {
7512
        if (!(this_present_e && that_present_e))
7513
          return false;
7514
        if (!this.e.equals(that.e))
7515
          return false;
7516
      }
7517
 
7518
      return true;
7519
    }
7520
 
7521
    @Override
7522
    public int hashCode() {
7523
      return 0;
7524
    }
7525
 
7526
    public int compareTo(getPurchasesForPO_result other) {
7527
      if (!getClass().equals(other.getClass())) {
7528
        return getClass().getName().compareTo(other.getClass().getName());
7529
      }
7530
 
7531
      int lastComparison = 0;
7532
      getPurchasesForPO_result typedOther = (getPurchasesForPO_result)other;
7533
 
7534
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7535
      if (lastComparison != 0) {
7536
        return lastComparison;
7537
      }
7538
      if (isSetSuccess()) {
7539
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7540
        if (lastComparison != 0) {
7541
          return lastComparison;
7542
        }
7543
      }
7544
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7545
      if (lastComparison != 0) {
7546
        return lastComparison;
7547
      }
7548
      if (isSetE()) {
7549
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7550
        if (lastComparison != 0) {
7551
          return lastComparison;
7552
        }
7553
      }
7554
      return 0;
7555
    }
7556
 
7557
    public _Fields fieldForId(int fieldId) {
7558
      return _Fields.findByThriftId(fieldId);
7559
    }
7560
 
7561
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7562
      org.apache.thrift.protocol.TField field;
7563
      iprot.readStructBegin();
7564
      while (true)
7565
      {
7566
        field = iprot.readFieldBegin();
7567
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7568
          break;
7569
        }
7570
        switch (field.id) {
7571
          case 0: // SUCCESS
7572
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7573
              {
7574
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
7575
                this.success = new ArrayList<Purchase>(_list12.size);
7576
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
7577
                {
7578
                  Purchase _elem14; // required
7579
                  _elem14 = new Purchase();
7580
                  _elem14.read(iprot);
7581
                  this.success.add(_elem14);
7582
                }
7583
                iprot.readListEnd();
7584
              }
7585
            } else { 
7586
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7587
            }
7588
            break;
7589
          case 1: // E
7590
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7591
              this.e = new PurchaseServiceException();
7592
              this.e.read(iprot);
7593
            } else { 
7594
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7595
            }
7596
            break;
7597
          default:
7598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7599
        }
7600
        iprot.readFieldEnd();
7601
      }
7602
      iprot.readStructEnd();
7603
      validate();
7604
    }
7605
 
7606
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7607
      oprot.writeStructBegin(STRUCT_DESC);
7608
 
7609
      if (this.isSetSuccess()) {
7610
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7611
        {
7612
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7613
          for (Purchase _iter15 : this.success)
7614
          {
7615
            _iter15.write(oprot);
7616
          }
7617
          oprot.writeListEnd();
7618
        }
7619
        oprot.writeFieldEnd();
7620
      } else if (this.isSetE()) {
7621
        oprot.writeFieldBegin(E_FIELD_DESC);
7622
        this.e.write(oprot);
7623
        oprot.writeFieldEnd();
7624
      }
7625
      oprot.writeFieldStop();
7626
      oprot.writeStructEnd();
7627
    }
7628
 
7629
    @Override
7630
    public String toString() {
7631
      StringBuilder sb = new StringBuilder("getPurchasesForPO_result(");
7632
      boolean first = true;
7633
 
7634
      sb.append("success:");
7635
      if (this.success == null) {
7636
        sb.append("null");
7637
      } else {
7638
        sb.append(this.success);
7639
      }
7640
      first = false;
7641
      if (!first) sb.append(", ");
7642
      sb.append("e:");
7643
      if (this.e == null) {
7644
        sb.append("null");
7645
      } else {
7646
        sb.append(this.e);
7647
      }
7648
      first = false;
7649
      sb.append(")");
7650
      return sb.toString();
7651
    }
7652
 
7653
    public void validate() throws org.apache.thrift.TException {
7654
      // check for required fields
7655
    }
7656
 
7657
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7658
      try {
7659
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7660
      } catch (org.apache.thrift.TException te) {
7661
        throw new java.io.IOException(te);
7662
      }
7663
    }
7664
 
7665
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7666
      try {
7667
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7668
      } catch (org.apache.thrift.TException te) {
7669
        throw new java.io.IOException(te);
7670
      }
7671
    }
7672
 
7673
  }
7674
 
4555 mandeep.dh 7675
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
7676
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 7677
 
7678
    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);
7679
 
7680
    private long purchaseId; // required
7681
 
7682
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7683
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 7684
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 7685
 
7686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7687
 
7688
      static {
7689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7690
          byName.put(field.getFieldName(), field);
7691
        }
7692
      }
7693
 
7694
      /**
7695
       * Find the _Fields constant that matches fieldId, or null if its not found.
7696
       */
7697
      public static _Fields findByThriftId(int fieldId) {
7698
        switch(fieldId) {
7699
          case 1: // PURCHASE_ID
7700
            return PURCHASE_ID;
7701
          default:
7702
            return null;
7703
        }
7704
      }
7705
 
7706
      /**
7707
       * Find the _Fields constant that matches fieldId, throwing an exception
7708
       * if it is not found.
7709
       */
7710
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7711
        _Fields fields = findByThriftId(fieldId);
7712
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7713
        return fields;
7714
      }
7715
 
7716
      /**
7717
       * Find the _Fields constant that matches name, or null if its not found.
7718
       */
7719
      public static _Fields findByName(String name) {
7720
        return byName.get(name);
7721
      }
7722
 
7723
      private final short _thriftId;
7724
      private final String _fieldName;
7725
 
7726
      _Fields(short thriftId, String fieldName) {
7727
        _thriftId = thriftId;
7728
        _fieldName = fieldName;
7729
      }
7730
 
7731
      public short getThriftFieldId() {
7732
        return _thriftId;
7733
      }
7734
 
7735
      public String getFieldName() {
7736
        return _fieldName;
7737
      }
7738
    }
7739
 
7740
    // isset id assignments
7741
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 7742
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 7743
 
7744
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7745
    static {
7746
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7747
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7748
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7749
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 7750
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 7751
    }
7752
 
4555 mandeep.dh 7753
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 7754
    }
7755
 
4555 mandeep.dh 7756
    public getPurchaseOrderForPurchase_args(
7757
      long purchaseId)
4496 mandeep.dh 7758
    {
7759
      this();
7760
      this.purchaseId = purchaseId;
7761
      setPurchaseIdIsSet(true);
7762
    }
7763
 
7764
    /**
7765
     * Performs a deep copy on <i>other</i>.
7766
     */
4555 mandeep.dh 7767
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 7768
      __isset_bit_vector.clear();
7769
      __isset_bit_vector.or(other.__isset_bit_vector);
7770
      this.purchaseId = other.purchaseId;
7771
    }
7772
 
4555 mandeep.dh 7773
    public getPurchaseOrderForPurchase_args deepCopy() {
7774
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 7775
    }
7776
 
7777
    @Override
7778
    public void clear() {
7779
      setPurchaseIdIsSet(false);
7780
      this.purchaseId = 0;
7781
    }
7782
 
7783
    public long getPurchaseId() {
7784
      return this.purchaseId;
7785
    }
7786
 
7787
    public void setPurchaseId(long purchaseId) {
7788
      this.purchaseId = purchaseId;
7789
      setPurchaseIdIsSet(true);
7790
    }
7791
 
7792
    public void unsetPurchaseId() {
7793
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
7794
    }
7795
 
7796
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
7797
    public boolean isSetPurchaseId() {
7798
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
7799
    }
7800
 
7801
    public void setPurchaseIdIsSet(boolean value) {
7802
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
7803
    }
7804
 
7805
    public void setFieldValue(_Fields field, Object value) {
7806
      switch (field) {
7807
      case PURCHASE_ID:
7808
        if (value == null) {
7809
          unsetPurchaseId();
7810
        } else {
7811
          setPurchaseId((Long)value);
7812
        }
7813
        break;
7814
 
7815
      }
7816
    }
7817
 
7818
    public Object getFieldValue(_Fields field) {
7819
      switch (field) {
7820
      case PURCHASE_ID:
7821
        return Long.valueOf(getPurchaseId());
7822
 
7823
      }
7824
      throw new IllegalStateException();
7825
    }
7826
 
7827
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7828
    public boolean isSet(_Fields field) {
7829
      if (field == null) {
7830
        throw new IllegalArgumentException();
7831
      }
7832
 
7833
      switch (field) {
7834
      case PURCHASE_ID:
7835
        return isSetPurchaseId();
7836
      }
7837
      throw new IllegalStateException();
7838
    }
7839
 
7840
    @Override
7841
    public boolean equals(Object that) {
7842
      if (that == null)
7843
        return false;
4555 mandeep.dh 7844
      if (that instanceof getPurchaseOrderForPurchase_args)
7845
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 7846
      return false;
7847
    }
7848
 
4555 mandeep.dh 7849
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 7850
      if (that == null)
7851
        return false;
7852
 
7853
      boolean this_present_purchaseId = true;
7854
      boolean that_present_purchaseId = true;
7855
      if (this_present_purchaseId || that_present_purchaseId) {
7856
        if (!(this_present_purchaseId && that_present_purchaseId))
7857
          return false;
7858
        if (this.purchaseId != that.purchaseId)
7859
          return false;
7860
      }
7861
 
7862
      return true;
7863
    }
7864
 
7865
    @Override
7866
    public int hashCode() {
7867
      return 0;
7868
    }
7869
 
4555 mandeep.dh 7870
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 7871
      if (!getClass().equals(other.getClass())) {
7872
        return getClass().getName().compareTo(other.getClass().getName());
7873
      }
7874
 
7875
      int lastComparison = 0;
4555 mandeep.dh 7876
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 7877
 
7878
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
7879
      if (lastComparison != 0) {
7880
        return lastComparison;
7881
      }
7882
      if (isSetPurchaseId()) {
7883
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
7884
        if (lastComparison != 0) {
7885
          return lastComparison;
7886
        }
7887
      }
7888
      return 0;
7889
    }
7890
 
7891
    public _Fields fieldForId(int fieldId) {
7892
      return _Fields.findByThriftId(fieldId);
7893
    }
7894
 
7895
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7896
      org.apache.thrift.protocol.TField field;
7897
      iprot.readStructBegin();
7898
      while (true)
7899
      {
7900
        field = iprot.readFieldBegin();
7901
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7902
          break;
7903
        }
7904
        switch (field.id) {
7905
          case 1: // PURCHASE_ID
7906
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7907
              this.purchaseId = iprot.readI64();
7908
              setPurchaseIdIsSet(true);
7909
            } else { 
7910
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7911
            }
7912
            break;
7913
          default:
7914
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7915
        }
7916
        iprot.readFieldEnd();
7917
      }
7918
      iprot.readStructEnd();
7919
      validate();
7920
    }
7921
 
7922
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7923
      validate();
7924
 
7925
      oprot.writeStructBegin(STRUCT_DESC);
7926
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
7927
      oprot.writeI64(this.purchaseId);
7928
      oprot.writeFieldEnd();
7929
      oprot.writeFieldStop();
7930
      oprot.writeStructEnd();
7931
    }
7932
 
7933
    @Override
7934
    public String toString() {
4555 mandeep.dh 7935
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 7936
      boolean first = true;
7937
 
7938
      sb.append("purchaseId:");
7939
      sb.append(this.purchaseId);
7940
      first = false;
7941
      sb.append(")");
7942
      return sb.toString();
7943
    }
7944
 
7945
    public void validate() throws org.apache.thrift.TException {
7946
      // check for required fields
7947
    }
7948
 
7949
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7950
      try {
7951
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7952
      } catch (org.apache.thrift.TException te) {
7953
        throw new java.io.IOException(te);
7954
      }
7955
    }
7956
 
7957
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7958
      try {
4555 mandeep.dh 7959
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7960
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 7961
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7962
      } catch (org.apache.thrift.TException te) {
7963
        throw new java.io.IOException(te);
7964
      }
7965
    }
7966
 
7967
  }
7968
 
4555 mandeep.dh 7969
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
7970
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 7971
 
4555 mandeep.dh 7972
    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 7973
 
4555 mandeep.dh 7974
    private PurchaseOrder success; // required
4496 mandeep.dh 7975
 
7976
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7977
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7978
      SUCCESS((short)0, "success");
7979
 
7980
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7981
 
7982
      static {
7983
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7984
          byName.put(field.getFieldName(), field);
7985
        }
7986
      }
7987
 
7988
      /**
7989
       * Find the _Fields constant that matches fieldId, or null if its not found.
7990
       */
7991
      public static _Fields findByThriftId(int fieldId) {
7992
        switch(fieldId) {
7993
          case 0: // SUCCESS
7994
            return SUCCESS;
7995
          default:
7996
            return null;
7997
        }
7998
      }
7999
 
8000
      /**
8001
       * Find the _Fields constant that matches fieldId, throwing an exception
8002
       * if it is not found.
8003
       */
8004
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8005
        _Fields fields = findByThriftId(fieldId);
8006
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8007
        return fields;
8008
      }
8009
 
8010
      /**
8011
       * Find the _Fields constant that matches name, or null if its not found.
8012
       */
8013
      public static _Fields findByName(String name) {
8014
        return byName.get(name);
8015
      }
8016
 
8017
      private final short _thriftId;
8018
      private final String _fieldName;
8019
 
8020
      _Fields(short thriftId, String fieldName) {
8021
        _thriftId = thriftId;
8022
        _fieldName = fieldName;
8023
      }
8024
 
8025
      public short getThriftFieldId() {
8026
        return _thriftId;
8027
      }
8028
 
8029
      public String getFieldName() {
8030
        return _fieldName;
8031
      }
8032
    }
8033
 
8034
    // isset id assignments
8035
 
8036
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8037
    static {
8038
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8039
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8040
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 8041
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 8042
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 8043
    }
8044
 
4555 mandeep.dh 8045
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 8046
    }
8047
 
4555 mandeep.dh 8048
    public getPurchaseOrderForPurchase_result(
8049
      PurchaseOrder success)
4496 mandeep.dh 8050
    {
8051
      this();
8052
      this.success = success;
8053
    }
8054
 
8055
    /**
8056
     * Performs a deep copy on <i>other</i>.
8057
     */
4555 mandeep.dh 8058
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
8059
      if (other.isSetSuccess()) {
8060
        this.success = new PurchaseOrder(other.success);
8061
      }
4496 mandeep.dh 8062
    }
8063
 
4555 mandeep.dh 8064
    public getPurchaseOrderForPurchase_result deepCopy() {
8065
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 8066
    }
8067
 
8068
    @Override
8069
    public void clear() {
4555 mandeep.dh 8070
      this.success = null;
4496 mandeep.dh 8071
    }
8072
 
4555 mandeep.dh 8073
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 8074
      return this.success;
8075
    }
8076
 
4555 mandeep.dh 8077
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 8078
      this.success = success;
8079
    }
8080
 
8081
    public void unsetSuccess() {
4555 mandeep.dh 8082
      this.success = null;
4496 mandeep.dh 8083
    }
8084
 
8085
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8086
    public boolean isSetSuccess() {
4555 mandeep.dh 8087
      return this.success != null;
4496 mandeep.dh 8088
    }
8089
 
8090
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8091
      if (!value) {
8092
        this.success = null;
8093
      }
4496 mandeep.dh 8094
    }
8095
 
8096
    public void setFieldValue(_Fields field, Object value) {
8097
      switch (field) {
8098
      case SUCCESS:
8099
        if (value == null) {
8100
          unsetSuccess();
8101
        } else {
4555 mandeep.dh 8102
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 8103
        }
8104
        break;
8105
 
8106
      }
8107
    }
8108
 
8109
    public Object getFieldValue(_Fields field) {
8110
      switch (field) {
8111
      case SUCCESS:
4555 mandeep.dh 8112
        return getSuccess();
4496 mandeep.dh 8113
 
8114
      }
8115
      throw new IllegalStateException();
8116
    }
8117
 
8118
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8119
    public boolean isSet(_Fields field) {
8120
      if (field == null) {
8121
        throw new IllegalArgumentException();
8122
      }
8123
 
8124
      switch (field) {
8125
      case SUCCESS:
8126
        return isSetSuccess();
8127
      }
8128
      throw new IllegalStateException();
8129
    }
8130
 
8131
    @Override
8132
    public boolean equals(Object that) {
8133
      if (that == null)
8134
        return false;
4555 mandeep.dh 8135
      if (that instanceof getPurchaseOrderForPurchase_result)
8136
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 8137
      return false;
8138
    }
8139
 
4555 mandeep.dh 8140
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 8141
      if (that == null)
8142
        return false;
8143
 
4555 mandeep.dh 8144
      boolean this_present_success = true && this.isSetSuccess();
8145
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8146
      if (this_present_success || that_present_success) {
8147
        if (!(this_present_success && that_present_success))
8148
          return false;
4555 mandeep.dh 8149
        if (!this.success.equals(that.success))
4496 mandeep.dh 8150
          return false;
8151
      }
8152
 
8153
      return true;
8154
    }
8155
 
8156
    @Override
8157
    public int hashCode() {
8158
      return 0;
8159
    }
8160
 
4555 mandeep.dh 8161
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 8162
      if (!getClass().equals(other.getClass())) {
8163
        return getClass().getName().compareTo(other.getClass().getName());
8164
      }
8165
 
8166
      int lastComparison = 0;
4555 mandeep.dh 8167
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 8168
 
8169
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8170
      if (lastComparison != 0) {
8171
        return lastComparison;
8172
      }
8173
      if (isSetSuccess()) {
8174
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8175
        if (lastComparison != 0) {
8176
          return lastComparison;
8177
        }
8178
      }
8179
      return 0;
8180
    }
8181
 
8182
    public _Fields fieldForId(int fieldId) {
8183
      return _Fields.findByThriftId(fieldId);
8184
    }
8185
 
8186
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8187
      org.apache.thrift.protocol.TField field;
8188
      iprot.readStructBegin();
8189
      while (true)
8190
      {
8191
        field = iprot.readFieldBegin();
8192
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8193
          break;
8194
        }
8195
        switch (field.id) {
8196
          case 0: // SUCCESS
4555 mandeep.dh 8197
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8198
              this.success = new PurchaseOrder();
8199
              this.success.read(iprot);
4496 mandeep.dh 8200
            } else { 
8201
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8202
            }
8203
            break;
8204
          default:
8205
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8206
        }
8207
        iprot.readFieldEnd();
8208
      }
8209
      iprot.readStructEnd();
8210
      validate();
8211
    }
8212
 
8213
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8214
      oprot.writeStructBegin(STRUCT_DESC);
8215
 
8216
      if (this.isSetSuccess()) {
8217
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8218
        this.success.write(oprot);
4496 mandeep.dh 8219
        oprot.writeFieldEnd();
8220
      }
8221
      oprot.writeFieldStop();
8222
      oprot.writeStructEnd();
8223
    }
8224
 
8225
    @Override
8226
    public String toString() {
4555 mandeep.dh 8227
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 8228
      boolean first = true;
8229
 
8230
      sb.append("success:");
4555 mandeep.dh 8231
      if (this.success == null) {
8232
        sb.append("null");
8233
      } else {
8234
        sb.append(this.success);
8235
      }
4496 mandeep.dh 8236
      first = false;
8237
      sb.append(")");
8238
      return sb.toString();
8239
    }
8240
 
8241
    public void validate() throws org.apache.thrift.TException {
8242
      // check for required fields
8243
    }
8244
 
8245
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8246
      try {
8247
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8248
      } catch (org.apache.thrift.TException te) {
8249
        throw new java.io.IOException(te);
8250
      }
8251
    }
8252
 
8253
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8254
      try {
8255
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8256
      } catch (org.apache.thrift.TException te) {
8257
        throw new java.io.IOException(te);
8258
      }
8259
    }
8260
 
8261
  }
8262
 
4754 mandeep.dh 8263
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
8264
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
8265
 
8266
    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);
8267
 
8268
    private long warehouseId; // required
8269
 
8270
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8271
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8272
      WAREHOUSE_ID((short)1, "warehouseId");
8273
 
8274
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8275
 
8276
      static {
8277
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8278
          byName.put(field.getFieldName(), field);
8279
        }
8280
      }
8281
 
8282
      /**
8283
       * Find the _Fields constant that matches fieldId, or null if its not found.
8284
       */
8285
      public static _Fields findByThriftId(int fieldId) {
8286
        switch(fieldId) {
8287
          case 1: // WAREHOUSE_ID
8288
            return WAREHOUSE_ID;
8289
          default:
8290
            return null;
8291
        }
8292
      }
8293
 
8294
      /**
8295
       * Find the _Fields constant that matches fieldId, throwing an exception
8296
       * if it is not found.
8297
       */
8298
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8299
        _Fields fields = findByThriftId(fieldId);
8300
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8301
        return fields;
8302
      }
8303
 
8304
      /**
8305
       * Find the _Fields constant that matches name, or null if its not found.
8306
       */
8307
      public static _Fields findByName(String name) {
8308
        return byName.get(name);
8309
      }
8310
 
8311
      private final short _thriftId;
8312
      private final String _fieldName;
8313
 
8314
      _Fields(short thriftId, String fieldName) {
8315
        _thriftId = thriftId;
8316
        _fieldName = fieldName;
8317
      }
8318
 
8319
      public short getThriftFieldId() {
8320
        return _thriftId;
8321
      }
8322
 
8323
      public String getFieldName() {
8324
        return _fieldName;
8325
      }
8326
    }
8327
 
8328
    // isset id assignments
8329
    private static final int __WAREHOUSEID_ISSET_ID = 0;
8330
    private BitSet __isset_bit_vector = new BitSet(1);
8331
 
8332
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8333
    static {
8334
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8335
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8336
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8337
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8338
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
8339
    }
8340
 
8341
    public getPendingPurchaseOrders_args() {
8342
    }
8343
 
8344
    public getPendingPurchaseOrders_args(
8345
      long warehouseId)
8346
    {
8347
      this();
8348
      this.warehouseId = warehouseId;
8349
      setWarehouseIdIsSet(true);
8350
    }
8351
 
8352
    /**
8353
     * Performs a deep copy on <i>other</i>.
8354
     */
8355
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
8356
      __isset_bit_vector.clear();
8357
      __isset_bit_vector.or(other.__isset_bit_vector);
8358
      this.warehouseId = other.warehouseId;
8359
    }
8360
 
8361
    public getPendingPurchaseOrders_args deepCopy() {
8362
      return new getPendingPurchaseOrders_args(this);
8363
    }
8364
 
8365
    @Override
8366
    public void clear() {
8367
      setWarehouseIdIsSet(false);
8368
      this.warehouseId = 0;
8369
    }
8370
 
8371
    public long getWarehouseId() {
8372
      return this.warehouseId;
8373
    }
8374
 
8375
    public void setWarehouseId(long warehouseId) {
8376
      this.warehouseId = warehouseId;
8377
      setWarehouseIdIsSet(true);
8378
    }
8379
 
8380
    public void unsetWarehouseId() {
8381
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8382
    }
8383
 
8384
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8385
    public boolean isSetWarehouseId() {
8386
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
8387
    }
8388
 
8389
    public void setWarehouseIdIsSet(boolean value) {
8390
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
8391
    }
8392
 
8393
    public void setFieldValue(_Fields field, Object value) {
8394
      switch (field) {
8395
      case WAREHOUSE_ID:
8396
        if (value == null) {
8397
          unsetWarehouseId();
8398
        } else {
8399
          setWarehouseId((Long)value);
8400
        }
8401
        break;
8402
 
8403
      }
8404
    }
8405
 
8406
    public Object getFieldValue(_Fields field) {
8407
      switch (field) {
8408
      case WAREHOUSE_ID:
8409
        return Long.valueOf(getWarehouseId());
8410
 
8411
      }
8412
      throw new IllegalStateException();
8413
    }
8414
 
8415
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8416
    public boolean isSet(_Fields field) {
8417
      if (field == null) {
8418
        throw new IllegalArgumentException();
8419
      }
8420
 
8421
      switch (field) {
8422
      case WAREHOUSE_ID:
8423
        return isSetWarehouseId();
8424
      }
8425
      throw new IllegalStateException();
8426
    }
8427
 
8428
    @Override
8429
    public boolean equals(Object that) {
8430
      if (that == null)
8431
        return false;
8432
      if (that instanceof getPendingPurchaseOrders_args)
8433
        return this.equals((getPendingPurchaseOrders_args)that);
8434
      return false;
8435
    }
8436
 
8437
    public boolean equals(getPendingPurchaseOrders_args that) {
8438
      if (that == null)
8439
        return false;
8440
 
8441
      boolean this_present_warehouseId = true;
8442
      boolean that_present_warehouseId = true;
8443
      if (this_present_warehouseId || that_present_warehouseId) {
8444
        if (!(this_present_warehouseId && that_present_warehouseId))
8445
          return false;
8446
        if (this.warehouseId != that.warehouseId)
8447
          return false;
8448
      }
8449
 
8450
      return true;
8451
    }
8452
 
8453
    @Override
8454
    public int hashCode() {
8455
      return 0;
8456
    }
8457
 
8458
    public int compareTo(getPendingPurchaseOrders_args other) {
8459
      if (!getClass().equals(other.getClass())) {
8460
        return getClass().getName().compareTo(other.getClass().getName());
8461
      }
8462
 
8463
      int lastComparison = 0;
8464
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
8465
 
8466
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
8467
      if (lastComparison != 0) {
8468
        return lastComparison;
8469
      }
8470
      if (isSetWarehouseId()) {
8471
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
8472
        if (lastComparison != 0) {
8473
          return lastComparison;
8474
        }
8475
      }
8476
      return 0;
8477
    }
8478
 
8479
    public _Fields fieldForId(int fieldId) {
8480
      return _Fields.findByThriftId(fieldId);
8481
    }
8482
 
8483
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8484
      org.apache.thrift.protocol.TField field;
8485
      iprot.readStructBegin();
8486
      while (true)
8487
      {
8488
        field = iprot.readFieldBegin();
8489
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8490
          break;
8491
        }
8492
        switch (field.id) {
8493
          case 1: // WAREHOUSE_ID
8494
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8495
              this.warehouseId = iprot.readI64();
8496
              setWarehouseIdIsSet(true);
8497
            } else { 
8498
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8499
            }
8500
            break;
8501
          default:
8502
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8503
        }
8504
        iprot.readFieldEnd();
8505
      }
8506
      iprot.readStructEnd();
8507
      validate();
8508
    }
8509
 
8510
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8511
      validate();
8512
 
8513
      oprot.writeStructBegin(STRUCT_DESC);
8514
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8515
      oprot.writeI64(this.warehouseId);
8516
      oprot.writeFieldEnd();
8517
      oprot.writeFieldStop();
8518
      oprot.writeStructEnd();
8519
    }
8520
 
8521
    @Override
8522
    public String toString() {
8523
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
8524
      boolean first = true;
8525
 
8526
      sb.append("warehouseId:");
8527
      sb.append(this.warehouseId);
8528
      first = false;
8529
      sb.append(")");
8530
      return sb.toString();
8531
    }
8532
 
8533
    public void validate() throws org.apache.thrift.TException {
8534
      // check for required fields
8535
    }
8536
 
8537
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8538
      try {
8539
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8540
      } catch (org.apache.thrift.TException te) {
8541
        throw new java.io.IOException(te);
8542
      }
8543
    }
8544
 
8545
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8546
      try {
8547
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8548
        __isset_bit_vector = new BitSet(1);
8549
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8550
      } catch (org.apache.thrift.TException te) {
8551
        throw new java.io.IOException(te);
8552
      }
8553
    }
8554
 
8555
  }
8556
 
8557
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
8558
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
8559
 
8560
    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);
8561
    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);
8562
 
8563
    private List<PurchaseOrder> success; // required
8564
    private PurchaseServiceException e; // required
8565
 
8566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8567
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8568
      SUCCESS((short)0, "success"),
8569
      E((short)1, "e");
8570
 
8571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8572
 
8573
      static {
8574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8575
          byName.put(field.getFieldName(), field);
8576
        }
8577
      }
8578
 
8579
      /**
8580
       * Find the _Fields constant that matches fieldId, or null if its not found.
8581
       */
8582
      public static _Fields findByThriftId(int fieldId) {
8583
        switch(fieldId) {
8584
          case 0: // SUCCESS
8585
            return SUCCESS;
8586
          case 1: // E
8587
            return E;
8588
          default:
8589
            return null;
8590
        }
8591
      }
8592
 
8593
      /**
8594
       * Find the _Fields constant that matches fieldId, throwing an exception
8595
       * if it is not found.
8596
       */
8597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8598
        _Fields fields = findByThriftId(fieldId);
8599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8600
        return fields;
8601
      }
8602
 
8603
      /**
8604
       * Find the _Fields constant that matches name, or null if its not found.
8605
       */
8606
      public static _Fields findByName(String name) {
8607
        return byName.get(name);
8608
      }
8609
 
8610
      private final short _thriftId;
8611
      private final String _fieldName;
8612
 
8613
      _Fields(short thriftId, String fieldName) {
8614
        _thriftId = thriftId;
8615
        _fieldName = fieldName;
8616
      }
8617
 
8618
      public short getThriftFieldId() {
8619
        return _thriftId;
8620
      }
8621
 
8622
      public String getFieldName() {
8623
        return _fieldName;
8624
      }
8625
    }
8626
 
8627
    // isset id assignments
8628
 
8629
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8630
    static {
8631
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8632
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8633
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8634
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
8635
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8636
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8637
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8638
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
8639
    }
8640
 
8641
    public getPendingPurchaseOrders_result() {
8642
    }
8643
 
8644
    public getPendingPurchaseOrders_result(
8645
      List<PurchaseOrder> success,
8646
      PurchaseServiceException e)
8647
    {
8648
      this();
8649
      this.success = success;
8650
      this.e = e;
8651
    }
8652
 
8653
    /**
8654
     * Performs a deep copy on <i>other</i>.
8655
     */
8656
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
8657
      if (other.isSetSuccess()) {
8658
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
8659
        for (PurchaseOrder other_element : other.success) {
8660
          __this__success.add(new PurchaseOrder(other_element));
8661
        }
8662
        this.success = __this__success;
8663
      }
8664
      if (other.isSetE()) {
8665
        this.e = new PurchaseServiceException(other.e);
8666
      }
8667
    }
8668
 
8669
    public getPendingPurchaseOrders_result deepCopy() {
8670
      return new getPendingPurchaseOrders_result(this);
8671
    }
8672
 
8673
    @Override
8674
    public void clear() {
8675
      this.success = null;
8676
      this.e = null;
8677
    }
8678
 
8679
    public int getSuccessSize() {
8680
      return (this.success == null) ? 0 : this.success.size();
8681
    }
8682
 
8683
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
8684
      return (this.success == null) ? null : this.success.iterator();
8685
    }
8686
 
8687
    public void addToSuccess(PurchaseOrder elem) {
8688
      if (this.success == null) {
8689
        this.success = new ArrayList<PurchaseOrder>();
8690
      }
8691
      this.success.add(elem);
8692
    }
8693
 
8694
    public List<PurchaseOrder> getSuccess() {
8695
      return this.success;
8696
    }
8697
 
8698
    public void setSuccess(List<PurchaseOrder> success) {
8699
      this.success = success;
8700
    }
8701
 
8702
    public void unsetSuccess() {
8703
      this.success = null;
8704
    }
8705
 
8706
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8707
    public boolean isSetSuccess() {
8708
      return this.success != null;
8709
    }
8710
 
8711
    public void setSuccessIsSet(boolean value) {
8712
      if (!value) {
8713
        this.success = null;
8714
      }
8715
    }
8716
 
8717
    public PurchaseServiceException getE() {
8718
      return this.e;
8719
    }
8720
 
8721
    public void setE(PurchaseServiceException e) {
8722
      this.e = e;
8723
    }
8724
 
8725
    public void unsetE() {
8726
      this.e = null;
8727
    }
8728
 
8729
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8730
    public boolean isSetE() {
8731
      return this.e != null;
8732
    }
8733
 
8734
    public void setEIsSet(boolean value) {
8735
      if (!value) {
8736
        this.e = null;
8737
      }
8738
    }
8739
 
8740
    public void setFieldValue(_Fields field, Object value) {
8741
      switch (field) {
8742
      case SUCCESS:
8743
        if (value == null) {
8744
          unsetSuccess();
8745
        } else {
8746
          setSuccess((List<PurchaseOrder>)value);
8747
        }
8748
        break;
8749
 
8750
      case E:
8751
        if (value == null) {
8752
          unsetE();
8753
        } else {
8754
          setE((PurchaseServiceException)value);
8755
        }
8756
        break;
8757
 
8758
      }
8759
    }
8760
 
8761
    public Object getFieldValue(_Fields field) {
8762
      switch (field) {
8763
      case SUCCESS:
8764
        return getSuccess();
8765
 
8766
      case E:
8767
        return getE();
8768
 
8769
      }
8770
      throw new IllegalStateException();
8771
    }
8772
 
8773
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8774
    public boolean isSet(_Fields field) {
8775
      if (field == null) {
8776
        throw new IllegalArgumentException();
8777
      }
8778
 
8779
      switch (field) {
8780
      case SUCCESS:
8781
        return isSetSuccess();
8782
      case E:
8783
        return isSetE();
8784
      }
8785
      throw new IllegalStateException();
8786
    }
8787
 
8788
    @Override
8789
    public boolean equals(Object that) {
8790
      if (that == null)
8791
        return false;
8792
      if (that instanceof getPendingPurchaseOrders_result)
8793
        return this.equals((getPendingPurchaseOrders_result)that);
8794
      return false;
8795
    }
8796
 
8797
    public boolean equals(getPendingPurchaseOrders_result that) {
8798
      if (that == null)
8799
        return false;
8800
 
8801
      boolean this_present_success = true && this.isSetSuccess();
8802
      boolean that_present_success = true && that.isSetSuccess();
8803
      if (this_present_success || that_present_success) {
8804
        if (!(this_present_success && that_present_success))
8805
          return false;
8806
        if (!this.success.equals(that.success))
8807
          return false;
8808
      }
8809
 
8810
      boolean this_present_e = true && this.isSetE();
8811
      boolean that_present_e = true && that.isSetE();
8812
      if (this_present_e || that_present_e) {
8813
        if (!(this_present_e && that_present_e))
8814
          return false;
8815
        if (!this.e.equals(that.e))
8816
          return false;
8817
      }
8818
 
8819
      return true;
8820
    }
8821
 
8822
    @Override
8823
    public int hashCode() {
8824
      return 0;
8825
    }
8826
 
8827
    public int compareTo(getPendingPurchaseOrders_result other) {
8828
      if (!getClass().equals(other.getClass())) {
8829
        return getClass().getName().compareTo(other.getClass().getName());
8830
      }
8831
 
8832
      int lastComparison = 0;
8833
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
8834
 
8835
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8836
      if (lastComparison != 0) {
8837
        return lastComparison;
8838
      }
8839
      if (isSetSuccess()) {
8840
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8841
        if (lastComparison != 0) {
8842
          return lastComparison;
8843
        }
8844
      }
8845
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8846
      if (lastComparison != 0) {
8847
        return lastComparison;
8848
      }
8849
      if (isSetE()) {
8850
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8851
        if (lastComparison != 0) {
8852
          return lastComparison;
8853
        }
8854
      }
8855
      return 0;
8856
    }
8857
 
8858
    public _Fields fieldForId(int fieldId) {
8859
      return _Fields.findByThriftId(fieldId);
8860
    }
8861
 
8862
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8863
      org.apache.thrift.protocol.TField field;
8864
      iprot.readStructBegin();
8865
      while (true)
8866
      {
8867
        field = iprot.readFieldBegin();
8868
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8869
          break;
8870
        }
8871
        switch (field.id) {
8872
          case 0: // SUCCESS
8873
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8874
              {
6385 amar.kumar 8875
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
8876
                this.success = new ArrayList<PurchaseOrder>(_list16.size);
8877
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
4754 mandeep.dh 8878
                {
6385 amar.kumar 8879
                  PurchaseOrder _elem18; // required
8880
                  _elem18 = new PurchaseOrder();
8881
                  _elem18.read(iprot);
8882
                  this.success.add(_elem18);
4754 mandeep.dh 8883
                }
8884
                iprot.readListEnd();
8885
              }
8886
            } else { 
8887
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8888
            }
8889
            break;
8890
          case 1: // E
8891
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8892
              this.e = new PurchaseServiceException();
8893
              this.e.read(iprot);
8894
            } else { 
8895
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8896
            }
8897
            break;
8898
          default:
8899
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8900
        }
8901
        iprot.readFieldEnd();
8902
      }
8903
      iprot.readStructEnd();
8904
      validate();
8905
    }
8906
 
8907
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8908
      oprot.writeStructBegin(STRUCT_DESC);
8909
 
8910
      if (this.isSetSuccess()) {
8911
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8912
        {
8913
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 8914
          for (PurchaseOrder _iter19 : this.success)
4754 mandeep.dh 8915
          {
6385 amar.kumar 8916
            _iter19.write(oprot);
4754 mandeep.dh 8917
          }
8918
          oprot.writeListEnd();
8919
        }
8920
        oprot.writeFieldEnd();
8921
      } else if (this.isSetE()) {
8922
        oprot.writeFieldBegin(E_FIELD_DESC);
8923
        this.e.write(oprot);
8924
        oprot.writeFieldEnd();
8925
      }
8926
      oprot.writeFieldStop();
8927
      oprot.writeStructEnd();
8928
    }
8929
 
8930
    @Override
8931
    public String toString() {
8932
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
8933
      boolean first = true;
8934
 
8935
      sb.append("success:");
8936
      if (this.success == null) {
8937
        sb.append("null");
8938
      } else {
8939
        sb.append(this.success);
8940
      }
8941
      first = false;
8942
      if (!first) sb.append(", ");
8943
      sb.append("e:");
8944
      if (this.e == null) {
8945
        sb.append("null");
8946
      } else {
8947
        sb.append(this.e);
8948
      }
8949
      first = false;
8950
      sb.append(")");
8951
      return sb.toString();
8952
    }
8953
 
8954
    public void validate() throws org.apache.thrift.TException {
8955
      // check for required fields
8956
    }
8957
 
8958
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8959
      try {
8960
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8961
      } catch (org.apache.thrift.TException te) {
8962
        throw new java.io.IOException(te);
8963
      }
8964
    }
8965
 
8966
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8967
      try {
8968
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8969
      } catch (org.apache.thrift.TException te) {
8970
        throw new java.io.IOException(te);
8971
      }
8972
    }
8973
 
8974
  }
8975
 
8976
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
8977
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
8978
 
8979
 
8980
 
8981
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8982
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8983
;
8984
 
8985
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8986
 
8987
      static {
8988
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8989
          byName.put(field.getFieldName(), field);
8990
        }
8991
      }
8992
 
8993
      /**
8994
       * Find the _Fields constant that matches fieldId, or null if its not found.
8995
       */
8996
      public static _Fields findByThriftId(int fieldId) {
8997
        switch(fieldId) {
8998
          default:
8999
            return null;
9000
        }
9001
      }
9002
 
9003
      /**
9004
       * Find the _Fields constant that matches fieldId, throwing an exception
9005
       * if it is not found.
9006
       */
9007
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9008
        _Fields fields = findByThriftId(fieldId);
9009
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9010
        return fields;
9011
      }
9012
 
9013
      /**
9014
       * Find the _Fields constant that matches name, or null if its not found.
9015
       */
9016
      public static _Fields findByName(String name) {
9017
        return byName.get(name);
9018
      }
9019
 
9020
      private final short _thriftId;
9021
      private final String _fieldName;
9022
 
9023
      _Fields(short thriftId, String fieldName) {
9024
        _thriftId = thriftId;
9025
        _fieldName = fieldName;
9026
      }
9027
 
9028
      public short getThriftFieldId() {
9029
        return _thriftId;
9030
      }
9031
 
9032
      public String getFieldName() {
9033
        return _fieldName;
9034
      }
9035
    }
9036
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9037
    static {
9038
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9039
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9040
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
9041
    }
9042
 
9043
    public getSuppliers_args() {
9044
    }
9045
 
9046
    /**
9047
     * Performs a deep copy on <i>other</i>.
9048
     */
9049
    public getSuppliers_args(getSuppliers_args other) {
9050
    }
9051
 
9052
    public getSuppliers_args deepCopy() {
9053
      return new getSuppliers_args(this);
9054
    }
9055
 
9056
    @Override
9057
    public void clear() {
9058
    }
9059
 
9060
    public void setFieldValue(_Fields field, Object value) {
9061
      switch (field) {
9062
      }
9063
    }
9064
 
9065
    public Object getFieldValue(_Fields field) {
9066
      switch (field) {
9067
      }
9068
      throw new IllegalStateException();
9069
    }
9070
 
9071
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9072
    public boolean isSet(_Fields field) {
9073
      if (field == null) {
9074
        throw new IllegalArgumentException();
9075
      }
9076
 
9077
      switch (field) {
9078
      }
9079
      throw new IllegalStateException();
9080
    }
9081
 
9082
    @Override
9083
    public boolean equals(Object that) {
9084
      if (that == null)
9085
        return false;
9086
      if (that instanceof getSuppliers_args)
9087
        return this.equals((getSuppliers_args)that);
9088
      return false;
9089
    }
9090
 
9091
    public boolean equals(getSuppliers_args that) {
9092
      if (that == null)
9093
        return false;
9094
 
9095
      return true;
9096
    }
9097
 
9098
    @Override
9099
    public int hashCode() {
9100
      return 0;
9101
    }
9102
 
9103
    public int compareTo(getSuppliers_args other) {
9104
      if (!getClass().equals(other.getClass())) {
9105
        return getClass().getName().compareTo(other.getClass().getName());
9106
      }
9107
 
9108
      int lastComparison = 0;
9109
      getSuppliers_args typedOther = (getSuppliers_args)other;
9110
 
9111
      return 0;
9112
    }
9113
 
9114
    public _Fields fieldForId(int fieldId) {
9115
      return _Fields.findByThriftId(fieldId);
9116
    }
9117
 
9118
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9119
      org.apache.thrift.protocol.TField field;
9120
      iprot.readStructBegin();
9121
      while (true)
9122
      {
9123
        field = iprot.readFieldBegin();
9124
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9125
          break;
9126
        }
9127
        switch (field.id) {
9128
          default:
9129
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9130
        }
9131
        iprot.readFieldEnd();
9132
      }
9133
      iprot.readStructEnd();
9134
      validate();
9135
    }
9136
 
9137
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9138
      validate();
9139
 
9140
      oprot.writeStructBegin(STRUCT_DESC);
9141
      oprot.writeFieldStop();
9142
      oprot.writeStructEnd();
9143
    }
9144
 
9145
    @Override
9146
    public String toString() {
9147
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
9148
      boolean first = true;
9149
 
9150
      sb.append(")");
9151
      return sb.toString();
9152
    }
9153
 
9154
    public void validate() throws org.apache.thrift.TException {
9155
      // check for required fields
9156
    }
9157
 
9158
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9159
      try {
9160
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9161
      } catch (org.apache.thrift.TException te) {
9162
        throw new java.io.IOException(te);
9163
      }
9164
    }
9165
 
9166
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9167
      try {
9168
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9169
      } catch (org.apache.thrift.TException te) {
9170
        throw new java.io.IOException(te);
9171
      }
9172
    }
9173
 
9174
  }
9175
 
9176
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
9177
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
9178
 
9179
    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);
9180
    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);
9181
 
9182
    private List<Supplier> success; // required
9183
    private PurchaseServiceException e; // required
9184
 
9185
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9186
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9187
      SUCCESS((short)0, "success"),
9188
      E((short)1, "e");
9189
 
9190
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9191
 
9192
      static {
9193
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9194
          byName.put(field.getFieldName(), field);
9195
        }
9196
      }
9197
 
9198
      /**
9199
       * Find the _Fields constant that matches fieldId, or null if its not found.
9200
       */
9201
      public static _Fields findByThriftId(int fieldId) {
9202
        switch(fieldId) {
9203
          case 0: // SUCCESS
9204
            return SUCCESS;
9205
          case 1: // E
9206
            return E;
9207
          default:
9208
            return null;
9209
        }
9210
      }
9211
 
9212
      /**
9213
       * Find the _Fields constant that matches fieldId, throwing an exception
9214
       * if it is not found.
9215
       */
9216
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9217
        _Fields fields = findByThriftId(fieldId);
9218
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9219
        return fields;
9220
      }
9221
 
9222
      /**
9223
       * Find the _Fields constant that matches name, or null if its not found.
9224
       */
9225
      public static _Fields findByName(String name) {
9226
        return byName.get(name);
9227
      }
9228
 
9229
      private final short _thriftId;
9230
      private final String _fieldName;
9231
 
9232
      _Fields(short thriftId, String fieldName) {
9233
        _thriftId = thriftId;
9234
        _fieldName = fieldName;
9235
      }
9236
 
9237
      public short getThriftFieldId() {
9238
        return _thriftId;
9239
      }
9240
 
9241
      public String getFieldName() {
9242
        return _fieldName;
9243
      }
9244
    }
9245
 
9246
    // isset id assignments
9247
 
9248
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9249
    static {
9250
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9251
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9252
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9253
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
9254
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9255
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9256
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9257
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
9258
    }
9259
 
9260
    public getSuppliers_result() {
9261
    }
9262
 
9263
    public getSuppliers_result(
9264
      List<Supplier> success,
9265
      PurchaseServiceException e)
9266
    {
9267
      this();
9268
      this.success = success;
9269
      this.e = e;
9270
    }
9271
 
9272
    /**
9273
     * Performs a deep copy on <i>other</i>.
9274
     */
9275
    public getSuppliers_result(getSuppliers_result other) {
9276
      if (other.isSetSuccess()) {
9277
        List<Supplier> __this__success = new ArrayList<Supplier>();
9278
        for (Supplier other_element : other.success) {
9279
          __this__success.add(new Supplier(other_element));
9280
        }
9281
        this.success = __this__success;
9282
      }
9283
      if (other.isSetE()) {
9284
        this.e = new PurchaseServiceException(other.e);
9285
      }
9286
    }
9287
 
9288
    public getSuppliers_result deepCopy() {
9289
      return new getSuppliers_result(this);
9290
    }
9291
 
9292
    @Override
9293
    public void clear() {
9294
      this.success = null;
9295
      this.e = null;
9296
    }
9297
 
9298
    public int getSuccessSize() {
9299
      return (this.success == null) ? 0 : this.success.size();
9300
    }
9301
 
9302
    public java.util.Iterator<Supplier> getSuccessIterator() {
9303
      return (this.success == null) ? null : this.success.iterator();
9304
    }
9305
 
9306
    public void addToSuccess(Supplier elem) {
9307
      if (this.success == null) {
9308
        this.success = new ArrayList<Supplier>();
9309
      }
9310
      this.success.add(elem);
9311
    }
9312
 
9313
    public List<Supplier> getSuccess() {
9314
      return this.success;
9315
    }
9316
 
9317
    public void setSuccess(List<Supplier> success) {
9318
      this.success = success;
9319
    }
9320
 
9321
    public void unsetSuccess() {
9322
      this.success = null;
9323
    }
9324
 
9325
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9326
    public boolean isSetSuccess() {
9327
      return this.success != null;
9328
    }
9329
 
9330
    public void setSuccessIsSet(boolean value) {
9331
      if (!value) {
9332
        this.success = null;
9333
      }
9334
    }
9335
 
9336
    public PurchaseServiceException getE() {
9337
      return this.e;
9338
    }
9339
 
9340
    public void setE(PurchaseServiceException e) {
9341
      this.e = e;
9342
    }
9343
 
9344
    public void unsetE() {
9345
      this.e = null;
9346
    }
9347
 
9348
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9349
    public boolean isSetE() {
9350
      return this.e != null;
9351
    }
9352
 
9353
    public void setEIsSet(boolean value) {
9354
      if (!value) {
9355
        this.e = null;
9356
      }
9357
    }
9358
 
9359
    public void setFieldValue(_Fields field, Object value) {
9360
      switch (field) {
9361
      case SUCCESS:
9362
        if (value == null) {
9363
          unsetSuccess();
9364
        } else {
9365
          setSuccess((List<Supplier>)value);
9366
        }
9367
        break;
9368
 
9369
      case E:
9370
        if (value == null) {
9371
          unsetE();
9372
        } else {
9373
          setE((PurchaseServiceException)value);
9374
        }
9375
        break;
9376
 
9377
      }
9378
    }
9379
 
9380
    public Object getFieldValue(_Fields field) {
9381
      switch (field) {
9382
      case SUCCESS:
9383
        return getSuccess();
9384
 
9385
      case E:
9386
        return getE();
9387
 
9388
      }
9389
      throw new IllegalStateException();
9390
    }
9391
 
9392
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9393
    public boolean isSet(_Fields field) {
9394
      if (field == null) {
9395
        throw new IllegalArgumentException();
9396
      }
9397
 
9398
      switch (field) {
9399
      case SUCCESS:
9400
        return isSetSuccess();
9401
      case E:
9402
        return isSetE();
9403
      }
9404
      throw new IllegalStateException();
9405
    }
9406
 
9407
    @Override
9408
    public boolean equals(Object that) {
9409
      if (that == null)
9410
        return false;
9411
      if (that instanceof getSuppliers_result)
9412
        return this.equals((getSuppliers_result)that);
9413
      return false;
9414
    }
9415
 
9416
    public boolean equals(getSuppliers_result that) {
9417
      if (that == null)
9418
        return false;
9419
 
9420
      boolean this_present_success = true && this.isSetSuccess();
9421
      boolean that_present_success = true && that.isSetSuccess();
9422
      if (this_present_success || that_present_success) {
9423
        if (!(this_present_success && that_present_success))
9424
          return false;
9425
        if (!this.success.equals(that.success))
9426
          return false;
9427
      }
9428
 
9429
      boolean this_present_e = true && this.isSetE();
9430
      boolean that_present_e = true && that.isSetE();
9431
      if (this_present_e || that_present_e) {
9432
        if (!(this_present_e && that_present_e))
9433
          return false;
9434
        if (!this.e.equals(that.e))
9435
          return false;
9436
      }
9437
 
9438
      return true;
9439
    }
9440
 
9441
    @Override
9442
    public int hashCode() {
9443
      return 0;
9444
    }
9445
 
9446
    public int compareTo(getSuppliers_result other) {
9447
      if (!getClass().equals(other.getClass())) {
9448
        return getClass().getName().compareTo(other.getClass().getName());
9449
      }
9450
 
9451
      int lastComparison = 0;
9452
      getSuppliers_result typedOther = (getSuppliers_result)other;
9453
 
9454
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9455
      if (lastComparison != 0) {
9456
        return lastComparison;
9457
      }
9458
      if (isSetSuccess()) {
9459
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9460
        if (lastComparison != 0) {
9461
          return lastComparison;
9462
        }
9463
      }
9464
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9465
      if (lastComparison != 0) {
9466
        return lastComparison;
9467
      }
9468
      if (isSetE()) {
9469
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9470
        if (lastComparison != 0) {
9471
          return lastComparison;
9472
        }
9473
      }
9474
      return 0;
9475
    }
9476
 
9477
    public _Fields fieldForId(int fieldId) {
9478
      return _Fields.findByThriftId(fieldId);
9479
    }
9480
 
9481
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9482
      org.apache.thrift.protocol.TField field;
9483
      iprot.readStructBegin();
9484
      while (true)
9485
      {
9486
        field = iprot.readFieldBegin();
9487
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9488
          break;
9489
        }
9490
        switch (field.id) {
9491
          case 0: // SUCCESS
9492
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9493
              {
6385 amar.kumar 9494
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
9495
                this.success = new ArrayList<Supplier>(_list20.size);
9496
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
4754 mandeep.dh 9497
                {
6385 amar.kumar 9498
                  Supplier _elem22; // required
9499
                  _elem22 = new Supplier();
9500
                  _elem22.read(iprot);
9501
                  this.success.add(_elem22);
4754 mandeep.dh 9502
                }
9503
                iprot.readListEnd();
9504
              }
9505
            } else { 
9506
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9507
            }
9508
            break;
9509
          case 1: // E
9510
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9511
              this.e = new PurchaseServiceException();
9512
              this.e.read(iprot);
9513
            } else { 
9514
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9515
            }
9516
            break;
9517
          default:
9518
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9519
        }
9520
        iprot.readFieldEnd();
9521
      }
9522
      iprot.readStructEnd();
9523
      validate();
9524
    }
9525
 
9526
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9527
      oprot.writeStructBegin(STRUCT_DESC);
9528
 
9529
      if (this.isSetSuccess()) {
9530
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9531
        {
9532
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 9533
          for (Supplier _iter23 : this.success)
4754 mandeep.dh 9534
          {
6385 amar.kumar 9535
            _iter23.write(oprot);
4754 mandeep.dh 9536
          }
9537
          oprot.writeListEnd();
9538
        }
9539
        oprot.writeFieldEnd();
9540
      } else if (this.isSetE()) {
9541
        oprot.writeFieldBegin(E_FIELD_DESC);
9542
        this.e.write(oprot);
9543
        oprot.writeFieldEnd();
9544
      }
9545
      oprot.writeFieldStop();
9546
      oprot.writeStructEnd();
9547
    }
9548
 
9549
    @Override
9550
    public String toString() {
9551
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
9552
      boolean first = true;
9553
 
9554
      sb.append("success:");
9555
      if (this.success == null) {
9556
        sb.append("null");
9557
      } else {
9558
        sb.append(this.success);
9559
      }
9560
      first = false;
9561
      if (!first) sb.append(", ");
9562
      sb.append("e:");
9563
      if (this.e == null) {
9564
        sb.append("null");
9565
      } else {
9566
        sb.append(this.e);
9567
      }
9568
      first = false;
9569
      sb.append(")");
9570
      return sb.toString();
9571
    }
9572
 
9573
    public void validate() throws org.apache.thrift.TException {
9574
      // check for required fields
9575
    }
9576
 
9577
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9578
      try {
9579
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9580
      } catch (org.apache.thrift.TException te) {
9581
        throw new java.io.IOException(te);
9582
      }
9583
    }
9584
 
9585
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9586
      try {
9587
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9588
      } catch (org.apache.thrift.TException te) {
9589
        throw new java.io.IOException(te);
9590
      }
9591
    }
9592
 
9593
  }
9594
 
9595
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
9596
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
9597
 
9598
    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);
9599
    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);
9600
    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);
9601
 
9602
    private long purchaseOrderId; // required
9603
    private long itemId; // required
9604
    private long quantity; // required
9605
 
9606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9607
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9608
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
9609
      ITEM_ID((short)2, "itemId"),
9610
      QUANTITY((short)3, "quantity");
9611
 
9612
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9613
 
9614
      static {
9615
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9616
          byName.put(field.getFieldName(), field);
9617
        }
9618
      }
9619
 
9620
      /**
9621
       * Find the _Fields constant that matches fieldId, or null if its not found.
9622
       */
9623
      public static _Fields findByThriftId(int fieldId) {
9624
        switch(fieldId) {
9625
          case 1: // PURCHASE_ORDER_ID
9626
            return PURCHASE_ORDER_ID;
9627
          case 2: // ITEM_ID
9628
            return ITEM_ID;
9629
          case 3: // QUANTITY
9630
            return QUANTITY;
9631
          default:
9632
            return null;
9633
        }
9634
      }
9635
 
9636
      /**
9637
       * Find the _Fields constant that matches fieldId, throwing an exception
9638
       * if it is not found.
9639
       */
9640
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9641
        _Fields fields = findByThriftId(fieldId);
9642
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9643
        return fields;
9644
      }
9645
 
9646
      /**
9647
       * Find the _Fields constant that matches name, or null if its not found.
9648
       */
9649
      public static _Fields findByName(String name) {
9650
        return byName.get(name);
9651
      }
9652
 
9653
      private final short _thriftId;
9654
      private final String _fieldName;
9655
 
9656
      _Fields(short thriftId, String fieldName) {
9657
        _thriftId = thriftId;
9658
        _fieldName = fieldName;
9659
      }
9660
 
9661
      public short getThriftFieldId() {
9662
        return _thriftId;
9663
      }
9664
 
9665
      public String getFieldName() {
9666
        return _fieldName;
9667
      }
9668
    }
9669
 
9670
    // isset id assignments
9671
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
9672
    private static final int __ITEMID_ISSET_ID = 1;
9673
    private static final int __QUANTITY_ISSET_ID = 2;
9674
    private BitSet __isset_bit_vector = new BitSet(3);
9675
 
9676
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9677
    static {
9678
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9679
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9680
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9681
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9682
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9683
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9684
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9685
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9686
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
9687
    }
9688
 
9689
    public fulfillPO_args() {
9690
    }
9691
 
9692
    public fulfillPO_args(
9693
      long purchaseOrderId,
9694
      long itemId,
9695
      long quantity)
9696
    {
9697
      this();
9698
      this.purchaseOrderId = purchaseOrderId;
9699
      setPurchaseOrderIdIsSet(true);
9700
      this.itemId = itemId;
9701
      setItemIdIsSet(true);
9702
      this.quantity = quantity;
9703
      setQuantityIsSet(true);
9704
    }
9705
 
9706
    /**
9707
     * Performs a deep copy on <i>other</i>.
9708
     */
9709
    public fulfillPO_args(fulfillPO_args other) {
9710
      __isset_bit_vector.clear();
9711
      __isset_bit_vector.or(other.__isset_bit_vector);
9712
      this.purchaseOrderId = other.purchaseOrderId;
9713
      this.itemId = other.itemId;
9714
      this.quantity = other.quantity;
9715
    }
9716
 
9717
    public fulfillPO_args deepCopy() {
9718
      return new fulfillPO_args(this);
9719
    }
9720
 
9721
    @Override
9722
    public void clear() {
9723
      setPurchaseOrderIdIsSet(false);
9724
      this.purchaseOrderId = 0;
9725
      setItemIdIsSet(false);
9726
      this.itemId = 0;
9727
      setQuantityIsSet(false);
9728
      this.quantity = 0;
9729
    }
9730
 
9731
    public long getPurchaseOrderId() {
9732
      return this.purchaseOrderId;
9733
    }
9734
 
9735
    public void setPurchaseOrderId(long purchaseOrderId) {
9736
      this.purchaseOrderId = purchaseOrderId;
9737
      setPurchaseOrderIdIsSet(true);
9738
    }
9739
 
9740
    public void unsetPurchaseOrderId() {
9741
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
9742
    }
9743
 
9744
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
9745
    public boolean isSetPurchaseOrderId() {
9746
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
9747
    }
9748
 
9749
    public void setPurchaseOrderIdIsSet(boolean value) {
9750
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
9751
    }
9752
 
9753
    public long getItemId() {
9754
      return this.itemId;
9755
    }
9756
 
9757
    public void setItemId(long itemId) {
9758
      this.itemId = itemId;
9759
      setItemIdIsSet(true);
9760
    }
9761
 
9762
    public void unsetItemId() {
9763
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
9764
    }
9765
 
9766
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
9767
    public boolean isSetItemId() {
9768
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
9769
    }
9770
 
9771
    public void setItemIdIsSet(boolean value) {
9772
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
9773
    }
9774
 
9775
    public long getQuantity() {
9776
      return this.quantity;
9777
    }
9778
 
9779
    public void setQuantity(long quantity) {
9780
      this.quantity = quantity;
9781
      setQuantityIsSet(true);
9782
    }
9783
 
9784
    public void unsetQuantity() {
9785
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
9786
    }
9787
 
9788
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
9789
    public boolean isSetQuantity() {
9790
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
9791
    }
9792
 
9793
    public void setQuantityIsSet(boolean value) {
9794
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
9795
    }
9796
 
9797
    public void setFieldValue(_Fields field, Object value) {
9798
      switch (field) {
9799
      case PURCHASE_ORDER_ID:
9800
        if (value == null) {
9801
          unsetPurchaseOrderId();
9802
        } else {
9803
          setPurchaseOrderId((Long)value);
9804
        }
9805
        break;
9806
 
9807
      case ITEM_ID:
9808
        if (value == null) {
9809
          unsetItemId();
9810
        } else {
9811
          setItemId((Long)value);
9812
        }
9813
        break;
9814
 
9815
      case QUANTITY:
9816
        if (value == null) {
9817
          unsetQuantity();
9818
        } else {
9819
          setQuantity((Long)value);
9820
        }
9821
        break;
9822
 
9823
      }
9824
    }
9825
 
9826
    public Object getFieldValue(_Fields field) {
9827
      switch (field) {
9828
      case PURCHASE_ORDER_ID:
9829
        return Long.valueOf(getPurchaseOrderId());
9830
 
9831
      case ITEM_ID:
9832
        return Long.valueOf(getItemId());
9833
 
9834
      case QUANTITY:
9835
        return Long.valueOf(getQuantity());
9836
 
9837
      }
9838
      throw new IllegalStateException();
9839
    }
9840
 
9841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9842
    public boolean isSet(_Fields field) {
9843
      if (field == null) {
9844
        throw new IllegalArgumentException();
9845
      }
9846
 
9847
      switch (field) {
9848
      case PURCHASE_ORDER_ID:
9849
        return isSetPurchaseOrderId();
9850
      case ITEM_ID:
9851
        return isSetItemId();
9852
      case QUANTITY:
9853
        return isSetQuantity();
9854
      }
9855
      throw new IllegalStateException();
9856
    }
9857
 
9858
    @Override
9859
    public boolean equals(Object that) {
9860
      if (that == null)
9861
        return false;
9862
      if (that instanceof fulfillPO_args)
9863
        return this.equals((fulfillPO_args)that);
9864
      return false;
9865
    }
9866
 
9867
    public boolean equals(fulfillPO_args that) {
9868
      if (that == null)
9869
        return false;
9870
 
9871
      boolean this_present_purchaseOrderId = true;
9872
      boolean that_present_purchaseOrderId = true;
9873
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
9874
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
9875
          return false;
9876
        if (this.purchaseOrderId != that.purchaseOrderId)
9877
          return false;
9878
      }
9879
 
9880
      boolean this_present_itemId = true;
9881
      boolean that_present_itemId = true;
9882
      if (this_present_itemId || that_present_itemId) {
9883
        if (!(this_present_itemId && that_present_itemId))
9884
          return false;
9885
        if (this.itemId != that.itemId)
9886
          return false;
9887
      }
9888
 
9889
      boolean this_present_quantity = true;
9890
      boolean that_present_quantity = true;
9891
      if (this_present_quantity || that_present_quantity) {
9892
        if (!(this_present_quantity && that_present_quantity))
9893
          return false;
9894
        if (this.quantity != that.quantity)
9895
          return false;
9896
      }
9897
 
9898
      return true;
9899
    }
9900
 
9901
    @Override
9902
    public int hashCode() {
9903
      return 0;
9904
    }
9905
 
9906
    public int compareTo(fulfillPO_args other) {
9907
      if (!getClass().equals(other.getClass())) {
9908
        return getClass().getName().compareTo(other.getClass().getName());
9909
      }
9910
 
9911
      int lastComparison = 0;
9912
      fulfillPO_args typedOther = (fulfillPO_args)other;
9913
 
9914
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
9915
      if (lastComparison != 0) {
9916
        return lastComparison;
9917
      }
9918
      if (isSetPurchaseOrderId()) {
9919
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
9920
        if (lastComparison != 0) {
9921
          return lastComparison;
9922
        }
9923
      }
9924
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
9925
      if (lastComparison != 0) {
9926
        return lastComparison;
9927
      }
9928
      if (isSetItemId()) {
9929
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
9930
        if (lastComparison != 0) {
9931
          return lastComparison;
9932
        }
9933
      }
9934
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
9935
      if (lastComparison != 0) {
9936
        return lastComparison;
9937
      }
9938
      if (isSetQuantity()) {
9939
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
9940
        if (lastComparison != 0) {
9941
          return lastComparison;
9942
        }
9943
      }
9944
      return 0;
9945
    }
9946
 
9947
    public _Fields fieldForId(int fieldId) {
9948
      return _Fields.findByThriftId(fieldId);
9949
    }
9950
 
9951
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9952
      org.apache.thrift.protocol.TField field;
9953
      iprot.readStructBegin();
9954
      while (true)
9955
      {
9956
        field = iprot.readFieldBegin();
9957
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9958
          break;
9959
        }
9960
        switch (field.id) {
9961
          case 1: // PURCHASE_ORDER_ID
9962
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9963
              this.purchaseOrderId = iprot.readI64();
9964
              setPurchaseOrderIdIsSet(true);
9965
            } else { 
9966
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9967
            }
9968
            break;
9969
          case 2: // ITEM_ID
9970
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9971
              this.itemId = iprot.readI64();
9972
              setItemIdIsSet(true);
9973
            } else { 
9974
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9975
            }
9976
            break;
9977
          case 3: // QUANTITY
9978
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9979
              this.quantity = iprot.readI64();
9980
              setQuantityIsSet(true);
9981
            } else { 
9982
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9983
            }
9984
            break;
9985
          default:
9986
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9987
        }
9988
        iprot.readFieldEnd();
9989
      }
9990
      iprot.readStructEnd();
9991
      validate();
9992
    }
9993
 
9994
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9995
      validate();
9996
 
9997
      oprot.writeStructBegin(STRUCT_DESC);
9998
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
9999
      oprot.writeI64(this.purchaseOrderId);
10000
      oprot.writeFieldEnd();
10001
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10002
      oprot.writeI64(this.itemId);
10003
      oprot.writeFieldEnd();
10004
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10005
      oprot.writeI64(this.quantity);
10006
      oprot.writeFieldEnd();
10007
      oprot.writeFieldStop();
10008
      oprot.writeStructEnd();
10009
    }
10010
 
10011
    @Override
10012
    public String toString() {
10013
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
10014
      boolean first = true;
10015
 
10016
      sb.append("purchaseOrderId:");
10017
      sb.append(this.purchaseOrderId);
10018
      first = false;
10019
      if (!first) sb.append(", ");
10020
      sb.append("itemId:");
10021
      sb.append(this.itemId);
10022
      first = false;
10023
      if (!first) sb.append(", ");
10024
      sb.append("quantity:");
10025
      sb.append(this.quantity);
10026
      first = false;
10027
      sb.append(")");
10028
      return sb.toString();
10029
    }
10030
 
10031
    public void validate() throws org.apache.thrift.TException {
10032
      // check for required fields
10033
    }
10034
 
10035
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10036
      try {
10037
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10038
      } catch (org.apache.thrift.TException te) {
10039
        throw new java.io.IOException(te);
10040
      }
10041
    }
10042
 
10043
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10044
      try {
10045
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10046
        __isset_bit_vector = new BitSet(1);
10047
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10048
      } catch (org.apache.thrift.TException te) {
10049
        throw new java.io.IOException(te);
10050
      }
10051
    }
10052
 
10053
  }
10054
 
10055
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10056
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
10057
 
10058
    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);
10059
 
10060
    private PurchaseServiceException e; // required
10061
 
10062
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10063
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10064
      E((short)1, "e");
10065
 
10066
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10067
 
10068
      static {
10069
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10070
          byName.put(field.getFieldName(), field);
10071
        }
10072
      }
10073
 
10074
      /**
10075
       * Find the _Fields constant that matches fieldId, or null if its not found.
10076
       */
10077
      public static _Fields findByThriftId(int fieldId) {
10078
        switch(fieldId) {
10079
          case 1: // E
10080
            return E;
10081
          default:
10082
            return null;
10083
        }
10084
      }
10085
 
10086
      /**
10087
       * Find the _Fields constant that matches fieldId, throwing an exception
10088
       * if it is not found.
10089
       */
10090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10091
        _Fields fields = findByThriftId(fieldId);
10092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10093
        return fields;
10094
      }
10095
 
10096
      /**
10097
       * Find the _Fields constant that matches name, or null if its not found.
10098
       */
10099
      public static _Fields findByName(String name) {
10100
        return byName.get(name);
10101
      }
10102
 
10103
      private final short _thriftId;
10104
      private final String _fieldName;
10105
 
10106
      _Fields(short thriftId, String fieldName) {
10107
        _thriftId = thriftId;
10108
        _fieldName = fieldName;
10109
      }
10110
 
10111
      public short getThriftFieldId() {
10112
        return _thriftId;
10113
      }
10114
 
10115
      public String getFieldName() {
10116
        return _fieldName;
10117
      }
10118
    }
10119
 
10120
    // isset id assignments
10121
 
10122
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10123
    static {
10124
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10125
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10126
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10127
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10128
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
10129
    }
10130
 
10131
    public fulfillPO_result() {
10132
    }
10133
 
10134
    public fulfillPO_result(
10135
      PurchaseServiceException e)
10136
    {
10137
      this();
10138
      this.e = e;
10139
    }
10140
 
10141
    /**
10142
     * Performs a deep copy on <i>other</i>.
10143
     */
10144
    public fulfillPO_result(fulfillPO_result other) {
10145
      if (other.isSetE()) {
10146
        this.e = new PurchaseServiceException(other.e);
10147
      }
10148
    }
10149
 
10150
    public fulfillPO_result deepCopy() {
10151
      return new fulfillPO_result(this);
10152
    }
10153
 
10154
    @Override
10155
    public void clear() {
10156
      this.e = null;
10157
    }
10158
 
10159
    public PurchaseServiceException getE() {
10160
      return this.e;
10161
    }
10162
 
10163
    public void setE(PurchaseServiceException e) {
10164
      this.e = e;
10165
    }
10166
 
10167
    public void unsetE() {
10168
      this.e = null;
10169
    }
10170
 
10171
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10172
    public boolean isSetE() {
10173
      return this.e != null;
10174
    }
10175
 
10176
    public void setEIsSet(boolean value) {
10177
      if (!value) {
10178
        this.e = null;
10179
      }
10180
    }
10181
 
10182
    public void setFieldValue(_Fields field, Object value) {
10183
      switch (field) {
10184
      case E:
10185
        if (value == null) {
10186
          unsetE();
10187
        } else {
10188
          setE((PurchaseServiceException)value);
10189
        }
10190
        break;
10191
 
10192
      }
10193
    }
10194
 
10195
    public Object getFieldValue(_Fields field) {
10196
      switch (field) {
10197
      case E:
10198
        return getE();
10199
 
10200
      }
10201
      throw new IllegalStateException();
10202
    }
10203
 
10204
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10205
    public boolean isSet(_Fields field) {
10206
      if (field == null) {
10207
        throw new IllegalArgumentException();
10208
      }
10209
 
10210
      switch (field) {
10211
      case E:
10212
        return isSetE();
10213
      }
10214
      throw new IllegalStateException();
10215
    }
10216
 
10217
    @Override
10218
    public boolean equals(Object that) {
10219
      if (that == null)
10220
        return false;
10221
      if (that instanceof fulfillPO_result)
10222
        return this.equals((fulfillPO_result)that);
10223
      return false;
10224
    }
10225
 
10226
    public boolean equals(fulfillPO_result that) {
10227
      if (that == null)
10228
        return false;
10229
 
10230
      boolean this_present_e = true && this.isSetE();
10231
      boolean that_present_e = true && that.isSetE();
10232
      if (this_present_e || that_present_e) {
10233
        if (!(this_present_e && that_present_e))
10234
          return false;
10235
        if (!this.e.equals(that.e))
10236
          return false;
10237
      }
10238
 
10239
      return true;
10240
    }
10241
 
10242
    @Override
10243
    public int hashCode() {
10244
      return 0;
10245
    }
10246
 
10247
    public int compareTo(fulfillPO_result other) {
10248
      if (!getClass().equals(other.getClass())) {
10249
        return getClass().getName().compareTo(other.getClass().getName());
10250
      }
10251
 
10252
      int lastComparison = 0;
10253
      fulfillPO_result typedOther = (fulfillPO_result)other;
10254
 
10255
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10256
      if (lastComparison != 0) {
10257
        return lastComparison;
10258
      }
10259
      if (isSetE()) {
10260
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10261
        if (lastComparison != 0) {
10262
          return lastComparison;
10263
        }
10264
      }
10265
      return 0;
10266
    }
10267
 
10268
    public _Fields fieldForId(int fieldId) {
10269
      return _Fields.findByThriftId(fieldId);
10270
    }
10271
 
10272
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10273
      org.apache.thrift.protocol.TField field;
10274
      iprot.readStructBegin();
10275
      while (true)
10276
      {
10277
        field = iprot.readFieldBegin();
10278
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10279
          break;
10280
        }
10281
        switch (field.id) {
10282
          case 1: // E
10283
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10284
              this.e = new PurchaseServiceException();
10285
              this.e.read(iprot);
10286
            } else { 
10287
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10288
            }
10289
            break;
10290
          default:
10291
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10292
        }
10293
        iprot.readFieldEnd();
10294
      }
10295
      iprot.readStructEnd();
10296
      validate();
10297
    }
10298
 
10299
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10300
      oprot.writeStructBegin(STRUCT_DESC);
10301
 
10302
      if (this.isSetE()) {
10303
        oprot.writeFieldBegin(E_FIELD_DESC);
10304
        this.e.write(oprot);
10305
        oprot.writeFieldEnd();
10306
      }
10307
      oprot.writeFieldStop();
10308
      oprot.writeStructEnd();
10309
    }
10310
 
10311
    @Override
10312
    public String toString() {
10313
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
10314
      boolean first = true;
10315
 
10316
      sb.append("e:");
10317
      if (this.e == null) {
10318
        sb.append("null");
10319
      } else {
10320
        sb.append(this.e);
10321
      }
10322
      first = false;
10323
      sb.append(")");
10324
      return sb.toString();
10325
    }
10326
 
10327
    public void validate() throws org.apache.thrift.TException {
10328
      // check for required fields
10329
    }
10330
 
10331
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10332
      try {
10333
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10334
      } catch (org.apache.thrift.TException te) {
10335
        throw new java.io.IOException(te);
10336
      }
10337
    }
10338
 
10339
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10340
      try {
10341
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10342
      } catch (org.apache.thrift.TException te) {
10343
        throw new java.io.IOException(te);
10344
      }
10345
    }
10346
 
10347
  }
10348
 
10349
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
10350
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
10351
 
10352
    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);
10353
 
10354
    private PurchaseOrder purchaseOrder; // required
10355
 
10356
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10357
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10358
      PURCHASE_ORDER((short)1, "purchaseOrder");
10359
 
10360
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10361
 
10362
      static {
10363
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10364
          byName.put(field.getFieldName(), field);
10365
        }
10366
      }
10367
 
10368
      /**
10369
       * Find the _Fields constant that matches fieldId, or null if its not found.
10370
       */
10371
      public static _Fields findByThriftId(int fieldId) {
10372
        switch(fieldId) {
10373
          case 1: // PURCHASE_ORDER
10374
            return PURCHASE_ORDER;
10375
          default:
10376
            return null;
10377
        }
10378
      }
10379
 
10380
      /**
10381
       * Find the _Fields constant that matches fieldId, throwing an exception
10382
       * if it is not found.
10383
       */
10384
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10385
        _Fields fields = findByThriftId(fieldId);
10386
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10387
        return fields;
10388
      }
10389
 
10390
      /**
10391
       * Find the _Fields constant that matches name, or null if its not found.
10392
       */
10393
      public static _Fields findByName(String name) {
10394
        return byName.get(name);
10395
      }
10396
 
10397
      private final short _thriftId;
10398
      private final String _fieldName;
10399
 
10400
      _Fields(short thriftId, String fieldName) {
10401
        _thriftId = thriftId;
10402
        _fieldName = fieldName;
10403
      }
10404
 
10405
      public short getThriftFieldId() {
10406
        return _thriftId;
10407
      }
10408
 
10409
      public String getFieldName() {
10410
        return _fieldName;
10411
      }
10412
    }
10413
 
10414
    // isset id assignments
10415
 
10416
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10417
    static {
10418
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10419
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10420
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
10421
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10422
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
10423
    }
10424
 
10425
    public updatePurchaseOrder_args() {
10426
    }
10427
 
10428
    public updatePurchaseOrder_args(
10429
      PurchaseOrder purchaseOrder)
10430
    {
10431
      this();
10432
      this.purchaseOrder = purchaseOrder;
10433
    }
10434
 
10435
    /**
10436
     * Performs a deep copy on <i>other</i>.
10437
     */
10438
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
10439
      if (other.isSetPurchaseOrder()) {
10440
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
10441
      }
10442
    }
10443
 
10444
    public updatePurchaseOrder_args deepCopy() {
10445
      return new updatePurchaseOrder_args(this);
10446
    }
10447
 
10448
    @Override
10449
    public void clear() {
10450
      this.purchaseOrder = null;
10451
    }
10452
 
10453
    public PurchaseOrder getPurchaseOrder() {
10454
      return this.purchaseOrder;
10455
    }
10456
 
10457
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
10458
      this.purchaseOrder = purchaseOrder;
10459
    }
10460
 
10461
    public void unsetPurchaseOrder() {
10462
      this.purchaseOrder = null;
10463
    }
10464
 
10465
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
10466
    public boolean isSetPurchaseOrder() {
10467
      return this.purchaseOrder != null;
10468
    }
10469
 
10470
    public void setPurchaseOrderIsSet(boolean value) {
10471
      if (!value) {
10472
        this.purchaseOrder = null;
10473
      }
10474
    }
10475
 
10476
    public void setFieldValue(_Fields field, Object value) {
10477
      switch (field) {
10478
      case PURCHASE_ORDER:
10479
        if (value == null) {
10480
          unsetPurchaseOrder();
10481
        } else {
10482
          setPurchaseOrder((PurchaseOrder)value);
10483
        }
10484
        break;
10485
 
10486
      }
10487
    }
10488
 
10489
    public Object getFieldValue(_Fields field) {
10490
      switch (field) {
10491
      case PURCHASE_ORDER:
10492
        return getPurchaseOrder();
10493
 
10494
      }
10495
      throw new IllegalStateException();
10496
    }
10497
 
10498
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10499
    public boolean isSet(_Fields field) {
10500
      if (field == null) {
10501
        throw new IllegalArgumentException();
10502
      }
10503
 
10504
      switch (field) {
10505
      case PURCHASE_ORDER:
10506
        return isSetPurchaseOrder();
10507
      }
10508
      throw new IllegalStateException();
10509
    }
10510
 
10511
    @Override
10512
    public boolean equals(Object that) {
10513
      if (that == null)
10514
        return false;
10515
      if (that instanceof updatePurchaseOrder_args)
10516
        return this.equals((updatePurchaseOrder_args)that);
10517
      return false;
10518
    }
10519
 
10520
    public boolean equals(updatePurchaseOrder_args that) {
10521
      if (that == null)
10522
        return false;
10523
 
10524
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
10525
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
10526
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
10527
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
10528
          return false;
10529
        if (!this.purchaseOrder.equals(that.purchaseOrder))
10530
          return false;
10531
      }
10532
 
10533
      return true;
10534
    }
10535
 
10536
    @Override
10537
    public int hashCode() {
10538
      return 0;
10539
    }
10540
 
10541
    public int compareTo(updatePurchaseOrder_args other) {
10542
      if (!getClass().equals(other.getClass())) {
10543
        return getClass().getName().compareTo(other.getClass().getName());
10544
      }
10545
 
10546
      int lastComparison = 0;
10547
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
10548
 
10549
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
10550
      if (lastComparison != 0) {
10551
        return lastComparison;
10552
      }
10553
      if (isSetPurchaseOrder()) {
10554
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
10555
        if (lastComparison != 0) {
10556
          return lastComparison;
10557
        }
10558
      }
10559
      return 0;
10560
    }
10561
 
10562
    public _Fields fieldForId(int fieldId) {
10563
      return _Fields.findByThriftId(fieldId);
10564
    }
10565
 
10566
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10567
      org.apache.thrift.protocol.TField field;
10568
      iprot.readStructBegin();
10569
      while (true)
10570
      {
10571
        field = iprot.readFieldBegin();
10572
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10573
          break;
10574
        }
10575
        switch (field.id) {
10576
          case 1: // PURCHASE_ORDER
10577
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10578
              this.purchaseOrder = new PurchaseOrder();
10579
              this.purchaseOrder.read(iprot);
10580
            } else { 
10581
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10582
            }
10583
            break;
10584
          default:
10585
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10586
        }
10587
        iprot.readFieldEnd();
10588
      }
10589
      iprot.readStructEnd();
10590
      validate();
10591
    }
10592
 
10593
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10594
      validate();
10595
 
10596
      oprot.writeStructBegin(STRUCT_DESC);
10597
      if (this.purchaseOrder != null) {
10598
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
10599
        this.purchaseOrder.write(oprot);
10600
        oprot.writeFieldEnd();
10601
      }
10602
      oprot.writeFieldStop();
10603
      oprot.writeStructEnd();
10604
    }
10605
 
10606
    @Override
10607
    public String toString() {
10608
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
10609
      boolean first = true;
10610
 
10611
      sb.append("purchaseOrder:");
10612
      if (this.purchaseOrder == null) {
10613
        sb.append("null");
10614
      } else {
10615
        sb.append(this.purchaseOrder);
10616
      }
10617
      first = false;
10618
      sb.append(")");
10619
      return sb.toString();
10620
    }
10621
 
10622
    public void validate() throws org.apache.thrift.TException {
10623
      // check for required fields
10624
    }
10625
 
10626
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10627
      try {
10628
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10629
      } catch (org.apache.thrift.TException te) {
10630
        throw new java.io.IOException(te);
10631
      }
10632
    }
10633
 
10634
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10635
      try {
10636
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10637
      } catch (org.apache.thrift.TException te) {
10638
        throw new java.io.IOException(te);
10639
      }
10640
    }
10641
 
10642
  }
10643
 
10644
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
10645
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
10646
 
10647
    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);
10648
 
10649
    private PurchaseServiceException e; // required
10650
 
10651
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10652
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10653
      E((short)1, "e");
10654
 
10655
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10656
 
10657
      static {
10658
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10659
          byName.put(field.getFieldName(), field);
10660
        }
10661
      }
10662
 
10663
      /**
10664
       * Find the _Fields constant that matches fieldId, or null if its not found.
10665
       */
10666
      public static _Fields findByThriftId(int fieldId) {
10667
        switch(fieldId) {
10668
          case 1: // E
10669
            return E;
10670
          default:
10671
            return null;
10672
        }
10673
      }
10674
 
10675
      /**
10676
       * Find the _Fields constant that matches fieldId, throwing an exception
10677
       * if it is not found.
10678
       */
10679
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10680
        _Fields fields = findByThriftId(fieldId);
10681
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10682
        return fields;
10683
      }
10684
 
10685
      /**
10686
       * Find the _Fields constant that matches name, or null if its not found.
10687
       */
10688
      public static _Fields findByName(String name) {
10689
        return byName.get(name);
10690
      }
10691
 
10692
      private final short _thriftId;
10693
      private final String _fieldName;
10694
 
10695
      _Fields(short thriftId, String fieldName) {
10696
        _thriftId = thriftId;
10697
        _fieldName = fieldName;
10698
      }
10699
 
10700
      public short getThriftFieldId() {
10701
        return _thriftId;
10702
      }
10703
 
10704
      public String getFieldName() {
10705
        return _fieldName;
10706
      }
10707
    }
10708
 
10709
    // isset id assignments
10710
 
10711
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10712
    static {
10713
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10714
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10715
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10716
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10717
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
10718
    }
10719
 
10720
    public updatePurchaseOrder_result() {
10721
    }
10722
 
10723
    public updatePurchaseOrder_result(
10724
      PurchaseServiceException e)
10725
    {
10726
      this();
10727
      this.e = e;
10728
    }
10729
 
10730
    /**
10731
     * Performs a deep copy on <i>other</i>.
10732
     */
10733
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
10734
      if (other.isSetE()) {
10735
        this.e = new PurchaseServiceException(other.e);
10736
      }
10737
    }
10738
 
10739
    public updatePurchaseOrder_result deepCopy() {
10740
      return new updatePurchaseOrder_result(this);
10741
    }
10742
 
10743
    @Override
10744
    public void clear() {
10745
      this.e = null;
10746
    }
10747
 
10748
    public PurchaseServiceException getE() {
10749
      return this.e;
10750
    }
10751
 
10752
    public void setE(PurchaseServiceException e) {
10753
      this.e = e;
10754
    }
10755
 
10756
    public void unsetE() {
10757
      this.e = null;
10758
    }
10759
 
10760
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10761
    public boolean isSetE() {
10762
      return this.e != null;
10763
    }
10764
 
10765
    public void setEIsSet(boolean value) {
10766
      if (!value) {
10767
        this.e = null;
10768
      }
10769
    }
10770
 
10771
    public void setFieldValue(_Fields field, Object value) {
10772
      switch (field) {
10773
      case E:
10774
        if (value == null) {
10775
          unsetE();
10776
        } else {
10777
          setE((PurchaseServiceException)value);
10778
        }
10779
        break;
10780
 
10781
      }
10782
    }
10783
 
10784
    public Object getFieldValue(_Fields field) {
10785
      switch (field) {
10786
      case E:
10787
        return getE();
10788
 
10789
      }
10790
      throw new IllegalStateException();
10791
    }
10792
 
10793
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10794
    public boolean isSet(_Fields field) {
10795
      if (field == null) {
10796
        throw new IllegalArgumentException();
10797
      }
10798
 
10799
      switch (field) {
10800
      case E:
10801
        return isSetE();
10802
      }
10803
      throw new IllegalStateException();
10804
    }
10805
 
10806
    @Override
10807
    public boolean equals(Object that) {
10808
      if (that == null)
10809
        return false;
10810
      if (that instanceof updatePurchaseOrder_result)
10811
        return this.equals((updatePurchaseOrder_result)that);
10812
      return false;
10813
    }
10814
 
10815
    public boolean equals(updatePurchaseOrder_result that) {
10816
      if (that == null)
10817
        return false;
10818
 
10819
      boolean this_present_e = true && this.isSetE();
10820
      boolean that_present_e = true && that.isSetE();
10821
      if (this_present_e || that_present_e) {
10822
        if (!(this_present_e && that_present_e))
10823
          return false;
10824
        if (!this.e.equals(that.e))
10825
          return false;
10826
      }
10827
 
10828
      return true;
10829
    }
10830
 
10831
    @Override
10832
    public int hashCode() {
10833
      return 0;
10834
    }
10835
 
10836
    public int compareTo(updatePurchaseOrder_result other) {
10837
      if (!getClass().equals(other.getClass())) {
10838
        return getClass().getName().compareTo(other.getClass().getName());
10839
      }
10840
 
10841
      int lastComparison = 0;
10842
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
10843
 
10844
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10845
      if (lastComparison != 0) {
10846
        return lastComparison;
10847
      }
10848
      if (isSetE()) {
10849
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10850
        if (lastComparison != 0) {
10851
          return lastComparison;
10852
        }
10853
      }
10854
      return 0;
10855
    }
10856
 
10857
    public _Fields fieldForId(int fieldId) {
10858
      return _Fields.findByThriftId(fieldId);
10859
    }
10860
 
10861
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10862
      org.apache.thrift.protocol.TField field;
10863
      iprot.readStructBegin();
10864
      while (true)
10865
      {
10866
        field = iprot.readFieldBegin();
10867
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10868
          break;
10869
        }
10870
        switch (field.id) {
10871
          case 1: // E
10872
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10873
              this.e = new PurchaseServiceException();
10874
              this.e.read(iprot);
10875
            } else { 
10876
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10877
            }
10878
            break;
10879
          default:
10880
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10881
        }
10882
        iprot.readFieldEnd();
10883
      }
10884
      iprot.readStructEnd();
10885
      validate();
10886
    }
10887
 
10888
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10889
      oprot.writeStructBegin(STRUCT_DESC);
10890
 
10891
      if (this.isSetE()) {
10892
        oprot.writeFieldBegin(E_FIELD_DESC);
10893
        this.e.write(oprot);
10894
        oprot.writeFieldEnd();
10895
      }
10896
      oprot.writeFieldStop();
10897
      oprot.writeStructEnd();
10898
    }
10899
 
10900
    @Override
10901
    public String toString() {
10902
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
10903
      boolean first = true;
10904
 
10905
      sb.append("e:");
10906
      if (this.e == null) {
10907
        sb.append("null");
10908
      } else {
10909
        sb.append(this.e);
10910
      }
10911
      first = false;
10912
      sb.append(")");
10913
      return sb.toString();
10914
    }
10915
 
10916
    public void validate() throws org.apache.thrift.TException {
10917
      // check for required fields
10918
    }
10919
 
10920
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10921
      try {
10922
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10923
      } catch (org.apache.thrift.TException te) {
10924
        throw new java.io.IOException(te);
10925
      }
10926
    }
10927
 
10928
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10929
      try {
10930
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10931
      } catch (org.apache.thrift.TException te) {
10932
        throw new java.io.IOException(te);
10933
      }
10934
    }
10935
 
10936
  }
10937
 
5185 mandeep.dh 10938
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
10939
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
10940
 
10941
    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);
10942
    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);
10943
    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);
10944
 
10945
    private long purchaseId; // required
10946
    private long itemId; // required
10947
    private long quantity; // required
10948
 
10949
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10950
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10951
      PURCHASE_ID((short)1, "purchaseId"),
10952
      ITEM_ID((short)2, "itemId"),
10953
      QUANTITY((short)3, "quantity");
10954
 
10955
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10956
 
10957
      static {
10958
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10959
          byName.put(field.getFieldName(), field);
10960
        }
10961
      }
10962
 
10963
      /**
10964
       * Find the _Fields constant that matches fieldId, or null if its not found.
10965
       */
10966
      public static _Fields findByThriftId(int fieldId) {
10967
        switch(fieldId) {
10968
          case 1: // PURCHASE_ID
10969
            return PURCHASE_ID;
10970
          case 2: // ITEM_ID
10971
            return ITEM_ID;
10972
          case 3: // QUANTITY
10973
            return QUANTITY;
10974
          default:
10975
            return null;
10976
        }
10977
      }
10978
 
10979
      /**
10980
       * Find the _Fields constant that matches fieldId, throwing an exception
10981
       * if it is not found.
10982
       */
10983
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10984
        _Fields fields = findByThriftId(fieldId);
10985
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10986
        return fields;
10987
      }
10988
 
10989
      /**
10990
       * Find the _Fields constant that matches name, or null if its not found.
10991
       */
10992
      public static _Fields findByName(String name) {
10993
        return byName.get(name);
10994
      }
10995
 
10996
      private final short _thriftId;
10997
      private final String _fieldName;
10998
 
10999
      _Fields(short thriftId, String fieldName) {
11000
        _thriftId = thriftId;
11001
        _fieldName = fieldName;
11002
      }
11003
 
11004
      public short getThriftFieldId() {
11005
        return _thriftId;
11006
      }
11007
 
11008
      public String getFieldName() {
11009
        return _fieldName;
11010
      }
11011
    }
11012
 
11013
    // isset id assignments
11014
    private static final int __PURCHASEID_ISSET_ID = 0;
11015
    private static final int __ITEMID_ISSET_ID = 1;
11016
    private static final int __QUANTITY_ISSET_ID = 2;
11017
    private BitSet __isset_bit_vector = new BitSet(3);
11018
 
11019
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11020
    static {
11021
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11022
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11023
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11024
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11025
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11026
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11027
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11028
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11029
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
11030
    }
11031
 
11032
    public unFulfillPO_args() {
11033
    }
11034
 
11035
    public unFulfillPO_args(
11036
      long purchaseId,
11037
      long itemId,
11038
      long quantity)
11039
    {
11040
      this();
11041
      this.purchaseId = purchaseId;
11042
      setPurchaseIdIsSet(true);
11043
      this.itemId = itemId;
11044
      setItemIdIsSet(true);
11045
      this.quantity = quantity;
11046
      setQuantityIsSet(true);
11047
    }
11048
 
11049
    /**
11050
     * Performs a deep copy on <i>other</i>.
11051
     */
11052
    public unFulfillPO_args(unFulfillPO_args other) {
11053
      __isset_bit_vector.clear();
11054
      __isset_bit_vector.or(other.__isset_bit_vector);
11055
      this.purchaseId = other.purchaseId;
11056
      this.itemId = other.itemId;
11057
      this.quantity = other.quantity;
11058
    }
11059
 
11060
    public unFulfillPO_args deepCopy() {
11061
      return new unFulfillPO_args(this);
11062
    }
11063
 
11064
    @Override
11065
    public void clear() {
11066
      setPurchaseIdIsSet(false);
11067
      this.purchaseId = 0;
11068
      setItemIdIsSet(false);
11069
      this.itemId = 0;
11070
      setQuantityIsSet(false);
11071
      this.quantity = 0;
11072
    }
11073
 
11074
    public long getPurchaseId() {
11075
      return this.purchaseId;
11076
    }
11077
 
11078
    public void setPurchaseId(long purchaseId) {
11079
      this.purchaseId = purchaseId;
11080
      setPurchaseIdIsSet(true);
11081
    }
11082
 
11083
    public void unsetPurchaseId() {
11084
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
11085
    }
11086
 
11087
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
11088
    public boolean isSetPurchaseId() {
11089
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
11090
    }
11091
 
11092
    public void setPurchaseIdIsSet(boolean value) {
11093
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
11094
    }
11095
 
11096
    public long getItemId() {
11097
      return this.itemId;
11098
    }
11099
 
11100
    public void setItemId(long itemId) {
11101
      this.itemId = itemId;
11102
      setItemIdIsSet(true);
11103
    }
11104
 
11105
    public void unsetItemId() {
11106
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11107
    }
11108
 
11109
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11110
    public boolean isSetItemId() {
11111
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11112
    }
11113
 
11114
    public void setItemIdIsSet(boolean value) {
11115
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11116
    }
11117
 
11118
    public long getQuantity() {
11119
      return this.quantity;
11120
    }
11121
 
11122
    public void setQuantity(long quantity) {
11123
      this.quantity = quantity;
11124
      setQuantityIsSet(true);
11125
    }
11126
 
11127
    public void unsetQuantity() {
11128
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
11129
    }
11130
 
11131
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
11132
    public boolean isSetQuantity() {
11133
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
11134
    }
11135
 
11136
    public void setQuantityIsSet(boolean value) {
11137
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
11138
    }
11139
 
11140
    public void setFieldValue(_Fields field, Object value) {
11141
      switch (field) {
11142
      case PURCHASE_ID:
11143
        if (value == null) {
11144
          unsetPurchaseId();
11145
        } else {
11146
          setPurchaseId((Long)value);
11147
        }
11148
        break;
11149
 
11150
      case ITEM_ID:
11151
        if (value == null) {
11152
          unsetItemId();
11153
        } else {
11154
          setItemId((Long)value);
11155
        }
11156
        break;
11157
 
11158
      case QUANTITY:
11159
        if (value == null) {
11160
          unsetQuantity();
11161
        } else {
11162
          setQuantity((Long)value);
11163
        }
11164
        break;
11165
 
11166
      }
11167
    }
11168
 
11169
    public Object getFieldValue(_Fields field) {
11170
      switch (field) {
11171
      case PURCHASE_ID:
11172
        return Long.valueOf(getPurchaseId());
11173
 
11174
      case ITEM_ID:
11175
        return Long.valueOf(getItemId());
11176
 
11177
      case QUANTITY:
11178
        return Long.valueOf(getQuantity());
11179
 
11180
      }
11181
      throw new IllegalStateException();
11182
    }
11183
 
11184
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11185
    public boolean isSet(_Fields field) {
11186
      if (field == null) {
11187
        throw new IllegalArgumentException();
11188
      }
11189
 
11190
      switch (field) {
11191
      case PURCHASE_ID:
11192
        return isSetPurchaseId();
11193
      case ITEM_ID:
11194
        return isSetItemId();
11195
      case QUANTITY:
11196
        return isSetQuantity();
11197
      }
11198
      throw new IllegalStateException();
11199
    }
11200
 
11201
    @Override
11202
    public boolean equals(Object that) {
11203
      if (that == null)
11204
        return false;
11205
      if (that instanceof unFulfillPO_args)
11206
        return this.equals((unFulfillPO_args)that);
11207
      return false;
11208
    }
11209
 
11210
    public boolean equals(unFulfillPO_args that) {
11211
      if (that == null)
11212
        return false;
11213
 
11214
      boolean this_present_purchaseId = true;
11215
      boolean that_present_purchaseId = true;
11216
      if (this_present_purchaseId || that_present_purchaseId) {
11217
        if (!(this_present_purchaseId && that_present_purchaseId))
11218
          return false;
11219
        if (this.purchaseId != that.purchaseId)
11220
          return false;
11221
      }
11222
 
11223
      boolean this_present_itemId = true;
11224
      boolean that_present_itemId = true;
11225
      if (this_present_itemId || that_present_itemId) {
11226
        if (!(this_present_itemId && that_present_itemId))
11227
          return false;
11228
        if (this.itemId != that.itemId)
11229
          return false;
11230
      }
11231
 
11232
      boolean this_present_quantity = true;
11233
      boolean that_present_quantity = true;
11234
      if (this_present_quantity || that_present_quantity) {
11235
        if (!(this_present_quantity && that_present_quantity))
11236
          return false;
11237
        if (this.quantity != that.quantity)
11238
          return false;
11239
      }
11240
 
11241
      return true;
11242
    }
11243
 
11244
    @Override
11245
    public int hashCode() {
11246
      return 0;
11247
    }
11248
 
11249
    public int compareTo(unFulfillPO_args other) {
11250
      if (!getClass().equals(other.getClass())) {
11251
        return getClass().getName().compareTo(other.getClass().getName());
11252
      }
11253
 
11254
      int lastComparison = 0;
11255
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
11256
 
11257
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
11258
      if (lastComparison != 0) {
11259
        return lastComparison;
11260
      }
11261
      if (isSetPurchaseId()) {
11262
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
11263
        if (lastComparison != 0) {
11264
          return lastComparison;
11265
        }
11266
      }
11267
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11268
      if (lastComparison != 0) {
11269
        return lastComparison;
11270
      }
11271
      if (isSetItemId()) {
11272
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11273
        if (lastComparison != 0) {
11274
          return lastComparison;
11275
        }
11276
      }
11277
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
11278
      if (lastComparison != 0) {
11279
        return lastComparison;
11280
      }
11281
      if (isSetQuantity()) {
11282
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
11283
        if (lastComparison != 0) {
11284
          return lastComparison;
11285
        }
11286
      }
11287
      return 0;
11288
    }
11289
 
11290
    public _Fields fieldForId(int fieldId) {
11291
      return _Fields.findByThriftId(fieldId);
11292
    }
11293
 
11294
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11295
      org.apache.thrift.protocol.TField field;
11296
      iprot.readStructBegin();
11297
      while (true)
11298
      {
11299
        field = iprot.readFieldBegin();
11300
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11301
          break;
11302
        }
11303
        switch (field.id) {
11304
          case 1: // PURCHASE_ID
11305
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11306
              this.purchaseId = iprot.readI64();
11307
              setPurchaseIdIsSet(true);
11308
            } else { 
11309
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11310
            }
11311
            break;
11312
          case 2: // ITEM_ID
11313
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11314
              this.itemId = iprot.readI64();
11315
              setItemIdIsSet(true);
11316
            } else { 
11317
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11318
            }
11319
            break;
11320
          case 3: // QUANTITY
11321
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11322
              this.quantity = iprot.readI64();
11323
              setQuantityIsSet(true);
11324
            } else { 
11325
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11326
            }
11327
            break;
11328
          default:
11329
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11330
        }
11331
        iprot.readFieldEnd();
11332
      }
11333
      iprot.readStructEnd();
11334
      validate();
11335
    }
11336
 
11337
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11338
      validate();
11339
 
11340
      oprot.writeStructBegin(STRUCT_DESC);
11341
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
11342
      oprot.writeI64(this.purchaseId);
11343
      oprot.writeFieldEnd();
11344
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11345
      oprot.writeI64(this.itemId);
11346
      oprot.writeFieldEnd();
11347
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
11348
      oprot.writeI64(this.quantity);
11349
      oprot.writeFieldEnd();
11350
      oprot.writeFieldStop();
11351
      oprot.writeStructEnd();
11352
    }
11353
 
11354
    @Override
11355
    public String toString() {
11356
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
11357
      boolean first = true;
11358
 
11359
      sb.append("purchaseId:");
11360
      sb.append(this.purchaseId);
11361
      first = false;
11362
      if (!first) sb.append(", ");
11363
      sb.append("itemId:");
11364
      sb.append(this.itemId);
11365
      first = false;
11366
      if (!first) sb.append(", ");
11367
      sb.append("quantity:");
11368
      sb.append(this.quantity);
11369
      first = false;
11370
      sb.append(")");
11371
      return sb.toString();
11372
    }
11373
 
11374
    public void validate() throws org.apache.thrift.TException {
11375
      // check for required fields
11376
    }
11377
 
11378
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11379
      try {
11380
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11381
      } catch (org.apache.thrift.TException te) {
11382
        throw new java.io.IOException(te);
11383
      }
11384
    }
11385
 
11386
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11387
      try {
11388
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11389
        __isset_bit_vector = new BitSet(1);
11390
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11391
      } catch (org.apache.thrift.TException te) {
11392
        throw new java.io.IOException(te);
11393
      }
11394
    }
11395
 
11396
  }
11397
 
11398
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
11399
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
11400
 
11401
    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);
11402
 
11403
    private PurchaseServiceException e; // required
11404
 
11405
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11406
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11407
      E((short)1, "e");
11408
 
11409
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11410
 
11411
      static {
11412
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11413
          byName.put(field.getFieldName(), field);
11414
        }
11415
      }
11416
 
11417
      /**
11418
       * Find the _Fields constant that matches fieldId, or null if its not found.
11419
       */
11420
      public static _Fields findByThriftId(int fieldId) {
11421
        switch(fieldId) {
11422
          case 1: // E
11423
            return E;
11424
          default:
11425
            return null;
11426
        }
11427
      }
11428
 
11429
      /**
11430
       * Find the _Fields constant that matches fieldId, throwing an exception
11431
       * if it is not found.
11432
       */
11433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11434
        _Fields fields = findByThriftId(fieldId);
11435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11436
        return fields;
11437
      }
11438
 
11439
      /**
11440
       * Find the _Fields constant that matches name, or null if its not found.
11441
       */
11442
      public static _Fields findByName(String name) {
11443
        return byName.get(name);
11444
      }
11445
 
11446
      private final short _thriftId;
11447
      private final String _fieldName;
11448
 
11449
      _Fields(short thriftId, String fieldName) {
11450
        _thriftId = thriftId;
11451
        _fieldName = fieldName;
11452
      }
11453
 
11454
      public short getThriftFieldId() {
11455
        return _thriftId;
11456
      }
11457
 
11458
      public String getFieldName() {
11459
        return _fieldName;
11460
      }
11461
    }
11462
 
11463
    // isset id assignments
11464
 
11465
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11466
    static {
11467
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11468
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11469
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11470
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11471
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
11472
    }
11473
 
11474
    public unFulfillPO_result() {
11475
    }
11476
 
11477
    public unFulfillPO_result(
11478
      PurchaseServiceException e)
11479
    {
11480
      this();
11481
      this.e = e;
11482
    }
11483
 
11484
    /**
11485
     * Performs a deep copy on <i>other</i>.
11486
     */
11487
    public unFulfillPO_result(unFulfillPO_result other) {
11488
      if (other.isSetE()) {
11489
        this.e = new PurchaseServiceException(other.e);
11490
      }
11491
    }
11492
 
11493
    public unFulfillPO_result deepCopy() {
11494
      return new unFulfillPO_result(this);
11495
    }
11496
 
11497
    @Override
11498
    public void clear() {
11499
      this.e = null;
11500
    }
11501
 
11502
    public PurchaseServiceException getE() {
11503
      return this.e;
11504
    }
11505
 
11506
    public void setE(PurchaseServiceException e) {
11507
      this.e = e;
11508
    }
11509
 
11510
    public void unsetE() {
11511
      this.e = null;
11512
    }
11513
 
11514
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11515
    public boolean isSetE() {
11516
      return this.e != null;
11517
    }
11518
 
11519
    public void setEIsSet(boolean value) {
11520
      if (!value) {
11521
        this.e = null;
11522
      }
11523
    }
11524
 
11525
    public void setFieldValue(_Fields field, Object value) {
11526
      switch (field) {
11527
      case E:
11528
        if (value == null) {
11529
          unsetE();
11530
        } else {
11531
          setE((PurchaseServiceException)value);
11532
        }
11533
        break;
11534
 
11535
      }
11536
    }
11537
 
11538
    public Object getFieldValue(_Fields field) {
11539
      switch (field) {
11540
      case E:
11541
        return getE();
11542
 
11543
      }
11544
      throw new IllegalStateException();
11545
    }
11546
 
11547
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11548
    public boolean isSet(_Fields field) {
11549
      if (field == null) {
11550
        throw new IllegalArgumentException();
11551
      }
11552
 
11553
      switch (field) {
11554
      case E:
11555
        return isSetE();
11556
      }
11557
      throw new IllegalStateException();
11558
    }
11559
 
11560
    @Override
11561
    public boolean equals(Object that) {
11562
      if (that == null)
11563
        return false;
11564
      if (that instanceof unFulfillPO_result)
11565
        return this.equals((unFulfillPO_result)that);
11566
      return false;
11567
    }
11568
 
11569
    public boolean equals(unFulfillPO_result that) {
11570
      if (that == null)
11571
        return false;
11572
 
11573
      boolean this_present_e = true && this.isSetE();
11574
      boolean that_present_e = true && that.isSetE();
11575
      if (this_present_e || that_present_e) {
11576
        if (!(this_present_e && that_present_e))
11577
          return false;
11578
        if (!this.e.equals(that.e))
11579
          return false;
11580
      }
11581
 
11582
      return true;
11583
    }
11584
 
11585
    @Override
11586
    public int hashCode() {
11587
      return 0;
11588
    }
11589
 
11590
    public int compareTo(unFulfillPO_result other) {
11591
      if (!getClass().equals(other.getClass())) {
11592
        return getClass().getName().compareTo(other.getClass().getName());
11593
      }
11594
 
11595
      int lastComparison = 0;
11596
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
11597
 
11598
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11599
      if (lastComparison != 0) {
11600
        return lastComparison;
11601
      }
11602
      if (isSetE()) {
11603
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11604
        if (lastComparison != 0) {
11605
          return lastComparison;
11606
        }
11607
      }
11608
      return 0;
11609
    }
11610
 
11611
    public _Fields fieldForId(int fieldId) {
11612
      return _Fields.findByThriftId(fieldId);
11613
    }
11614
 
11615
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11616
      org.apache.thrift.protocol.TField field;
11617
      iprot.readStructBegin();
11618
      while (true)
11619
      {
11620
        field = iprot.readFieldBegin();
11621
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11622
          break;
11623
        }
11624
        switch (field.id) {
11625
          case 1: // E
11626
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11627
              this.e = new PurchaseServiceException();
11628
              this.e.read(iprot);
11629
            } else { 
11630
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11631
            }
11632
            break;
11633
          default:
11634
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11635
        }
11636
        iprot.readFieldEnd();
11637
      }
11638
      iprot.readStructEnd();
11639
      validate();
11640
    }
11641
 
11642
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11643
      oprot.writeStructBegin(STRUCT_DESC);
11644
 
11645
      if (this.isSetE()) {
11646
        oprot.writeFieldBegin(E_FIELD_DESC);
11647
        this.e.write(oprot);
11648
        oprot.writeFieldEnd();
11649
      }
11650
      oprot.writeFieldStop();
11651
      oprot.writeStructEnd();
11652
    }
11653
 
11654
    @Override
11655
    public String toString() {
11656
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
11657
      boolean first = true;
11658
 
11659
      sb.append("e:");
11660
      if (this.e == null) {
11661
        sb.append("null");
11662
      } else {
11663
        sb.append(this.e);
11664
      }
11665
      first = false;
11666
      sb.append(")");
11667
      return sb.toString();
11668
    }
11669
 
11670
    public void validate() throws org.apache.thrift.TException {
11671
      // check for required fields
11672
    }
11673
 
11674
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11675
      try {
11676
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11677
      } catch (org.apache.thrift.TException te) {
11678
        throw new java.io.IOException(te);
11679
      }
11680
    }
11681
 
11682
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11683
      try {
11684
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11685
      } catch (org.apache.thrift.TException te) {
11686
        throw new java.io.IOException(te);
11687
      }
11688
    }
11689
 
11690
  }
11691
 
5443 mandeep.dh 11692
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
11693
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
11694
 
11695
    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);
11696
 
11697
    private long date; // required
11698
 
11699
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11700
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11701
      DATE((short)1, "date");
11702
 
11703
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11704
 
11705
      static {
11706
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11707
          byName.put(field.getFieldName(), field);
11708
        }
11709
      }
11710
 
11711
      /**
11712
       * Find the _Fields constant that matches fieldId, or null if its not found.
11713
       */
11714
      public static _Fields findByThriftId(int fieldId) {
11715
        switch(fieldId) {
11716
          case 1: // DATE
11717
            return DATE;
11718
          default:
11719
            return null;
11720
        }
11721
      }
11722
 
11723
      /**
11724
       * Find the _Fields constant that matches fieldId, throwing an exception
11725
       * if it is not found.
11726
       */
11727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11728
        _Fields fields = findByThriftId(fieldId);
11729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11730
        return fields;
11731
      }
11732
 
11733
      /**
11734
       * Find the _Fields constant that matches name, or null if its not found.
11735
       */
11736
      public static _Fields findByName(String name) {
11737
        return byName.get(name);
11738
      }
11739
 
11740
      private final short _thriftId;
11741
      private final String _fieldName;
11742
 
11743
      _Fields(short thriftId, String fieldName) {
11744
        _thriftId = thriftId;
11745
        _fieldName = fieldName;
11746
      }
11747
 
11748
      public short getThriftFieldId() {
11749
        return _thriftId;
11750
      }
11751
 
11752
      public String getFieldName() {
11753
        return _fieldName;
11754
      }
11755
    }
11756
 
11757
    // isset id assignments
11758
    private static final int __DATE_ISSET_ID = 0;
11759
    private BitSet __isset_bit_vector = new BitSet(1);
11760
 
11761
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11762
    static {
11763
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11764
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11766
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11767
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
11768
    }
11769
 
11770
    public getInvoices_args() {
11771
    }
11772
 
11773
    public getInvoices_args(
11774
      long date)
11775
    {
11776
      this();
11777
      this.date = date;
11778
      setDateIsSet(true);
11779
    }
11780
 
11781
    /**
11782
     * Performs a deep copy on <i>other</i>.
11783
     */
11784
    public getInvoices_args(getInvoices_args other) {
11785
      __isset_bit_vector.clear();
11786
      __isset_bit_vector.or(other.__isset_bit_vector);
11787
      this.date = other.date;
11788
    }
11789
 
11790
    public getInvoices_args deepCopy() {
11791
      return new getInvoices_args(this);
11792
    }
11793
 
11794
    @Override
11795
    public void clear() {
11796
      setDateIsSet(false);
11797
      this.date = 0;
11798
    }
11799
 
11800
    public long getDate() {
11801
      return this.date;
11802
    }
11803
 
11804
    public void setDate(long date) {
11805
      this.date = date;
11806
      setDateIsSet(true);
11807
    }
11808
 
11809
    public void unsetDate() {
11810
      __isset_bit_vector.clear(__DATE_ISSET_ID);
11811
    }
11812
 
11813
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
11814
    public boolean isSetDate() {
11815
      return __isset_bit_vector.get(__DATE_ISSET_ID);
11816
    }
11817
 
11818
    public void setDateIsSet(boolean value) {
11819
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
11820
    }
11821
 
11822
    public void setFieldValue(_Fields field, Object value) {
11823
      switch (field) {
11824
      case DATE:
11825
        if (value == null) {
11826
          unsetDate();
11827
        } else {
11828
          setDate((Long)value);
11829
        }
11830
        break;
11831
 
11832
      }
11833
    }
11834
 
11835
    public Object getFieldValue(_Fields field) {
11836
      switch (field) {
11837
      case DATE:
11838
        return Long.valueOf(getDate());
11839
 
11840
      }
11841
      throw new IllegalStateException();
11842
    }
11843
 
11844
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11845
    public boolean isSet(_Fields field) {
11846
      if (field == null) {
11847
        throw new IllegalArgumentException();
11848
      }
11849
 
11850
      switch (field) {
11851
      case DATE:
11852
        return isSetDate();
11853
      }
11854
      throw new IllegalStateException();
11855
    }
11856
 
11857
    @Override
11858
    public boolean equals(Object that) {
11859
      if (that == null)
11860
        return false;
11861
      if (that instanceof getInvoices_args)
11862
        return this.equals((getInvoices_args)that);
11863
      return false;
11864
    }
11865
 
11866
    public boolean equals(getInvoices_args that) {
11867
      if (that == null)
11868
        return false;
11869
 
11870
      boolean this_present_date = true;
11871
      boolean that_present_date = true;
11872
      if (this_present_date || that_present_date) {
11873
        if (!(this_present_date && that_present_date))
11874
          return false;
11875
        if (this.date != that.date)
11876
          return false;
11877
      }
11878
 
11879
      return true;
11880
    }
11881
 
11882
    @Override
11883
    public int hashCode() {
11884
      return 0;
11885
    }
11886
 
11887
    public int compareTo(getInvoices_args other) {
11888
      if (!getClass().equals(other.getClass())) {
11889
        return getClass().getName().compareTo(other.getClass().getName());
11890
      }
11891
 
11892
      int lastComparison = 0;
11893
      getInvoices_args typedOther = (getInvoices_args)other;
11894
 
11895
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
11896
      if (lastComparison != 0) {
11897
        return lastComparison;
11898
      }
11899
      if (isSetDate()) {
11900
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
11901
        if (lastComparison != 0) {
11902
          return lastComparison;
11903
        }
11904
      }
11905
      return 0;
11906
    }
11907
 
11908
    public _Fields fieldForId(int fieldId) {
11909
      return _Fields.findByThriftId(fieldId);
11910
    }
11911
 
11912
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11913
      org.apache.thrift.protocol.TField field;
11914
      iprot.readStructBegin();
11915
      while (true)
11916
      {
11917
        field = iprot.readFieldBegin();
11918
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11919
          break;
11920
        }
11921
        switch (field.id) {
11922
          case 1: // DATE
11923
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11924
              this.date = iprot.readI64();
11925
              setDateIsSet(true);
11926
            } else { 
11927
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11928
            }
11929
            break;
11930
          default:
11931
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11932
        }
11933
        iprot.readFieldEnd();
11934
      }
11935
      iprot.readStructEnd();
11936
      validate();
11937
    }
11938
 
11939
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11940
      validate();
11941
 
11942
      oprot.writeStructBegin(STRUCT_DESC);
11943
      oprot.writeFieldBegin(DATE_FIELD_DESC);
11944
      oprot.writeI64(this.date);
11945
      oprot.writeFieldEnd();
11946
      oprot.writeFieldStop();
11947
      oprot.writeStructEnd();
11948
    }
11949
 
11950
    @Override
11951
    public String toString() {
11952
      StringBuilder sb = new StringBuilder("getInvoices_args(");
11953
      boolean first = true;
11954
 
11955
      sb.append("date:");
11956
      sb.append(this.date);
11957
      first = false;
11958
      sb.append(")");
11959
      return sb.toString();
11960
    }
11961
 
11962
    public void validate() throws org.apache.thrift.TException {
11963
      // check for required fields
11964
    }
11965
 
11966
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11967
      try {
11968
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11969
      } catch (org.apache.thrift.TException te) {
11970
        throw new java.io.IOException(te);
11971
      }
11972
    }
11973
 
11974
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11975
      try {
11976
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11977
        __isset_bit_vector = new BitSet(1);
11978
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11979
      } catch (org.apache.thrift.TException te) {
11980
        throw new java.io.IOException(te);
11981
      }
11982
    }
11983
 
11984
  }
11985
 
11986
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
11987
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
11988
 
11989
    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);
11990
 
11991
    private List<Invoice> success; // required
11992
 
11993
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11994
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11995
      SUCCESS((short)0, "success");
11996
 
11997
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11998
 
11999
      static {
12000
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12001
          byName.put(field.getFieldName(), field);
12002
        }
12003
      }
12004
 
12005
      /**
12006
       * Find the _Fields constant that matches fieldId, or null if its not found.
12007
       */
12008
      public static _Fields findByThriftId(int fieldId) {
12009
        switch(fieldId) {
12010
          case 0: // SUCCESS
12011
            return SUCCESS;
12012
          default:
12013
            return null;
12014
        }
12015
      }
12016
 
12017
      /**
12018
       * Find the _Fields constant that matches fieldId, throwing an exception
12019
       * if it is not found.
12020
       */
12021
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12022
        _Fields fields = findByThriftId(fieldId);
12023
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12024
        return fields;
12025
      }
12026
 
12027
      /**
12028
       * Find the _Fields constant that matches name, or null if its not found.
12029
       */
12030
      public static _Fields findByName(String name) {
12031
        return byName.get(name);
12032
      }
12033
 
12034
      private final short _thriftId;
12035
      private final String _fieldName;
12036
 
12037
      _Fields(short thriftId, String fieldName) {
12038
        _thriftId = thriftId;
12039
        _fieldName = fieldName;
12040
      }
12041
 
12042
      public short getThriftFieldId() {
12043
        return _thriftId;
12044
      }
12045
 
12046
      public String getFieldName() {
12047
        return _fieldName;
12048
      }
12049
    }
12050
 
12051
    // isset id assignments
12052
 
12053
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12054
    static {
12055
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12056
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12057
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12058
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
12059
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12060
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
12061
    }
12062
 
12063
    public getInvoices_result() {
12064
    }
12065
 
12066
    public getInvoices_result(
12067
      List<Invoice> success)
12068
    {
12069
      this();
12070
      this.success = success;
12071
    }
12072
 
12073
    /**
12074
     * Performs a deep copy on <i>other</i>.
12075
     */
12076
    public getInvoices_result(getInvoices_result other) {
12077
      if (other.isSetSuccess()) {
12078
        List<Invoice> __this__success = new ArrayList<Invoice>();
12079
        for (Invoice other_element : other.success) {
12080
          __this__success.add(new Invoice(other_element));
12081
        }
12082
        this.success = __this__success;
12083
      }
12084
    }
12085
 
12086
    public getInvoices_result deepCopy() {
12087
      return new getInvoices_result(this);
12088
    }
12089
 
12090
    @Override
12091
    public void clear() {
12092
      this.success = null;
12093
    }
12094
 
12095
    public int getSuccessSize() {
12096
      return (this.success == null) ? 0 : this.success.size();
12097
    }
12098
 
12099
    public java.util.Iterator<Invoice> getSuccessIterator() {
12100
      return (this.success == null) ? null : this.success.iterator();
12101
    }
12102
 
12103
    public void addToSuccess(Invoice elem) {
12104
      if (this.success == null) {
12105
        this.success = new ArrayList<Invoice>();
12106
      }
12107
      this.success.add(elem);
12108
    }
12109
 
12110
    public List<Invoice> getSuccess() {
12111
      return this.success;
12112
    }
12113
 
12114
    public void setSuccess(List<Invoice> success) {
12115
      this.success = success;
12116
    }
12117
 
12118
    public void unsetSuccess() {
12119
      this.success = null;
12120
    }
12121
 
12122
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12123
    public boolean isSetSuccess() {
12124
      return this.success != null;
12125
    }
12126
 
12127
    public void setSuccessIsSet(boolean value) {
12128
      if (!value) {
12129
        this.success = null;
12130
      }
12131
    }
12132
 
12133
    public void setFieldValue(_Fields field, Object value) {
12134
      switch (field) {
12135
      case SUCCESS:
12136
        if (value == null) {
12137
          unsetSuccess();
12138
        } else {
12139
          setSuccess((List<Invoice>)value);
12140
        }
12141
        break;
12142
 
12143
      }
12144
    }
12145
 
12146
    public Object getFieldValue(_Fields field) {
12147
      switch (field) {
12148
      case SUCCESS:
12149
        return getSuccess();
12150
 
12151
      }
12152
      throw new IllegalStateException();
12153
    }
12154
 
12155
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12156
    public boolean isSet(_Fields field) {
12157
      if (field == null) {
12158
        throw new IllegalArgumentException();
12159
      }
12160
 
12161
      switch (field) {
12162
      case SUCCESS:
12163
        return isSetSuccess();
12164
      }
12165
      throw new IllegalStateException();
12166
    }
12167
 
12168
    @Override
12169
    public boolean equals(Object that) {
12170
      if (that == null)
12171
        return false;
12172
      if (that instanceof getInvoices_result)
12173
        return this.equals((getInvoices_result)that);
12174
      return false;
12175
    }
12176
 
12177
    public boolean equals(getInvoices_result that) {
12178
      if (that == null)
12179
        return false;
12180
 
12181
      boolean this_present_success = true && this.isSetSuccess();
12182
      boolean that_present_success = true && that.isSetSuccess();
12183
      if (this_present_success || that_present_success) {
12184
        if (!(this_present_success && that_present_success))
12185
          return false;
12186
        if (!this.success.equals(that.success))
12187
          return false;
12188
      }
12189
 
12190
      return true;
12191
    }
12192
 
12193
    @Override
12194
    public int hashCode() {
12195
      return 0;
12196
    }
12197
 
12198
    public int compareTo(getInvoices_result other) {
12199
      if (!getClass().equals(other.getClass())) {
12200
        return getClass().getName().compareTo(other.getClass().getName());
12201
      }
12202
 
12203
      int lastComparison = 0;
12204
      getInvoices_result typedOther = (getInvoices_result)other;
12205
 
12206
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12207
      if (lastComparison != 0) {
12208
        return lastComparison;
12209
      }
12210
      if (isSetSuccess()) {
12211
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12212
        if (lastComparison != 0) {
12213
          return lastComparison;
12214
        }
12215
      }
12216
      return 0;
12217
    }
12218
 
12219
    public _Fields fieldForId(int fieldId) {
12220
      return _Fields.findByThriftId(fieldId);
12221
    }
12222
 
12223
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12224
      org.apache.thrift.protocol.TField field;
12225
      iprot.readStructBegin();
12226
      while (true)
12227
      {
12228
        field = iprot.readFieldBegin();
12229
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12230
          break;
12231
        }
12232
        switch (field.id) {
12233
          case 0: // SUCCESS
12234
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12235
              {
6385 amar.kumar 12236
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
12237
                this.success = new ArrayList<Invoice>(_list24.size);
12238
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
5443 mandeep.dh 12239
                {
6385 amar.kumar 12240
                  Invoice _elem26; // required
12241
                  _elem26 = new Invoice();
12242
                  _elem26.read(iprot);
12243
                  this.success.add(_elem26);
5443 mandeep.dh 12244
                }
12245
                iprot.readListEnd();
12246
              }
12247
            } else { 
12248
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12249
            }
12250
            break;
12251
          default:
12252
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12253
        }
12254
        iprot.readFieldEnd();
12255
      }
12256
      iprot.readStructEnd();
12257
      validate();
12258
    }
12259
 
12260
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12261
      oprot.writeStructBegin(STRUCT_DESC);
12262
 
12263
      if (this.isSetSuccess()) {
12264
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12265
        {
12266
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6385 amar.kumar 12267
          for (Invoice _iter27 : this.success)
5443 mandeep.dh 12268
          {
6385 amar.kumar 12269
            _iter27.write(oprot);
5443 mandeep.dh 12270
          }
12271
          oprot.writeListEnd();
12272
        }
12273
        oprot.writeFieldEnd();
12274
      }
12275
      oprot.writeFieldStop();
12276
      oprot.writeStructEnd();
12277
    }
12278
 
12279
    @Override
12280
    public String toString() {
12281
      StringBuilder sb = new StringBuilder("getInvoices_result(");
12282
      boolean first = true;
12283
 
12284
      sb.append("success:");
12285
      if (this.success == null) {
12286
        sb.append("null");
12287
      } else {
12288
        sb.append(this.success);
12289
      }
12290
      first = false;
12291
      sb.append(")");
12292
      return sb.toString();
12293
    }
12294
 
12295
    public void validate() throws org.apache.thrift.TException {
12296
      // check for required fields
12297
    }
12298
 
12299
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12300
      try {
12301
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12302
      } catch (org.apache.thrift.TException te) {
12303
        throw new java.io.IOException(te);
12304
      }
12305
    }
12306
 
12307
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12308
      try {
12309
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12310
      } catch (org.apache.thrift.TException te) {
12311
        throw new java.io.IOException(te);
12312
      }
12313
    }
12314
 
12315
  }
12316
 
12317
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
12318
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
12319
 
12320
    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);
12321
 
12322
    private Invoice invoice; // required
12323
 
12324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12325
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12326
      INVOICE((short)1, "invoice");
12327
 
12328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12329
 
12330
      static {
12331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12332
          byName.put(field.getFieldName(), field);
12333
        }
12334
      }
12335
 
12336
      /**
12337
       * Find the _Fields constant that matches fieldId, or null if its not found.
12338
       */
12339
      public static _Fields findByThriftId(int fieldId) {
12340
        switch(fieldId) {
12341
          case 1: // INVOICE
12342
            return INVOICE;
12343
          default:
12344
            return null;
12345
        }
12346
      }
12347
 
12348
      /**
12349
       * Find the _Fields constant that matches fieldId, throwing an exception
12350
       * if it is not found.
12351
       */
12352
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12353
        _Fields fields = findByThriftId(fieldId);
12354
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12355
        return fields;
12356
      }
12357
 
12358
      /**
12359
       * Find the _Fields constant that matches name, or null if its not found.
12360
       */
12361
      public static _Fields findByName(String name) {
12362
        return byName.get(name);
12363
      }
12364
 
12365
      private final short _thriftId;
12366
      private final String _fieldName;
12367
 
12368
      _Fields(short thriftId, String fieldName) {
12369
        _thriftId = thriftId;
12370
        _fieldName = fieldName;
12371
      }
12372
 
12373
      public short getThriftFieldId() {
12374
        return _thriftId;
12375
      }
12376
 
12377
      public String getFieldName() {
12378
        return _fieldName;
12379
      }
12380
    }
12381
 
12382
    // isset id assignments
12383
 
12384
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12385
    static {
12386
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12387
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12388
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
12389
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12390
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
12391
    }
12392
 
12393
    public createInvoice_args() {
12394
    }
12395
 
12396
    public createInvoice_args(
12397
      Invoice invoice)
12398
    {
12399
      this();
12400
      this.invoice = invoice;
12401
    }
12402
 
12403
    /**
12404
     * Performs a deep copy on <i>other</i>.
12405
     */
12406
    public createInvoice_args(createInvoice_args other) {
12407
      if (other.isSetInvoice()) {
12408
        this.invoice = new Invoice(other.invoice);
12409
      }
12410
    }
12411
 
12412
    public createInvoice_args deepCopy() {
12413
      return new createInvoice_args(this);
12414
    }
12415
 
12416
    @Override
12417
    public void clear() {
12418
      this.invoice = null;
12419
    }
12420
 
12421
    public Invoice getInvoice() {
12422
      return this.invoice;
12423
    }
12424
 
12425
    public void setInvoice(Invoice invoice) {
12426
      this.invoice = invoice;
12427
    }
12428
 
12429
    public void unsetInvoice() {
12430
      this.invoice = null;
12431
    }
12432
 
12433
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
12434
    public boolean isSetInvoice() {
12435
      return this.invoice != null;
12436
    }
12437
 
12438
    public void setInvoiceIsSet(boolean value) {
12439
      if (!value) {
12440
        this.invoice = null;
12441
      }
12442
    }
12443
 
12444
    public void setFieldValue(_Fields field, Object value) {
12445
      switch (field) {
12446
      case INVOICE:
12447
        if (value == null) {
12448
          unsetInvoice();
12449
        } else {
12450
          setInvoice((Invoice)value);
12451
        }
12452
        break;
12453
 
12454
      }
12455
    }
12456
 
12457
    public Object getFieldValue(_Fields field) {
12458
      switch (field) {
12459
      case INVOICE:
12460
        return getInvoice();
12461
 
12462
      }
12463
      throw new IllegalStateException();
12464
    }
12465
 
12466
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12467
    public boolean isSet(_Fields field) {
12468
      if (field == null) {
12469
        throw new IllegalArgumentException();
12470
      }
12471
 
12472
      switch (field) {
12473
      case INVOICE:
12474
        return isSetInvoice();
12475
      }
12476
      throw new IllegalStateException();
12477
    }
12478
 
12479
    @Override
12480
    public boolean equals(Object that) {
12481
      if (that == null)
12482
        return false;
12483
      if (that instanceof createInvoice_args)
12484
        return this.equals((createInvoice_args)that);
12485
      return false;
12486
    }
12487
 
12488
    public boolean equals(createInvoice_args that) {
12489
      if (that == null)
12490
        return false;
12491
 
12492
      boolean this_present_invoice = true && this.isSetInvoice();
12493
      boolean that_present_invoice = true && that.isSetInvoice();
12494
      if (this_present_invoice || that_present_invoice) {
12495
        if (!(this_present_invoice && that_present_invoice))
12496
          return false;
12497
        if (!this.invoice.equals(that.invoice))
12498
          return false;
12499
      }
12500
 
12501
      return true;
12502
    }
12503
 
12504
    @Override
12505
    public int hashCode() {
12506
      return 0;
12507
    }
12508
 
12509
    public int compareTo(createInvoice_args other) {
12510
      if (!getClass().equals(other.getClass())) {
12511
        return getClass().getName().compareTo(other.getClass().getName());
12512
      }
12513
 
12514
      int lastComparison = 0;
12515
      createInvoice_args typedOther = (createInvoice_args)other;
12516
 
12517
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
12518
      if (lastComparison != 0) {
12519
        return lastComparison;
12520
      }
12521
      if (isSetInvoice()) {
12522
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
12523
        if (lastComparison != 0) {
12524
          return lastComparison;
12525
        }
12526
      }
12527
      return 0;
12528
    }
12529
 
12530
    public _Fields fieldForId(int fieldId) {
12531
      return _Fields.findByThriftId(fieldId);
12532
    }
12533
 
12534
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12535
      org.apache.thrift.protocol.TField field;
12536
      iprot.readStructBegin();
12537
      while (true)
12538
      {
12539
        field = iprot.readFieldBegin();
12540
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12541
          break;
12542
        }
12543
        switch (field.id) {
12544
          case 1: // INVOICE
12545
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12546
              this.invoice = new Invoice();
12547
              this.invoice.read(iprot);
12548
            } else { 
12549
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12550
            }
12551
            break;
12552
          default:
12553
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12554
        }
12555
        iprot.readFieldEnd();
12556
      }
12557
      iprot.readStructEnd();
12558
      validate();
12559
    }
12560
 
12561
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12562
      validate();
12563
 
12564
      oprot.writeStructBegin(STRUCT_DESC);
12565
      if (this.invoice != null) {
12566
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
12567
        this.invoice.write(oprot);
12568
        oprot.writeFieldEnd();
12569
      }
12570
      oprot.writeFieldStop();
12571
      oprot.writeStructEnd();
12572
    }
12573
 
12574
    @Override
12575
    public String toString() {
12576
      StringBuilder sb = new StringBuilder("createInvoice_args(");
12577
      boolean first = true;
12578
 
12579
      sb.append("invoice:");
12580
      if (this.invoice == null) {
12581
        sb.append("null");
12582
      } else {
12583
        sb.append(this.invoice);
12584
      }
12585
      first = false;
12586
      sb.append(")");
12587
      return sb.toString();
12588
    }
12589
 
12590
    public void validate() throws org.apache.thrift.TException {
12591
      // check for required fields
12592
    }
12593
 
12594
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12595
      try {
12596
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12597
      } catch (org.apache.thrift.TException te) {
12598
        throw new java.io.IOException(te);
12599
      }
12600
    }
12601
 
12602
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12603
      try {
12604
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12605
      } catch (org.apache.thrift.TException te) {
12606
        throw new java.io.IOException(te);
12607
      }
12608
    }
12609
 
12610
  }
12611
 
12612
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
12613
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
12614
 
12615
    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);
12616
 
12617
    private PurchaseServiceException e; // required
12618
 
12619
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12620
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12621
      E((short)1, "e");
12622
 
12623
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12624
 
12625
      static {
12626
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12627
          byName.put(field.getFieldName(), field);
12628
        }
12629
      }
12630
 
12631
      /**
12632
       * Find the _Fields constant that matches fieldId, or null if its not found.
12633
       */
12634
      public static _Fields findByThriftId(int fieldId) {
12635
        switch(fieldId) {
12636
          case 1: // E
12637
            return E;
12638
          default:
12639
            return null;
12640
        }
12641
      }
12642
 
12643
      /**
12644
       * Find the _Fields constant that matches fieldId, throwing an exception
12645
       * if it is not found.
12646
       */
12647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12648
        _Fields fields = findByThriftId(fieldId);
12649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12650
        return fields;
12651
      }
12652
 
12653
      /**
12654
       * Find the _Fields constant that matches name, or null if its not found.
12655
       */
12656
      public static _Fields findByName(String name) {
12657
        return byName.get(name);
12658
      }
12659
 
12660
      private final short _thriftId;
12661
      private final String _fieldName;
12662
 
12663
      _Fields(short thriftId, String fieldName) {
12664
        _thriftId = thriftId;
12665
        _fieldName = fieldName;
12666
      }
12667
 
12668
      public short getThriftFieldId() {
12669
        return _thriftId;
12670
      }
12671
 
12672
      public String getFieldName() {
12673
        return _fieldName;
12674
      }
12675
    }
12676
 
12677
    // isset id assignments
12678
 
12679
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12680
    static {
12681
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12682
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12683
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12684
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12685
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
12686
    }
12687
 
12688
    public createInvoice_result() {
12689
    }
12690
 
12691
    public createInvoice_result(
12692
      PurchaseServiceException e)
12693
    {
12694
      this();
12695
      this.e = e;
12696
    }
12697
 
12698
    /**
12699
     * Performs a deep copy on <i>other</i>.
12700
     */
12701
    public createInvoice_result(createInvoice_result other) {
12702
      if (other.isSetE()) {
12703
        this.e = new PurchaseServiceException(other.e);
12704
      }
12705
    }
12706
 
12707
    public createInvoice_result deepCopy() {
12708
      return new createInvoice_result(this);
12709
    }
12710
 
12711
    @Override
12712
    public void clear() {
12713
      this.e = null;
12714
    }
12715
 
12716
    public PurchaseServiceException getE() {
12717
      return this.e;
12718
    }
12719
 
12720
    public void setE(PurchaseServiceException e) {
12721
      this.e = e;
12722
    }
12723
 
12724
    public void unsetE() {
12725
      this.e = null;
12726
    }
12727
 
12728
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
12729
    public boolean isSetE() {
12730
      return this.e != null;
12731
    }
12732
 
12733
    public void setEIsSet(boolean value) {
12734
      if (!value) {
12735
        this.e = null;
12736
      }
12737
    }
12738
 
12739
    public void setFieldValue(_Fields field, Object value) {
12740
      switch (field) {
12741
      case E:
12742
        if (value == null) {
12743
          unsetE();
12744
        } else {
12745
          setE((PurchaseServiceException)value);
12746
        }
12747
        break;
12748
 
12749
      }
12750
    }
12751
 
12752
    public Object getFieldValue(_Fields field) {
12753
      switch (field) {
12754
      case E:
12755
        return getE();
12756
 
12757
      }
12758
      throw new IllegalStateException();
12759
    }
12760
 
12761
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12762
    public boolean isSet(_Fields field) {
12763
      if (field == null) {
12764
        throw new IllegalArgumentException();
12765
      }
12766
 
12767
      switch (field) {
12768
      case E:
12769
        return isSetE();
12770
      }
12771
      throw new IllegalStateException();
12772
    }
12773
 
12774
    @Override
12775
    public boolean equals(Object that) {
12776
      if (that == null)
12777
        return false;
12778
      if (that instanceof createInvoice_result)
12779
        return this.equals((createInvoice_result)that);
12780
      return false;
12781
    }
12782
 
12783
    public boolean equals(createInvoice_result that) {
12784
      if (that == null)
12785
        return false;
12786
 
12787
      boolean this_present_e = true && this.isSetE();
12788
      boolean that_present_e = true && that.isSetE();
12789
      if (this_present_e || that_present_e) {
12790
        if (!(this_present_e && that_present_e))
12791
          return false;
12792
        if (!this.e.equals(that.e))
12793
          return false;
12794
      }
12795
 
12796
      return true;
12797
    }
12798
 
12799
    @Override
12800
    public int hashCode() {
12801
      return 0;
12802
    }
12803
 
12804
    public int compareTo(createInvoice_result other) {
12805
      if (!getClass().equals(other.getClass())) {
12806
        return getClass().getName().compareTo(other.getClass().getName());
12807
      }
12808
 
12809
      int lastComparison = 0;
12810
      createInvoice_result typedOther = (createInvoice_result)other;
12811
 
12812
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
12813
      if (lastComparison != 0) {
12814
        return lastComparison;
12815
      }
12816
      if (isSetE()) {
12817
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
12818
        if (lastComparison != 0) {
12819
          return lastComparison;
12820
        }
12821
      }
12822
      return 0;
12823
    }
12824
 
12825
    public _Fields fieldForId(int fieldId) {
12826
      return _Fields.findByThriftId(fieldId);
12827
    }
12828
 
12829
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12830
      org.apache.thrift.protocol.TField field;
12831
      iprot.readStructBegin();
12832
      while (true)
12833
      {
12834
        field = iprot.readFieldBegin();
12835
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12836
          break;
12837
        }
12838
        switch (field.id) {
12839
          case 1: // E
12840
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12841
              this.e = new PurchaseServiceException();
12842
              this.e.read(iprot);
12843
            } else { 
12844
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12845
            }
12846
            break;
12847
          default:
12848
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12849
        }
12850
        iprot.readFieldEnd();
12851
      }
12852
      iprot.readStructEnd();
12853
      validate();
12854
    }
12855
 
12856
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12857
      oprot.writeStructBegin(STRUCT_DESC);
12858
 
12859
      if (this.isSetE()) {
12860
        oprot.writeFieldBegin(E_FIELD_DESC);
12861
        this.e.write(oprot);
12862
        oprot.writeFieldEnd();
12863
      }
12864
      oprot.writeFieldStop();
12865
      oprot.writeStructEnd();
12866
    }
12867
 
12868
    @Override
12869
    public String toString() {
12870
      StringBuilder sb = new StringBuilder("createInvoice_result(");
12871
      boolean first = true;
12872
 
12873
      sb.append("e:");
12874
      if (this.e == null) {
12875
        sb.append("null");
12876
      } else {
12877
        sb.append(this.e);
12878
      }
12879
      first = false;
12880
      sb.append(")");
12881
      return sb.toString();
12882
    }
12883
 
12884
    public void validate() throws org.apache.thrift.TException {
12885
      // check for required fields
12886
    }
12887
 
12888
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12889
      try {
12890
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12891
      } catch (org.apache.thrift.TException te) {
12892
        throw new java.io.IOException(te);
12893
      }
12894
    }
12895
 
12896
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12897
      try {
12898
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12899
      } catch (org.apache.thrift.TException te) {
12900
        throw new java.io.IOException(te);
12901
      }
12902
    }
12903
 
12904
  }
12905
 
5591 mandeep.dh 12906
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
12907
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
12908
 
12909
    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);
12910
 
12911
    private Supplier supplier; // required
12912
 
12913
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12914
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12915
      SUPPLIER((short)1, "supplier");
12916
 
12917
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12918
 
12919
      static {
12920
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12921
          byName.put(field.getFieldName(), field);
12922
        }
12923
      }
12924
 
12925
      /**
12926
       * Find the _Fields constant that matches fieldId, or null if its not found.
12927
       */
12928
      public static _Fields findByThriftId(int fieldId) {
12929
        switch(fieldId) {
12930
          case 1: // SUPPLIER
12931
            return SUPPLIER;
12932
          default:
12933
            return null;
12934
        }
12935
      }
12936
 
12937
      /**
12938
       * Find the _Fields constant that matches fieldId, throwing an exception
12939
       * if it is not found.
12940
       */
12941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12942
        _Fields fields = findByThriftId(fieldId);
12943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12944
        return fields;
12945
      }
12946
 
12947
      /**
12948
       * Find the _Fields constant that matches name, or null if its not found.
12949
       */
12950
      public static _Fields findByName(String name) {
12951
        return byName.get(name);
12952
      }
12953
 
12954
      private final short _thriftId;
12955
      private final String _fieldName;
12956
 
12957
      _Fields(short thriftId, String fieldName) {
12958
        _thriftId = thriftId;
12959
        _fieldName = fieldName;
12960
      }
12961
 
12962
      public short getThriftFieldId() {
12963
        return _thriftId;
12964
      }
12965
 
12966
      public String getFieldName() {
12967
        return _fieldName;
12968
      }
12969
    }
12970
 
12971
    // isset id assignments
12972
 
12973
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12974
    static {
12975
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12976
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12977
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
12978
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12979
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
12980
    }
12981
 
12982
    public addSupplier_args() {
12983
    }
12984
 
12985
    public addSupplier_args(
12986
      Supplier supplier)
12987
    {
12988
      this();
12989
      this.supplier = supplier;
12990
    }
12991
 
12992
    /**
12993
     * Performs a deep copy on <i>other</i>.
12994
     */
12995
    public addSupplier_args(addSupplier_args other) {
12996
      if (other.isSetSupplier()) {
12997
        this.supplier = new Supplier(other.supplier);
12998
      }
12999
    }
13000
 
13001
    public addSupplier_args deepCopy() {
13002
      return new addSupplier_args(this);
13003
    }
13004
 
13005
    @Override
13006
    public void clear() {
13007
      this.supplier = null;
13008
    }
13009
 
13010
    public Supplier getSupplier() {
13011
      return this.supplier;
13012
    }
13013
 
13014
    public void setSupplier(Supplier supplier) {
13015
      this.supplier = supplier;
13016
    }
13017
 
13018
    public void unsetSupplier() {
13019
      this.supplier = null;
13020
    }
13021
 
13022
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
13023
    public boolean isSetSupplier() {
13024
      return this.supplier != null;
13025
    }
13026
 
13027
    public void setSupplierIsSet(boolean value) {
13028
      if (!value) {
13029
        this.supplier = null;
13030
      }
13031
    }
13032
 
13033
    public void setFieldValue(_Fields field, Object value) {
13034
      switch (field) {
13035
      case SUPPLIER:
13036
        if (value == null) {
13037
          unsetSupplier();
13038
        } else {
13039
          setSupplier((Supplier)value);
13040
        }
13041
        break;
13042
 
13043
      }
13044
    }
13045
 
13046
    public Object getFieldValue(_Fields field) {
13047
      switch (field) {
13048
      case SUPPLIER:
13049
        return getSupplier();
13050
 
13051
      }
13052
      throw new IllegalStateException();
13053
    }
13054
 
13055
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13056
    public boolean isSet(_Fields field) {
13057
      if (field == null) {
13058
        throw new IllegalArgumentException();
13059
      }
13060
 
13061
      switch (field) {
13062
      case SUPPLIER:
13063
        return isSetSupplier();
13064
      }
13065
      throw new IllegalStateException();
13066
    }
13067
 
13068
    @Override
13069
    public boolean equals(Object that) {
13070
      if (that == null)
13071
        return false;
13072
      if (that instanceof addSupplier_args)
13073
        return this.equals((addSupplier_args)that);
13074
      return false;
13075
    }
13076
 
13077
    public boolean equals(addSupplier_args that) {
13078
      if (that == null)
13079
        return false;
13080
 
13081
      boolean this_present_supplier = true && this.isSetSupplier();
13082
      boolean that_present_supplier = true && that.isSetSupplier();
13083
      if (this_present_supplier || that_present_supplier) {
13084
        if (!(this_present_supplier && that_present_supplier))
13085
          return false;
13086
        if (!this.supplier.equals(that.supplier))
13087
          return false;
13088
      }
13089
 
13090
      return true;
13091
    }
13092
 
13093
    @Override
13094
    public int hashCode() {
13095
      return 0;
13096
    }
13097
 
13098
    public int compareTo(addSupplier_args other) {
13099
      if (!getClass().equals(other.getClass())) {
13100
        return getClass().getName().compareTo(other.getClass().getName());
13101
      }
13102
 
13103
      int lastComparison = 0;
13104
      addSupplier_args typedOther = (addSupplier_args)other;
13105
 
13106
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
13107
      if (lastComparison != 0) {
13108
        return lastComparison;
13109
      }
13110
      if (isSetSupplier()) {
13111
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
13112
        if (lastComparison != 0) {
13113
          return lastComparison;
13114
        }
13115
      }
13116
      return 0;
13117
    }
13118
 
13119
    public _Fields fieldForId(int fieldId) {
13120
      return _Fields.findByThriftId(fieldId);
13121
    }
13122
 
13123
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13124
      org.apache.thrift.protocol.TField field;
13125
      iprot.readStructBegin();
13126
      while (true)
13127
      {
13128
        field = iprot.readFieldBegin();
13129
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13130
          break;
13131
        }
13132
        switch (field.id) {
13133
          case 1: // SUPPLIER
13134
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13135
              this.supplier = new Supplier();
13136
              this.supplier.read(iprot);
13137
            } else { 
13138
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13139
            }
13140
            break;
13141
          default:
13142
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13143
        }
13144
        iprot.readFieldEnd();
13145
      }
13146
      iprot.readStructEnd();
13147
      validate();
13148
    }
13149
 
13150
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13151
      validate();
13152
 
13153
      oprot.writeStructBegin(STRUCT_DESC);
13154
      if (this.supplier != null) {
13155
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
13156
        this.supplier.write(oprot);
13157
        oprot.writeFieldEnd();
13158
      }
13159
      oprot.writeFieldStop();
13160
      oprot.writeStructEnd();
13161
    }
13162
 
13163
    @Override
13164
    public String toString() {
13165
      StringBuilder sb = new StringBuilder("addSupplier_args(");
13166
      boolean first = true;
13167
 
13168
      sb.append("supplier:");
13169
      if (this.supplier == null) {
13170
        sb.append("null");
13171
      } else {
13172
        sb.append(this.supplier);
13173
      }
13174
      first = false;
13175
      sb.append(")");
13176
      return sb.toString();
13177
    }
13178
 
13179
    public void validate() throws org.apache.thrift.TException {
13180
      // check for required fields
13181
    }
13182
 
13183
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13184
      try {
13185
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13186
      } catch (org.apache.thrift.TException te) {
13187
        throw new java.io.IOException(te);
13188
      }
13189
    }
13190
 
13191
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13192
      try {
13193
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13194
      } catch (org.apache.thrift.TException te) {
13195
        throw new java.io.IOException(te);
13196
      }
13197
    }
13198
 
13199
  }
13200
 
13201
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
13202
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
13203
 
13204
    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);
13205
 
13206
    private Supplier success; // required
13207
 
13208
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13209
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13210
      SUCCESS((short)0, "success");
13211
 
13212
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13213
 
13214
      static {
13215
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13216
          byName.put(field.getFieldName(), field);
13217
        }
13218
      }
13219
 
13220
      /**
13221
       * Find the _Fields constant that matches fieldId, or null if its not found.
13222
       */
13223
      public static _Fields findByThriftId(int fieldId) {
13224
        switch(fieldId) {
13225
          case 0: // SUCCESS
13226
            return SUCCESS;
13227
          default:
13228
            return null;
13229
        }
13230
      }
13231
 
13232
      /**
13233
       * Find the _Fields constant that matches fieldId, throwing an exception
13234
       * if it is not found.
13235
       */
13236
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13237
        _Fields fields = findByThriftId(fieldId);
13238
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13239
        return fields;
13240
      }
13241
 
13242
      /**
13243
       * Find the _Fields constant that matches name, or null if its not found.
13244
       */
13245
      public static _Fields findByName(String name) {
13246
        return byName.get(name);
13247
      }
13248
 
13249
      private final short _thriftId;
13250
      private final String _fieldName;
13251
 
13252
      _Fields(short thriftId, String fieldName) {
13253
        _thriftId = thriftId;
13254
        _fieldName = fieldName;
13255
      }
13256
 
13257
      public short getThriftFieldId() {
13258
        return _thriftId;
13259
      }
13260
 
13261
      public String getFieldName() {
13262
        return _fieldName;
13263
      }
13264
    }
13265
 
13266
    // isset id assignments
13267
 
13268
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13269
    static {
13270
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13271
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13272
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13273
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13274
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
13275
    }
13276
 
13277
    public addSupplier_result() {
13278
    }
13279
 
13280
    public addSupplier_result(
13281
      Supplier success)
13282
    {
13283
      this();
13284
      this.success = success;
13285
    }
13286
 
13287
    /**
13288
     * Performs a deep copy on <i>other</i>.
13289
     */
13290
    public addSupplier_result(addSupplier_result other) {
13291
      if (other.isSetSuccess()) {
13292
        this.success = new Supplier(other.success);
13293
      }
13294
    }
13295
 
13296
    public addSupplier_result deepCopy() {
13297
      return new addSupplier_result(this);
13298
    }
13299
 
13300
    @Override
13301
    public void clear() {
13302
      this.success = null;
13303
    }
13304
 
13305
    public Supplier getSuccess() {
13306
      return this.success;
13307
    }
13308
 
13309
    public void setSuccess(Supplier success) {
13310
      this.success = success;
13311
    }
13312
 
13313
    public void unsetSuccess() {
13314
      this.success = null;
13315
    }
13316
 
13317
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13318
    public boolean isSetSuccess() {
13319
      return this.success != null;
13320
    }
13321
 
13322
    public void setSuccessIsSet(boolean value) {
13323
      if (!value) {
13324
        this.success = null;
13325
      }
13326
    }
13327
 
13328
    public void setFieldValue(_Fields field, Object value) {
13329
      switch (field) {
13330
      case SUCCESS:
13331
        if (value == null) {
13332
          unsetSuccess();
13333
        } else {
13334
          setSuccess((Supplier)value);
13335
        }
13336
        break;
13337
 
13338
      }
13339
    }
13340
 
13341
    public Object getFieldValue(_Fields field) {
13342
      switch (field) {
13343
      case SUCCESS:
13344
        return getSuccess();
13345
 
13346
      }
13347
      throw new IllegalStateException();
13348
    }
13349
 
13350
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13351
    public boolean isSet(_Fields field) {
13352
      if (field == null) {
13353
        throw new IllegalArgumentException();
13354
      }
13355
 
13356
      switch (field) {
13357
      case SUCCESS:
13358
        return isSetSuccess();
13359
      }
13360
      throw new IllegalStateException();
13361
    }
13362
 
13363
    @Override
13364
    public boolean equals(Object that) {
13365
      if (that == null)
13366
        return false;
13367
      if (that instanceof addSupplier_result)
13368
        return this.equals((addSupplier_result)that);
13369
      return false;
13370
    }
13371
 
13372
    public boolean equals(addSupplier_result that) {
13373
      if (that == null)
13374
        return false;
13375
 
13376
      boolean this_present_success = true && this.isSetSuccess();
13377
      boolean that_present_success = true && that.isSetSuccess();
13378
      if (this_present_success || that_present_success) {
13379
        if (!(this_present_success && that_present_success))
13380
          return false;
13381
        if (!this.success.equals(that.success))
13382
          return false;
13383
      }
13384
 
13385
      return true;
13386
    }
13387
 
13388
    @Override
13389
    public int hashCode() {
13390
      return 0;
13391
    }
13392
 
13393
    public int compareTo(addSupplier_result other) {
13394
      if (!getClass().equals(other.getClass())) {
13395
        return getClass().getName().compareTo(other.getClass().getName());
13396
      }
13397
 
13398
      int lastComparison = 0;
13399
      addSupplier_result typedOther = (addSupplier_result)other;
13400
 
13401
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13402
      if (lastComparison != 0) {
13403
        return lastComparison;
13404
      }
13405
      if (isSetSuccess()) {
13406
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13407
        if (lastComparison != 0) {
13408
          return lastComparison;
13409
        }
13410
      }
13411
      return 0;
13412
    }
13413
 
13414
    public _Fields fieldForId(int fieldId) {
13415
      return _Fields.findByThriftId(fieldId);
13416
    }
13417
 
13418
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13419
      org.apache.thrift.protocol.TField field;
13420
      iprot.readStructBegin();
13421
      while (true)
13422
      {
13423
        field = iprot.readFieldBegin();
13424
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13425
          break;
13426
        }
13427
        switch (field.id) {
13428
          case 0: // SUCCESS
13429
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13430
              this.success = new Supplier();
13431
              this.success.read(iprot);
13432
            } else { 
13433
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13434
            }
13435
            break;
13436
          default:
13437
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13438
        }
13439
        iprot.readFieldEnd();
13440
      }
13441
      iprot.readStructEnd();
13442
      validate();
13443
    }
13444
 
13445
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13446
      oprot.writeStructBegin(STRUCT_DESC);
13447
 
13448
      if (this.isSetSuccess()) {
13449
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13450
        this.success.write(oprot);
13451
        oprot.writeFieldEnd();
13452
      }
13453
      oprot.writeFieldStop();
13454
      oprot.writeStructEnd();
13455
    }
13456
 
13457
    @Override
13458
    public String toString() {
13459
      StringBuilder sb = new StringBuilder("addSupplier_result(");
13460
      boolean first = true;
13461
 
13462
      sb.append("success:");
13463
      if (this.success == null) {
13464
        sb.append("null");
13465
      } else {
13466
        sb.append(this.success);
13467
      }
13468
      first = false;
13469
      sb.append(")");
13470
      return sb.toString();
13471
    }
13472
 
13473
    public void validate() throws org.apache.thrift.TException {
13474
      // check for required fields
13475
    }
13476
 
13477
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13478
      try {
13479
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13480
      } catch (org.apache.thrift.TException te) {
13481
        throw new java.io.IOException(te);
13482
      }
13483
    }
13484
 
13485
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13486
      try {
13487
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13488
      } catch (org.apache.thrift.TException te) {
13489
        throw new java.io.IOException(te);
13490
      }
13491
    }
13492
 
13493
  }
13494
 
13495
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
13496
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
13497
 
13498
    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);
13499
 
13500
    private Supplier supplier; // required
13501
 
13502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13503
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13504
      SUPPLIER((short)1, "supplier");
13505
 
13506
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13507
 
13508
      static {
13509
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13510
          byName.put(field.getFieldName(), field);
13511
        }
13512
      }
13513
 
13514
      /**
13515
       * Find the _Fields constant that matches fieldId, or null if its not found.
13516
       */
13517
      public static _Fields findByThriftId(int fieldId) {
13518
        switch(fieldId) {
13519
          case 1: // SUPPLIER
13520
            return SUPPLIER;
13521
          default:
13522
            return null;
13523
        }
13524
      }
13525
 
13526
      /**
13527
       * Find the _Fields constant that matches fieldId, throwing an exception
13528
       * if it is not found.
13529
       */
13530
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13531
        _Fields fields = findByThriftId(fieldId);
13532
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13533
        return fields;
13534
      }
13535
 
13536
      /**
13537
       * Find the _Fields constant that matches name, or null if its not found.
13538
       */
13539
      public static _Fields findByName(String name) {
13540
        return byName.get(name);
13541
      }
13542
 
13543
      private final short _thriftId;
13544
      private final String _fieldName;
13545
 
13546
      _Fields(short thriftId, String fieldName) {
13547
        _thriftId = thriftId;
13548
        _fieldName = fieldName;
13549
      }
13550
 
13551
      public short getThriftFieldId() {
13552
        return _thriftId;
13553
      }
13554
 
13555
      public String getFieldName() {
13556
        return _fieldName;
13557
      }
13558
    }
13559
 
13560
    // isset id assignments
13561
 
13562
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13563
    static {
13564
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13565
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13566
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
13567
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13568
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
13569
    }
13570
 
13571
    public updateSupplier_args() {
13572
    }
13573
 
13574
    public updateSupplier_args(
13575
      Supplier supplier)
13576
    {
13577
      this();
13578
      this.supplier = supplier;
13579
    }
13580
 
13581
    /**
13582
     * Performs a deep copy on <i>other</i>.
13583
     */
13584
    public updateSupplier_args(updateSupplier_args other) {
13585
      if (other.isSetSupplier()) {
13586
        this.supplier = new Supplier(other.supplier);
13587
      }
13588
    }
13589
 
13590
    public updateSupplier_args deepCopy() {
13591
      return new updateSupplier_args(this);
13592
    }
13593
 
13594
    @Override
13595
    public void clear() {
13596
      this.supplier = null;
13597
    }
13598
 
13599
    public Supplier getSupplier() {
13600
      return this.supplier;
13601
    }
13602
 
13603
    public void setSupplier(Supplier supplier) {
13604
      this.supplier = supplier;
13605
    }
13606
 
13607
    public void unsetSupplier() {
13608
      this.supplier = null;
13609
    }
13610
 
13611
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
13612
    public boolean isSetSupplier() {
13613
      return this.supplier != null;
13614
    }
13615
 
13616
    public void setSupplierIsSet(boolean value) {
13617
      if (!value) {
13618
        this.supplier = null;
13619
      }
13620
    }
13621
 
13622
    public void setFieldValue(_Fields field, Object value) {
13623
      switch (field) {
13624
      case SUPPLIER:
13625
        if (value == null) {
13626
          unsetSupplier();
13627
        } else {
13628
          setSupplier((Supplier)value);
13629
        }
13630
        break;
13631
 
13632
      }
13633
    }
13634
 
13635
    public Object getFieldValue(_Fields field) {
13636
      switch (field) {
13637
      case SUPPLIER:
13638
        return getSupplier();
13639
 
13640
      }
13641
      throw new IllegalStateException();
13642
    }
13643
 
13644
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13645
    public boolean isSet(_Fields field) {
13646
      if (field == null) {
13647
        throw new IllegalArgumentException();
13648
      }
13649
 
13650
      switch (field) {
13651
      case SUPPLIER:
13652
        return isSetSupplier();
13653
      }
13654
      throw new IllegalStateException();
13655
    }
13656
 
13657
    @Override
13658
    public boolean equals(Object that) {
13659
      if (that == null)
13660
        return false;
13661
      if (that instanceof updateSupplier_args)
13662
        return this.equals((updateSupplier_args)that);
13663
      return false;
13664
    }
13665
 
13666
    public boolean equals(updateSupplier_args that) {
13667
      if (that == null)
13668
        return false;
13669
 
13670
      boolean this_present_supplier = true && this.isSetSupplier();
13671
      boolean that_present_supplier = true && that.isSetSupplier();
13672
      if (this_present_supplier || that_present_supplier) {
13673
        if (!(this_present_supplier && that_present_supplier))
13674
          return false;
13675
        if (!this.supplier.equals(that.supplier))
13676
          return false;
13677
      }
13678
 
13679
      return true;
13680
    }
13681
 
13682
    @Override
13683
    public int hashCode() {
13684
      return 0;
13685
    }
13686
 
13687
    public int compareTo(updateSupplier_args other) {
13688
      if (!getClass().equals(other.getClass())) {
13689
        return getClass().getName().compareTo(other.getClass().getName());
13690
      }
13691
 
13692
      int lastComparison = 0;
13693
      updateSupplier_args typedOther = (updateSupplier_args)other;
13694
 
13695
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
13696
      if (lastComparison != 0) {
13697
        return lastComparison;
13698
      }
13699
      if (isSetSupplier()) {
13700
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
13701
        if (lastComparison != 0) {
13702
          return lastComparison;
13703
        }
13704
      }
13705
      return 0;
13706
    }
13707
 
13708
    public _Fields fieldForId(int fieldId) {
13709
      return _Fields.findByThriftId(fieldId);
13710
    }
13711
 
13712
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13713
      org.apache.thrift.protocol.TField field;
13714
      iprot.readStructBegin();
13715
      while (true)
13716
      {
13717
        field = iprot.readFieldBegin();
13718
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13719
          break;
13720
        }
13721
        switch (field.id) {
13722
          case 1: // SUPPLIER
13723
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13724
              this.supplier = new Supplier();
13725
              this.supplier.read(iprot);
13726
            } else { 
13727
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13728
            }
13729
            break;
13730
          default:
13731
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13732
        }
13733
        iprot.readFieldEnd();
13734
      }
13735
      iprot.readStructEnd();
13736
      validate();
13737
    }
13738
 
13739
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13740
      validate();
13741
 
13742
      oprot.writeStructBegin(STRUCT_DESC);
13743
      if (this.supplier != null) {
13744
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
13745
        this.supplier.write(oprot);
13746
        oprot.writeFieldEnd();
13747
      }
13748
      oprot.writeFieldStop();
13749
      oprot.writeStructEnd();
13750
    }
13751
 
13752
    @Override
13753
    public String toString() {
13754
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
13755
      boolean first = true;
13756
 
13757
      sb.append("supplier:");
13758
      if (this.supplier == null) {
13759
        sb.append("null");
13760
      } else {
13761
        sb.append(this.supplier);
13762
      }
13763
      first = false;
13764
      sb.append(")");
13765
      return sb.toString();
13766
    }
13767
 
13768
    public void validate() throws org.apache.thrift.TException {
13769
      // check for required fields
13770
    }
13771
 
13772
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13773
      try {
13774
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13775
      } catch (org.apache.thrift.TException te) {
13776
        throw new java.io.IOException(te);
13777
      }
13778
    }
13779
 
13780
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13781
      try {
13782
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13783
      } catch (org.apache.thrift.TException te) {
13784
        throw new java.io.IOException(te);
13785
      }
13786
    }
13787
 
13788
  }
13789
 
13790
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
13791
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
13792
 
13793
 
13794
 
13795
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13796
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13797
;
13798
 
13799
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13800
 
13801
      static {
13802
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13803
          byName.put(field.getFieldName(), field);
13804
        }
13805
      }
13806
 
13807
      /**
13808
       * Find the _Fields constant that matches fieldId, or null if its not found.
13809
       */
13810
      public static _Fields findByThriftId(int fieldId) {
13811
        switch(fieldId) {
13812
          default:
13813
            return null;
13814
        }
13815
      }
13816
 
13817
      /**
13818
       * Find the _Fields constant that matches fieldId, throwing an exception
13819
       * if it is not found.
13820
       */
13821
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13822
        _Fields fields = findByThriftId(fieldId);
13823
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13824
        return fields;
13825
      }
13826
 
13827
      /**
13828
       * Find the _Fields constant that matches name, or null if its not found.
13829
       */
13830
      public static _Fields findByName(String name) {
13831
        return byName.get(name);
13832
      }
13833
 
13834
      private final short _thriftId;
13835
      private final String _fieldName;
13836
 
13837
      _Fields(short thriftId, String fieldName) {
13838
        _thriftId = thriftId;
13839
        _fieldName = fieldName;
13840
      }
13841
 
13842
      public short getThriftFieldId() {
13843
        return _thriftId;
13844
      }
13845
 
13846
      public String getFieldName() {
13847
        return _fieldName;
13848
      }
13849
    }
13850
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13851
    static {
13852
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13853
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13854
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
13855
    }
13856
 
13857
    public updateSupplier_result() {
13858
    }
13859
 
13860
    /**
13861
     * Performs a deep copy on <i>other</i>.
13862
     */
13863
    public updateSupplier_result(updateSupplier_result other) {
13864
    }
13865
 
13866
    public updateSupplier_result deepCopy() {
13867
      return new updateSupplier_result(this);
13868
    }
13869
 
13870
    @Override
13871
    public void clear() {
13872
    }
13873
 
13874
    public void setFieldValue(_Fields field, Object value) {
13875
      switch (field) {
13876
      }
13877
    }
13878
 
13879
    public Object getFieldValue(_Fields field) {
13880
      switch (field) {
13881
      }
13882
      throw new IllegalStateException();
13883
    }
13884
 
13885
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13886
    public boolean isSet(_Fields field) {
13887
      if (field == null) {
13888
        throw new IllegalArgumentException();
13889
      }
13890
 
13891
      switch (field) {
13892
      }
13893
      throw new IllegalStateException();
13894
    }
13895
 
13896
    @Override
13897
    public boolean equals(Object that) {
13898
      if (that == null)
13899
        return false;
13900
      if (that instanceof updateSupplier_result)
13901
        return this.equals((updateSupplier_result)that);
13902
      return false;
13903
    }
13904
 
13905
    public boolean equals(updateSupplier_result that) {
13906
      if (that == null)
13907
        return false;
13908
 
13909
      return true;
13910
    }
13911
 
13912
    @Override
13913
    public int hashCode() {
13914
      return 0;
13915
    }
13916
 
13917
    public int compareTo(updateSupplier_result other) {
13918
      if (!getClass().equals(other.getClass())) {
13919
        return getClass().getName().compareTo(other.getClass().getName());
13920
      }
13921
 
13922
      int lastComparison = 0;
13923
      updateSupplier_result typedOther = (updateSupplier_result)other;
13924
 
13925
      return 0;
13926
    }
13927
 
13928
    public _Fields fieldForId(int fieldId) {
13929
      return _Fields.findByThriftId(fieldId);
13930
    }
13931
 
13932
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13933
      org.apache.thrift.protocol.TField field;
13934
      iprot.readStructBegin();
13935
      while (true)
13936
      {
13937
        field = iprot.readFieldBegin();
13938
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13939
          break;
13940
        }
13941
        switch (field.id) {
13942
          default:
13943
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13944
        }
13945
        iprot.readFieldEnd();
13946
      }
13947
      iprot.readStructEnd();
13948
      validate();
13949
    }
13950
 
13951
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13952
      oprot.writeStructBegin(STRUCT_DESC);
13953
 
13954
      oprot.writeFieldStop();
13955
      oprot.writeStructEnd();
13956
    }
13957
 
13958
    @Override
13959
    public String toString() {
13960
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
13961
      boolean first = true;
13962
 
13963
      sb.append(")");
13964
      return sb.toString();
13965
    }
13966
 
13967
    public void validate() throws org.apache.thrift.TException {
13968
      // check for required fields
13969
    }
13970
 
13971
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13972
      try {
13973
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13974
      } catch (org.apache.thrift.TException te) {
13975
        throw new java.io.IOException(te);
13976
      }
13977
    }
13978
 
13979
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13980
      try {
13981
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13982
      } catch (org.apache.thrift.TException te) {
13983
        throw new java.io.IOException(te);
13984
      }
13985
    }
13986
 
13987
  }
13988
 
6467 amar.kumar 13989
  public static class createPurchaseReturn_args implements org.apache.thrift.TBase<createPurchaseReturn_args, createPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
13990
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_args");
13991
 
13992
    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);
13993
 
13994
    private PurchaseReturn purchaseReturn; // required
13995
 
13996
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13997
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13998
      PURCHASE_RETURN((short)1, "purchaseReturn");
13999
 
14000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14001
 
14002
      static {
14003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14004
          byName.put(field.getFieldName(), field);
14005
        }
14006
      }
14007
 
14008
      /**
14009
       * Find the _Fields constant that matches fieldId, or null if its not found.
14010
       */
14011
      public static _Fields findByThriftId(int fieldId) {
14012
        switch(fieldId) {
14013
          case 1: // PURCHASE_RETURN
14014
            return PURCHASE_RETURN;
14015
          default:
14016
            return null;
14017
        }
14018
      }
14019
 
14020
      /**
14021
       * Find the _Fields constant that matches fieldId, throwing an exception
14022
       * if it is not found.
14023
       */
14024
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14025
        _Fields fields = findByThriftId(fieldId);
14026
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14027
        return fields;
14028
      }
14029
 
14030
      /**
14031
       * Find the _Fields constant that matches name, or null if its not found.
14032
       */
14033
      public static _Fields findByName(String name) {
14034
        return byName.get(name);
14035
      }
14036
 
14037
      private final short _thriftId;
14038
      private final String _fieldName;
14039
 
14040
      _Fields(short thriftId, String fieldName) {
14041
        _thriftId = thriftId;
14042
        _fieldName = fieldName;
14043
      }
14044
 
14045
      public short getThriftFieldId() {
14046
        return _thriftId;
14047
      }
14048
 
14049
      public String getFieldName() {
14050
        return _fieldName;
14051
      }
14052
    }
14053
 
14054
    // isset id assignments
14055
 
14056
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14057
    static {
14058
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14059
      tmpMap.put(_Fields.PURCHASE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("purchaseReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14060
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
14061
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14062
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_args.class, metaDataMap);
14063
    }
14064
 
14065
    public createPurchaseReturn_args() {
14066
    }
14067
 
14068
    public createPurchaseReturn_args(
14069
      PurchaseReturn purchaseReturn)
14070
    {
14071
      this();
14072
      this.purchaseReturn = purchaseReturn;
14073
    }
14074
 
14075
    /**
14076
     * Performs a deep copy on <i>other</i>.
14077
     */
14078
    public createPurchaseReturn_args(createPurchaseReturn_args other) {
14079
      if (other.isSetPurchaseReturn()) {
14080
        this.purchaseReturn = new PurchaseReturn(other.purchaseReturn);
14081
      }
14082
    }
14083
 
14084
    public createPurchaseReturn_args deepCopy() {
14085
      return new createPurchaseReturn_args(this);
14086
    }
14087
 
14088
    @Override
14089
    public void clear() {
14090
      this.purchaseReturn = null;
14091
    }
14092
 
14093
    public PurchaseReturn getPurchaseReturn() {
14094
      return this.purchaseReturn;
14095
    }
14096
 
14097
    public void setPurchaseReturn(PurchaseReturn purchaseReturn) {
14098
      this.purchaseReturn = purchaseReturn;
14099
    }
14100
 
14101
    public void unsetPurchaseReturn() {
14102
      this.purchaseReturn = null;
14103
    }
14104
 
14105
    /** Returns true if field purchaseReturn is set (has been assigned a value) and false otherwise */
14106
    public boolean isSetPurchaseReturn() {
14107
      return this.purchaseReturn != null;
14108
    }
14109
 
14110
    public void setPurchaseReturnIsSet(boolean value) {
14111
      if (!value) {
14112
        this.purchaseReturn = null;
14113
      }
14114
    }
14115
 
14116
    public void setFieldValue(_Fields field, Object value) {
14117
      switch (field) {
14118
      case PURCHASE_RETURN:
14119
        if (value == null) {
14120
          unsetPurchaseReturn();
14121
        } else {
14122
          setPurchaseReturn((PurchaseReturn)value);
14123
        }
14124
        break;
14125
 
14126
      }
14127
    }
14128
 
14129
    public Object getFieldValue(_Fields field) {
14130
      switch (field) {
14131
      case PURCHASE_RETURN:
14132
        return getPurchaseReturn();
14133
 
14134
      }
14135
      throw new IllegalStateException();
14136
    }
14137
 
14138
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14139
    public boolean isSet(_Fields field) {
14140
      if (field == null) {
14141
        throw new IllegalArgumentException();
14142
      }
14143
 
14144
      switch (field) {
14145
      case PURCHASE_RETURN:
14146
        return isSetPurchaseReturn();
14147
      }
14148
      throw new IllegalStateException();
14149
    }
14150
 
14151
    @Override
14152
    public boolean equals(Object that) {
14153
      if (that == null)
14154
        return false;
14155
      if (that instanceof createPurchaseReturn_args)
14156
        return this.equals((createPurchaseReturn_args)that);
14157
      return false;
14158
    }
14159
 
14160
    public boolean equals(createPurchaseReturn_args that) {
14161
      if (that == null)
14162
        return false;
14163
 
14164
      boolean this_present_purchaseReturn = true && this.isSetPurchaseReturn();
14165
      boolean that_present_purchaseReturn = true && that.isSetPurchaseReturn();
14166
      if (this_present_purchaseReturn || that_present_purchaseReturn) {
14167
        if (!(this_present_purchaseReturn && that_present_purchaseReturn))
14168
          return false;
14169
        if (!this.purchaseReturn.equals(that.purchaseReturn))
14170
          return false;
14171
      }
14172
 
14173
      return true;
14174
    }
14175
 
14176
    @Override
14177
    public int hashCode() {
14178
      return 0;
14179
    }
14180
 
14181
    public int compareTo(createPurchaseReturn_args other) {
14182
      if (!getClass().equals(other.getClass())) {
14183
        return getClass().getName().compareTo(other.getClass().getName());
14184
      }
14185
 
14186
      int lastComparison = 0;
14187
      createPurchaseReturn_args typedOther = (createPurchaseReturn_args)other;
14188
 
14189
      lastComparison = Boolean.valueOf(isSetPurchaseReturn()).compareTo(typedOther.isSetPurchaseReturn());
14190
      if (lastComparison != 0) {
14191
        return lastComparison;
14192
      }
14193
      if (isSetPurchaseReturn()) {
14194
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseReturn, typedOther.purchaseReturn);
14195
        if (lastComparison != 0) {
14196
          return lastComparison;
14197
        }
14198
      }
14199
      return 0;
14200
    }
14201
 
14202
    public _Fields fieldForId(int fieldId) {
14203
      return _Fields.findByThriftId(fieldId);
14204
    }
14205
 
14206
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14207
      org.apache.thrift.protocol.TField field;
14208
      iprot.readStructBegin();
14209
      while (true)
14210
      {
14211
        field = iprot.readFieldBegin();
14212
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14213
          break;
14214
        }
14215
        switch (field.id) {
14216
          case 1: // PURCHASE_RETURN
14217
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14218
              this.purchaseReturn = new PurchaseReturn();
14219
              this.purchaseReturn.read(iprot);
14220
            } else { 
14221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14222
            }
14223
            break;
14224
          default:
14225
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14226
        }
14227
        iprot.readFieldEnd();
14228
      }
14229
      iprot.readStructEnd();
14230
      validate();
14231
    }
14232
 
14233
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14234
      validate();
14235
 
14236
      oprot.writeStructBegin(STRUCT_DESC);
14237
      if (this.purchaseReturn != null) {
14238
        oprot.writeFieldBegin(PURCHASE_RETURN_FIELD_DESC);
14239
        this.purchaseReturn.write(oprot);
14240
        oprot.writeFieldEnd();
14241
      }
14242
      oprot.writeFieldStop();
14243
      oprot.writeStructEnd();
14244
    }
14245
 
14246
    @Override
14247
    public String toString() {
14248
      StringBuilder sb = new StringBuilder("createPurchaseReturn_args(");
14249
      boolean first = true;
14250
 
14251
      sb.append("purchaseReturn:");
14252
      if (this.purchaseReturn == null) {
14253
        sb.append("null");
14254
      } else {
14255
        sb.append(this.purchaseReturn);
14256
      }
14257
      first = false;
14258
      sb.append(")");
14259
      return sb.toString();
14260
    }
14261
 
14262
    public void validate() throws org.apache.thrift.TException {
14263
      // check for required fields
14264
    }
14265
 
14266
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14267
      try {
14268
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14269
      } catch (org.apache.thrift.TException te) {
14270
        throw new java.io.IOException(te);
14271
      }
14272
    }
14273
 
14274
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14275
      try {
14276
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14277
      } catch (org.apache.thrift.TException te) {
14278
        throw new java.io.IOException(te);
14279
      }
14280
    }
14281
 
14282
  }
14283
 
14284
  public static class createPurchaseReturn_result implements org.apache.thrift.TBase<createPurchaseReturn_result, createPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14285
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseReturn_result");
14286
 
14287
    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);
14288
 
14289
    private long success; // required
14290
 
14291
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14292
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14293
      SUCCESS((short)0, "success");
14294
 
14295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14296
 
14297
      static {
14298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14299
          byName.put(field.getFieldName(), field);
14300
        }
14301
      }
14302
 
14303
      /**
14304
       * Find the _Fields constant that matches fieldId, or null if its not found.
14305
       */
14306
      public static _Fields findByThriftId(int fieldId) {
14307
        switch(fieldId) {
14308
          case 0: // SUCCESS
14309
            return SUCCESS;
14310
          default:
14311
            return null;
14312
        }
14313
      }
14314
 
14315
      /**
14316
       * Find the _Fields constant that matches fieldId, throwing an exception
14317
       * if it is not found.
14318
       */
14319
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14320
        _Fields fields = findByThriftId(fieldId);
14321
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14322
        return fields;
14323
      }
14324
 
14325
      /**
14326
       * Find the _Fields constant that matches name, or null if its not found.
14327
       */
14328
      public static _Fields findByName(String name) {
14329
        return byName.get(name);
14330
      }
14331
 
14332
      private final short _thriftId;
14333
      private final String _fieldName;
14334
 
14335
      _Fields(short thriftId, String fieldName) {
14336
        _thriftId = thriftId;
14337
        _fieldName = fieldName;
14338
      }
14339
 
14340
      public short getThriftFieldId() {
14341
        return _thriftId;
14342
      }
14343
 
14344
      public String getFieldName() {
14345
        return _fieldName;
14346
      }
14347
    }
14348
 
14349
    // isset id assignments
14350
    private static final int __SUCCESS_ISSET_ID = 0;
14351
    private BitSet __isset_bit_vector = new BitSet(1);
14352
 
14353
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14354
    static {
14355
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14356
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14357
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14358
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14359
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseReturn_result.class, metaDataMap);
14360
    }
14361
 
14362
    public createPurchaseReturn_result() {
14363
    }
14364
 
14365
    public createPurchaseReturn_result(
14366
      long success)
14367
    {
14368
      this();
14369
      this.success = success;
14370
      setSuccessIsSet(true);
14371
    }
14372
 
14373
    /**
14374
     * Performs a deep copy on <i>other</i>.
14375
     */
14376
    public createPurchaseReturn_result(createPurchaseReturn_result other) {
14377
      __isset_bit_vector.clear();
14378
      __isset_bit_vector.or(other.__isset_bit_vector);
14379
      this.success = other.success;
14380
    }
14381
 
14382
    public createPurchaseReturn_result deepCopy() {
14383
      return new createPurchaseReturn_result(this);
14384
    }
14385
 
14386
    @Override
14387
    public void clear() {
14388
      setSuccessIsSet(false);
14389
      this.success = 0;
14390
    }
14391
 
14392
    public long getSuccess() {
14393
      return this.success;
14394
    }
14395
 
14396
    public void setSuccess(long success) {
14397
      this.success = success;
14398
      setSuccessIsSet(true);
14399
    }
14400
 
14401
    public void unsetSuccess() {
14402
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14403
    }
14404
 
14405
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14406
    public boolean isSetSuccess() {
14407
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14408
    }
14409
 
14410
    public void setSuccessIsSet(boolean value) {
14411
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14412
    }
14413
 
14414
    public void setFieldValue(_Fields field, Object value) {
14415
      switch (field) {
14416
      case SUCCESS:
14417
        if (value == null) {
14418
          unsetSuccess();
14419
        } else {
14420
          setSuccess((Long)value);
14421
        }
14422
        break;
14423
 
14424
      }
14425
    }
14426
 
14427
    public Object getFieldValue(_Fields field) {
14428
      switch (field) {
14429
      case SUCCESS:
14430
        return Long.valueOf(getSuccess());
14431
 
14432
      }
14433
      throw new IllegalStateException();
14434
    }
14435
 
14436
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14437
    public boolean isSet(_Fields field) {
14438
      if (field == null) {
14439
        throw new IllegalArgumentException();
14440
      }
14441
 
14442
      switch (field) {
14443
      case SUCCESS:
14444
        return isSetSuccess();
14445
      }
14446
      throw new IllegalStateException();
14447
    }
14448
 
14449
    @Override
14450
    public boolean equals(Object that) {
14451
      if (that == null)
14452
        return false;
14453
      if (that instanceof createPurchaseReturn_result)
14454
        return this.equals((createPurchaseReturn_result)that);
14455
      return false;
14456
    }
14457
 
14458
    public boolean equals(createPurchaseReturn_result that) {
14459
      if (that == null)
14460
        return false;
14461
 
14462
      boolean this_present_success = true;
14463
      boolean that_present_success = true;
14464
      if (this_present_success || that_present_success) {
14465
        if (!(this_present_success && that_present_success))
14466
          return false;
14467
        if (this.success != that.success)
14468
          return false;
14469
      }
14470
 
14471
      return true;
14472
    }
14473
 
14474
    @Override
14475
    public int hashCode() {
14476
      return 0;
14477
    }
14478
 
14479
    public int compareTo(createPurchaseReturn_result other) {
14480
      if (!getClass().equals(other.getClass())) {
14481
        return getClass().getName().compareTo(other.getClass().getName());
14482
      }
14483
 
14484
      int lastComparison = 0;
14485
      createPurchaseReturn_result typedOther = (createPurchaseReturn_result)other;
14486
 
14487
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14488
      if (lastComparison != 0) {
14489
        return lastComparison;
14490
      }
14491
      if (isSetSuccess()) {
14492
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14493
        if (lastComparison != 0) {
14494
          return lastComparison;
14495
        }
14496
      }
14497
      return 0;
14498
    }
14499
 
14500
    public _Fields fieldForId(int fieldId) {
14501
      return _Fields.findByThriftId(fieldId);
14502
    }
14503
 
14504
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14505
      org.apache.thrift.protocol.TField field;
14506
      iprot.readStructBegin();
14507
      while (true)
14508
      {
14509
        field = iprot.readFieldBegin();
14510
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14511
          break;
14512
        }
14513
        switch (field.id) {
14514
          case 0: // SUCCESS
14515
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14516
              this.success = iprot.readI64();
14517
              setSuccessIsSet(true);
14518
            } else { 
14519
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14520
            }
14521
            break;
14522
          default:
14523
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14524
        }
14525
        iprot.readFieldEnd();
14526
      }
14527
      iprot.readStructEnd();
14528
      validate();
14529
    }
14530
 
14531
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14532
      oprot.writeStructBegin(STRUCT_DESC);
14533
 
14534
      if (this.isSetSuccess()) {
14535
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14536
        oprot.writeI64(this.success);
14537
        oprot.writeFieldEnd();
14538
      }
14539
      oprot.writeFieldStop();
14540
      oprot.writeStructEnd();
14541
    }
14542
 
14543
    @Override
14544
    public String toString() {
14545
      StringBuilder sb = new StringBuilder("createPurchaseReturn_result(");
14546
      boolean first = true;
14547
 
14548
      sb.append("success:");
14549
      sb.append(this.success);
14550
      first = false;
14551
      sb.append(")");
14552
      return sb.toString();
14553
    }
14554
 
14555
    public void validate() throws org.apache.thrift.TException {
14556
      // check for required fields
14557
    }
14558
 
14559
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14560
      try {
14561
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14562
      } catch (org.apache.thrift.TException te) {
14563
        throw new java.io.IOException(te);
14564
      }
14565
    }
14566
 
14567
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14568
      try {
14569
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14570
      } catch (org.apache.thrift.TException te) {
14571
        throw new java.io.IOException(te);
14572
      }
14573
    }
14574
 
14575
  }
14576
 
14577
  public static class settlePurchaseReturn_args implements org.apache.thrift.TBase<settlePurchaseReturn_args, settlePurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14578
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_args");
14579
 
14580
    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);
14581
 
14582
    private long id; // required
14583
 
14584
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14585
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14586
      ID((short)1, "id");
14587
 
14588
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14589
 
14590
      static {
14591
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14592
          byName.put(field.getFieldName(), field);
14593
        }
14594
      }
14595
 
14596
      /**
14597
       * Find the _Fields constant that matches fieldId, or null if its not found.
14598
       */
14599
      public static _Fields findByThriftId(int fieldId) {
14600
        switch(fieldId) {
14601
          case 1: // ID
14602
            return ID;
14603
          default:
14604
            return null;
14605
        }
14606
      }
14607
 
14608
      /**
14609
       * Find the _Fields constant that matches fieldId, throwing an exception
14610
       * if it is not found.
14611
       */
14612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14613
        _Fields fields = findByThriftId(fieldId);
14614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14615
        return fields;
14616
      }
14617
 
14618
      /**
14619
       * Find the _Fields constant that matches name, or null if its not found.
14620
       */
14621
      public static _Fields findByName(String name) {
14622
        return byName.get(name);
14623
      }
14624
 
14625
      private final short _thriftId;
14626
      private final String _fieldName;
14627
 
14628
      _Fields(short thriftId, String fieldName) {
14629
        _thriftId = thriftId;
14630
        _fieldName = fieldName;
14631
      }
14632
 
14633
      public short getThriftFieldId() {
14634
        return _thriftId;
14635
      }
14636
 
14637
      public String getFieldName() {
14638
        return _fieldName;
14639
      }
14640
    }
14641
 
14642
    // isset id assignments
14643
    private static final int __ID_ISSET_ID = 0;
14644
    private BitSet __isset_bit_vector = new BitSet(1);
14645
 
14646
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14647
    static {
14648
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14649
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14650
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14651
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14652
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_args.class, metaDataMap);
14653
    }
14654
 
14655
    public settlePurchaseReturn_args() {
14656
    }
14657
 
14658
    public settlePurchaseReturn_args(
14659
      long id)
14660
    {
14661
      this();
14662
      this.id = id;
14663
      setIdIsSet(true);
14664
    }
14665
 
14666
    /**
14667
     * Performs a deep copy on <i>other</i>.
14668
     */
14669
    public settlePurchaseReturn_args(settlePurchaseReturn_args other) {
14670
      __isset_bit_vector.clear();
14671
      __isset_bit_vector.or(other.__isset_bit_vector);
14672
      this.id = other.id;
14673
    }
14674
 
14675
    public settlePurchaseReturn_args deepCopy() {
14676
      return new settlePurchaseReturn_args(this);
14677
    }
14678
 
14679
    @Override
14680
    public void clear() {
14681
      setIdIsSet(false);
14682
      this.id = 0;
14683
    }
14684
 
14685
    public long getId() {
14686
      return this.id;
14687
    }
14688
 
14689
    public void setId(long id) {
14690
      this.id = id;
14691
      setIdIsSet(true);
14692
    }
14693
 
14694
    public void unsetId() {
14695
      __isset_bit_vector.clear(__ID_ISSET_ID);
14696
    }
14697
 
14698
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
14699
    public boolean isSetId() {
14700
      return __isset_bit_vector.get(__ID_ISSET_ID);
14701
    }
14702
 
14703
    public void setIdIsSet(boolean value) {
14704
      __isset_bit_vector.set(__ID_ISSET_ID, value);
14705
    }
14706
 
14707
    public void setFieldValue(_Fields field, Object value) {
14708
      switch (field) {
14709
      case ID:
14710
        if (value == null) {
14711
          unsetId();
14712
        } else {
14713
          setId((Long)value);
14714
        }
14715
        break;
14716
 
14717
      }
14718
    }
14719
 
14720
    public Object getFieldValue(_Fields field) {
14721
      switch (field) {
14722
      case ID:
14723
        return Long.valueOf(getId());
14724
 
14725
      }
14726
      throw new IllegalStateException();
14727
    }
14728
 
14729
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14730
    public boolean isSet(_Fields field) {
14731
      if (field == null) {
14732
        throw new IllegalArgumentException();
14733
      }
14734
 
14735
      switch (field) {
14736
      case ID:
14737
        return isSetId();
14738
      }
14739
      throw new IllegalStateException();
14740
    }
14741
 
14742
    @Override
14743
    public boolean equals(Object that) {
14744
      if (that == null)
14745
        return false;
14746
      if (that instanceof settlePurchaseReturn_args)
14747
        return this.equals((settlePurchaseReturn_args)that);
14748
      return false;
14749
    }
14750
 
14751
    public boolean equals(settlePurchaseReturn_args that) {
14752
      if (that == null)
14753
        return false;
14754
 
14755
      boolean this_present_id = true;
14756
      boolean that_present_id = true;
14757
      if (this_present_id || that_present_id) {
14758
        if (!(this_present_id && that_present_id))
14759
          return false;
14760
        if (this.id != that.id)
14761
          return false;
14762
      }
14763
 
14764
      return true;
14765
    }
14766
 
14767
    @Override
14768
    public int hashCode() {
14769
      return 0;
14770
    }
14771
 
14772
    public int compareTo(settlePurchaseReturn_args other) {
14773
      if (!getClass().equals(other.getClass())) {
14774
        return getClass().getName().compareTo(other.getClass().getName());
14775
      }
14776
 
14777
      int lastComparison = 0;
14778
      settlePurchaseReturn_args typedOther = (settlePurchaseReturn_args)other;
14779
 
14780
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
14781
      if (lastComparison != 0) {
14782
        return lastComparison;
14783
      }
14784
      if (isSetId()) {
14785
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
14786
        if (lastComparison != 0) {
14787
          return lastComparison;
14788
        }
14789
      }
14790
      return 0;
14791
    }
14792
 
14793
    public _Fields fieldForId(int fieldId) {
14794
      return _Fields.findByThriftId(fieldId);
14795
    }
14796
 
14797
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14798
      org.apache.thrift.protocol.TField field;
14799
      iprot.readStructBegin();
14800
      while (true)
14801
      {
14802
        field = iprot.readFieldBegin();
14803
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14804
          break;
14805
        }
14806
        switch (field.id) {
14807
          case 1: // ID
14808
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14809
              this.id = iprot.readI64();
14810
              setIdIsSet(true);
14811
            } else { 
14812
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14813
            }
14814
            break;
14815
          default:
14816
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14817
        }
14818
        iprot.readFieldEnd();
14819
      }
14820
      iprot.readStructEnd();
14821
      validate();
14822
    }
14823
 
14824
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14825
      validate();
14826
 
14827
      oprot.writeStructBegin(STRUCT_DESC);
14828
      oprot.writeFieldBegin(ID_FIELD_DESC);
14829
      oprot.writeI64(this.id);
14830
      oprot.writeFieldEnd();
14831
      oprot.writeFieldStop();
14832
      oprot.writeStructEnd();
14833
    }
14834
 
14835
    @Override
14836
    public String toString() {
14837
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_args(");
14838
      boolean first = true;
14839
 
14840
      sb.append("id:");
14841
      sb.append(this.id);
14842
      first = false;
14843
      sb.append(")");
14844
      return sb.toString();
14845
    }
14846
 
14847
    public void validate() throws org.apache.thrift.TException {
14848
      // check for required fields
14849
    }
14850
 
14851
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14852
      try {
14853
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14854
      } catch (org.apache.thrift.TException te) {
14855
        throw new java.io.IOException(te);
14856
      }
14857
    }
14858
 
14859
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14860
      try {
14861
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
14862
        __isset_bit_vector = new BitSet(1);
14863
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14864
      } catch (org.apache.thrift.TException te) {
14865
        throw new java.io.IOException(te);
14866
      }
14867
    }
14868
 
14869
  }
14870
 
14871
  public static class settlePurchaseReturn_result implements org.apache.thrift.TBase<settlePurchaseReturn_result, settlePurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14872
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("settlePurchaseReturn_result");
14873
 
14874
 
14875
 
14876
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14877
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14878
;
14879
 
14880
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14881
 
14882
      static {
14883
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14884
          byName.put(field.getFieldName(), field);
14885
        }
14886
      }
14887
 
14888
      /**
14889
       * Find the _Fields constant that matches fieldId, or null if its not found.
14890
       */
14891
      public static _Fields findByThriftId(int fieldId) {
14892
        switch(fieldId) {
14893
          default:
14894
            return null;
14895
        }
14896
      }
14897
 
14898
      /**
14899
       * Find the _Fields constant that matches fieldId, throwing an exception
14900
       * if it is not found.
14901
       */
14902
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14903
        _Fields fields = findByThriftId(fieldId);
14904
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14905
        return fields;
14906
      }
14907
 
14908
      /**
14909
       * Find the _Fields constant that matches name, or null if its not found.
14910
       */
14911
      public static _Fields findByName(String name) {
14912
        return byName.get(name);
14913
      }
14914
 
14915
      private final short _thriftId;
14916
      private final String _fieldName;
14917
 
14918
      _Fields(short thriftId, String fieldName) {
14919
        _thriftId = thriftId;
14920
        _fieldName = fieldName;
14921
      }
14922
 
14923
      public short getThriftFieldId() {
14924
        return _thriftId;
14925
      }
14926
 
14927
      public String getFieldName() {
14928
        return _fieldName;
14929
      }
14930
    }
14931
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14932
    static {
14933
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14934
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14935
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(settlePurchaseReturn_result.class, metaDataMap);
14936
    }
14937
 
14938
    public settlePurchaseReturn_result() {
14939
    }
14940
 
14941
    /**
14942
     * Performs a deep copy on <i>other</i>.
14943
     */
14944
    public settlePurchaseReturn_result(settlePurchaseReturn_result other) {
14945
    }
14946
 
14947
    public settlePurchaseReturn_result deepCopy() {
14948
      return new settlePurchaseReturn_result(this);
14949
    }
14950
 
14951
    @Override
14952
    public void clear() {
14953
    }
14954
 
14955
    public void setFieldValue(_Fields field, Object value) {
14956
      switch (field) {
14957
      }
14958
    }
14959
 
14960
    public Object getFieldValue(_Fields field) {
14961
      switch (field) {
14962
      }
14963
      throw new IllegalStateException();
14964
    }
14965
 
14966
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14967
    public boolean isSet(_Fields field) {
14968
      if (field == null) {
14969
        throw new IllegalArgumentException();
14970
      }
14971
 
14972
      switch (field) {
14973
      }
14974
      throw new IllegalStateException();
14975
    }
14976
 
14977
    @Override
14978
    public boolean equals(Object that) {
14979
      if (that == null)
14980
        return false;
14981
      if (that instanceof settlePurchaseReturn_result)
14982
        return this.equals((settlePurchaseReturn_result)that);
14983
      return false;
14984
    }
14985
 
14986
    public boolean equals(settlePurchaseReturn_result that) {
14987
      if (that == null)
14988
        return false;
14989
 
14990
      return true;
14991
    }
14992
 
14993
    @Override
14994
    public int hashCode() {
14995
      return 0;
14996
    }
14997
 
14998
    public int compareTo(settlePurchaseReturn_result other) {
14999
      if (!getClass().equals(other.getClass())) {
15000
        return getClass().getName().compareTo(other.getClass().getName());
15001
      }
15002
 
15003
      int lastComparison = 0;
15004
      settlePurchaseReturn_result typedOther = (settlePurchaseReturn_result)other;
15005
 
15006
      return 0;
15007
    }
15008
 
15009
    public _Fields fieldForId(int fieldId) {
15010
      return _Fields.findByThriftId(fieldId);
15011
    }
15012
 
15013
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15014
      org.apache.thrift.protocol.TField field;
15015
      iprot.readStructBegin();
15016
      while (true)
15017
      {
15018
        field = iprot.readFieldBegin();
15019
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15020
          break;
15021
        }
15022
        switch (field.id) {
15023
          default:
15024
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15025
        }
15026
        iprot.readFieldEnd();
15027
      }
15028
      iprot.readStructEnd();
15029
      validate();
15030
    }
15031
 
15032
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15033
      oprot.writeStructBegin(STRUCT_DESC);
15034
 
15035
      oprot.writeFieldStop();
15036
      oprot.writeStructEnd();
15037
    }
15038
 
15039
    @Override
15040
    public String toString() {
15041
      StringBuilder sb = new StringBuilder("settlePurchaseReturn_result(");
15042
      boolean first = true;
15043
 
15044
      sb.append(")");
15045
      return sb.toString();
15046
    }
15047
 
15048
    public void validate() throws org.apache.thrift.TException {
15049
      // check for required fields
15050
    }
15051
 
15052
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15053
      try {
15054
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15055
      } catch (org.apache.thrift.TException te) {
15056
        throw new java.io.IOException(te);
15057
      }
15058
    }
15059
 
15060
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15061
      try {
15062
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15063
      } catch (org.apache.thrift.TException te) {
15064
        throw new java.io.IOException(te);
15065
      }
15066
    }
15067
 
15068
  }
15069
 
15070
  public static class getUnsettledPurchaseReturns_args implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_args, getUnsettledPurchaseReturns_args._Fields>, java.io.Serializable, Cloneable   {
15071
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_args");
15072
 
15073
 
15074
 
15075
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15076
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15077
;
15078
 
15079
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15080
 
15081
      static {
15082
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15083
          byName.put(field.getFieldName(), field);
15084
        }
15085
      }
15086
 
15087
      /**
15088
       * Find the _Fields constant that matches fieldId, or null if its not found.
15089
       */
15090
      public static _Fields findByThriftId(int fieldId) {
15091
        switch(fieldId) {
15092
          default:
15093
            return null;
15094
        }
15095
      }
15096
 
15097
      /**
15098
       * Find the _Fields constant that matches fieldId, throwing an exception
15099
       * if it is not found.
15100
       */
15101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15102
        _Fields fields = findByThriftId(fieldId);
15103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15104
        return fields;
15105
      }
15106
 
15107
      /**
15108
       * Find the _Fields constant that matches name, or null if its not found.
15109
       */
15110
      public static _Fields findByName(String name) {
15111
        return byName.get(name);
15112
      }
15113
 
15114
      private final short _thriftId;
15115
      private final String _fieldName;
15116
 
15117
      _Fields(short thriftId, String fieldName) {
15118
        _thriftId = thriftId;
15119
        _fieldName = fieldName;
15120
      }
15121
 
15122
      public short getThriftFieldId() {
15123
        return _thriftId;
15124
      }
15125
 
15126
      public String getFieldName() {
15127
        return _fieldName;
15128
      }
15129
    }
15130
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15131
    static {
15132
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15133
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15134
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_args.class, metaDataMap);
15135
    }
15136
 
15137
    public getUnsettledPurchaseReturns_args() {
15138
    }
15139
 
15140
    /**
15141
     * Performs a deep copy on <i>other</i>.
15142
     */
15143
    public getUnsettledPurchaseReturns_args(getUnsettledPurchaseReturns_args other) {
15144
    }
15145
 
15146
    public getUnsettledPurchaseReturns_args deepCopy() {
15147
      return new getUnsettledPurchaseReturns_args(this);
15148
    }
15149
 
15150
    @Override
15151
    public void clear() {
15152
    }
15153
 
15154
    public void setFieldValue(_Fields field, Object value) {
15155
      switch (field) {
15156
      }
15157
    }
15158
 
15159
    public Object getFieldValue(_Fields field) {
15160
      switch (field) {
15161
      }
15162
      throw new IllegalStateException();
15163
    }
15164
 
15165
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15166
    public boolean isSet(_Fields field) {
15167
      if (field == null) {
15168
        throw new IllegalArgumentException();
15169
      }
15170
 
15171
      switch (field) {
15172
      }
15173
      throw new IllegalStateException();
15174
    }
15175
 
15176
    @Override
15177
    public boolean equals(Object that) {
15178
      if (that == null)
15179
        return false;
15180
      if (that instanceof getUnsettledPurchaseReturns_args)
15181
        return this.equals((getUnsettledPurchaseReturns_args)that);
15182
      return false;
15183
    }
15184
 
15185
    public boolean equals(getUnsettledPurchaseReturns_args that) {
15186
      if (that == null)
15187
        return false;
15188
 
15189
      return true;
15190
    }
15191
 
15192
    @Override
15193
    public int hashCode() {
15194
      return 0;
15195
    }
15196
 
15197
    public int compareTo(getUnsettledPurchaseReturns_args other) {
15198
      if (!getClass().equals(other.getClass())) {
15199
        return getClass().getName().compareTo(other.getClass().getName());
15200
      }
15201
 
15202
      int lastComparison = 0;
15203
      getUnsettledPurchaseReturns_args typedOther = (getUnsettledPurchaseReturns_args)other;
15204
 
15205
      return 0;
15206
    }
15207
 
15208
    public _Fields fieldForId(int fieldId) {
15209
      return _Fields.findByThriftId(fieldId);
15210
    }
15211
 
15212
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15213
      org.apache.thrift.protocol.TField field;
15214
      iprot.readStructBegin();
15215
      while (true)
15216
      {
15217
        field = iprot.readFieldBegin();
15218
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15219
          break;
15220
        }
15221
        switch (field.id) {
15222
          default:
15223
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15224
        }
15225
        iprot.readFieldEnd();
15226
      }
15227
      iprot.readStructEnd();
15228
      validate();
15229
    }
15230
 
15231
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15232
      validate();
15233
 
15234
      oprot.writeStructBegin(STRUCT_DESC);
15235
      oprot.writeFieldStop();
15236
      oprot.writeStructEnd();
15237
    }
15238
 
15239
    @Override
15240
    public String toString() {
15241
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_args(");
15242
      boolean first = true;
15243
 
15244
      sb.append(")");
15245
      return sb.toString();
15246
    }
15247
 
15248
    public void validate() throws org.apache.thrift.TException {
15249
      // check for required fields
15250
    }
15251
 
15252
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15253
      try {
15254
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15255
      } catch (org.apache.thrift.TException te) {
15256
        throw new java.io.IOException(te);
15257
      }
15258
    }
15259
 
15260
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15261
      try {
15262
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15263
      } catch (org.apache.thrift.TException te) {
15264
        throw new java.io.IOException(te);
15265
      }
15266
    }
15267
 
15268
  }
15269
 
15270
  public static class getUnsettledPurchaseReturns_result implements org.apache.thrift.TBase<getUnsettledPurchaseReturns_result, getUnsettledPurchaseReturns_result._Fields>, java.io.Serializable, Cloneable   {
15271
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnsettledPurchaseReturns_result");
15272
 
15273
    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);
15274
 
15275
    private List<PurchaseReturn> success; // required
15276
 
15277
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15278
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15279
      SUCCESS((short)0, "success");
15280
 
15281
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15282
 
15283
      static {
15284
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15285
          byName.put(field.getFieldName(), field);
15286
        }
15287
      }
15288
 
15289
      /**
15290
       * Find the _Fields constant that matches fieldId, or null if its not found.
15291
       */
15292
      public static _Fields findByThriftId(int fieldId) {
15293
        switch(fieldId) {
15294
          case 0: // SUCCESS
15295
            return SUCCESS;
15296
          default:
15297
            return null;
15298
        }
15299
      }
15300
 
15301
      /**
15302
       * Find the _Fields constant that matches fieldId, throwing an exception
15303
       * if it is not found.
15304
       */
15305
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15306
        _Fields fields = findByThriftId(fieldId);
15307
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15308
        return fields;
15309
      }
15310
 
15311
      /**
15312
       * Find the _Fields constant that matches name, or null if its not found.
15313
       */
15314
      public static _Fields findByName(String name) {
15315
        return byName.get(name);
15316
      }
15317
 
15318
      private final short _thriftId;
15319
      private final String _fieldName;
15320
 
15321
      _Fields(short thriftId, String fieldName) {
15322
        _thriftId = thriftId;
15323
        _fieldName = fieldName;
15324
      }
15325
 
15326
      public short getThriftFieldId() {
15327
        return _thriftId;
15328
      }
15329
 
15330
      public String getFieldName() {
15331
        return _fieldName;
15332
      }
15333
    }
15334
 
15335
    // isset id assignments
15336
 
15337
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15338
    static {
15339
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15340
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15341
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15342
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
15343
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15344
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnsettledPurchaseReturns_result.class, metaDataMap);
15345
    }
15346
 
15347
    public getUnsettledPurchaseReturns_result() {
15348
    }
15349
 
15350
    public getUnsettledPurchaseReturns_result(
15351
      List<PurchaseReturn> success)
15352
    {
15353
      this();
15354
      this.success = success;
15355
    }
15356
 
15357
    /**
15358
     * Performs a deep copy on <i>other</i>.
15359
     */
15360
    public getUnsettledPurchaseReturns_result(getUnsettledPurchaseReturns_result other) {
15361
      if (other.isSetSuccess()) {
15362
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
15363
        for (PurchaseReturn other_element : other.success) {
15364
          __this__success.add(new PurchaseReturn(other_element));
15365
        }
15366
        this.success = __this__success;
15367
      }
15368
    }
15369
 
15370
    public getUnsettledPurchaseReturns_result deepCopy() {
15371
      return new getUnsettledPurchaseReturns_result(this);
15372
    }
15373
 
15374
    @Override
15375
    public void clear() {
15376
      this.success = null;
15377
    }
15378
 
15379
    public int getSuccessSize() {
15380
      return (this.success == null) ? 0 : this.success.size();
15381
    }
15382
 
15383
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
15384
      return (this.success == null) ? null : this.success.iterator();
15385
    }
15386
 
15387
    public void addToSuccess(PurchaseReturn elem) {
15388
      if (this.success == null) {
15389
        this.success = new ArrayList<PurchaseReturn>();
15390
      }
15391
      this.success.add(elem);
15392
    }
15393
 
15394
    public List<PurchaseReturn> getSuccess() {
15395
      return this.success;
15396
    }
15397
 
15398
    public void setSuccess(List<PurchaseReturn> success) {
15399
      this.success = success;
15400
    }
15401
 
15402
    public void unsetSuccess() {
15403
      this.success = null;
15404
    }
15405
 
15406
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15407
    public boolean isSetSuccess() {
15408
      return this.success != null;
15409
    }
15410
 
15411
    public void setSuccessIsSet(boolean value) {
15412
      if (!value) {
15413
        this.success = null;
15414
      }
15415
    }
15416
 
15417
    public void setFieldValue(_Fields field, Object value) {
15418
      switch (field) {
15419
      case SUCCESS:
15420
        if (value == null) {
15421
          unsetSuccess();
15422
        } else {
15423
          setSuccess((List<PurchaseReturn>)value);
15424
        }
15425
        break;
15426
 
15427
      }
15428
    }
15429
 
15430
    public Object getFieldValue(_Fields field) {
15431
      switch (field) {
15432
      case SUCCESS:
15433
        return getSuccess();
15434
 
15435
      }
15436
      throw new IllegalStateException();
15437
    }
15438
 
15439
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15440
    public boolean isSet(_Fields field) {
15441
      if (field == null) {
15442
        throw new IllegalArgumentException();
15443
      }
15444
 
15445
      switch (field) {
15446
      case SUCCESS:
15447
        return isSetSuccess();
15448
      }
15449
      throw new IllegalStateException();
15450
    }
15451
 
15452
    @Override
15453
    public boolean equals(Object that) {
15454
      if (that == null)
15455
        return false;
15456
      if (that instanceof getUnsettledPurchaseReturns_result)
15457
        return this.equals((getUnsettledPurchaseReturns_result)that);
15458
      return false;
15459
    }
15460
 
15461
    public boolean equals(getUnsettledPurchaseReturns_result that) {
15462
      if (that == null)
15463
        return false;
15464
 
15465
      boolean this_present_success = true && this.isSetSuccess();
15466
      boolean that_present_success = true && that.isSetSuccess();
15467
      if (this_present_success || that_present_success) {
15468
        if (!(this_present_success && that_present_success))
15469
          return false;
15470
        if (!this.success.equals(that.success))
15471
          return false;
15472
      }
15473
 
15474
      return true;
15475
    }
15476
 
15477
    @Override
15478
    public int hashCode() {
15479
      return 0;
15480
    }
15481
 
15482
    public int compareTo(getUnsettledPurchaseReturns_result other) {
15483
      if (!getClass().equals(other.getClass())) {
15484
        return getClass().getName().compareTo(other.getClass().getName());
15485
      }
15486
 
15487
      int lastComparison = 0;
15488
      getUnsettledPurchaseReturns_result typedOther = (getUnsettledPurchaseReturns_result)other;
15489
 
15490
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15491
      if (lastComparison != 0) {
15492
        return lastComparison;
15493
      }
15494
      if (isSetSuccess()) {
15495
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15496
        if (lastComparison != 0) {
15497
          return lastComparison;
15498
        }
15499
      }
15500
      return 0;
15501
    }
15502
 
15503
    public _Fields fieldForId(int fieldId) {
15504
      return _Fields.findByThriftId(fieldId);
15505
    }
15506
 
15507
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15508
      org.apache.thrift.protocol.TField field;
15509
      iprot.readStructBegin();
15510
      while (true)
15511
      {
15512
        field = iprot.readFieldBegin();
15513
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15514
          break;
15515
        }
15516
        switch (field.id) {
15517
          case 0: // SUCCESS
15518
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15519
              {
15520
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
15521
                this.success = new ArrayList<PurchaseReturn>(_list28.size);
15522
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
15523
                {
15524
                  PurchaseReturn _elem30; // required
15525
                  _elem30 = new PurchaseReturn();
15526
                  _elem30.read(iprot);
15527
                  this.success.add(_elem30);
15528
                }
15529
                iprot.readListEnd();
15530
              }
15531
            } else { 
15532
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15533
            }
15534
            break;
15535
          default:
15536
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15537
        }
15538
        iprot.readFieldEnd();
15539
      }
15540
      iprot.readStructEnd();
15541
      validate();
15542
    }
15543
 
15544
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15545
      oprot.writeStructBegin(STRUCT_DESC);
15546
 
15547
      if (this.isSetSuccess()) {
15548
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15549
        {
15550
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
15551
          for (PurchaseReturn _iter31 : this.success)
15552
          {
15553
            _iter31.write(oprot);
15554
          }
15555
          oprot.writeListEnd();
15556
        }
15557
        oprot.writeFieldEnd();
15558
      }
15559
      oprot.writeFieldStop();
15560
      oprot.writeStructEnd();
15561
    }
15562
 
15563
    @Override
15564
    public String toString() {
15565
      StringBuilder sb = new StringBuilder("getUnsettledPurchaseReturns_result(");
15566
      boolean first = true;
15567
 
15568
      sb.append("success:");
15569
      if (this.success == null) {
15570
        sb.append("null");
15571
      } else {
15572
        sb.append(this.success);
15573
      }
15574
      first = false;
15575
      sb.append(")");
15576
      return sb.toString();
15577
    }
15578
 
15579
    public void validate() throws org.apache.thrift.TException {
15580
      // check for required fields
15581
    }
15582
 
15583
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15584
      try {
15585
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15586
      } catch (org.apache.thrift.TException te) {
15587
        throw new java.io.IOException(te);
15588
      }
15589
    }
15590
 
15591
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15592
      try {
15593
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15594
      } catch (org.apache.thrift.TException te) {
15595
        throw new java.io.IOException(te);
15596
      }
15597
    }
15598
 
15599
  }
15600
 
4496 mandeep.dh 15601
}