Subversion Repositories SmartDukaan

Rev

Rev 5530 | Rev 6385 | 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
    /**
4555 mandeep.dh 83
     * Returns the purchase order object for a given purchase
4496 mandeep.dh 84
     * 
85
     * @param purchaseId
86
     */
4555 mandeep.dh 87
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException;
4496 mandeep.dh 88
 
4754 mandeep.dh 89
    /**
90
     * Creates purchase order objects from pending orders
91
     * 
92
     * @param warehouseId
93
     */
94
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
95
 
96
    /**
97
     * Returns all the valid suppliers
98
     */
99
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException;
100
 
101
    /**
102
     * Fulfills a given purchase order with an item.
103
     * 
104
     * @param purchaseOrderId
105
     * @param itemId
106
     * @param quantity
107
     */
108
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
109
 
110
    /**
111
     * Amends a PO as per the new lineitems passed
112
     * 
113
     * @param purchaseOrder
114
     */
115
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
116
 
5185 mandeep.dh 117
    /**
118
     * Fulfills a given purchase id with an item and its quantity.
119
     * 
120
     * @param purchaseId
121
     * @param itemId
122
     * @param quantity
123
     */
124
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
125
 
5443 mandeep.dh 126
    /**
5530 mandeep.dh 127
     * Fetches all invoices after a given date
5443 mandeep.dh 128
     * 
129
     * @param date
130
     */
131
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
132
 
133
    /**
134
     * Creates an invoice object
135
     * 
136
     * @param invoice
137
     */
138
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
139
 
5591 mandeep.dh 140
    /**
141
     * Creates a supplier
142
     * 
143
     * @param supplier
144
     */
145
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException;
146
 
147
    /**
148
     * Updates a supplier
149
     * 
150
     * @param supplier
151
     */
152
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException;
153
 
4496 mandeep.dh 154
  }
155
 
156
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
157
 
158
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
159
 
160
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
161
 
162
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
163
 
164
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
165
 
166
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
167
 
168
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
169
 
170
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
171
 
4555 mandeep.dh 172
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 173
 
4754 mandeep.dh 174
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
175
 
176
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
177
 
178
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
179
 
180
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
181
 
5185 mandeep.dh 182
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
183
 
5443 mandeep.dh 184
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
185
 
186
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
187
 
5591 mandeep.dh 188
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addSupplier_call> resultHandler) throws org.apache.thrift.TException;
189
 
190
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSupplier_call> resultHandler) throws org.apache.thrift.TException;
191
 
4496 mandeep.dh 192
  }
193
 
194
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
195
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
196
      public Factory() {}
197
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
198
        return new Client(prot);
199
      }
200
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
201
        return new Client(iprot, oprot);
202
      }
203
    }
204
 
205
    public Client(org.apache.thrift.protocol.TProtocol prot)
206
    {
207
      super(prot, prot);
208
    }
209
 
210
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
211
      super(iprot, oprot);
212
    }
213
 
214
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
215
    {
216
      send_createPurchaseOrder(purchaseOrder);
217
      return recv_createPurchaseOrder();
218
    }
219
 
220
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
221
    {
222
      createPurchaseOrder_args args = new createPurchaseOrder_args();
223
      args.setPurchaseOrder(purchaseOrder);
224
      sendBase("createPurchaseOrder", args);
225
    }
226
 
227
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
228
    {
229
      createPurchaseOrder_result result = new createPurchaseOrder_result();
230
      receiveBase(result, "createPurchaseOrder");
231
      if (result.isSetSuccess()) {
232
        return result.success;
233
      }
234
      if (result.e != null) {
235
        throw result.e;
236
      }
237
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
238
    }
239
 
240
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
241
    {
242
      send_getPurchaseOrder(id);
243
      return recv_getPurchaseOrder();
244
    }
245
 
246
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
247
    {
248
      getPurchaseOrder_args args = new getPurchaseOrder_args();
249
      args.setId(id);
250
      sendBase("getPurchaseOrder", args);
251
    }
252
 
253
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
254
    {
255
      getPurchaseOrder_result result = new getPurchaseOrder_result();
256
      receiveBase(result, "getPurchaseOrder");
257
      if (result.isSetSuccess()) {
258
        return result.success;
259
      }
260
      if (result.e != null) {
261
        throw result.e;
262
      }
263
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
264
    }
265
 
266
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
267
    {
268
      send_getAllPurchaseOrders(status);
269
      return recv_getAllPurchaseOrders();
270
    }
271
 
272
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
273
    {
274
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
275
      args.setStatus(status);
276
      sendBase("getAllPurchaseOrders", args);
277
    }
278
 
279
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
280
    {
281
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
282
      receiveBase(result, "getAllPurchaseOrders");
283
      if (result.isSetSuccess()) {
284
        return result.success;
285
      }
286
      if (result.e != null) {
287
        throw result.e;
288
      }
289
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
290
    }
291
 
292
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
293
    {
294
      send_getSupplier(id);
295
      return recv_getSupplier();
296
    }
297
 
298
    public void send_getSupplier(long id) throws org.apache.thrift.TException
299
    {
300
      getSupplier_args args = new getSupplier_args();
301
      args.setId(id);
302
      sendBase("getSupplier", args);
303
    }
304
 
305
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
306
    {
307
      getSupplier_result result = new getSupplier_result();
308
      receiveBase(result, "getSupplier");
309
      if (result.isSetSuccess()) {
310
        return result.success;
311
      }
312
      if (result.e != null) {
313
        throw result.e;
314
      }
315
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
316
    }
317
 
318
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
319
    {
320
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
321
      return recv_startPurchase();
322
    }
323
 
324
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
325
    {
326
      startPurchase_args args = new startPurchase_args();
327
      args.setPurchaseOrderId(purchaseOrderId);
328
      args.setInvoiceNumber(invoiceNumber);
329
      args.setFreightCharges(freightCharges);
330
      sendBase("startPurchase", args);
331
    }
332
 
333
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
334
    {
335
      startPurchase_result result = new startPurchase_result();
336
      receiveBase(result, "startPurchase");
337
      if (result.isSetSuccess()) {
338
        return result.success;
339
      }
340
      if (result.e != null) {
341
        throw result.e;
342
      }
343
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
344
    }
345
 
346
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
347
    {
348
      send_closePurchase(purchaseId);
349
      return recv_closePurchase();
350
    }
351
 
352
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
353
    {
354
      closePurchase_args args = new closePurchase_args();
355
      args.setPurchaseId(purchaseId);
356
      sendBase("closePurchase", args);
357
    }
358
 
359
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
360
    {
361
      closePurchase_result result = new closePurchase_result();
362
      receiveBase(result, "closePurchase");
363
      if (result.isSetSuccess()) {
364
        return result.success;
365
      }
366
      if (result.e != null) {
367
        throw result.e;
368
      }
369
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
370
    }
371
 
372
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
373
    {
374
      send_getAllPurchases(purchaseOrderId, open);
375
      return recv_getAllPurchases();
376
    }
377
 
378
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
379
    {
380
      getAllPurchases_args args = new getAllPurchases_args();
381
      args.setPurchaseOrderId(purchaseOrderId);
382
      args.setOpen(open);
383
      sendBase("getAllPurchases", args);
384
    }
385
 
386
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
387
    {
388
      getAllPurchases_result result = new getAllPurchases_result();
389
      receiveBase(result, "getAllPurchases");
390
      if (result.isSetSuccess()) {
391
        return result.success;
392
      }
393
      if (result.e != null) {
394
        throw result.e;
395
      }
396
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
397
    }
398
 
4555 mandeep.dh 399
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 400
    {
4555 mandeep.dh 401
      send_getPurchaseOrderForPurchase(purchaseId);
402
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 403
    }
404
 
4555 mandeep.dh 405
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 406
    {
4555 mandeep.dh 407
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 408
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 409
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 410
    }
411
 
4555 mandeep.dh 412
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 413
    {
4555 mandeep.dh 414
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
415
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 416
      if (result.isSetSuccess()) {
417
        return result.success;
418
      }
4555 mandeep.dh 419
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 420
    }
421
 
4754 mandeep.dh 422
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
423
    {
424
      send_getPendingPurchaseOrders(warehouseId);
425
      return recv_getPendingPurchaseOrders();
426
    }
427
 
428
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
429
    {
430
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
431
      args.setWarehouseId(warehouseId);
432
      sendBase("getPendingPurchaseOrders", args);
433
    }
434
 
435
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
436
    {
437
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
438
      receiveBase(result, "getPendingPurchaseOrders");
439
      if (result.isSetSuccess()) {
440
        return result.success;
441
      }
442
      if (result.e != null) {
443
        throw result.e;
444
      }
445
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
446
    }
447
 
448
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
449
    {
450
      send_getSuppliers();
451
      return recv_getSuppliers();
452
    }
453
 
454
    public void send_getSuppliers() throws org.apache.thrift.TException
455
    {
456
      getSuppliers_args args = new getSuppliers_args();
457
      sendBase("getSuppliers", args);
458
    }
459
 
460
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
461
    {
462
      getSuppliers_result result = new getSuppliers_result();
463
      receiveBase(result, "getSuppliers");
464
      if (result.isSetSuccess()) {
465
        return result.success;
466
      }
467
      if (result.e != null) {
468
        throw result.e;
469
      }
470
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
471
    }
472
 
473
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
474
    {
475
      send_fulfillPO(purchaseOrderId, itemId, quantity);
476
      recv_fulfillPO();
477
    }
478
 
479
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
480
    {
481
      fulfillPO_args args = new fulfillPO_args();
482
      args.setPurchaseOrderId(purchaseOrderId);
483
      args.setItemId(itemId);
484
      args.setQuantity(quantity);
485
      sendBase("fulfillPO", args);
486
    }
487
 
488
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
489
    {
490
      fulfillPO_result result = new fulfillPO_result();
491
      receiveBase(result, "fulfillPO");
492
      if (result.e != null) {
493
        throw result.e;
494
      }
495
      return;
496
    }
497
 
498
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
499
    {
500
      send_updatePurchaseOrder(purchaseOrder);
501
      recv_updatePurchaseOrder();
502
    }
503
 
504
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
505
    {
506
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
507
      args.setPurchaseOrder(purchaseOrder);
508
      sendBase("updatePurchaseOrder", args);
509
    }
510
 
511
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
512
    {
513
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
514
      receiveBase(result, "updatePurchaseOrder");
515
      if (result.e != null) {
516
        throw result.e;
517
      }
518
      return;
519
    }
520
 
5185 mandeep.dh 521
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
522
    {
523
      send_unFulfillPO(purchaseId, itemId, quantity);
524
      recv_unFulfillPO();
525
    }
526
 
527
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
528
    {
529
      unFulfillPO_args args = new unFulfillPO_args();
530
      args.setPurchaseId(purchaseId);
531
      args.setItemId(itemId);
532
      args.setQuantity(quantity);
533
      sendBase("unFulfillPO", args);
534
    }
535
 
536
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
537
    {
538
      unFulfillPO_result result = new unFulfillPO_result();
539
      receiveBase(result, "unFulfillPO");
540
      if (result.e != null) {
541
        throw result.e;
542
      }
543
      return;
544
    }
545
 
5443 mandeep.dh 546
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
547
    {
548
      send_getInvoices(date);
549
      return recv_getInvoices();
550
    }
551
 
552
    public void send_getInvoices(long date) throws org.apache.thrift.TException
553
    {
554
      getInvoices_args args = new getInvoices_args();
555
      args.setDate(date);
556
      sendBase("getInvoices", args);
557
    }
558
 
559
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
560
    {
561
      getInvoices_result result = new getInvoices_result();
562
      receiveBase(result, "getInvoices");
563
      if (result.isSetSuccess()) {
564
        return result.success;
565
      }
566
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
567
    }
568
 
569
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
570
    {
571
      send_createInvoice(invoice);
572
      recv_createInvoice();
573
    }
574
 
575
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
576
    {
577
      createInvoice_args args = new createInvoice_args();
578
      args.setInvoice(invoice);
579
      sendBase("createInvoice", args);
580
    }
581
 
582
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
583
    {
584
      createInvoice_result result = new createInvoice_result();
585
      receiveBase(result, "createInvoice");
586
      if (result.e != null) {
587
        throw result.e;
588
      }
589
      return;
590
    }
591
 
5591 mandeep.dh 592
    public Supplier addSupplier(Supplier supplier) throws org.apache.thrift.TException
593
    {
594
      send_addSupplier(supplier);
595
      return recv_addSupplier();
596
    }
597
 
598
    public void send_addSupplier(Supplier supplier) throws org.apache.thrift.TException
599
    {
600
      addSupplier_args args = new addSupplier_args();
601
      args.setSupplier(supplier);
602
      sendBase("addSupplier", args);
603
    }
604
 
605
    public Supplier recv_addSupplier() throws org.apache.thrift.TException
606
    {
607
      addSupplier_result result = new addSupplier_result();
608
      receiveBase(result, "addSupplier");
609
      if (result.isSetSuccess()) {
610
        return result.success;
611
      }
612
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
613
    }
614
 
615
    public void updateSupplier(Supplier supplier) throws org.apache.thrift.TException
616
    {
617
      send_updateSupplier(supplier);
618
      recv_updateSupplier();
619
    }
620
 
621
    public void send_updateSupplier(Supplier supplier) throws org.apache.thrift.TException
622
    {
623
      updateSupplier_args args = new updateSupplier_args();
624
      args.setSupplier(supplier);
625
      sendBase("updateSupplier", args);
626
    }
627
 
628
    public void recv_updateSupplier() throws org.apache.thrift.TException
629
    {
630
      updateSupplier_result result = new updateSupplier_result();
631
      receiveBase(result, "updateSupplier");
632
      return;
633
    }
634
 
4496 mandeep.dh 635
  }
636
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
637
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
638
      private org.apache.thrift.async.TAsyncClientManager clientManager;
639
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
640
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
641
        this.clientManager = clientManager;
642
        this.protocolFactory = protocolFactory;
643
      }
644
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
645
        return new AsyncClient(protocolFactory, clientManager, transport);
646
      }
647
    }
648
 
649
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
650
      super(protocolFactory, clientManager, transport);
651
    }
652
 
653
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
654
      checkReady();
655
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
656
      this.___currentMethod = method_call;
657
      ___manager.call(method_call);
658
    }
659
 
660
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
661
      private PurchaseOrder purchaseOrder;
662
      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 {
663
        super(client, protocolFactory, transport, resultHandler, false);
664
        this.purchaseOrder = purchaseOrder;
665
      }
666
 
667
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
668
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
669
        createPurchaseOrder_args args = new createPurchaseOrder_args();
670
        args.setPurchaseOrder(purchaseOrder);
671
        args.write(prot);
672
        prot.writeMessageEnd();
673
      }
674
 
675
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
676
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
677
          throw new IllegalStateException("Method call not finished!");
678
        }
679
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
680
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
681
        return (new Client(prot)).recv_createPurchaseOrder();
682
      }
683
    }
684
 
685
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
686
      checkReady();
687
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
688
      this.___currentMethod = method_call;
689
      ___manager.call(method_call);
690
    }
691
 
692
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
693
      private long id;
694
      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 {
695
        super(client, protocolFactory, transport, resultHandler, false);
696
        this.id = id;
697
      }
698
 
699
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
700
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
701
        getPurchaseOrder_args args = new getPurchaseOrder_args();
702
        args.setId(id);
703
        args.write(prot);
704
        prot.writeMessageEnd();
705
      }
706
 
707
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
708
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
709
          throw new IllegalStateException("Method call not finished!");
710
        }
711
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
712
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
713
        return (new Client(prot)).recv_getPurchaseOrder();
714
      }
715
    }
716
 
717
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
718
      checkReady();
719
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
720
      this.___currentMethod = method_call;
721
      ___manager.call(method_call);
722
    }
723
 
724
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
725
      private POStatus status;
726
      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 {
727
        super(client, protocolFactory, transport, resultHandler, false);
728
        this.status = status;
729
      }
730
 
731
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
732
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
733
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
734
        args.setStatus(status);
735
        args.write(prot);
736
        prot.writeMessageEnd();
737
      }
738
 
739
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
740
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
741
          throw new IllegalStateException("Method call not finished!");
742
        }
743
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
744
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
745
        return (new Client(prot)).recv_getAllPurchaseOrders();
746
      }
747
    }
748
 
749
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
750
      checkReady();
751
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
752
      this.___currentMethod = method_call;
753
      ___manager.call(method_call);
754
    }
755
 
756
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
757
      private long id;
758
      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 {
759
        super(client, protocolFactory, transport, resultHandler, false);
760
        this.id = id;
761
      }
762
 
763
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
764
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
765
        getSupplier_args args = new getSupplier_args();
766
        args.setId(id);
767
        args.write(prot);
768
        prot.writeMessageEnd();
769
      }
770
 
771
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
772
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
773
          throw new IllegalStateException("Method call not finished!");
774
        }
775
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
776
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
777
        return (new Client(prot)).recv_getSupplier();
778
      }
779
    }
780
 
781
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
782
      checkReady();
783
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
784
      this.___currentMethod = method_call;
785
      ___manager.call(method_call);
786
    }
787
 
788
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
789
      private long purchaseOrderId;
790
      private String invoiceNumber;
791
      private double freightCharges;
792
      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 {
793
        super(client, protocolFactory, transport, resultHandler, false);
794
        this.purchaseOrderId = purchaseOrderId;
795
        this.invoiceNumber = invoiceNumber;
796
        this.freightCharges = freightCharges;
797
      }
798
 
799
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
800
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
801
        startPurchase_args args = new startPurchase_args();
802
        args.setPurchaseOrderId(purchaseOrderId);
803
        args.setInvoiceNumber(invoiceNumber);
804
        args.setFreightCharges(freightCharges);
805
        args.write(prot);
806
        prot.writeMessageEnd();
807
      }
808
 
809
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
810
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
811
          throw new IllegalStateException("Method call not finished!");
812
        }
813
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
814
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
815
        return (new Client(prot)).recv_startPurchase();
816
      }
817
    }
818
 
819
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
820
      checkReady();
821
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
822
      this.___currentMethod = method_call;
823
      ___manager.call(method_call);
824
    }
825
 
826
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
827
      private long purchaseId;
828
      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 {
829
        super(client, protocolFactory, transport, resultHandler, false);
830
        this.purchaseId = purchaseId;
831
      }
832
 
833
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
834
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
835
        closePurchase_args args = new closePurchase_args();
836
        args.setPurchaseId(purchaseId);
837
        args.write(prot);
838
        prot.writeMessageEnd();
839
      }
840
 
841
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
842
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
843
          throw new IllegalStateException("Method call not finished!");
844
        }
845
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
846
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
847
        return (new Client(prot)).recv_closePurchase();
848
      }
849
    }
850
 
851
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
852
      checkReady();
853
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
854
      this.___currentMethod = method_call;
855
      ___manager.call(method_call);
856
    }
857
 
858
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
859
      private long purchaseOrderId;
860
      private boolean open;
861
      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 {
862
        super(client, protocolFactory, transport, resultHandler, false);
863
        this.purchaseOrderId = purchaseOrderId;
864
        this.open = open;
865
      }
866
 
867
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
868
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
869
        getAllPurchases_args args = new getAllPurchases_args();
870
        args.setPurchaseOrderId(purchaseOrderId);
871
        args.setOpen(open);
872
        args.write(prot);
873
        prot.writeMessageEnd();
874
      }
875
 
876
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
877
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
878
          throw new IllegalStateException("Method call not finished!");
879
        }
880
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
881
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
882
        return (new Client(prot)).recv_getAllPurchases();
883
      }
884
    }
885
 
4555 mandeep.dh 886
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 887
      checkReady();
4555 mandeep.dh 888
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 889
      this.___currentMethod = method_call;
890
      ___manager.call(method_call);
891
    }
892
 
4555 mandeep.dh 893
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 894
      private long purchaseId;
4555 mandeep.dh 895
      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 896
        super(client, protocolFactory, transport, resultHandler, false);
897
        this.purchaseId = purchaseId;
898
      }
899
 
900
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 901
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
902
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 903
        args.setPurchaseId(purchaseId);
904
        args.write(prot);
905
        prot.writeMessageEnd();
906
      }
907
 
4555 mandeep.dh 908
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 909
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
910
          throw new IllegalStateException("Method call not finished!");
911
        }
912
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
913
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 914
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 915
      }
916
    }
917
 
4754 mandeep.dh 918
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
919
      checkReady();
920
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
921
      this.___currentMethod = method_call;
922
      ___manager.call(method_call);
923
    }
924
 
925
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
926
      private long warehouseId;
927
      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 {
928
        super(client, protocolFactory, transport, resultHandler, false);
929
        this.warehouseId = warehouseId;
930
      }
931
 
932
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
933
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
934
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
935
        args.setWarehouseId(warehouseId);
936
        args.write(prot);
937
        prot.writeMessageEnd();
938
      }
939
 
940
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
941
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
942
          throw new IllegalStateException("Method call not finished!");
943
        }
944
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
945
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
946
        return (new Client(prot)).recv_getPendingPurchaseOrders();
947
      }
948
    }
949
 
950
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
951
      checkReady();
952
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
953
      this.___currentMethod = method_call;
954
      ___manager.call(method_call);
955
    }
956
 
957
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
958
      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 {
959
        super(client, protocolFactory, transport, resultHandler, false);
960
      }
961
 
962
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
963
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
964
        getSuppliers_args args = new getSuppliers_args();
965
        args.write(prot);
966
        prot.writeMessageEnd();
967
      }
968
 
969
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
970
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
971
          throw new IllegalStateException("Method call not finished!");
972
        }
973
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
974
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
975
        return (new Client(prot)).recv_getSuppliers();
976
      }
977
    }
978
 
979
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
980
      checkReady();
981
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
982
      this.___currentMethod = method_call;
983
      ___manager.call(method_call);
984
    }
985
 
986
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
987
      private long purchaseOrderId;
988
      private long itemId;
989
      private long quantity;
990
      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 {
991
        super(client, protocolFactory, transport, resultHandler, false);
992
        this.purchaseOrderId = purchaseOrderId;
993
        this.itemId = itemId;
994
        this.quantity = quantity;
995
      }
996
 
997
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
998
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
999
        fulfillPO_args args = new fulfillPO_args();
1000
        args.setPurchaseOrderId(purchaseOrderId);
1001
        args.setItemId(itemId);
1002
        args.setQuantity(quantity);
1003
        args.write(prot);
1004
        prot.writeMessageEnd();
1005
      }
1006
 
1007
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1008
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1009
          throw new IllegalStateException("Method call not finished!");
1010
        }
1011
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1012
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1013
        (new Client(prot)).recv_fulfillPO();
1014
      }
1015
    }
1016
 
1017
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
1018
      checkReady();
1019
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
1020
      this.___currentMethod = method_call;
1021
      ___manager.call(method_call);
1022
    }
1023
 
1024
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1025
      private PurchaseOrder purchaseOrder;
1026
      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 {
1027
        super(client, protocolFactory, transport, resultHandler, false);
1028
        this.purchaseOrder = purchaseOrder;
1029
      }
1030
 
1031
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1032
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1033
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
1034
        args.setPurchaseOrder(purchaseOrder);
1035
        args.write(prot);
1036
        prot.writeMessageEnd();
1037
      }
1038
 
1039
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1040
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1041
          throw new IllegalStateException("Method call not finished!");
1042
        }
1043
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1044
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1045
        (new Client(prot)).recv_updatePurchaseOrder();
1046
      }
1047
    }
1048
 
5185 mandeep.dh 1049
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
1050
      checkReady();
1051
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
1052
      this.___currentMethod = method_call;
1053
      ___manager.call(method_call);
1054
    }
1055
 
1056
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
1057
      private long purchaseId;
1058
      private long itemId;
1059
      private long quantity;
1060
      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 {
1061
        super(client, protocolFactory, transport, resultHandler, false);
1062
        this.purchaseId = purchaseId;
1063
        this.itemId = itemId;
1064
        this.quantity = quantity;
1065
      }
1066
 
1067
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1068
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
1069
        unFulfillPO_args args = new unFulfillPO_args();
1070
        args.setPurchaseId(purchaseId);
1071
        args.setItemId(itemId);
1072
        args.setQuantity(quantity);
1073
        args.write(prot);
1074
        prot.writeMessageEnd();
1075
      }
1076
 
1077
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1078
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1079
          throw new IllegalStateException("Method call not finished!");
1080
        }
1081
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1082
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1083
        (new Client(prot)).recv_unFulfillPO();
1084
      }
1085
    }
1086
 
5443 mandeep.dh 1087
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
1088
      checkReady();
1089
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
1090
      this.___currentMethod = method_call;
1091
      ___manager.call(method_call);
1092
    }
1093
 
1094
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
1095
      private long date;
1096
      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 {
1097
        super(client, protocolFactory, transport, resultHandler, false);
1098
        this.date = date;
1099
      }
1100
 
1101
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1102
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
1103
        getInvoices_args args = new getInvoices_args();
1104
        args.setDate(date);
1105
        args.write(prot);
1106
        prot.writeMessageEnd();
1107
      }
1108
 
1109
      public List<Invoice> getResult() throws org.apache.thrift.TException {
1110
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1111
          throw new IllegalStateException("Method call not finished!");
1112
        }
1113
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1114
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1115
        return (new Client(prot)).recv_getInvoices();
1116
      }
1117
    }
1118
 
1119
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
1120
      checkReady();
1121
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
1122
      this.___currentMethod = method_call;
1123
      ___manager.call(method_call);
1124
    }
1125
 
1126
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
1127
      private Invoice invoice;
1128
      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 {
1129
        super(client, protocolFactory, transport, resultHandler, false);
1130
        this.invoice = invoice;
1131
      }
1132
 
1133
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1134
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
1135
        createInvoice_args args = new createInvoice_args();
1136
        args.setInvoice(invoice);
1137
        args.write(prot);
1138
        prot.writeMessageEnd();
1139
      }
1140
 
1141
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1142
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1143
          throw new IllegalStateException("Method call not finished!");
1144
        }
1145
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1146
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1147
        (new Client(prot)).recv_createInvoice();
1148
      }
1149
    }
1150
 
5591 mandeep.dh 1151
    public void addSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<addSupplier_call> resultHandler) throws org.apache.thrift.TException {
1152
      checkReady();
1153
      addSupplier_call method_call = new addSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1154
      this.___currentMethod = method_call;
1155
      ___manager.call(method_call);
1156
    }
1157
 
1158
    public static class addSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1159
      private Supplier supplier;
1160
      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 {
1161
        super(client, protocolFactory, transport, resultHandler, false);
1162
        this.supplier = supplier;
1163
      }
1164
 
1165
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1166
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1167
        addSupplier_args args = new addSupplier_args();
1168
        args.setSupplier(supplier);
1169
        args.write(prot);
1170
        prot.writeMessageEnd();
1171
      }
1172
 
1173
      public Supplier getResult() throws org.apache.thrift.TException {
1174
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1175
          throw new IllegalStateException("Method call not finished!");
1176
        }
1177
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1178
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1179
        return (new Client(prot)).recv_addSupplier();
1180
      }
1181
    }
1182
 
1183
    public void updateSupplier(Supplier supplier, org.apache.thrift.async.AsyncMethodCallback<updateSupplier_call> resultHandler) throws org.apache.thrift.TException {
1184
      checkReady();
1185
      updateSupplier_call method_call = new updateSupplier_call(supplier, resultHandler, this, ___protocolFactory, ___transport);
1186
      this.___currentMethod = method_call;
1187
      ___manager.call(method_call);
1188
    }
1189
 
1190
    public static class updateSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
1191
      private Supplier supplier;
1192
      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 {
1193
        super(client, protocolFactory, transport, resultHandler, false);
1194
        this.supplier = supplier;
1195
      }
1196
 
1197
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1198
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
1199
        updateSupplier_args args = new updateSupplier_args();
1200
        args.setSupplier(supplier);
1201
        args.write(prot);
1202
        prot.writeMessageEnd();
1203
      }
1204
 
1205
      public void getResult() throws org.apache.thrift.TException {
1206
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1207
          throw new IllegalStateException("Method call not finished!");
1208
        }
1209
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1210
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1211
        (new Client(prot)).recv_updateSupplier();
1212
      }
1213
    }
1214
 
4496 mandeep.dh 1215
  }
1216
 
1217
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1218
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1219
    public Processor(I iface) {
1220
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1221
    }
1222
 
1223
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1224
      super(iface, getProcessMap(processMap));
1225
    }
1226
 
1227
    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) {
1228
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
1229
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
1230
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
1231
      processMap.put("getSupplier", new getSupplier());
1232
      processMap.put("startPurchase", new startPurchase());
1233
      processMap.put("closePurchase", new closePurchase());
1234
      processMap.put("getAllPurchases", new getAllPurchases());
4555 mandeep.dh 1235
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 1236
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1237
      processMap.put("getSuppliers", new getSuppliers());
1238
      processMap.put("fulfillPO", new fulfillPO());
1239
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 1240
      processMap.put("unFulfillPO", new unFulfillPO());
5443 mandeep.dh 1241
      processMap.put("getInvoices", new getInvoices());
1242
      processMap.put("createInvoice", new createInvoice());
5591 mandeep.dh 1243
      processMap.put("addSupplier", new addSupplier());
1244
      processMap.put("updateSupplier", new updateSupplier());
4496 mandeep.dh 1245
      return processMap;
1246
    }
1247
 
1248
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1249
      public createPurchaseOrder() {
1250
        super("createPurchaseOrder");
1251
      }
1252
 
1253
      protected createPurchaseOrder_args getEmptyArgsInstance() {
1254
        return new createPurchaseOrder_args();
1255
      }
1256
 
1257
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1258
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1259
        try {
1260
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1261
          result.setSuccessIsSet(true);
1262
        } catch (PurchaseServiceException e) {
1263
          result.e = e;
1264
        }
1265
        return result;
1266
      }
1267
    }
1268
 
1269
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1270
      public getPurchaseOrder() {
1271
        super("getPurchaseOrder");
1272
      }
1273
 
1274
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1275
        return new getPurchaseOrder_args();
1276
      }
1277
 
1278
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1279
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1280
        try {
1281
          result.success = iface.getPurchaseOrder(args.id);
1282
        } catch (PurchaseServiceException e) {
1283
          result.e = e;
1284
        }
1285
        return result;
1286
      }
1287
    }
1288
 
1289
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1290
      public getAllPurchaseOrders() {
1291
        super("getAllPurchaseOrders");
1292
      }
1293
 
1294
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1295
        return new getAllPurchaseOrders_args();
1296
      }
1297
 
1298
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1299
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1300
        try {
1301
          result.success = iface.getAllPurchaseOrders(args.status);
1302
        } catch (PurchaseServiceException e) {
1303
          result.e = e;
1304
        }
1305
        return result;
1306
      }
1307
    }
1308
 
1309
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1310
      public getSupplier() {
1311
        super("getSupplier");
1312
      }
1313
 
1314
      protected getSupplier_args getEmptyArgsInstance() {
1315
        return new getSupplier_args();
1316
      }
1317
 
1318
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1319
        getSupplier_result result = new getSupplier_result();
1320
        try {
1321
          result.success = iface.getSupplier(args.id);
1322
        } catch (PurchaseServiceException e) {
1323
          result.e = e;
1324
        }
1325
        return result;
1326
      }
1327
    }
1328
 
1329
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
1330
      public startPurchase() {
1331
        super("startPurchase");
1332
      }
1333
 
1334
      protected startPurchase_args getEmptyArgsInstance() {
1335
        return new startPurchase_args();
1336
      }
1337
 
1338
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
1339
        startPurchase_result result = new startPurchase_result();
1340
        try {
1341
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
1342
          result.setSuccessIsSet(true);
1343
        } catch (PurchaseServiceException e) {
1344
          result.e = e;
1345
        }
1346
        return result;
1347
      }
1348
    }
1349
 
1350
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
1351
      public closePurchase() {
1352
        super("closePurchase");
1353
      }
1354
 
1355
      protected closePurchase_args getEmptyArgsInstance() {
1356
        return new closePurchase_args();
1357
      }
1358
 
1359
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
1360
        closePurchase_result result = new closePurchase_result();
1361
        try {
1362
          result.success = iface.closePurchase(args.purchaseId);
1363
          result.setSuccessIsSet(true);
1364
        } catch (PurchaseServiceException e) {
1365
          result.e = e;
1366
        }
1367
        return result;
1368
      }
1369
    }
1370
 
1371
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
1372
      public getAllPurchases() {
1373
        super("getAllPurchases");
1374
      }
1375
 
1376
      protected getAllPurchases_args getEmptyArgsInstance() {
1377
        return new getAllPurchases_args();
1378
      }
1379
 
1380
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
1381
        getAllPurchases_result result = new getAllPurchases_result();
1382
        try {
1383
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
1384
        } catch (PurchaseServiceException e) {
1385
          result.e = e;
1386
        }
1387
        return result;
1388
      }
1389
    }
1390
 
4555 mandeep.dh 1391
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
1392
      public getPurchaseOrderForPurchase() {
1393
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 1394
      }
1395
 
4555 mandeep.dh 1396
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
1397
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1398
      }
1399
 
4555 mandeep.dh 1400
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
1401
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
1402
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 1403
        return result;
1404
      }
1405
    }
1406
 
4754 mandeep.dh 1407
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
1408
      public getPendingPurchaseOrders() {
1409
        super("getPendingPurchaseOrders");
1410
      }
1411
 
1412
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
1413
        return new getPendingPurchaseOrders_args();
1414
      }
1415
 
1416
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
1417
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
1418
        try {
1419
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
1420
        } catch (PurchaseServiceException e) {
1421
          result.e = e;
1422
        }
1423
        return result;
1424
      }
1425
    }
1426
 
1427
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
1428
      public getSuppliers() {
1429
        super("getSuppliers");
1430
      }
1431
 
1432
      protected getSuppliers_args getEmptyArgsInstance() {
1433
        return new getSuppliers_args();
1434
      }
1435
 
1436
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
1437
        getSuppliers_result result = new getSuppliers_result();
1438
        try {
1439
          result.success = iface.getSuppliers();
1440
        } catch (PurchaseServiceException e) {
1441
          result.e = e;
1442
        }
1443
        return result;
1444
      }
1445
    }
1446
 
1447
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
1448
      public fulfillPO() {
1449
        super("fulfillPO");
1450
      }
1451
 
1452
      protected fulfillPO_args getEmptyArgsInstance() {
1453
        return new fulfillPO_args();
1454
      }
1455
 
1456
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
1457
        fulfillPO_result result = new fulfillPO_result();
1458
        try {
1459
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
1460
        } catch (PurchaseServiceException e) {
1461
          result.e = e;
1462
        }
1463
        return result;
1464
      }
1465
    }
1466
 
1467
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
1468
      public updatePurchaseOrder() {
1469
        super("updatePurchaseOrder");
1470
      }
1471
 
1472
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
1473
        return new updatePurchaseOrder_args();
1474
      }
1475
 
1476
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
1477
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
1478
        try {
1479
          iface.updatePurchaseOrder(args.purchaseOrder);
1480
        } catch (PurchaseServiceException e) {
1481
          result.e = e;
1482
        }
1483
        return result;
1484
      }
1485
    }
1486
 
5185 mandeep.dh 1487
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
1488
      public unFulfillPO() {
1489
        super("unFulfillPO");
1490
      }
1491
 
1492
      protected unFulfillPO_args getEmptyArgsInstance() {
1493
        return new unFulfillPO_args();
1494
      }
1495
 
1496
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
1497
        unFulfillPO_result result = new unFulfillPO_result();
1498
        try {
1499
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
1500
        } catch (PurchaseServiceException e) {
1501
          result.e = e;
1502
        }
1503
        return result;
1504
      }
1505
    }
1506
 
5443 mandeep.dh 1507
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
1508
      public getInvoices() {
1509
        super("getInvoices");
1510
      }
1511
 
1512
      protected getInvoices_args getEmptyArgsInstance() {
1513
        return new getInvoices_args();
1514
      }
1515
 
1516
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
1517
        getInvoices_result result = new getInvoices_result();
1518
        result.success = iface.getInvoices(args.date);
1519
        return result;
1520
      }
1521
    }
1522
 
1523
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
1524
      public createInvoice() {
1525
        super("createInvoice");
1526
      }
1527
 
1528
      protected createInvoice_args getEmptyArgsInstance() {
1529
        return new createInvoice_args();
1530
      }
1531
 
1532
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
1533
        createInvoice_result result = new createInvoice_result();
1534
        try {
1535
          iface.createInvoice(args.invoice);
1536
        } catch (PurchaseServiceException e) {
1537
          result.e = e;
1538
        }
1539
        return result;
1540
      }
1541
    }
1542
 
5591 mandeep.dh 1543
    private static class addSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSupplier_args> {
1544
      public addSupplier() {
1545
        super("addSupplier");
1546
      }
1547
 
1548
      protected addSupplier_args getEmptyArgsInstance() {
1549
        return new addSupplier_args();
1550
      }
1551
 
1552
      protected addSupplier_result getResult(I iface, addSupplier_args args) throws org.apache.thrift.TException {
1553
        addSupplier_result result = new addSupplier_result();
1554
        result.success = iface.addSupplier(args.supplier);
1555
        return result;
1556
      }
1557
    }
1558
 
1559
    private static class updateSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSupplier_args> {
1560
      public updateSupplier() {
1561
        super("updateSupplier");
1562
      }
1563
 
1564
      protected updateSupplier_args getEmptyArgsInstance() {
1565
        return new updateSupplier_args();
1566
      }
1567
 
1568
      protected updateSupplier_result getResult(I iface, updateSupplier_args args) throws org.apache.thrift.TException {
1569
        updateSupplier_result result = new updateSupplier_result();
1570
        iface.updateSupplier(args.supplier);
1571
        return result;
1572
      }
1573
    }
1574
 
4496 mandeep.dh 1575
  }
1576
 
1577
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1578
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1579
 
1580
    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);
1581
 
1582
    private PurchaseOrder purchaseOrder; // required
1583
 
1584
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1585
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1586
      PURCHASE_ORDER((short)1, "purchaseOrder");
1587
 
1588
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1589
 
1590
      static {
1591
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1592
          byName.put(field.getFieldName(), field);
1593
        }
1594
      }
1595
 
1596
      /**
1597
       * Find the _Fields constant that matches fieldId, or null if its not found.
1598
       */
1599
      public static _Fields findByThriftId(int fieldId) {
1600
        switch(fieldId) {
1601
          case 1: // PURCHASE_ORDER
1602
            return PURCHASE_ORDER;
1603
          default:
1604
            return null;
1605
        }
1606
      }
1607
 
1608
      /**
1609
       * Find the _Fields constant that matches fieldId, throwing an exception
1610
       * if it is not found.
1611
       */
1612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1613
        _Fields fields = findByThriftId(fieldId);
1614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1615
        return fields;
1616
      }
1617
 
1618
      /**
1619
       * Find the _Fields constant that matches name, or null if its not found.
1620
       */
1621
      public static _Fields findByName(String name) {
1622
        return byName.get(name);
1623
      }
1624
 
1625
      private final short _thriftId;
1626
      private final String _fieldName;
1627
 
1628
      _Fields(short thriftId, String fieldName) {
1629
        _thriftId = thriftId;
1630
        _fieldName = fieldName;
1631
      }
1632
 
1633
      public short getThriftFieldId() {
1634
        return _thriftId;
1635
      }
1636
 
1637
      public String getFieldName() {
1638
        return _fieldName;
1639
      }
1640
    }
1641
 
1642
    // isset id assignments
1643
 
1644
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1645
    static {
1646
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1647
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1648
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
1649
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1650
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
1651
    }
1652
 
1653
    public createPurchaseOrder_args() {
1654
    }
1655
 
1656
    public createPurchaseOrder_args(
1657
      PurchaseOrder purchaseOrder)
1658
    {
1659
      this();
1660
      this.purchaseOrder = purchaseOrder;
1661
    }
1662
 
1663
    /**
1664
     * Performs a deep copy on <i>other</i>.
1665
     */
1666
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
1667
      if (other.isSetPurchaseOrder()) {
1668
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
1669
      }
1670
    }
1671
 
1672
    public createPurchaseOrder_args deepCopy() {
1673
      return new createPurchaseOrder_args(this);
1674
    }
1675
 
1676
    @Override
1677
    public void clear() {
1678
      this.purchaseOrder = null;
1679
    }
1680
 
1681
    public PurchaseOrder getPurchaseOrder() {
1682
      return this.purchaseOrder;
1683
    }
1684
 
1685
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
1686
      this.purchaseOrder = purchaseOrder;
1687
    }
1688
 
1689
    public void unsetPurchaseOrder() {
1690
      this.purchaseOrder = null;
1691
    }
1692
 
1693
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
1694
    public boolean isSetPurchaseOrder() {
1695
      return this.purchaseOrder != null;
1696
    }
1697
 
1698
    public void setPurchaseOrderIsSet(boolean value) {
1699
      if (!value) {
1700
        this.purchaseOrder = null;
1701
      }
1702
    }
1703
 
1704
    public void setFieldValue(_Fields field, Object value) {
1705
      switch (field) {
1706
      case PURCHASE_ORDER:
1707
        if (value == null) {
1708
          unsetPurchaseOrder();
1709
        } else {
1710
          setPurchaseOrder((PurchaseOrder)value);
1711
        }
1712
        break;
1713
 
1714
      }
1715
    }
1716
 
1717
    public Object getFieldValue(_Fields field) {
1718
      switch (field) {
1719
      case PURCHASE_ORDER:
1720
        return getPurchaseOrder();
1721
 
1722
      }
1723
      throw new IllegalStateException();
1724
    }
1725
 
1726
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1727
    public boolean isSet(_Fields field) {
1728
      if (field == null) {
1729
        throw new IllegalArgumentException();
1730
      }
1731
 
1732
      switch (field) {
1733
      case PURCHASE_ORDER:
1734
        return isSetPurchaseOrder();
1735
      }
1736
      throw new IllegalStateException();
1737
    }
1738
 
1739
    @Override
1740
    public boolean equals(Object that) {
1741
      if (that == null)
1742
        return false;
1743
      if (that instanceof createPurchaseOrder_args)
1744
        return this.equals((createPurchaseOrder_args)that);
1745
      return false;
1746
    }
1747
 
1748
    public boolean equals(createPurchaseOrder_args that) {
1749
      if (that == null)
1750
        return false;
1751
 
1752
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
1753
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
1754
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
1755
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
1756
          return false;
1757
        if (!this.purchaseOrder.equals(that.purchaseOrder))
1758
          return false;
1759
      }
1760
 
1761
      return true;
1762
    }
1763
 
1764
    @Override
1765
    public int hashCode() {
1766
      return 0;
1767
    }
1768
 
1769
    public int compareTo(createPurchaseOrder_args other) {
1770
      if (!getClass().equals(other.getClass())) {
1771
        return getClass().getName().compareTo(other.getClass().getName());
1772
      }
1773
 
1774
      int lastComparison = 0;
1775
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
1776
 
1777
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
1778
      if (lastComparison != 0) {
1779
        return lastComparison;
1780
      }
1781
      if (isSetPurchaseOrder()) {
1782
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
1783
        if (lastComparison != 0) {
1784
          return lastComparison;
1785
        }
1786
      }
1787
      return 0;
1788
    }
1789
 
1790
    public _Fields fieldForId(int fieldId) {
1791
      return _Fields.findByThriftId(fieldId);
1792
    }
1793
 
1794
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1795
      org.apache.thrift.protocol.TField field;
1796
      iprot.readStructBegin();
1797
      while (true)
1798
      {
1799
        field = iprot.readFieldBegin();
1800
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1801
          break;
1802
        }
1803
        switch (field.id) {
1804
          case 1: // PURCHASE_ORDER
1805
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1806
              this.purchaseOrder = new PurchaseOrder();
1807
              this.purchaseOrder.read(iprot);
1808
            } else { 
1809
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1810
            }
1811
            break;
1812
          default:
1813
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1814
        }
1815
        iprot.readFieldEnd();
1816
      }
1817
      iprot.readStructEnd();
1818
      validate();
1819
    }
1820
 
1821
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1822
      validate();
1823
 
1824
      oprot.writeStructBegin(STRUCT_DESC);
1825
      if (this.purchaseOrder != null) {
1826
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
1827
        this.purchaseOrder.write(oprot);
1828
        oprot.writeFieldEnd();
1829
      }
1830
      oprot.writeFieldStop();
1831
      oprot.writeStructEnd();
1832
    }
1833
 
1834
    @Override
1835
    public String toString() {
1836
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
1837
      boolean first = true;
1838
 
1839
      sb.append("purchaseOrder:");
1840
      if (this.purchaseOrder == null) {
1841
        sb.append("null");
1842
      } else {
1843
        sb.append(this.purchaseOrder);
1844
      }
1845
      first = false;
1846
      sb.append(")");
1847
      return sb.toString();
1848
    }
1849
 
1850
    public void validate() throws org.apache.thrift.TException {
1851
      // check for required fields
1852
    }
1853
 
1854
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1855
      try {
1856
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1857
      } catch (org.apache.thrift.TException te) {
1858
        throw new java.io.IOException(te);
1859
      }
1860
    }
1861
 
1862
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1863
      try {
1864
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1865
      } catch (org.apache.thrift.TException te) {
1866
        throw new java.io.IOException(te);
1867
      }
1868
    }
1869
 
1870
  }
1871
 
1872
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
1873
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
1874
 
1875
    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);
1876
    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);
1877
 
1878
    private long success; // required
1879
    private PurchaseServiceException e; // required
1880
 
1881
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1882
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1883
      SUCCESS((short)0, "success"),
1884
      E((short)1, "e");
1885
 
1886
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1887
 
1888
      static {
1889
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1890
          byName.put(field.getFieldName(), field);
1891
        }
1892
      }
1893
 
1894
      /**
1895
       * Find the _Fields constant that matches fieldId, or null if its not found.
1896
       */
1897
      public static _Fields findByThriftId(int fieldId) {
1898
        switch(fieldId) {
1899
          case 0: // SUCCESS
1900
            return SUCCESS;
1901
          case 1: // E
1902
            return E;
1903
          default:
1904
            return null;
1905
        }
1906
      }
1907
 
1908
      /**
1909
       * Find the _Fields constant that matches fieldId, throwing an exception
1910
       * if it is not found.
1911
       */
1912
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1913
        _Fields fields = findByThriftId(fieldId);
1914
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1915
        return fields;
1916
      }
1917
 
1918
      /**
1919
       * Find the _Fields constant that matches name, or null if its not found.
1920
       */
1921
      public static _Fields findByName(String name) {
1922
        return byName.get(name);
1923
      }
1924
 
1925
      private final short _thriftId;
1926
      private final String _fieldName;
1927
 
1928
      _Fields(short thriftId, String fieldName) {
1929
        _thriftId = thriftId;
1930
        _fieldName = fieldName;
1931
      }
1932
 
1933
      public short getThriftFieldId() {
1934
        return _thriftId;
1935
      }
1936
 
1937
      public String getFieldName() {
1938
        return _fieldName;
1939
      }
1940
    }
1941
 
1942
    // isset id assignments
1943
    private static final int __SUCCESS_ISSET_ID = 0;
1944
    private BitSet __isset_bit_vector = new BitSet(1);
1945
 
1946
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1947
    static {
1948
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1949
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1950
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
1951
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1952
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
1953
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1954
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
1955
    }
1956
 
1957
    public createPurchaseOrder_result() {
1958
    }
1959
 
1960
    public createPurchaseOrder_result(
1961
      long success,
1962
      PurchaseServiceException e)
1963
    {
1964
      this();
1965
      this.success = success;
1966
      setSuccessIsSet(true);
1967
      this.e = e;
1968
    }
1969
 
1970
    /**
1971
     * Performs a deep copy on <i>other</i>.
1972
     */
1973
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
1974
      __isset_bit_vector.clear();
1975
      __isset_bit_vector.or(other.__isset_bit_vector);
1976
      this.success = other.success;
1977
      if (other.isSetE()) {
1978
        this.e = new PurchaseServiceException(other.e);
1979
      }
1980
    }
1981
 
1982
    public createPurchaseOrder_result deepCopy() {
1983
      return new createPurchaseOrder_result(this);
1984
    }
1985
 
1986
    @Override
1987
    public void clear() {
1988
      setSuccessIsSet(false);
1989
      this.success = 0;
1990
      this.e = null;
1991
    }
1992
 
1993
    public long getSuccess() {
1994
      return this.success;
1995
    }
1996
 
1997
    public void setSuccess(long success) {
1998
      this.success = success;
1999
      setSuccessIsSet(true);
2000
    }
2001
 
2002
    public void unsetSuccess() {
2003
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2004
    }
2005
 
2006
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2007
    public boolean isSetSuccess() {
2008
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2009
    }
2010
 
2011
    public void setSuccessIsSet(boolean value) {
2012
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2013
    }
2014
 
2015
    public PurchaseServiceException getE() {
2016
      return this.e;
2017
    }
2018
 
2019
    public void setE(PurchaseServiceException e) {
2020
      this.e = e;
2021
    }
2022
 
2023
    public void unsetE() {
2024
      this.e = null;
2025
    }
2026
 
2027
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2028
    public boolean isSetE() {
2029
      return this.e != null;
2030
    }
2031
 
2032
    public void setEIsSet(boolean value) {
2033
      if (!value) {
2034
        this.e = null;
2035
      }
2036
    }
2037
 
2038
    public void setFieldValue(_Fields field, Object value) {
2039
      switch (field) {
2040
      case SUCCESS:
2041
        if (value == null) {
2042
          unsetSuccess();
2043
        } else {
2044
          setSuccess((Long)value);
2045
        }
2046
        break;
2047
 
2048
      case E:
2049
        if (value == null) {
2050
          unsetE();
2051
        } else {
2052
          setE((PurchaseServiceException)value);
2053
        }
2054
        break;
2055
 
2056
      }
2057
    }
2058
 
2059
    public Object getFieldValue(_Fields field) {
2060
      switch (field) {
2061
      case SUCCESS:
2062
        return Long.valueOf(getSuccess());
2063
 
2064
      case E:
2065
        return getE();
2066
 
2067
      }
2068
      throw new IllegalStateException();
2069
    }
2070
 
2071
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2072
    public boolean isSet(_Fields field) {
2073
      if (field == null) {
2074
        throw new IllegalArgumentException();
2075
      }
2076
 
2077
      switch (field) {
2078
      case SUCCESS:
2079
        return isSetSuccess();
2080
      case E:
2081
        return isSetE();
2082
      }
2083
      throw new IllegalStateException();
2084
    }
2085
 
2086
    @Override
2087
    public boolean equals(Object that) {
2088
      if (that == null)
2089
        return false;
2090
      if (that instanceof createPurchaseOrder_result)
2091
        return this.equals((createPurchaseOrder_result)that);
2092
      return false;
2093
    }
2094
 
2095
    public boolean equals(createPurchaseOrder_result that) {
2096
      if (that == null)
2097
        return false;
2098
 
2099
      boolean this_present_success = true;
2100
      boolean that_present_success = true;
2101
      if (this_present_success || that_present_success) {
2102
        if (!(this_present_success && that_present_success))
2103
          return false;
2104
        if (this.success != that.success)
2105
          return false;
2106
      }
2107
 
2108
      boolean this_present_e = true && this.isSetE();
2109
      boolean that_present_e = true && that.isSetE();
2110
      if (this_present_e || that_present_e) {
2111
        if (!(this_present_e && that_present_e))
2112
          return false;
2113
        if (!this.e.equals(that.e))
2114
          return false;
2115
      }
2116
 
2117
      return true;
2118
    }
2119
 
2120
    @Override
2121
    public int hashCode() {
2122
      return 0;
2123
    }
2124
 
2125
    public int compareTo(createPurchaseOrder_result other) {
2126
      if (!getClass().equals(other.getClass())) {
2127
        return getClass().getName().compareTo(other.getClass().getName());
2128
      }
2129
 
2130
      int lastComparison = 0;
2131
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
2132
 
2133
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2134
      if (lastComparison != 0) {
2135
        return lastComparison;
2136
      }
2137
      if (isSetSuccess()) {
2138
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2139
        if (lastComparison != 0) {
2140
          return lastComparison;
2141
        }
2142
      }
2143
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2144
      if (lastComparison != 0) {
2145
        return lastComparison;
2146
      }
2147
      if (isSetE()) {
2148
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2149
        if (lastComparison != 0) {
2150
          return lastComparison;
2151
        }
2152
      }
2153
      return 0;
2154
    }
2155
 
2156
    public _Fields fieldForId(int fieldId) {
2157
      return _Fields.findByThriftId(fieldId);
2158
    }
2159
 
2160
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2161
      org.apache.thrift.protocol.TField field;
2162
      iprot.readStructBegin();
2163
      while (true)
2164
      {
2165
        field = iprot.readFieldBegin();
2166
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2167
          break;
2168
        }
2169
        switch (field.id) {
2170
          case 0: // SUCCESS
2171
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2172
              this.success = iprot.readI64();
2173
              setSuccessIsSet(true);
2174
            } else { 
2175
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2176
            }
2177
            break;
2178
          case 1: // E
2179
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2180
              this.e = new PurchaseServiceException();
2181
              this.e.read(iprot);
2182
            } else { 
2183
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2184
            }
2185
            break;
2186
          default:
2187
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2188
        }
2189
        iprot.readFieldEnd();
2190
      }
2191
      iprot.readStructEnd();
2192
      validate();
2193
    }
2194
 
2195
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2196
      oprot.writeStructBegin(STRUCT_DESC);
2197
 
2198
      if (this.isSetSuccess()) {
2199
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2200
        oprot.writeI64(this.success);
2201
        oprot.writeFieldEnd();
2202
      } else if (this.isSetE()) {
2203
        oprot.writeFieldBegin(E_FIELD_DESC);
2204
        this.e.write(oprot);
2205
        oprot.writeFieldEnd();
2206
      }
2207
      oprot.writeFieldStop();
2208
      oprot.writeStructEnd();
2209
    }
2210
 
2211
    @Override
2212
    public String toString() {
2213
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
2214
      boolean first = true;
2215
 
2216
      sb.append("success:");
2217
      sb.append(this.success);
2218
      first = false;
2219
      if (!first) sb.append(", ");
2220
      sb.append("e:");
2221
      if (this.e == null) {
2222
        sb.append("null");
2223
      } else {
2224
        sb.append(this.e);
2225
      }
2226
      first = false;
2227
      sb.append(")");
2228
      return sb.toString();
2229
    }
2230
 
2231
    public void validate() throws org.apache.thrift.TException {
2232
      // check for required fields
2233
    }
2234
 
2235
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2236
      try {
2237
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2238
      } catch (org.apache.thrift.TException te) {
2239
        throw new java.io.IOException(te);
2240
      }
2241
    }
2242
 
2243
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2244
      try {
2245
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2246
      } catch (org.apache.thrift.TException te) {
2247
        throw new java.io.IOException(te);
2248
      }
2249
    }
2250
 
2251
  }
2252
 
2253
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2254
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
2255
 
2256
    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);
2257
 
2258
    private long id; // required
2259
 
2260
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2261
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2262
      ID((short)1, "id");
2263
 
2264
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2265
 
2266
      static {
2267
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2268
          byName.put(field.getFieldName(), field);
2269
        }
2270
      }
2271
 
2272
      /**
2273
       * Find the _Fields constant that matches fieldId, or null if its not found.
2274
       */
2275
      public static _Fields findByThriftId(int fieldId) {
2276
        switch(fieldId) {
2277
          case 1: // ID
2278
            return ID;
2279
          default:
2280
            return null;
2281
        }
2282
      }
2283
 
2284
      /**
2285
       * Find the _Fields constant that matches fieldId, throwing an exception
2286
       * if it is not found.
2287
       */
2288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2289
        _Fields fields = findByThriftId(fieldId);
2290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2291
        return fields;
2292
      }
2293
 
2294
      /**
2295
       * Find the _Fields constant that matches name, or null if its not found.
2296
       */
2297
      public static _Fields findByName(String name) {
2298
        return byName.get(name);
2299
      }
2300
 
2301
      private final short _thriftId;
2302
      private final String _fieldName;
2303
 
2304
      _Fields(short thriftId, String fieldName) {
2305
        _thriftId = thriftId;
2306
        _fieldName = fieldName;
2307
      }
2308
 
2309
      public short getThriftFieldId() {
2310
        return _thriftId;
2311
      }
2312
 
2313
      public String getFieldName() {
2314
        return _fieldName;
2315
      }
2316
    }
2317
 
2318
    // isset id assignments
2319
    private static final int __ID_ISSET_ID = 0;
2320
    private BitSet __isset_bit_vector = new BitSet(1);
2321
 
2322
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2323
    static {
2324
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2325
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2326
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2327
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2328
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
2329
    }
2330
 
2331
    public getPurchaseOrder_args() {
2332
    }
2333
 
2334
    public getPurchaseOrder_args(
2335
      long id)
2336
    {
2337
      this();
2338
      this.id = id;
2339
      setIdIsSet(true);
2340
    }
2341
 
2342
    /**
2343
     * Performs a deep copy on <i>other</i>.
2344
     */
2345
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
2346
      __isset_bit_vector.clear();
2347
      __isset_bit_vector.or(other.__isset_bit_vector);
2348
      this.id = other.id;
2349
    }
2350
 
2351
    public getPurchaseOrder_args deepCopy() {
2352
      return new getPurchaseOrder_args(this);
2353
    }
2354
 
2355
    @Override
2356
    public void clear() {
2357
      setIdIsSet(false);
2358
      this.id = 0;
2359
    }
2360
 
2361
    public long getId() {
2362
      return this.id;
2363
    }
2364
 
2365
    public void setId(long id) {
2366
      this.id = id;
2367
      setIdIsSet(true);
2368
    }
2369
 
2370
    public void unsetId() {
2371
      __isset_bit_vector.clear(__ID_ISSET_ID);
2372
    }
2373
 
2374
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
2375
    public boolean isSetId() {
2376
      return __isset_bit_vector.get(__ID_ISSET_ID);
2377
    }
2378
 
2379
    public void setIdIsSet(boolean value) {
2380
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2381
    }
2382
 
2383
    public void setFieldValue(_Fields field, Object value) {
2384
      switch (field) {
2385
      case ID:
2386
        if (value == null) {
2387
          unsetId();
2388
        } else {
2389
          setId((Long)value);
2390
        }
2391
        break;
2392
 
2393
      }
2394
    }
2395
 
2396
    public Object getFieldValue(_Fields field) {
2397
      switch (field) {
2398
      case ID:
2399
        return Long.valueOf(getId());
2400
 
2401
      }
2402
      throw new IllegalStateException();
2403
    }
2404
 
2405
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2406
    public boolean isSet(_Fields field) {
2407
      if (field == null) {
2408
        throw new IllegalArgumentException();
2409
      }
2410
 
2411
      switch (field) {
2412
      case ID:
2413
        return isSetId();
2414
      }
2415
      throw new IllegalStateException();
2416
    }
2417
 
2418
    @Override
2419
    public boolean equals(Object that) {
2420
      if (that == null)
2421
        return false;
2422
      if (that instanceof getPurchaseOrder_args)
2423
        return this.equals((getPurchaseOrder_args)that);
2424
      return false;
2425
    }
2426
 
2427
    public boolean equals(getPurchaseOrder_args that) {
2428
      if (that == null)
2429
        return false;
2430
 
2431
      boolean this_present_id = true;
2432
      boolean that_present_id = true;
2433
      if (this_present_id || that_present_id) {
2434
        if (!(this_present_id && that_present_id))
2435
          return false;
2436
        if (this.id != that.id)
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(getPurchaseOrder_args other) {
2449
      if (!getClass().equals(other.getClass())) {
2450
        return getClass().getName().compareTo(other.getClass().getName());
2451
      }
2452
 
2453
      int lastComparison = 0;
2454
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
2455
 
2456
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
2457
      if (lastComparison != 0) {
2458
        return lastComparison;
2459
      }
2460
      if (isSetId()) {
2461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
2462
        if (lastComparison != 0) {
2463
          return lastComparison;
2464
        }
2465
      }
2466
      return 0;
2467
    }
2468
 
2469
    public _Fields fieldForId(int fieldId) {
2470
      return _Fields.findByThriftId(fieldId);
2471
    }
2472
 
2473
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2474
      org.apache.thrift.protocol.TField field;
2475
      iprot.readStructBegin();
2476
      while (true)
2477
      {
2478
        field = iprot.readFieldBegin();
2479
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2480
          break;
2481
        }
2482
        switch (field.id) {
2483
          case 1: // ID
2484
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2485
              this.id = iprot.readI64();
2486
              setIdIsSet(true);
2487
            } else { 
2488
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2489
            }
2490
            break;
2491
          default:
2492
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2493
        }
2494
        iprot.readFieldEnd();
2495
      }
2496
      iprot.readStructEnd();
2497
      validate();
2498
    }
2499
 
2500
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2501
      validate();
2502
 
2503
      oprot.writeStructBegin(STRUCT_DESC);
2504
      oprot.writeFieldBegin(ID_FIELD_DESC);
2505
      oprot.writeI64(this.id);
2506
      oprot.writeFieldEnd();
2507
      oprot.writeFieldStop();
2508
      oprot.writeStructEnd();
2509
    }
2510
 
2511
    @Override
2512
    public String toString() {
2513
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
2514
      boolean first = true;
2515
 
2516
      sb.append("id:");
2517
      sb.append(this.id);
2518
      first = false;
2519
      sb.append(")");
2520
      return sb.toString();
2521
    }
2522
 
2523
    public void validate() throws org.apache.thrift.TException {
2524
      // check for required fields
2525
    }
2526
 
2527
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2528
      try {
2529
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2530
      } catch (org.apache.thrift.TException te) {
2531
        throw new java.io.IOException(te);
2532
      }
2533
    }
2534
 
2535
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2536
      try {
2537
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2538
      } catch (org.apache.thrift.TException te) {
2539
        throw new java.io.IOException(te);
2540
      }
2541
    }
2542
 
2543
  }
2544
 
2545
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2546
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
2547
 
2548
    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);
2549
    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);
2550
 
2551
    private PurchaseOrder success; // required
2552
    private PurchaseServiceException e; // required
2553
 
2554
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2555
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2556
      SUCCESS((short)0, "success"),
2557
      E((short)1, "e");
2558
 
2559
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2560
 
2561
      static {
2562
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2563
          byName.put(field.getFieldName(), field);
2564
        }
2565
      }
2566
 
2567
      /**
2568
       * Find the _Fields constant that matches fieldId, or null if its not found.
2569
       */
2570
      public static _Fields findByThriftId(int fieldId) {
2571
        switch(fieldId) {
2572
          case 0: // SUCCESS
2573
            return SUCCESS;
2574
          case 1: // E
2575
            return E;
2576
          default:
2577
            return null;
2578
        }
2579
      }
2580
 
2581
      /**
2582
       * Find the _Fields constant that matches fieldId, throwing an exception
2583
       * if it is not found.
2584
       */
2585
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2586
        _Fields fields = findByThriftId(fieldId);
2587
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2588
        return fields;
2589
      }
2590
 
2591
      /**
2592
       * Find the _Fields constant that matches name, or null if its not found.
2593
       */
2594
      public static _Fields findByName(String name) {
2595
        return byName.get(name);
2596
      }
2597
 
2598
      private final short _thriftId;
2599
      private final String _fieldName;
2600
 
2601
      _Fields(short thriftId, String fieldName) {
2602
        _thriftId = thriftId;
2603
        _fieldName = fieldName;
2604
      }
2605
 
2606
      public short getThriftFieldId() {
2607
        return _thriftId;
2608
      }
2609
 
2610
      public String getFieldName() {
2611
        return _fieldName;
2612
      }
2613
    }
2614
 
2615
    // isset id assignments
2616
 
2617
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2618
    static {
2619
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2620
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2621
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2622
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2623
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2624
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2625
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
2626
    }
2627
 
2628
    public getPurchaseOrder_result() {
2629
    }
2630
 
2631
    public getPurchaseOrder_result(
2632
      PurchaseOrder success,
2633
      PurchaseServiceException e)
2634
    {
2635
      this();
2636
      this.success = success;
2637
      this.e = e;
2638
    }
2639
 
2640
    /**
2641
     * Performs a deep copy on <i>other</i>.
2642
     */
2643
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
2644
      if (other.isSetSuccess()) {
2645
        this.success = new PurchaseOrder(other.success);
2646
      }
2647
      if (other.isSetE()) {
2648
        this.e = new PurchaseServiceException(other.e);
2649
      }
2650
    }
2651
 
2652
    public getPurchaseOrder_result deepCopy() {
2653
      return new getPurchaseOrder_result(this);
2654
    }
2655
 
2656
    @Override
2657
    public void clear() {
2658
      this.success = null;
2659
      this.e = null;
2660
    }
2661
 
2662
    public PurchaseOrder getSuccess() {
2663
      return this.success;
2664
    }
2665
 
2666
    public void setSuccess(PurchaseOrder success) {
2667
      this.success = success;
2668
    }
2669
 
2670
    public void unsetSuccess() {
2671
      this.success = null;
2672
    }
2673
 
2674
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2675
    public boolean isSetSuccess() {
2676
      return this.success != null;
2677
    }
2678
 
2679
    public void setSuccessIsSet(boolean value) {
2680
      if (!value) {
2681
        this.success = null;
2682
      }
2683
    }
2684
 
2685
    public PurchaseServiceException getE() {
2686
      return this.e;
2687
    }
2688
 
2689
    public void setE(PurchaseServiceException e) {
2690
      this.e = e;
2691
    }
2692
 
2693
    public void unsetE() {
2694
      this.e = null;
2695
    }
2696
 
2697
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2698
    public boolean isSetE() {
2699
      return this.e != null;
2700
    }
2701
 
2702
    public void setEIsSet(boolean value) {
2703
      if (!value) {
2704
        this.e = null;
2705
      }
2706
    }
2707
 
2708
    public void setFieldValue(_Fields field, Object value) {
2709
      switch (field) {
2710
      case SUCCESS:
2711
        if (value == null) {
2712
          unsetSuccess();
2713
        } else {
2714
          setSuccess((PurchaseOrder)value);
2715
        }
2716
        break;
2717
 
2718
      case E:
2719
        if (value == null) {
2720
          unsetE();
2721
        } else {
2722
          setE((PurchaseServiceException)value);
2723
        }
2724
        break;
2725
 
2726
      }
2727
    }
2728
 
2729
    public Object getFieldValue(_Fields field) {
2730
      switch (field) {
2731
      case SUCCESS:
2732
        return getSuccess();
2733
 
2734
      case E:
2735
        return getE();
2736
 
2737
      }
2738
      throw new IllegalStateException();
2739
    }
2740
 
2741
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2742
    public boolean isSet(_Fields field) {
2743
      if (field == null) {
2744
        throw new IllegalArgumentException();
2745
      }
2746
 
2747
      switch (field) {
2748
      case SUCCESS:
2749
        return isSetSuccess();
2750
      case E:
2751
        return isSetE();
2752
      }
2753
      throw new IllegalStateException();
2754
    }
2755
 
2756
    @Override
2757
    public boolean equals(Object that) {
2758
      if (that == null)
2759
        return false;
2760
      if (that instanceof getPurchaseOrder_result)
2761
        return this.equals((getPurchaseOrder_result)that);
2762
      return false;
2763
    }
2764
 
2765
    public boolean equals(getPurchaseOrder_result that) {
2766
      if (that == null)
2767
        return false;
2768
 
2769
      boolean this_present_success = true && this.isSetSuccess();
2770
      boolean that_present_success = true && that.isSetSuccess();
2771
      if (this_present_success || that_present_success) {
2772
        if (!(this_present_success && that_present_success))
2773
          return false;
2774
        if (!this.success.equals(that.success))
2775
          return false;
2776
      }
2777
 
2778
      boolean this_present_e = true && this.isSetE();
2779
      boolean that_present_e = true && that.isSetE();
2780
      if (this_present_e || that_present_e) {
2781
        if (!(this_present_e && that_present_e))
2782
          return false;
2783
        if (!this.e.equals(that.e))
2784
          return false;
2785
      }
2786
 
2787
      return true;
2788
    }
2789
 
2790
    @Override
2791
    public int hashCode() {
2792
      return 0;
2793
    }
2794
 
2795
    public int compareTo(getPurchaseOrder_result other) {
2796
      if (!getClass().equals(other.getClass())) {
2797
        return getClass().getName().compareTo(other.getClass().getName());
2798
      }
2799
 
2800
      int lastComparison = 0;
2801
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
2802
 
2803
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2804
      if (lastComparison != 0) {
2805
        return lastComparison;
2806
      }
2807
      if (isSetSuccess()) {
2808
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2809
        if (lastComparison != 0) {
2810
          return lastComparison;
2811
        }
2812
      }
2813
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2814
      if (lastComparison != 0) {
2815
        return lastComparison;
2816
      }
2817
      if (isSetE()) {
2818
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2819
        if (lastComparison != 0) {
2820
          return lastComparison;
2821
        }
2822
      }
2823
      return 0;
2824
    }
2825
 
2826
    public _Fields fieldForId(int fieldId) {
2827
      return _Fields.findByThriftId(fieldId);
2828
    }
2829
 
2830
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2831
      org.apache.thrift.protocol.TField field;
2832
      iprot.readStructBegin();
2833
      while (true)
2834
      {
2835
        field = iprot.readFieldBegin();
2836
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2837
          break;
2838
        }
2839
        switch (field.id) {
2840
          case 0: // SUCCESS
2841
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2842
              this.success = new PurchaseOrder();
2843
              this.success.read(iprot);
2844
            } else { 
2845
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2846
            }
2847
            break;
2848
          case 1: // E
2849
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2850
              this.e = new PurchaseServiceException();
2851
              this.e.read(iprot);
2852
            } else { 
2853
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2854
            }
2855
            break;
2856
          default:
2857
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2858
        }
2859
        iprot.readFieldEnd();
2860
      }
2861
      iprot.readStructEnd();
2862
      validate();
2863
    }
2864
 
2865
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2866
      oprot.writeStructBegin(STRUCT_DESC);
2867
 
2868
      if (this.isSetSuccess()) {
2869
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2870
        this.success.write(oprot);
2871
        oprot.writeFieldEnd();
2872
      } else if (this.isSetE()) {
2873
        oprot.writeFieldBegin(E_FIELD_DESC);
2874
        this.e.write(oprot);
2875
        oprot.writeFieldEnd();
2876
      }
2877
      oprot.writeFieldStop();
2878
      oprot.writeStructEnd();
2879
    }
2880
 
2881
    @Override
2882
    public String toString() {
2883
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
2884
      boolean first = true;
2885
 
2886
      sb.append("success:");
2887
      if (this.success == null) {
2888
        sb.append("null");
2889
      } else {
2890
        sb.append(this.success);
2891
      }
2892
      first = false;
2893
      if (!first) sb.append(", ");
2894
      sb.append("e:");
2895
      if (this.e == null) {
2896
        sb.append("null");
2897
      } else {
2898
        sb.append(this.e);
2899
      }
2900
      first = false;
2901
      sb.append(")");
2902
      return sb.toString();
2903
    }
2904
 
2905
    public void validate() throws org.apache.thrift.TException {
2906
      // check for required fields
2907
    }
2908
 
2909
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2910
      try {
2911
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2912
      } catch (org.apache.thrift.TException te) {
2913
        throw new java.io.IOException(te);
2914
      }
2915
    }
2916
 
2917
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2918
      try {
2919
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2920
      } catch (org.apache.thrift.TException te) {
2921
        throw new java.io.IOException(te);
2922
      }
2923
    }
2924
 
2925
  }
2926
 
2927
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
2928
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
2929
 
2930
    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);
2931
 
2932
    private POStatus status; // required
2933
 
2934
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2935
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2936
      /**
2937
       * 
2938
       * @see POStatus
2939
       */
2940
      STATUS((short)1, "status");
2941
 
2942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2943
 
2944
      static {
2945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2946
          byName.put(field.getFieldName(), field);
2947
        }
2948
      }
2949
 
2950
      /**
2951
       * Find the _Fields constant that matches fieldId, or null if its not found.
2952
       */
2953
      public static _Fields findByThriftId(int fieldId) {
2954
        switch(fieldId) {
2955
          case 1: // STATUS
2956
            return STATUS;
2957
          default:
2958
            return null;
2959
        }
2960
      }
2961
 
2962
      /**
2963
       * Find the _Fields constant that matches fieldId, throwing an exception
2964
       * if it is not found.
2965
       */
2966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2967
        _Fields fields = findByThriftId(fieldId);
2968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2969
        return fields;
2970
      }
2971
 
2972
      /**
2973
       * Find the _Fields constant that matches name, or null if its not found.
2974
       */
2975
      public static _Fields findByName(String name) {
2976
        return byName.get(name);
2977
      }
2978
 
2979
      private final short _thriftId;
2980
      private final String _fieldName;
2981
 
2982
      _Fields(short thriftId, String fieldName) {
2983
        _thriftId = thriftId;
2984
        _fieldName = fieldName;
2985
      }
2986
 
2987
      public short getThriftFieldId() {
2988
        return _thriftId;
2989
      }
2990
 
2991
      public String getFieldName() {
2992
        return _fieldName;
2993
      }
2994
    }
2995
 
2996
    // isset id assignments
2997
 
2998
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2999
    static {
3000
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3001
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3002
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
3003
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3004
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
3005
    }
3006
 
3007
    public getAllPurchaseOrders_args() {
3008
    }
3009
 
3010
    public getAllPurchaseOrders_args(
3011
      POStatus status)
3012
    {
3013
      this();
3014
      this.status = status;
3015
    }
3016
 
3017
    /**
3018
     * Performs a deep copy on <i>other</i>.
3019
     */
3020
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
3021
      if (other.isSetStatus()) {
3022
        this.status = other.status;
3023
      }
3024
    }
3025
 
3026
    public getAllPurchaseOrders_args deepCopy() {
3027
      return new getAllPurchaseOrders_args(this);
3028
    }
3029
 
3030
    @Override
3031
    public void clear() {
3032
      this.status = null;
3033
    }
3034
 
3035
    /**
3036
     * 
3037
     * @see POStatus
3038
     */
3039
    public POStatus getStatus() {
3040
      return this.status;
3041
    }
3042
 
3043
    /**
3044
     * 
3045
     * @see POStatus
3046
     */
3047
    public void setStatus(POStatus status) {
3048
      this.status = status;
3049
    }
3050
 
3051
    public void unsetStatus() {
3052
      this.status = null;
3053
    }
3054
 
3055
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
3056
    public boolean isSetStatus() {
3057
      return this.status != null;
3058
    }
3059
 
3060
    public void setStatusIsSet(boolean value) {
3061
      if (!value) {
3062
        this.status = null;
3063
      }
3064
    }
3065
 
3066
    public void setFieldValue(_Fields field, Object value) {
3067
      switch (field) {
3068
      case STATUS:
3069
        if (value == null) {
3070
          unsetStatus();
3071
        } else {
3072
          setStatus((POStatus)value);
3073
        }
3074
        break;
3075
 
3076
      }
3077
    }
3078
 
3079
    public Object getFieldValue(_Fields field) {
3080
      switch (field) {
3081
      case STATUS:
3082
        return getStatus();
3083
 
3084
      }
3085
      throw new IllegalStateException();
3086
    }
3087
 
3088
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3089
    public boolean isSet(_Fields field) {
3090
      if (field == null) {
3091
        throw new IllegalArgumentException();
3092
      }
3093
 
3094
      switch (field) {
3095
      case STATUS:
3096
        return isSetStatus();
3097
      }
3098
      throw new IllegalStateException();
3099
    }
3100
 
3101
    @Override
3102
    public boolean equals(Object that) {
3103
      if (that == null)
3104
        return false;
3105
      if (that instanceof getAllPurchaseOrders_args)
3106
        return this.equals((getAllPurchaseOrders_args)that);
3107
      return false;
3108
    }
3109
 
3110
    public boolean equals(getAllPurchaseOrders_args that) {
3111
      if (that == null)
3112
        return false;
3113
 
3114
      boolean this_present_status = true && this.isSetStatus();
3115
      boolean that_present_status = true && that.isSetStatus();
3116
      if (this_present_status || that_present_status) {
3117
        if (!(this_present_status && that_present_status))
3118
          return false;
3119
        if (!this.status.equals(that.status))
3120
          return false;
3121
      }
3122
 
3123
      return true;
3124
    }
3125
 
3126
    @Override
3127
    public int hashCode() {
3128
      return 0;
3129
    }
3130
 
3131
    public int compareTo(getAllPurchaseOrders_args other) {
3132
      if (!getClass().equals(other.getClass())) {
3133
        return getClass().getName().compareTo(other.getClass().getName());
3134
      }
3135
 
3136
      int lastComparison = 0;
3137
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
3138
 
3139
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
3140
      if (lastComparison != 0) {
3141
        return lastComparison;
3142
      }
3143
      if (isSetStatus()) {
3144
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3145
        if (lastComparison != 0) {
3146
          return lastComparison;
3147
        }
3148
      }
3149
      return 0;
3150
    }
3151
 
3152
    public _Fields fieldForId(int fieldId) {
3153
      return _Fields.findByThriftId(fieldId);
3154
    }
3155
 
3156
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3157
      org.apache.thrift.protocol.TField field;
3158
      iprot.readStructBegin();
3159
      while (true)
3160
      {
3161
        field = iprot.readFieldBegin();
3162
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3163
          break;
3164
        }
3165
        switch (field.id) {
3166
          case 1: // STATUS
3167
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3168
              this.status = POStatus.findByValue(iprot.readI32());
3169
            } else { 
3170
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3171
            }
3172
            break;
3173
          default:
3174
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3175
        }
3176
        iprot.readFieldEnd();
3177
      }
3178
      iprot.readStructEnd();
3179
      validate();
3180
    }
3181
 
3182
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3183
      validate();
3184
 
3185
      oprot.writeStructBegin(STRUCT_DESC);
3186
      if (this.status != null) {
3187
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3188
        oprot.writeI32(this.status.getValue());
3189
        oprot.writeFieldEnd();
3190
      }
3191
      oprot.writeFieldStop();
3192
      oprot.writeStructEnd();
3193
    }
3194
 
3195
    @Override
3196
    public String toString() {
3197
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
3198
      boolean first = true;
3199
 
3200
      sb.append("status:");
3201
      if (this.status == null) {
3202
        sb.append("null");
3203
      } else {
3204
        sb.append(this.status);
3205
      }
3206
      first = false;
3207
      sb.append(")");
3208
      return sb.toString();
3209
    }
3210
 
3211
    public void validate() throws org.apache.thrift.TException {
3212
      // check for required fields
3213
    }
3214
 
3215
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3216
      try {
3217
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3218
      } catch (org.apache.thrift.TException te) {
3219
        throw new java.io.IOException(te);
3220
      }
3221
    }
3222
 
3223
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3224
      try {
3225
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3226
      } catch (org.apache.thrift.TException te) {
3227
        throw new java.io.IOException(te);
3228
      }
3229
    }
3230
 
3231
  }
3232
 
3233
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
3234
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
3235
 
3236
    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);
3237
    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);
3238
 
3239
    private List<PurchaseOrder> success; // required
3240
    private PurchaseServiceException e; // required
3241
 
3242
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3243
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3244
      SUCCESS((short)0, "success"),
3245
      E((short)1, "e");
3246
 
3247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3248
 
3249
      static {
3250
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3251
          byName.put(field.getFieldName(), field);
3252
        }
3253
      }
3254
 
3255
      /**
3256
       * Find the _Fields constant that matches fieldId, or null if its not found.
3257
       */
3258
      public static _Fields findByThriftId(int fieldId) {
3259
        switch(fieldId) {
3260
          case 0: // SUCCESS
3261
            return SUCCESS;
3262
          case 1: // E
3263
            return E;
3264
          default:
3265
            return null;
3266
        }
3267
      }
3268
 
3269
      /**
3270
       * Find the _Fields constant that matches fieldId, throwing an exception
3271
       * if it is not found.
3272
       */
3273
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3274
        _Fields fields = findByThriftId(fieldId);
3275
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3276
        return fields;
3277
      }
3278
 
3279
      /**
3280
       * Find the _Fields constant that matches name, or null if its not found.
3281
       */
3282
      public static _Fields findByName(String name) {
3283
        return byName.get(name);
3284
      }
3285
 
3286
      private final short _thriftId;
3287
      private final String _fieldName;
3288
 
3289
      _Fields(short thriftId, String fieldName) {
3290
        _thriftId = thriftId;
3291
        _fieldName = fieldName;
3292
      }
3293
 
3294
      public short getThriftFieldId() {
3295
        return _thriftId;
3296
      }
3297
 
3298
      public String getFieldName() {
3299
        return _fieldName;
3300
      }
3301
    }
3302
 
3303
    // isset id assignments
3304
 
3305
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3306
    static {
3307
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3308
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3309
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3310
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
3311
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3312
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3313
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3314
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
3315
    }
3316
 
3317
    public getAllPurchaseOrders_result() {
3318
    }
3319
 
3320
    public getAllPurchaseOrders_result(
3321
      List<PurchaseOrder> success,
3322
      PurchaseServiceException e)
3323
    {
3324
      this();
3325
      this.success = success;
3326
      this.e = e;
3327
    }
3328
 
3329
    /**
3330
     * Performs a deep copy on <i>other</i>.
3331
     */
3332
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
3333
      if (other.isSetSuccess()) {
3334
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
3335
        for (PurchaseOrder other_element : other.success) {
3336
          __this__success.add(new PurchaseOrder(other_element));
3337
        }
3338
        this.success = __this__success;
3339
      }
3340
      if (other.isSetE()) {
3341
        this.e = new PurchaseServiceException(other.e);
3342
      }
3343
    }
3344
 
3345
    public getAllPurchaseOrders_result deepCopy() {
3346
      return new getAllPurchaseOrders_result(this);
3347
    }
3348
 
3349
    @Override
3350
    public void clear() {
3351
      this.success = null;
3352
      this.e = null;
3353
    }
3354
 
3355
    public int getSuccessSize() {
3356
      return (this.success == null) ? 0 : this.success.size();
3357
    }
3358
 
3359
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
3360
      return (this.success == null) ? null : this.success.iterator();
3361
    }
3362
 
3363
    public void addToSuccess(PurchaseOrder elem) {
3364
      if (this.success == null) {
3365
        this.success = new ArrayList<PurchaseOrder>();
3366
      }
3367
      this.success.add(elem);
3368
    }
3369
 
3370
    public List<PurchaseOrder> getSuccess() {
3371
      return this.success;
3372
    }
3373
 
3374
    public void setSuccess(List<PurchaseOrder> success) {
3375
      this.success = success;
3376
    }
3377
 
3378
    public void unsetSuccess() {
3379
      this.success = null;
3380
    }
3381
 
3382
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3383
    public boolean isSetSuccess() {
3384
      return this.success != null;
3385
    }
3386
 
3387
    public void setSuccessIsSet(boolean value) {
3388
      if (!value) {
3389
        this.success = null;
3390
      }
3391
    }
3392
 
3393
    public PurchaseServiceException getE() {
3394
      return this.e;
3395
    }
3396
 
3397
    public void setE(PurchaseServiceException e) {
3398
      this.e = e;
3399
    }
3400
 
3401
    public void unsetE() {
3402
      this.e = null;
3403
    }
3404
 
3405
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3406
    public boolean isSetE() {
3407
      return this.e != null;
3408
    }
3409
 
3410
    public void setEIsSet(boolean value) {
3411
      if (!value) {
3412
        this.e = null;
3413
      }
3414
    }
3415
 
3416
    public void setFieldValue(_Fields field, Object value) {
3417
      switch (field) {
3418
      case SUCCESS:
3419
        if (value == null) {
3420
          unsetSuccess();
3421
        } else {
3422
          setSuccess((List<PurchaseOrder>)value);
3423
        }
3424
        break;
3425
 
3426
      case E:
3427
        if (value == null) {
3428
          unsetE();
3429
        } else {
3430
          setE((PurchaseServiceException)value);
3431
        }
3432
        break;
3433
 
3434
      }
3435
    }
3436
 
3437
    public Object getFieldValue(_Fields field) {
3438
      switch (field) {
3439
      case SUCCESS:
3440
        return getSuccess();
3441
 
3442
      case E:
3443
        return getE();
3444
 
3445
      }
3446
      throw new IllegalStateException();
3447
    }
3448
 
3449
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3450
    public boolean isSet(_Fields field) {
3451
      if (field == null) {
3452
        throw new IllegalArgumentException();
3453
      }
3454
 
3455
      switch (field) {
3456
      case SUCCESS:
3457
        return isSetSuccess();
3458
      case E:
3459
        return isSetE();
3460
      }
3461
      throw new IllegalStateException();
3462
    }
3463
 
3464
    @Override
3465
    public boolean equals(Object that) {
3466
      if (that == null)
3467
        return false;
3468
      if (that instanceof getAllPurchaseOrders_result)
3469
        return this.equals((getAllPurchaseOrders_result)that);
3470
      return false;
3471
    }
3472
 
3473
    public boolean equals(getAllPurchaseOrders_result that) {
3474
      if (that == null)
3475
        return false;
3476
 
3477
      boolean this_present_success = true && this.isSetSuccess();
3478
      boolean that_present_success = true && that.isSetSuccess();
3479
      if (this_present_success || that_present_success) {
3480
        if (!(this_present_success && that_present_success))
3481
          return false;
3482
        if (!this.success.equals(that.success))
3483
          return false;
3484
      }
3485
 
3486
      boolean this_present_e = true && this.isSetE();
3487
      boolean that_present_e = true && that.isSetE();
3488
      if (this_present_e || that_present_e) {
3489
        if (!(this_present_e && that_present_e))
3490
          return false;
3491
        if (!this.e.equals(that.e))
3492
          return false;
3493
      }
3494
 
3495
      return true;
3496
    }
3497
 
3498
    @Override
3499
    public int hashCode() {
3500
      return 0;
3501
    }
3502
 
3503
    public int compareTo(getAllPurchaseOrders_result other) {
3504
      if (!getClass().equals(other.getClass())) {
3505
        return getClass().getName().compareTo(other.getClass().getName());
3506
      }
3507
 
3508
      int lastComparison = 0;
3509
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
3510
 
3511
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3512
      if (lastComparison != 0) {
3513
        return lastComparison;
3514
      }
3515
      if (isSetSuccess()) {
3516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3517
        if (lastComparison != 0) {
3518
          return lastComparison;
3519
        }
3520
      }
3521
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3522
      if (lastComparison != 0) {
3523
        return lastComparison;
3524
      }
3525
      if (isSetE()) {
3526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3527
        if (lastComparison != 0) {
3528
          return lastComparison;
3529
        }
3530
      }
3531
      return 0;
3532
    }
3533
 
3534
    public _Fields fieldForId(int fieldId) {
3535
      return _Fields.findByThriftId(fieldId);
3536
    }
3537
 
3538
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3539
      org.apache.thrift.protocol.TField field;
3540
      iprot.readStructBegin();
3541
      while (true)
3542
      {
3543
        field = iprot.readFieldBegin();
3544
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3545
          break;
3546
        }
3547
        switch (field.id) {
3548
          case 0: // SUCCESS
3549
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
3550
              {
3551
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
3552
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
3553
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
3554
                {
3555
                  PurchaseOrder _elem6; // required
3556
                  _elem6 = new PurchaseOrder();
3557
                  _elem6.read(iprot);
3558
                  this.success.add(_elem6);
3559
                }
3560
                iprot.readListEnd();
3561
              }
3562
            } else { 
3563
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3564
            }
3565
            break;
3566
          case 1: // E
3567
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3568
              this.e = new PurchaseServiceException();
3569
              this.e.read(iprot);
3570
            } else { 
3571
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3572
            }
3573
            break;
3574
          default:
3575
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3576
        }
3577
        iprot.readFieldEnd();
3578
      }
3579
      iprot.readStructEnd();
3580
      validate();
3581
    }
3582
 
3583
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3584
      oprot.writeStructBegin(STRUCT_DESC);
3585
 
3586
      if (this.isSetSuccess()) {
3587
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3588
        {
3589
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
3590
          for (PurchaseOrder _iter7 : this.success)
3591
          {
3592
            _iter7.write(oprot);
3593
          }
3594
          oprot.writeListEnd();
3595
        }
3596
        oprot.writeFieldEnd();
3597
      } else if (this.isSetE()) {
3598
        oprot.writeFieldBegin(E_FIELD_DESC);
3599
        this.e.write(oprot);
3600
        oprot.writeFieldEnd();
3601
      }
3602
      oprot.writeFieldStop();
3603
      oprot.writeStructEnd();
3604
    }
3605
 
3606
    @Override
3607
    public String toString() {
3608
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
3609
      boolean first = true;
3610
 
3611
      sb.append("success:");
3612
      if (this.success == null) {
3613
        sb.append("null");
3614
      } else {
3615
        sb.append(this.success);
3616
      }
3617
      first = false;
3618
      if (!first) sb.append(", ");
3619
      sb.append("e:");
3620
      if (this.e == null) {
3621
        sb.append("null");
3622
      } else {
3623
        sb.append(this.e);
3624
      }
3625
      first = false;
3626
      sb.append(")");
3627
      return sb.toString();
3628
    }
3629
 
3630
    public void validate() throws org.apache.thrift.TException {
3631
      // check for required fields
3632
    }
3633
 
3634
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3635
      try {
3636
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3637
      } catch (org.apache.thrift.TException te) {
3638
        throw new java.io.IOException(te);
3639
      }
3640
    }
3641
 
3642
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3643
      try {
3644
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3645
      } catch (org.apache.thrift.TException te) {
3646
        throw new java.io.IOException(te);
3647
      }
3648
    }
3649
 
3650
  }
3651
 
3652
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
3653
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
3654
 
3655
    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);
3656
 
3657
    private long id; // required
3658
 
3659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3660
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3661
      ID((short)1, "id");
3662
 
3663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3664
 
3665
      static {
3666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3667
          byName.put(field.getFieldName(), field);
3668
        }
3669
      }
3670
 
3671
      /**
3672
       * Find the _Fields constant that matches fieldId, or null if its not found.
3673
       */
3674
      public static _Fields findByThriftId(int fieldId) {
3675
        switch(fieldId) {
3676
          case 1: // ID
3677
            return ID;
3678
          default:
3679
            return null;
3680
        }
3681
      }
3682
 
3683
      /**
3684
       * Find the _Fields constant that matches fieldId, throwing an exception
3685
       * if it is not found.
3686
       */
3687
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3688
        _Fields fields = findByThriftId(fieldId);
3689
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3690
        return fields;
3691
      }
3692
 
3693
      /**
3694
       * Find the _Fields constant that matches name, or null if its not found.
3695
       */
3696
      public static _Fields findByName(String name) {
3697
        return byName.get(name);
3698
      }
3699
 
3700
      private final short _thriftId;
3701
      private final String _fieldName;
3702
 
3703
      _Fields(short thriftId, String fieldName) {
3704
        _thriftId = thriftId;
3705
        _fieldName = fieldName;
3706
      }
3707
 
3708
      public short getThriftFieldId() {
3709
        return _thriftId;
3710
      }
3711
 
3712
      public String getFieldName() {
3713
        return _fieldName;
3714
      }
3715
    }
3716
 
3717
    // isset id assignments
3718
    private static final int __ID_ISSET_ID = 0;
3719
    private BitSet __isset_bit_vector = new BitSet(1);
3720
 
3721
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3722
    static {
3723
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3724
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3725
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3726
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3727
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
3728
    }
3729
 
3730
    public getSupplier_args() {
3731
    }
3732
 
3733
    public getSupplier_args(
3734
      long id)
3735
    {
3736
      this();
3737
      this.id = id;
3738
      setIdIsSet(true);
3739
    }
3740
 
3741
    /**
3742
     * Performs a deep copy on <i>other</i>.
3743
     */
3744
    public getSupplier_args(getSupplier_args other) {
3745
      __isset_bit_vector.clear();
3746
      __isset_bit_vector.or(other.__isset_bit_vector);
3747
      this.id = other.id;
3748
    }
3749
 
3750
    public getSupplier_args deepCopy() {
3751
      return new getSupplier_args(this);
3752
    }
3753
 
3754
    @Override
3755
    public void clear() {
3756
      setIdIsSet(false);
3757
      this.id = 0;
3758
    }
3759
 
3760
    public long getId() {
3761
      return this.id;
3762
    }
3763
 
3764
    public void setId(long id) {
3765
      this.id = id;
3766
      setIdIsSet(true);
3767
    }
3768
 
3769
    public void unsetId() {
3770
      __isset_bit_vector.clear(__ID_ISSET_ID);
3771
    }
3772
 
3773
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3774
    public boolean isSetId() {
3775
      return __isset_bit_vector.get(__ID_ISSET_ID);
3776
    }
3777
 
3778
    public void setIdIsSet(boolean value) {
3779
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3780
    }
3781
 
3782
    public void setFieldValue(_Fields field, Object value) {
3783
      switch (field) {
3784
      case ID:
3785
        if (value == null) {
3786
          unsetId();
3787
        } else {
3788
          setId((Long)value);
3789
        }
3790
        break;
3791
 
3792
      }
3793
    }
3794
 
3795
    public Object getFieldValue(_Fields field) {
3796
      switch (field) {
3797
      case ID:
3798
        return Long.valueOf(getId());
3799
 
3800
      }
3801
      throw new IllegalStateException();
3802
    }
3803
 
3804
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3805
    public boolean isSet(_Fields field) {
3806
      if (field == null) {
3807
        throw new IllegalArgumentException();
3808
      }
3809
 
3810
      switch (field) {
3811
      case ID:
3812
        return isSetId();
3813
      }
3814
      throw new IllegalStateException();
3815
    }
3816
 
3817
    @Override
3818
    public boolean equals(Object that) {
3819
      if (that == null)
3820
        return false;
3821
      if (that instanceof getSupplier_args)
3822
        return this.equals((getSupplier_args)that);
3823
      return false;
3824
    }
3825
 
3826
    public boolean equals(getSupplier_args that) {
3827
      if (that == null)
3828
        return false;
3829
 
3830
      boolean this_present_id = true;
3831
      boolean that_present_id = true;
3832
      if (this_present_id || that_present_id) {
3833
        if (!(this_present_id && that_present_id))
3834
          return false;
3835
        if (this.id != that.id)
3836
          return false;
3837
      }
3838
 
3839
      return true;
3840
    }
3841
 
3842
    @Override
3843
    public int hashCode() {
3844
      return 0;
3845
    }
3846
 
3847
    public int compareTo(getSupplier_args other) {
3848
      if (!getClass().equals(other.getClass())) {
3849
        return getClass().getName().compareTo(other.getClass().getName());
3850
      }
3851
 
3852
      int lastComparison = 0;
3853
      getSupplier_args typedOther = (getSupplier_args)other;
3854
 
3855
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3856
      if (lastComparison != 0) {
3857
        return lastComparison;
3858
      }
3859
      if (isSetId()) {
3860
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3861
        if (lastComparison != 0) {
3862
          return lastComparison;
3863
        }
3864
      }
3865
      return 0;
3866
    }
3867
 
3868
    public _Fields fieldForId(int fieldId) {
3869
      return _Fields.findByThriftId(fieldId);
3870
    }
3871
 
3872
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3873
      org.apache.thrift.protocol.TField field;
3874
      iprot.readStructBegin();
3875
      while (true)
3876
      {
3877
        field = iprot.readFieldBegin();
3878
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3879
          break;
3880
        }
3881
        switch (field.id) {
3882
          case 1: // ID
3883
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3884
              this.id = iprot.readI64();
3885
              setIdIsSet(true);
3886
            } else { 
3887
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3888
            }
3889
            break;
3890
          default:
3891
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3892
        }
3893
        iprot.readFieldEnd();
3894
      }
3895
      iprot.readStructEnd();
3896
      validate();
3897
    }
3898
 
3899
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3900
      validate();
3901
 
3902
      oprot.writeStructBegin(STRUCT_DESC);
3903
      oprot.writeFieldBegin(ID_FIELD_DESC);
3904
      oprot.writeI64(this.id);
3905
      oprot.writeFieldEnd();
3906
      oprot.writeFieldStop();
3907
      oprot.writeStructEnd();
3908
    }
3909
 
3910
    @Override
3911
    public String toString() {
3912
      StringBuilder sb = new StringBuilder("getSupplier_args(");
3913
      boolean first = true;
3914
 
3915
      sb.append("id:");
3916
      sb.append(this.id);
3917
      first = false;
3918
      sb.append(")");
3919
      return sb.toString();
3920
    }
3921
 
3922
    public void validate() throws org.apache.thrift.TException {
3923
      // check for required fields
3924
    }
3925
 
3926
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3927
      try {
3928
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3929
      } catch (org.apache.thrift.TException te) {
3930
        throw new java.io.IOException(te);
3931
      }
3932
    }
3933
 
3934
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3935
      try {
3936
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3937
        __isset_bit_vector = new BitSet(1);
3938
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3939
      } catch (org.apache.thrift.TException te) {
3940
        throw new java.io.IOException(te);
3941
      }
3942
    }
3943
 
3944
  }
3945
 
3946
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
3947
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
3948
 
3949
    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);
3950
    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);
3951
 
3952
    private Supplier success; // required
3953
    private PurchaseServiceException e; // required
3954
 
3955
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3956
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3957
      SUCCESS((short)0, "success"),
3958
      E((short)1, "e");
3959
 
3960
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3961
 
3962
      static {
3963
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3964
          byName.put(field.getFieldName(), field);
3965
        }
3966
      }
3967
 
3968
      /**
3969
       * Find the _Fields constant that matches fieldId, or null if its not found.
3970
       */
3971
      public static _Fields findByThriftId(int fieldId) {
3972
        switch(fieldId) {
3973
          case 0: // SUCCESS
3974
            return SUCCESS;
3975
          case 1: // E
3976
            return E;
3977
          default:
3978
            return null;
3979
        }
3980
      }
3981
 
3982
      /**
3983
       * Find the _Fields constant that matches fieldId, throwing an exception
3984
       * if it is not found.
3985
       */
3986
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3987
        _Fields fields = findByThriftId(fieldId);
3988
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3989
        return fields;
3990
      }
3991
 
3992
      /**
3993
       * Find the _Fields constant that matches name, or null if its not found.
3994
       */
3995
      public static _Fields findByName(String name) {
3996
        return byName.get(name);
3997
      }
3998
 
3999
      private final short _thriftId;
4000
      private final String _fieldName;
4001
 
4002
      _Fields(short thriftId, String fieldName) {
4003
        _thriftId = thriftId;
4004
        _fieldName = fieldName;
4005
      }
4006
 
4007
      public short getThriftFieldId() {
4008
        return _thriftId;
4009
      }
4010
 
4011
      public String getFieldName() {
4012
        return _fieldName;
4013
      }
4014
    }
4015
 
4016
    // isset id assignments
4017
 
4018
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4019
    static {
4020
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4021
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4022
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
4023
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4024
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4025
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4026
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
4027
    }
4028
 
4029
    public getSupplier_result() {
4030
    }
4031
 
4032
    public getSupplier_result(
4033
      Supplier success,
4034
      PurchaseServiceException e)
4035
    {
4036
      this();
4037
      this.success = success;
4038
      this.e = e;
4039
    }
4040
 
4041
    /**
4042
     * Performs a deep copy on <i>other</i>.
4043
     */
4044
    public getSupplier_result(getSupplier_result other) {
4045
      if (other.isSetSuccess()) {
4046
        this.success = new Supplier(other.success);
4047
      }
4048
      if (other.isSetE()) {
4049
        this.e = new PurchaseServiceException(other.e);
4050
      }
4051
    }
4052
 
4053
    public getSupplier_result deepCopy() {
4054
      return new getSupplier_result(this);
4055
    }
4056
 
4057
    @Override
4058
    public void clear() {
4059
      this.success = null;
4060
      this.e = null;
4061
    }
4062
 
4063
    public Supplier getSuccess() {
4064
      return this.success;
4065
    }
4066
 
4067
    public void setSuccess(Supplier success) {
4068
      this.success = success;
4069
    }
4070
 
4071
    public void unsetSuccess() {
4072
      this.success = null;
4073
    }
4074
 
4075
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4076
    public boolean isSetSuccess() {
4077
      return this.success != null;
4078
    }
4079
 
4080
    public void setSuccessIsSet(boolean value) {
4081
      if (!value) {
4082
        this.success = null;
4083
      }
4084
    }
4085
 
4086
    public PurchaseServiceException getE() {
4087
      return this.e;
4088
    }
4089
 
4090
    public void setE(PurchaseServiceException e) {
4091
      this.e = e;
4092
    }
4093
 
4094
    public void unsetE() {
4095
      this.e = null;
4096
    }
4097
 
4098
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4099
    public boolean isSetE() {
4100
      return this.e != null;
4101
    }
4102
 
4103
    public void setEIsSet(boolean value) {
4104
      if (!value) {
4105
        this.e = null;
4106
      }
4107
    }
4108
 
4109
    public void setFieldValue(_Fields field, Object value) {
4110
      switch (field) {
4111
      case SUCCESS:
4112
        if (value == null) {
4113
          unsetSuccess();
4114
        } else {
4115
          setSuccess((Supplier)value);
4116
        }
4117
        break;
4118
 
4119
      case E:
4120
        if (value == null) {
4121
          unsetE();
4122
        } else {
4123
          setE((PurchaseServiceException)value);
4124
        }
4125
        break;
4126
 
4127
      }
4128
    }
4129
 
4130
    public Object getFieldValue(_Fields field) {
4131
      switch (field) {
4132
      case SUCCESS:
4133
        return getSuccess();
4134
 
4135
      case E:
4136
        return getE();
4137
 
4138
      }
4139
      throw new IllegalStateException();
4140
    }
4141
 
4142
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4143
    public boolean isSet(_Fields field) {
4144
      if (field == null) {
4145
        throw new IllegalArgumentException();
4146
      }
4147
 
4148
      switch (field) {
4149
      case SUCCESS:
4150
        return isSetSuccess();
4151
      case E:
4152
        return isSetE();
4153
      }
4154
      throw new IllegalStateException();
4155
    }
4156
 
4157
    @Override
4158
    public boolean equals(Object that) {
4159
      if (that == null)
4160
        return false;
4161
      if (that instanceof getSupplier_result)
4162
        return this.equals((getSupplier_result)that);
4163
      return false;
4164
    }
4165
 
4166
    public boolean equals(getSupplier_result that) {
4167
      if (that == null)
4168
        return false;
4169
 
4170
      boolean this_present_success = true && this.isSetSuccess();
4171
      boolean that_present_success = true && that.isSetSuccess();
4172
      if (this_present_success || that_present_success) {
4173
        if (!(this_present_success && that_present_success))
4174
          return false;
4175
        if (!this.success.equals(that.success))
4176
          return false;
4177
      }
4178
 
4179
      boolean this_present_e = true && this.isSetE();
4180
      boolean that_present_e = true && that.isSetE();
4181
      if (this_present_e || that_present_e) {
4182
        if (!(this_present_e && that_present_e))
4183
          return false;
4184
        if (!this.e.equals(that.e))
4185
          return false;
4186
      }
4187
 
4188
      return true;
4189
    }
4190
 
4191
    @Override
4192
    public int hashCode() {
4193
      return 0;
4194
    }
4195
 
4196
    public int compareTo(getSupplier_result other) {
4197
      if (!getClass().equals(other.getClass())) {
4198
        return getClass().getName().compareTo(other.getClass().getName());
4199
      }
4200
 
4201
      int lastComparison = 0;
4202
      getSupplier_result typedOther = (getSupplier_result)other;
4203
 
4204
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4205
      if (lastComparison != 0) {
4206
        return lastComparison;
4207
      }
4208
      if (isSetSuccess()) {
4209
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4210
        if (lastComparison != 0) {
4211
          return lastComparison;
4212
        }
4213
      }
4214
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4215
      if (lastComparison != 0) {
4216
        return lastComparison;
4217
      }
4218
      if (isSetE()) {
4219
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4220
        if (lastComparison != 0) {
4221
          return lastComparison;
4222
        }
4223
      }
4224
      return 0;
4225
    }
4226
 
4227
    public _Fields fieldForId(int fieldId) {
4228
      return _Fields.findByThriftId(fieldId);
4229
    }
4230
 
4231
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4232
      org.apache.thrift.protocol.TField field;
4233
      iprot.readStructBegin();
4234
      while (true)
4235
      {
4236
        field = iprot.readFieldBegin();
4237
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4238
          break;
4239
        }
4240
        switch (field.id) {
4241
          case 0: // SUCCESS
4242
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4243
              this.success = new Supplier();
4244
              this.success.read(iprot);
4245
            } else { 
4246
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4247
            }
4248
            break;
4249
          case 1: // E
4250
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4251
              this.e = new PurchaseServiceException();
4252
              this.e.read(iprot);
4253
            } else { 
4254
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4255
            }
4256
            break;
4257
          default:
4258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4259
        }
4260
        iprot.readFieldEnd();
4261
      }
4262
      iprot.readStructEnd();
4263
      validate();
4264
    }
4265
 
4266
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4267
      oprot.writeStructBegin(STRUCT_DESC);
4268
 
4269
      if (this.isSetSuccess()) {
4270
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4271
        this.success.write(oprot);
4272
        oprot.writeFieldEnd();
4273
      } else if (this.isSetE()) {
4274
        oprot.writeFieldBegin(E_FIELD_DESC);
4275
        this.e.write(oprot);
4276
        oprot.writeFieldEnd();
4277
      }
4278
      oprot.writeFieldStop();
4279
      oprot.writeStructEnd();
4280
    }
4281
 
4282
    @Override
4283
    public String toString() {
4284
      StringBuilder sb = new StringBuilder("getSupplier_result(");
4285
      boolean first = true;
4286
 
4287
      sb.append("success:");
4288
      if (this.success == null) {
4289
        sb.append("null");
4290
      } else {
4291
        sb.append(this.success);
4292
      }
4293
      first = false;
4294
      if (!first) sb.append(", ");
4295
      sb.append("e:");
4296
      if (this.e == null) {
4297
        sb.append("null");
4298
      } else {
4299
        sb.append(this.e);
4300
      }
4301
      first = false;
4302
      sb.append(")");
4303
      return sb.toString();
4304
    }
4305
 
4306
    public void validate() throws org.apache.thrift.TException {
4307
      // check for required fields
4308
    }
4309
 
4310
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4311
      try {
4312
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4313
      } catch (org.apache.thrift.TException te) {
4314
        throw new java.io.IOException(te);
4315
      }
4316
    }
4317
 
4318
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4319
      try {
4320
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4321
      } catch (org.apache.thrift.TException te) {
4322
        throw new java.io.IOException(te);
4323
      }
4324
    }
4325
 
4326
  }
4327
 
4328
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
4329
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
4330
 
4331
    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);
4332
    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);
4333
    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);
4334
 
4335
    private long purchaseOrderId; // required
4336
    private String invoiceNumber; // required
4337
    private double freightCharges; // required
4338
 
4339
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4340
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4341
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
4342
      INVOICE_NUMBER((short)2, "invoiceNumber"),
4343
      FREIGHT_CHARGES((short)3, "freightCharges");
4344
 
4345
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4346
 
4347
      static {
4348
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4349
          byName.put(field.getFieldName(), field);
4350
        }
4351
      }
4352
 
4353
      /**
4354
       * Find the _Fields constant that matches fieldId, or null if its not found.
4355
       */
4356
      public static _Fields findByThriftId(int fieldId) {
4357
        switch(fieldId) {
4358
          case 1: // PURCHASE_ORDER_ID
4359
            return PURCHASE_ORDER_ID;
4360
          case 2: // INVOICE_NUMBER
4361
            return INVOICE_NUMBER;
4362
          case 3: // FREIGHT_CHARGES
4363
            return FREIGHT_CHARGES;
4364
          default:
4365
            return null;
4366
        }
4367
      }
4368
 
4369
      /**
4370
       * Find the _Fields constant that matches fieldId, throwing an exception
4371
       * if it is not found.
4372
       */
4373
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4374
        _Fields fields = findByThriftId(fieldId);
4375
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4376
        return fields;
4377
      }
4378
 
4379
      /**
4380
       * Find the _Fields constant that matches name, or null if its not found.
4381
       */
4382
      public static _Fields findByName(String name) {
4383
        return byName.get(name);
4384
      }
4385
 
4386
      private final short _thriftId;
4387
      private final String _fieldName;
4388
 
4389
      _Fields(short thriftId, String fieldName) {
4390
        _thriftId = thriftId;
4391
        _fieldName = fieldName;
4392
      }
4393
 
4394
      public short getThriftFieldId() {
4395
        return _thriftId;
4396
      }
4397
 
4398
      public String getFieldName() {
4399
        return _fieldName;
4400
      }
4401
    }
4402
 
4403
    // isset id assignments
4404
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
4405
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
4406
    private BitSet __isset_bit_vector = new BitSet(2);
4407
 
4408
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4409
    static {
4410
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4411
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4412
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4413
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4414
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4415
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4416
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4417
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4418
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
4419
    }
4420
 
4421
    public startPurchase_args() {
4422
    }
4423
 
4424
    public startPurchase_args(
4425
      long purchaseOrderId,
4426
      String invoiceNumber,
4427
      double freightCharges)
4428
    {
4429
      this();
4430
      this.purchaseOrderId = purchaseOrderId;
4431
      setPurchaseOrderIdIsSet(true);
4432
      this.invoiceNumber = invoiceNumber;
4433
      this.freightCharges = freightCharges;
4434
      setFreightChargesIsSet(true);
4435
    }
4436
 
4437
    /**
4438
     * Performs a deep copy on <i>other</i>.
4439
     */
4440
    public startPurchase_args(startPurchase_args other) {
4441
      __isset_bit_vector.clear();
4442
      __isset_bit_vector.or(other.__isset_bit_vector);
4443
      this.purchaseOrderId = other.purchaseOrderId;
4444
      if (other.isSetInvoiceNumber()) {
4445
        this.invoiceNumber = other.invoiceNumber;
4446
      }
4447
      this.freightCharges = other.freightCharges;
4448
    }
4449
 
4450
    public startPurchase_args deepCopy() {
4451
      return new startPurchase_args(this);
4452
    }
4453
 
4454
    @Override
4455
    public void clear() {
4456
      setPurchaseOrderIdIsSet(false);
4457
      this.purchaseOrderId = 0;
4458
      this.invoiceNumber = null;
4459
      setFreightChargesIsSet(false);
4460
      this.freightCharges = 0.0;
4461
    }
4462
 
4463
    public long getPurchaseOrderId() {
4464
      return this.purchaseOrderId;
4465
    }
4466
 
4467
    public void setPurchaseOrderId(long purchaseOrderId) {
4468
      this.purchaseOrderId = purchaseOrderId;
4469
      setPurchaseOrderIdIsSet(true);
4470
    }
4471
 
4472
    public void unsetPurchaseOrderId() {
4473
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
4474
    }
4475
 
4476
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
4477
    public boolean isSetPurchaseOrderId() {
4478
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
4479
    }
4480
 
4481
    public void setPurchaseOrderIdIsSet(boolean value) {
4482
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
4483
    }
4484
 
4485
    public String getInvoiceNumber() {
4486
      return this.invoiceNumber;
4487
    }
4488
 
4489
    public void setInvoiceNumber(String invoiceNumber) {
4490
      this.invoiceNumber = invoiceNumber;
4491
    }
4492
 
4493
    public void unsetInvoiceNumber() {
4494
      this.invoiceNumber = null;
4495
    }
4496
 
4497
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
4498
    public boolean isSetInvoiceNumber() {
4499
      return this.invoiceNumber != null;
4500
    }
4501
 
4502
    public void setInvoiceNumberIsSet(boolean value) {
4503
      if (!value) {
4504
        this.invoiceNumber = null;
4505
      }
4506
    }
4507
 
4508
    public double getFreightCharges() {
4509
      return this.freightCharges;
4510
    }
4511
 
4512
    public void setFreightCharges(double freightCharges) {
4513
      this.freightCharges = freightCharges;
4514
      setFreightChargesIsSet(true);
4515
    }
4516
 
4517
    public void unsetFreightCharges() {
4518
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
4519
    }
4520
 
4521
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
4522
    public boolean isSetFreightCharges() {
4523
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
4524
    }
4525
 
4526
    public void setFreightChargesIsSet(boolean value) {
4527
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
4528
    }
4529
 
4530
    public void setFieldValue(_Fields field, Object value) {
4531
      switch (field) {
4532
      case PURCHASE_ORDER_ID:
4533
        if (value == null) {
4534
          unsetPurchaseOrderId();
4535
        } else {
4536
          setPurchaseOrderId((Long)value);
4537
        }
4538
        break;
4539
 
4540
      case INVOICE_NUMBER:
4541
        if (value == null) {
4542
          unsetInvoiceNumber();
4543
        } else {
4544
          setInvoiceNumber((String)value);
4545
        }
4546
        break;
4547
 
4548
      case FREIGHT_CHARGES:
4549
        if (value == null) {
4550
          unsetFreightCharges();
4551
        } else {
4552
          setFreightCharges((Double)value);
4553
        }
4554
        break;
4555
 
4556
      }
4557
    }
4558
 
4559
    public Object getFieldValue(_Fields field) {
4560
      switch (field) {
4561
      case PURCHASE_ORDER_ID:
4562
        return Long.valueOf(getPurchaseOrderId());
4563
 
4564
      case INVOICE_NUMBER:
4565
        return getInvoiceNumber();
4566
 
4567
      case FREIGHT_CHARGES:
4568
        return Double.valueOf(getFreightCharges());
4569
 
4570
      }
4571
      throw new IllegalStateException();
4572
    }
4573
 
4574
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4575
    public boolean isSet(_Fields field) {
4576
      if (field == null) {
4577
        throw new IllegalArgumentException();
4578
      }
4579
 
4580
      switch (field) {
4581
      case PURCHASE_ORDER_ID:
4582
        return isSetPurchaseOrderId();
4583
      case INVOICE_NUMBER:
4584
        return isSetInvoiceNumber();
4585
      case FREIGHT_CHARGES:
4586
        return isSetFreightCharges();
4587
      }
4588
      throw new IllegalStateException();
4589
    }
4590
 
4591
    @Override
4592
    public boolean equals(Object that) {
4593
      if (that == null)
4594
        return false;
4595
      if (that instanceof startPurchase_args)
4596
        return this.equals((startPurchase_args)that);
4597
      return false;
4598
    }
4599
 
4600
    public boolean equals(startPurchase_args that) {
4601
      if (that == null)
4602
        return false;
4603
 
4604
      boolean this_present_purchaseOrderId = true;
4605
      boolean that_present_purchaseOrderId = true;
4606
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
4607
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
4608
          return false;
4609
        if (this.purchaseOrderId != that.purchaseOrderId)
4610
          return false;
4611
      }
4612
 
4613
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
4614
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
4615
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
4616
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
4617
          return false;
4618
        if (!this.invoiceNumber.equals(that.invoiceNumber))
4619
          return false;
4620
      }
4621
 
4622
      boolean this_present_freightCharges = true;
4623
      boolean that_present_freightCharges = true;
4624
      if (this_present_freightCharges || that_present_freightCharges) {
4625
        if (!(this_present_freightCharges && that_present_freightCharges))
4626
          return false;
4627
        if (this.freightCharges != that.freightCharges)
4628
          return false;
4629
      }
4630
 
4631
      return true;
4632
    }
4633
 
4634
    @Override
4635
    public int hashCode() {
4636
      return 0;
4637
    }
4638
 
4639
    public int compareTo(startPurchase_args other) {
4640
      if (!getClass().equals(other.getClass())) {
4641
        return getClass().getName().compareTo(other.getClass().getName());
4642
      }
4643
 
4644
      int lastComparison = 0;
4645
      startPurchase_args typedOther = (startPurchase_args)other;
4646
 
4647
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
4648
      if (lastComparison != 0) {
4649
        return lastComparison;
4650
      }
4651
      if (isSetPurchaseOrderId()) {
4652
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
4653
        if (lastComparison != 0) {
4654
          return lastComparison;
4655
        }
4656
      }
4657
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
4658
      if (lastComparison != 0) {
4659
        return lastComparison;
4660
      }
4661
      if (isSetInvoiceNumber()) {
4662
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
4663
        if (lastComparison != 0) {
4664
          return lastComparison;
4665
        }
4666
      }
4667
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
4668
      if (lastComparison != 0) {
4669
        return lastComparison;
4670
      }
4671
      if (isSetFreightCharges()) {
4672
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
4673
        if (lastComparison != 0) {
4674
          return lastComparison;
4675
        }
4676
      }
4677
      return 0;
4678
    }
4679
 
4680
    public _Fields fieldForId(int fieldId) {
4681
      return _Fields.findByThriftId(fieldId);
4682
    }
4683
 
4684
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4685
      org.apache.thrift.protocol.TField field;
4686
      iprot.readStructBegin();
4687
      while (true)
4688
      {
4689
        field = iprot.readFieldBegin();
4690
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4691
          break;
4692
        }
4693
        switch (field.id) {
4694
          case 1: // PURCHASE_ORDER_ID
4695
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4696
              this.purchaseOrderId = iprot.readI64();
4697
              setPurchaseOrderIdIsSet(true);
4698
            } else { 
4699
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4700
            }
4701
            break;
4702
          case 2: // INVOICE_NUMBER
4703
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4704
              this.invoiceNumber = iprot.readString();
4705
            } else { 
4706
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4707
            }
4708
            break;
4709
          case 3: // FREIGHT_CHARGES
4710
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
4711
              this.freightCharges = iprot.readDouble();
4712
              setFreightChargesIsSet(true);
4713
            } else { 
4714
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4715
            }
4716
            break;
4717
          default:
4718
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4719
        }
4720
        iprot.readFieldEnd();
4721
      }
4722
      iprot.readStructEnd();
4723
      validate();
4724
    }
4725
 
4726
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4727
      validate();
4728
 
4729
      oprot.writeStructBegin(STRUCT_DESC);
4730
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
4731
      oprot.writeI64(this.purchaseOrderId);
4732
      oprot.writeFieldEnd();
4733
      if (this.invoiceNumber != null) {
4734
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
4735
        oprot.writeString(this.invoiceNumber);
4736
        oprot.writeFieldEnd();
4737
      }
4738
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
4739
      oprot.writeDouble(this.freightCharges);
4740
      oprot.writeFieldEnd();
4741
      oprot.writeFieldStop();
4742
      oprot.writeStructEnd();
4743
    }
4744
 
4745
    @Override
4746
    public String toString() {
4747
      StringBuilder sb = new StringBuilder("startPurchase_args(");
4748
      boolean first = true;
4749
 
4750
      sb.append("purchaseOrderId:");
4751
      sb.append(this.purchaseOrderId);
4752
      first = false;
4753
      if (!first) sb.append(", ");
4754
      sb.append("invoiceNumber:");
4755
      if (this.invoiceNumber == null) {
4756
        sb.append("null");
4757
      } else {
4758
        sb.append(this.invoiceNumber);
4759
      }
4760
      first = false;
4761
      if (!first) sb.append(", ");
4762
      sb.append("freightCharges:");
4763
      sb.append(this.freightCharges);
4764
      first = false;
4765
      sb.append(")");
4766
      return sb.toString();
4767
    }
4768
 
4769
    public void validate() throws org.apache.thrift.TException {
4770
      // check for required fields
4771
    }
4772
 
4773
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4774
      try {
4775
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4776
      } catch (org.apache.thrift.TException te) {
4777
        throw new java.io.IOException(te);
4778
      }
4779
    }
4780
 
4781
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4782
      try {
4783
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4784
      } catch (org.apache.thrift.TException te) {
4785
        throw new java.io.IOException(te);
4786
      }
4787
    }
4788
 
4789
  }
4790
 
4791
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
4792
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
4793
 
4794
    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);
4795
    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);
4796
 
4797
    private long success; // required
4798
    private PurchaseServiceException e; // required
4799
 
4800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4801
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4802
      SUCCESS((short)0, "success"),
4803
      E((short)1, "e");
4804
 
4805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4806
 
4807
      static {
4808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4809
          byName.put(field.getFieldName(), field);
4810
        }
4811
      }
4812
 
4813
      /**
4814
       * Find the _Fields constant that matches fieldId, or null if its not found.
4815
       */
4816
      public static _Fields findByThriftId(int fieldId) {
4817
        switch(fieldId) {
4818
          case 0: // SUCCESS
4819
            return SUCCESS;
4820
          case 1: // E
4821
            return E;
4822
          default:
4823
            return null;
4824
        }
4825
      }
4826
 
4827
      /**
4828
       * Find the _Fields constant that matches fieldId, throwing an exception
4829
       * if it is not found.
4830
       */
4831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4832
        _Fields fields = findByThriftId(fieldId);
4833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4834
        return fields;
4835
      }
4836
 
4837
      /**
4838
       * Find the _Fields constant that matches name, or null if its not found.
4839
       */
4840
      public static _Fields findByName(String name) {
4841
        return byName.get(name);
4842
      }
4843
 
4844
      private final short _thriftId;
4845
      private final String _fieldName;
4846
 
4847
      _Fields(short thriftId, String fieldName) {
4848
        _thriftId = thriftId;
4849
        _fieldName = fieldName;
4850
      }
4851
 
4852
      public short getThriftFieldId() {
4853
        return _thriftId;
4854
      }
4855
 
4856
      public String getFieldName() {
4857
        return _fieldName;
4858
      }
4859
    }
4860
 
4861
    // isset id assignments
4862
    private static final int __SUCCESS_ISSET_ID = 0;
4863
    private BitSet __isset_bit_vector = new BitSet(1);
4864
 
4865
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4866
    static {
4867
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4868
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4869
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4870
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4871
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4872
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4873
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
4874
    }
4875
 
4876
    public startPurchase_result() {
4877
    }
4878
 
4879
    public startPurchase_result(
4880
      long success,
4881
      PurchaseServiceException e)
4882
    {
4883
      this();
4884
      this.success = success;
4885
      setSuccessIsSet(true);
4886
      this.e = e;
4887
    }
4888
 
4889
    /**
4890
     * Performs a deep copy on <i>other</i>.
4891
     */
4892
    public startPurchase_result(startPurchase_result other) {
4893
      __isset_bit_vector.clear();
4894
      __isset_bit_vector.or(other.__isset_bit_vector);
4895
      this.success = other.success;
4896
      if (other.isSetE()) {
4897
        this.e = new PurchaseServiceException(other.e);
4898
      }
4899
    }
4900
 
4901
    public startPurchase_result deepCopy() {
4902
      return new startPurchase_result(this);
4903
    }
4904
 
4905
    @Override
4906
    public void clear() {
4907
      setSuccessIsSet(false);
4908
      this.success = 0;
4909
      this.e = null;
4910
    }
4911
 
4912
    public long getSuccess() {
4913
      return this.success;
4914
    }
4915
 
4916
    public void setSuccess(long success) {
4917
      this.success = success;
4918
      setSuccessIsSet(true);
4919
    }
4920
 
4921
    public void unsetSuccess() {
4922
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
4923
    }
4924
 
4925
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4926
    public boolean isSetSuccess() {
4927
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
4928
    }
4929
 
4930
    public void setSuccessIsSet(boolean value) {
4931
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
4932
    }
4933
 
4934
    public PurchaseServiceException getE() {
4935
      return this.e;
4936
    }
4937
 
4938
    public void setE(PurchaseServiceException e) {
4939
      this.e = e;
4940
    }
4941
 
4942
    public void unsetE() {
4943
      this.e = null;
4944
    }
4945
 
4946
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4947
    public boolean isSetE() {
4948
      return this.e != null;
4949
    }
4950
 
4951
    public void setEIsSet(boolean value) {
4952
      if (!value) {
4953
        this.e = null;
4954
      }
4955
    }
4956
 
4957
    public void setFieldValue(_Fields field, Object value) {
4958
      switch (field) {
4959
      case SUCCESS:
4960
        if (value == null) {
4961
          unsetSuccess();
4962
        } else {
4963
          setSuccess((Long)value);
4964
        }
4965
        break;
4966
 
4967
      case E:
4968
        if (value == null) {
4969
          unsetE();
4970
        } else {
4971
          setE((PurchaseServiceException)value);
4972
        }
4973
        break;
4974
 
4975
      }
4976
    }
4977
 
4978
    public Object getFieldValue(_Fields field) {
4979
      switch (field) {
4980
      case SUCCESS:
4981
        return Long.valueOf(getSuccess());
4982
 
4983
      case E:
4984
        return getE();
4985
 
4986
      }
4987
      throw new IllegalStateException();
4988
    }
4989
 
4990
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4991
    public boolean isSet(_Fields field) {
4992
      if (field == null) {
4993
        throw new IllegalArgumentException();
4994
      }
4995
 
4996
      switch (field) {
4997
      case SUCCESS:
4998
        return isSetSuccess();
4999
      case E:
5000
        return isSetE();
5001
      }
5002
      throw new IllegalStateException();
5003
    }
5004
 
5005
    @Override
5006
    public boolean equals(Object that) {
5007
      if (that == null)
5008
        return false;
5009
      if (that instanceof startPurchase_result)
5010
        return this.equals((startPurchase_result)that);
5011
      return false;
5012
    }
5013
 
5014
    public boolean equals(startPurchase_result that) {
5015
      if (that == null)
5016
        return false;
5017
 
5018
      boolean this_present_success = true;
5019
      boolean that_present_success = true;
5020
      if (this_present_success || that_present_success) {
5021
        if (!(this_present_success && that_present_success))
5022
          return false;
5023
        if (this.success != that.success)
5024
          return false;
5025
      }
5026
 
5027
      boolean this_present_e = true && this.isSetE();
5028
      boolean that_present_e = true && that.isSetE();
5029
      if (this_present_e || that_present_e) {
5030
        if (!(this_present_e && that_present_e))
5031
          return false;
5032
        if (!this.e.equals(that.e))
5033
          return false;
5034
      }
5035
 
5036
      return true;
5037
    }
5038
 
5039
    @Override
5040
    public int hashCode() {
5041
      return 0;
5042
    }
5043
 
5044
    public int compareTo(startPurchase_result other) {
5045
      if (!getClass().equals(other.getClass())) {
5046
        return getClass().getName().compareTo(other.getClass().getName());
5047
      }
5048
 
5049
      int lastComparison = 0;
5050
      startPurchase_result typedOther = (startPurchase_result)other;
5051
 
5052
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5053
      if (lastComparison != 0) {
5054
        return lastComparison;
5055
      }
5056
      if (isSetSuccess()) {
5057
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5058
        if (lastComparison != 0) {
5059
          return lastComparison;
5060
        }
5061
      }
5062
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5063
      if (lastComparison != 0) {
5064
        return lastComparison;
5065
      }
5066
      if (isSetE()) {
5067
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5068
        if (lastComparison != 0) {
5069
          return lastComparison;
5070
        }
5071
      }
5072
      return 0;
5073
    }
5074
 
5075
    public _Fields fieldForId(int fieldId) {
5076
      return _Fields.findByThriftId(fieldId);
5077
    }
5078
 
5079
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5080
      org.apache.thrift.protocol.TField field;
5081
      iprot.readStructBegin();
5082
      while (true)
5083
      {
5084
        field = iprot.readFieldBegin();
5085
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5086
          break;
5087
        }
5088
        switch (field.id) {
5089
          case 0: // SUCCESS
5090
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5091
              this.success = iprot.readI64();
5092
              setSuccessIsSet(true);
5093
            } else { 
5094
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5095
            }
5096
            break;
5097
          case 1: // E
5098
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5099
              this.e = new PurchaseServiceException();
5100
              this.e.read(iprot);
5101
            } else { 
5102
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5103
            }
5104
            break;
5105
          default:
5106
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5107
        }
5108
        iprot.readFieldEnd();
5109
      }
5110
      iprot.readStructEnd();
5111
      validate();
5112
    }
5113
 
5114
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5115
      oprot.writeStructBegin(STRUCT_DESC);
5116
 
5117
      if (this.isSetSuccess()) {
5118
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5119
        oprot.writeI64(this.success);
5120
        oprot.writeFieldEnd();
5121
      } else if (this.isSetE()) {
5122
        oprot.writeFieldBegin(E_FIELD_DESC);
5123
        this.e.write(oprot);
5124
        oprot.writeFieldEnd();
5125
      }
5126
      oprot.writeFieldStop();
5127
      oprot.writeStructEnd();
5128
    }
5129
 
5130
    @Override
5131
    public String toString() {
5132
      StringBuilder sb = new StringBuilder("startPurchase_result(");
5133
      boolean first = true;
5134
 
5135
      sb.append("success:");
5136
      sb.append(this.success);
5137
      first = false;
5138
      if (!first) sb.append(", ");
5139
      sb.append("e:");
5140
      if (this.e == null) {
5141
        sb.append("null");
5142
      } else {
5143
        sb.append(this.e);
5144
      }
5145
      first = false;
5146
      sb.append(")");
5147
      return sb.toString();
5148
    }
5149
 
5150
    public void validate() throws org.apache.thrift.TException {
5151
      // check for required fields
5152
    }
5153
 
5154
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5155
      try {
5156
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5157
      } catch (org.apache.thrift.TException te) {
5158
        throw new java.io.IOException(te);
5159
      }
5160
    }
5161
 
5162
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5163
      try {
5164
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5165
      } catch (org.apache.thrift.TException te) {
5166
        throw new java.io.IOException(te);
5167
      }
5168
    }
5169
 
5170
  }
5171
 
5172
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
5173
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
5174
 
5175
    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);
5176
 
5177
    private long purchaseId; // required
5178
 
5179
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5180
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5181
      PURCHASE_ID((short)1, "purchaseId");
5182
 
5183
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5184
 
5185
      static {
5186
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5187
          byName.put(field.getFieldName(), field);
5188
        }
5189
      }
5190
 
5191
      /**
5192
       * Find the _Fields constant that matches fieldId, or null if its not found.
5193
       */
5194
      public static _Fields findByThriftId(int fieldId) {
5195
        switch(fieldId) {
5196
          case 1: // PURCHASE_ID
5197
            return PURCHASE_ID;
5198
          default:
5199
            return null;
5200
        }
5201
      }
5202
 
5203
      /**
5204
       * Find the _Fields constant that matches fieldId, throwing an exception
5205
       * if it is not found.
5206
       */
5207
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5208
        _Fields fields = findByThriftId(fieldId);
5209
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5210
        return fields;
5211
      }
5212
 
5213
      /**
5214
       * Find the _Fields constant that matches name, or null if its not found.
5215
       */
5216
      public static _Fields findByName(String name) {
5217
        return byName.get(name);
5218
      }
5219
 
5220
      private final short _thriftId;
5221
      private final String _fieldName;
5222
 
5223
      _Fields(short thriftId, String fieldName) {
5224
        _thriftId = thriftId;
5225
        _fieldName = fieldName;
5226
      }
5227
 
5228
      public short getThriftFieldId() {
5229
        return _thriftId;
5230
      }
5231
 
5232
      public String getFieldName() {
5233
        return _fieldName;
5234
      }
5235
    }
5236
 
5237
    // isset id assignments
5238
    private static final int __PURCHASEID_ISSET_ID = 0;
5239
    private BitSet __isset_bit_vector = new BitSet(1);
5240
 
5241
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5242
    static {
5243
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5244
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5245
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5246
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5247
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
5248
    }
5249
 
5250
    public closePurchase_args() {
5251
    }
5252
 
5253
    public closePurchase_args(
5254
      long purchaseId)
5255
    {
5256
      this();
5257
      this.purchaseId = purchaseId;
5258
      setPurchaseIdIsSet(true);
5259
    }
5260
 
5261
    /**
5262
     * Performs a deep copy on <i>other</i>.
5263
     */
5264
    public closePurchase_args(closePurchase_args other) {
5265
      __isset_bit_vector.clear();
5266
      __isset_bit_vector.or(other.__isset_bit_vector);
5267
      this.purchaseId = other.purchaseId;
5268
    }
5269
 
5270
    public closePurchase_args deepCopy() {
5271
      return new closePurchase_args(this);
5272
    }
5273
 
5274
    @Override
5275
    public void clear() {
5276
      setPurchaseIdIsSet(false);
5277
      this.purchaseId = 0;
5278
    }
5279
 
5280
    public long getPurchaseId() {
5281
      return this.purchaseId;
5282
    }
5283
 
5284
    public void setPurchaseId(long purchaseId) {
5285
      this.purchaseId = purchaseId;
5286
      setPurchaseIdIsSet(true);
5287
    }
5288
 
5289
    public void unsetPurchaseId() {
5290
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
5291
    }
5292
 
5293
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
5294
    public boolean isSetPurchaseId() {
5295
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
5296
    }
5297
 
5298
    public void setPurchaseIdIsSet(boolean value) {
5299
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
5300
    }
5301
 
5302
    public void setFieldValue(_Fields field, Object value) {
5303
      switch (field) {
5304
      case PURCHASE_ID:
5305
        if (value == null) {
5306
          unsetPurchaseId();
5307
        } else {
5308
          setPurchaseId((Long)value);
5309
        }
5310
        break;
5311
 
5312
      }
5313
    }
5314
 
5315
    public Object getFieldValue(_Fields field) {
5316
      switch (field) {
5317
      case PURCHASE_ID:
5318
        return Long.valueOf(getPurchaseId());
5319
 
5320
      }
5321
      throw new IllegalStateException();
5322
    }
5323
 
5324
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5325
    public boolean isSet(_Fields field) {
5326
      if (field == null) {
5327
        throw new IllegalArgumentException();
5328
      }
5329
 
5330
      switch (field) {
5331
      case PURCHASE_ID:
5332
        return isSetPurchaseId();
5333
      }
5334
      throw new IllegalStateException();
5335
    }
5336
 
5337
    @Override
5338
    public boolean equals(Object that) {
5339
      if (that == null)
5340
        return false;
5341
      if (that instanceof closePurchase_args)
5342
        return this.equals((closePurchase_args)that);
5343
      return false;
5344
    }
5345
 
5346
    public boolean equals(closePurchase_args that) {
5347
      if (that == null)
5348
        return false;
5349
 
5350
      boolean this_present_purchaseId = true;
5351
      boolean that_present_purchaseId = true;
5352
      if (this_present_purchaseId || that_present_purchaseId) {
5353
        if (!(this_present_purchaseId && that_present_purchaseId))
5354
          return false;
5355
        if (this.purchaseId != that.purchaseId)
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(closePurchase_args other) {
5368
      if (!getClass().equals(other.getClass())) {
5369
        return getClass().getName().compareTo(other.getClass().getName());
5370
      }
5371
 
5372
      int lastComparison = 0;
5373
      closePurchase_args typedOther = (closePurchase_args)other;
5374
 
5375
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
5376
      if (lastComparison != 0) {
5377
        return lastComparison;
5378
      }
5379
      if (isSetPurchaseId()) {
5380
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
5381
        if (lastComparison != 0) {
5382
          return lastComparison;
5383
        }
5384
      }
5385
      return 0;
5386
    }
5387
 
5388
    public _Fields fieldForId(int fieldId) {
5389
      return _Fields.findByThriftId(fieldId);
5390
    }
5391
 
5392
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5393
      org.apache.thrift.protocol.TField field;
5394
      iprot.readStructBegin();
5395
      while (true)
5396
      {
5397
        field = iprot.readFieldBegin();
5398
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5399
          break;
5400
        }
5401
        switch (field.id) {
5402
          case 1: // PURCHASE_ID
5403
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5404
              this.purchaseId = iprot.readI64();
5405
              setPurchaseIdIsSet(true);
5406
            } else { 
5407
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5408
            }
5409
            break;
5410
          default:
5411
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5412
        }
5413
        iprot.readFieldEnd();
5414
      }
5415
      iprot.readStructEnd();
5416
      validate();
5417
    }
5418
 
5419
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5420
      validate();
5421
 
5422
      oprot.writeStructBegin(STRUCT_DESC);
5423
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
5424
      oprot.writeI64(this.purchaseId);
5425
      oprot.writeFieldEnd();
5426
      oprot.writeFieldStop();
5427
      oprot.writeStructEnd();
5428
    }
5429
 
5430
    @Override
5431
    public String toString() {
5432
      StringBuilder sb = new StringBuilder("closePurchase_args(");
5433
      boolean first = true;
5434
 
5435
      sb.append("purchaseId:");
5436
      sb.append(this.purchaseId);
5437
      first = false;
5438
      sb.append(")");
5439
      return sb.toString();
5440
    }
5441
 
5442
    public void validate() throws org.apache.thrift.TException {
5443
      // check for required fields
5444
    }
5445
 
5446
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5447
      try {
5448
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5449
      } catch (org.apache.thrift.TException te) {
5450
        throw new java.io.IOException(te);
5451
      }
5452
    }
5453
 
5454
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5455
      try {
5456
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5457
      } catch (org.apache.thrift.TException te) {
5458
        throw new java.io.IOException(te);
5459
      }
5460
    }
5461
 
5462
  }
5463
 
5464
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
5465
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
5466
 
5467
    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);
5468
    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);
5469
 
5470
    private long success; // required
5471
    private PurchaseServiceException e; // required
5472
 
5473
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5474
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5475
      SUCCESS((short)0, "success"),
5476
      E((short)1, "e");
5477
 
5478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5479
 
5480
      static {
5481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5482
          byName.put(field.getFieldName(), field);
5483
        }
5484
      }
5485
 
5486
      /**
5487
       * Find the _Fields constant that matches fieldId, or null if its not found.
5488
       */
5489
      public static _Fields findByThriftId(int fieldId) {
5490
        switch(fieldId) {
5491
          case 0: // SUCCESS
5492
            return SUCCESS;
5493
          case 1: // E
5494
            return E;
5495
          default:
5496
            return null;
5497
        }
5498
      }
5499
 
5500
      /**
5501
       * Find the _Fields constant that matches fieldId, throwing an exception
5502
       * if it is not found.
5503
       */
5504
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5505
        _Fields fields = findByThriftId(fieldId);
5506
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5507
        return fields;
5508
      }
5509
 
5510
      /**
5511
       * Find the _Fields constant that matches name, or null if its not found.
5512
       */
5513
      public static _Fields findByName(String name) {
5514
        return byName.get(name);
5515
      }
5516
 
5517
      private final short _thriftId;
5518
      private final String _fieldName;
5519
 
5520
      _Fields(short thriftId, String fieldName) {
5521
        _thriftId = thriftId;
5522
        _fieldName = fieldName;
5523
      }
5524
 
5525
      public short getThriftFieldId() {
5526
        return _thriftId;
5527
      }
5528
 
5529
      public String getFieldName() {
5530
        return _fieldName;
5531
      }
5532
    }
5533
 
5534
    // isset id assignments
5535
    private static final int __SUCCESS_ISSET_ID = 0;
5536
    private BitSet __isset_bit_vector = new BitSet(1);
5537
 
5538
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5539
    static {
5540
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5541
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5542
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5543
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5544
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5545
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5546
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
5547
    }
5548
 
5549
    public closePurchase_result() {
5550
    }
5551
 
5552
    public closePurchase_result(
5553
      long success,
5554
      PurchaseServiceException e)
5555
    {
5556
      this();
5557
      this.success = success;
5558
      setSuccessIsSet(true);
5559
      this.e = e;
5560
    }
5561
 
5562
    /**
5563
     * Performs a deep copy on <i>other</i>.
5564
     */
5565
    public closePurchase_result(closePurchase_result other) {
5566
      __isset_bit_vector.clear();
5567
      __isset_bit_vector.or(other.__isset_bit_vector);
5568
      this.success = other.success;
5569
      if (other.isSetE()) {
5570
        this.e = new PurchaseServiceException(other.e);
5571
      }
5572
    }
5573
 
5574
    public closePurchase_result deepCopy() {
5575
      return new closePurchase_result(this);
5576
    }
5577
 
5578
    @Override
5579
    public void clear() {
5580
      setSuccessIsSet(false);
5581
      this.success = 0;
5582
      this.e = null;
5583
    }
5584
 
5585
    public long getSuccess() {
5586
      return this.success;
5587
    }
5588
 
5589
    public void setSuccess(long success) {
5590
      this.success = success;
5591
      setSuccessIsSet(true);
5592
    }
5593
 
5594
    public void unsetSuccess() {
5595
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5596
    }
5597
 
5598
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5599
    public boolean isSetSuccess() {
5600
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5601
    }
5602
 
5603
    public void setSuccessIsSet(boolean value) {
5604
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5605
    }
5606
 
5607
    public PurchaseServiceException getE() {
5608
      return this.e;
5609
    }
5610
 
5611
    public void setE(PurchaseServiceException e) {
5612
      this.e = e;
5613
    }
5614
 
5615
    public void unsetE() {
5616
      this.e = null;
5617
    }
5618
 
5619
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5620
    public boolean isSetE() {
5621
      return this.e != null;
5622
    }
5623
 
5624
    public void setEIsSet(boolean value) {
5625
      if (!value) {
5626
        this.e = null;
5627
      }
5628
    }
5629
 
5630
    public void setFieldValue(_Fields field, Object value) {
5631
      switch (field) {
5632
      case SUCCESS:
5633
        if (value == null) {
5634
          unsetSuccess();
5635
        } else {
5636
          setSuccess((Long)value);
5637
        }
5638
        break;
5639
 
5640
      case E:
5641
        if (value == null) {
5642
          unsetE();
5643
        } else {
5644
          setE((PurchaseServiceException)value);
5645
        }
5646
        break;
5647
 
5648
      }
5649
    }
5650
 
5651
    public Object getFieldValue(_Fields field) {
5652
      switch (field) {
5653
      case SUCCESS:
5654
        return Long.valueOf(getSuccess());
5655
 
5656
      case E:
5657
        return getE();
5658
 
5659
      }
5660
      throw new IllegalStateException();
5661
    }
5662
 
5663
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5664
    public boolean isSet(_Fields field) {
5665
      if (field == null) {
5666
        throw new IllegalArgumentException();
5667
      }
5668
 
5669
      switch (field) {
5670
      case SUCCESS:
5671
        return isSetSuccess();
5672
      case E:
5673
        return isSetE();
5674
      }
5675
      throw new IllegalStateException();
5676
    }
5677
 
5678
    @Override
5679
    public boolean equals(Object that) {
5680
      if (that == null)
5681
        return false;
5682
      if (that instanceof closePurchase_result)
5683
        return this.equals((closePurchase_result)that);
5684
      return false;
5685
    }
5686
 
5687
    public boolean equals(closePurchase_result that) {
5688
      if (that == null)
5689
        return false;
5690
 
5691
      boolean this_present_success = true;
5692
      boolean that_present_success = true;
5693
      if (this_present_success || that_present_success) {
5694
        if (!(this_present_success && that_present_success))
5695
          return false;
5696
        if (this.success != that.success)
5697
          return false;
5698
      }
5699
 
5700
      boolean this_present_e = true && this.isSetE();
5701
      boolean that_present_e = true && that.isSetE();
5702
      if (this_present_e || that_present_e) {
5703
        if (!(this_present_e && that_present_e))
5704
          return false;
5705
        if (!this.e.equals(that.e))
5706
          return false;
5707
      }
5708
 
5709
      return true;
5710
    }
5711
 
5712
    @Override
5713
    public int hashCode() {
5714
      return 0;
5715
    }
5716
 
5717
    public int compareTo(closePurchase_result other) {
5718
      if (!getClass().equals(other.getClass())) {
5719
        return getClass().getName().compareTo(other.getClass().getName());
5720
      }
5721
 
5722
      int lastComparison = 0;
5723
      closePurchase_result typedOther = (closePurchase_result)other;
5724
 
5725
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5726
      if (lastComparison != 0) {
5727
        return lastComparison;
5728
      }
5729
      if (isSetSuccess()) {
5730
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5731
        if (lastComparison != 0) {
5732
          return lastComparison;
5733
        }
5734
      }
5735
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5736
      if (lastComparison != 0) {
5737
        return lastComparison;
5738
      }
5739
      if (isSetE()) {
5740
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5741
        if (lastComparison != 0) {
5742
          return lastComparison;
5743
        }
5744
      }
5745
      return 0;
5746
    }
5747
 
5748
    public _Fields fieldForId(int fieldId) {
5749
      return _Fields.findByThriftId(fieldId);
5750
    }
5751
 
5752
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5753
      org.apache.thrift.protocol.TField field;
5754
      iprot.readStructBegin();
5755
      while (true)
5756
      {
5757
        field = iprot.readFieldBegin();
5758
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5759
          break;
5760
        }
5761
        switch (field.id) {
5762
          case 0: // SUCCESS
5763
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5764
              this.success = iprot.readI64();
5765
              setSuccessIsSet(true);
5766
            } else { 
5767
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5768
            }
5769
            break;
5770
          case 1: // E
5771
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5772
              this.e = new PurchaseServiceException();
5773
              this.e.read(iprot);
5774
            } else { 
5775
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5776
            }
5777
            break;
5778
          default:
5779
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5780
        }
5781
        iprot.readFieldEnd();
5782
      }
5783
      iprot.readStructEnd();
5784
      validate();
5785
    }
5786
 
5787
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5788
      oprot.writeStructBegin(STRUCT_DESC);
5789
 
5790
      if (this.isSetSuccess()) {
5791
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5792
        oprot.writeI64(this.success);
5793
        oprot.writeFieldEnd();
5794
      } else if (this.isSetE()) {
5795
        oprot.writeFieldBegin(E_FIELD_DESC);
5796
        this.e.write(oprot);
5797
        oprot.writeFieldEnd();
5798
      }
5799
      oprot.writeFieldStop();
5800
      oprot.writeStructEnd();
5801
    }
5802
 
5803
    @Override
5804
    public String toString() {
5805
      StringBuilder sb = new StringBuilder("closePurchase_result(");
5806
      boolean first = true;
5807
 
5808
      sb.append("success:");
5809
      sb.append(this.success);
5810
      first = false;
5811
      if (!first) sb.append(", ");
5812
      sb.append("e:");
5813
      if (this.e == null) {
5814
        sb.append("null");
5815
      } else {
5816
        sb.append(this.e);
5817
      }
5818
      first = false;
5819
      sb.append(")");
5820
      return sb.toString();
5821
    }
5822
 
5823
    public void validate() throws org.apache.thrift.TException {
5824
      // check for required fields
5825
    }
5826
 
5827
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5828
      try {
5829
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5830
      } catch (org.apache.thrift.TException te) {
5831
        throw new java.io.IOException(te);
5832
      }
5833
    }
5834
 
5835
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5836
      try {
5837
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5838
      } catch (org.apache.thrift.TException te) {
5839
        throw new java.io.IOException(te);
5840
      }
5841
    }
5842
 
5843
  }
5844
 
5845
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
5846
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
5847
 
5848
    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);
5849
    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);
5850
 
5851
    private long purchaseOrderId; // required
5852
    private boolean open; // required
5853
 
5854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5855
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5856
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5857
      OPEN((short)2, "open");
5858
 
5859
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5860
 
5861
      static {
5862
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5863
          byName.put(field.getFieldName(), field);
5864
        }
5865
      }
5866
 
5867
      /**
5868
       * Find the _Fields constant that matches fieldId, or null if its not found.
5869
       */
5870
      public static _Fields findByThriftId(int fieldId) {
5871
        switch(fieldId) {
5872
          case 1: // PURCHASE_ORDER_ID
5873
            return PURCHASE_ORDER_ID;
5874
          case 2: // OPEN
5875
            return OPEN;
5876
          default:
5877
            return null;
5878
        }
5879
      }
5880
 
5881
      /**
5882
       * Find the _Fields constant that matches fieldId, throwing an exception
5883
       * if it is not found.
5884
       */
5885
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5886
        _Fields fields = findByThriftId(fieldId);
5887
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5888
        return fields;
5889
      }
5890
 
5891
      /**
5892
       * Find the _Fields constant that matches name, or null if its not found.
5893
       */
5894
      public static _Fields findByName(String name) {
5895
        return byName.get(name);
5896
      }
5897
 
5898
      private final short _thriftId;
5899
      private final String _fieldName;
5900
 
5901
      _Fields(short thriftId, String fieldName) {
5902
        _thriftId = thriftId;
5903
        _fieldName = fieldName;
5904
      }
5905
 
5906
      public short getThriftFieldId() {
5907
        return _thriftId;
5908
      }
5909
 
5910
      public String getFieldName() {
5911
        return _fieldName;
5912
      }
5913
    }
5914
 
5915
    // isset id assignments
5916
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5917
    private static final int __OPEN_ISSET_ID = 1;
5918
    private BitSet __isset_bit_vector = new BitSet(2);
5919
 
5920
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5921
    static {
5922
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5923
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5924
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5925
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5926
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
5927
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5928
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
5929
    }
5930
 
5931
    public getAllPurchases_args() {
5932
    }
5933
 
5934
    public getAllPurchases_args(
5935
      long purchaseOrderId,
5936
      boolean open)
5937
    {
5938
      this();
5939
      this.purchaseOrderId = purchaseOrderId;
5940
      setPurchaseOrderIdIsSet(true);
5941
      this.open = open;
5942
      setOpenIsSet(true);
5943
    }
5944
 
5945
    /**
5946
     * Performs a deep copy on <i>other</i>.
5947
     */
5948
    public getAllPurchases_args(getAllPurchases_args other) {
5949
      __isset_bit_vector.clear();
5950
      __isset_bit_vector.or(other.__isset_bit_vector);
5951
      this.purchaseOrderId = other.purchaseOrderId;
5952
      this.open = other.open;
5953
    }
5954
 
5955
    public getAllPurchases_args deepCopy() {
5956
      return new getAllPurchases_args(this);
5957
    }
5958
 
5959
    @Override
5960
    public void clear() {
5961
      setPurchaseOrderIdIsSet(false);
5962
      this.purchaseOrderId = 0;
5963
      setOpenIsSet(false);
5964
      this.open = false;
5965
    }
5966
 
5967
    public long getPurchaseOrderId() {
5968
      return this.purchaseOrderId;
5969
    }
5970
 
5971
    public void setPurchaseOrderId(long purchaseOrderId) {
5972
      this.purchaseOrderId = purchaseOrderId;
5973
      setPurchaseOrderIdIsSet(true);
5974
    }
5975
 
5976
    public void unsetPurchaseOrderId() {
5977
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5978
    }
5979
 
5980
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5981
    public boolean isSetPurchaseOrderId() {
5982
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5983
    }
5984
 
5985
    public void setPurchaseOrderIdIsSet(boolean value) {
5986
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5987
    }
5988
 
5989
    public boolean isOpen() {
5990
      return this.open;
5991
    }
5992
 
5993
    public void setOpen(boolean open) {
5994
      this.open = open;
5995
      setOpenIsSet(true);
5996
    }
5997
 
5998
    public void unsetOpen() {
5999
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
6000
    }
6001
 
6002
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
6003
    public boolean isSetOpen() {
6004
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
6005
    }
6006
 
6007
    public void setOpenIsSet(boolean value) {
6008
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
6009
    }
6010
 
6011
    public void setFieldValue(_Fields field, Object value) {
6012
      switch (field) {
6013
      case PURCHASE_ORDER_ID:
6014
        if (value == null) {
6015
          unsetPurchaseOrderId();
6016
        } else {
6017
          setPurchaseOrderId((Long)value);
6018
        }
6019
        break;
6020
 
6021
      case OPEN:
6022
        if (value == null) {
6023
          unsetOpen();
6024
        } else {
6025
          setOpen((Boolean)value);
6026
        }
6027
        break;
6028
 
6029
      }
6030
    }
6031
 
6032
    public Object getFieldValue(_Fields field) {
6033
      switch (field) {
6034
      case PURCHASE_ORDER_ID:
6035
        return Long.valueOf(getPurchaseOrderId());
6036
 
6037
      case OPEN:
6038
        return Boolean.valueOf(isOpen());
6039
 
6040
      }
6041
      throw new IllegalStateException();
6042
    }
6043
 
6044
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6045
    public boolean isSet(_Fields field) {
6046
      if (field == null) {
6047
        throw new IllegalArgumentException();
6048
      }
6049
 
6050
      switch (field) {
6051
      case PURCHASE_ORDER_ID:
6052
        return isSetPurchaseOrderId();
6053
      case OPEN:
6054
        return isSetOpen();
6055
      }
6056
      throw new IllegalStateException();
6057
    }
6058
 
6059
    @Override
6060
    public boolean equals(Object that) {
6061
      if (that == null)
6062
        return false;
6063
      if (that instanceof getAllPurchases_args)
6064
        return this.equals((getAllPurchases_args)that);
6065
      return false;
6066
    }
6067
 
6068
    public boolean equals(getAllPurchases_args that) {
6069
      if (that == null)
6070
        return false;
6071
 
6072
      boolean this_present_purchaseOrderId = true;
6073
      boolean that_present_purchaseOrderId = true;
6074
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
6075
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
6076
          return false;
6077
        if (this.purchaseOrderId != that.purchaseOrderId)
6078
          return false;
6079
      }
6080
 
6081
      boolean this_present_open = true;
6082
      boolean that_present_open = true;
6083
      if (this_present_open || that_present_open) {
6084
        if (!(this_present_open && that_present_open))
6085
          return false;
6086
        if (this.open != that.open)
6087
          return false;
6088
      }
6089
 
6090
      return true;
6091
    }
6092
 
6093
    @Override
6094
    public int hashCode() {
6095
      return 0;
6096
    }
6097
 
6098
    public int compareTo(getAllPurchases_args other) {
6099
      if (!getClass().equals(other.getClass())) {
6100
        return getClass().getName().compareTo(other.getClass().getName());
6101
      }
6102
 
6103
      int lastComparison = 0;
6104
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
6105
 
6106
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
6107
      if (lastComparison != 0) {
6108
        return lastComparison;
6109
      }
6110
      if (isSetPurchaseOrderId()) {
6111
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
6112
        if (lastComparison != 0) {
6113
          return lastComparison;
6114
        }
6115
      }
6116
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
6117
      if (lastComparison != 0) {
6118
        return lastComparison;
6119
      }
6120
      if (isSetOpen()) {
6121
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
6122
        if (lastComparison != 0) {
6123
          return lastComparison;
6124
        }
6125
      }
6126
      return 0;
6127
    }
6128
 
6129
    public _Fields fieldForId(int fieldId) {
6130
      return _Fields.findByThriftId(fieldId);
6131
    }
6132
 
6133
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6134
      org.apache.thrift.protocol.TField field;
6135
      iprot.readStructBegin();
6136
      while (true)
6137
      {
6138
        field = iprot.readFieldBegin();
6139
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6140
          break;
6141
        }
6142
        switch (field.id) {
6143
          case 1: // PURCHASE_ORDER_ID
6144
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6145
              this.purchaseOrderId = iprot.readI64();
6146
              setPurchaseOrderIdIsSet(true);
6147
            } else { 
6148
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6149
            }
6150
            break;
6151
          case 2: // OPEN
6152
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
6153
              this.open = iprot.readBool();
6154
              setOpenIsSet(true);
6155
            } else { 
6156
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6157
            }
6158
            break;
6159
          default:
6160
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6161
        }
6162
        iprot.readFieldEnd();
6163
      }
6164
      iprot.readStructEnd();
6165
      validate();
6166
    }
6167
 
6168
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6169
      validate();
6170
 
6171
      oprot.writeStructBegin(STRUCT_DESC);
6172
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
6173
      oprot.writeI64(this.purchaseOrderId);
6174
      oprot.writeFieldEnd();
6175
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
6176
      oprot.writeBool(this.open);
6177
      oprot.writeFieldEnd();
6178
      oprot.writeFieldStop();
6179
      oprot.writeStructEnd();
6180
    }
6181
 
6182
    @Override
6183
    public String toString() {
6184
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
6185
      boolean first = true;
6186
 
6187
      sb.append("purchaseOrderId:");
6188
      sb.append(this.purchaseOrderId);
6189
      first = false;
6190
      if (!first) sb.append(", ");
6191
      sb.append("open:");
6192
      sb.append(this.open);
6193
      first = false;
6194
      sb.append(")");
6195
      return sb.toString();
6196
    }
6197
 
6198
    public void validate() throws org.apache.thrift.TException {
6199
      // check for required fields
6200
    }
6201
 
6202
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6203
      try {
6204
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6205
      } catch (org.apache.thrift.TException te) {
6206
        throw new java.io.IOException(te);
6207
      }
6208
    }
6209
 
6210
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6211
      try {
6212
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6213
      } catch (org.apache.thrift.TException te) {
6214
        throw new java.io.IOException(te);
6215
      }
6216
    }
6217
 
6218
  }
6219
 
6220
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
6221
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
6222
 
6223
    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);
6224
    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);
6225
 
6226
    private List<Purchase> success; // required
6227
    private PurchaseServiceException e; // required
6228
 
6229
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6230
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6231
      SUCCESS((short)0, "success"),
6232
      E((short)1, "e");
6233
 
6234
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6235
 
6236
      static {
6237
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6238
          byName.put(field.getFieldName(), field);
6239
        }
6240
      }
6241
 
6242
      /**
6243
       * Find the _Fields constant that matches fieldId, or null if its not found.
6244
       */
6245
      public static _Fields findByThriftId(int fieldId) {
6246
        switch(fieldId) {
6247
          case 0: // SUCCESS
6248
            return SUCCESS;
6249
          case 1: // E
6250
            return E;
6251
          default:
6252
            return null;
6253
        }
6254
      }
6255
 
6256
      /**
6257
       * Find the _Fields constant that matches fieldId, throwing an exception
6258
       * if it is not found.
6259
       */
6260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6261
        _Fields fields = findByThriftId(fieldId);
6262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6263
        return fields;
6264
      }
6265
 
6266
      /**
6267
       * Find the _Fields constant that matches name, or null if its not found.
6268
       */
6269
      public static _Fields findByName(String name) {
6270
        return byName.get(name);
6271
      }
6272
 
6273
      private final short _thriftId;
6274
      private final String _fieldName;
6275
 
6276
      _Fields(short thriftId, String fieldName) {
6277
        _thriftId = thriftId;
6278
        _fieldName = fieldName;
6279
      }
6280
 
6281
      public short getThriftFieldId() {
6282
        return _thriftId;
6283
      }
6284
 
6285
      public String getFieldName() {
6286
        return _fieldName;
6287
      }
6288
    }
6289
 
6290
    // isset id assignments
6291
 
6292
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6293
    static {
6294
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6295
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6296
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6297
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
6298
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6299
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6300
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6301
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
6302
    }
6303
 
6304
    public getAllPurchases_result() {
6305
    }
6306
 
6307
    public getAllPurchases_result(
6308
      List<Purchase> success,
6309
      PurchaseServiceException e)
6310
    {
6311
      this();
6312
      this.success = success;
6313
      this.e = e;
6314
    }
6315
 
6316
    /**
6317
     * Performs a deep copy on <i>other</i>.
6318
     */
6319
    public getAllPurchases_result(getAllPurchases_result other) {
6320
      if (other.isSetSuccess()) {
6321
        List<Purchase> __this__success = new ArrayList<Purchase>();
6322
        for (Purchase other_element : other.success) {
6323
          __this__success.add(new Purchase(other_element));
6324
        }
6325
        this.success = __this__success;
6326
      }
6327
      if (other.isSetE()) {
6328
        this.e = new PurchaseServiceException(other.e);
6329
      }
6330
    }
6331
 
6332
    public getAllPurchases_result deepCopy() {
6333
      return new getAllPurchases_result(this);
6334
    }
6335
 
6336
    @Override
6337
    public void clear() {
6338
      this.success = null;
6339
      this.e = null;
6340
    }
6341
 
6342
    public int getSuccessSize() {
6343
      return (this.success == null) ? 0 : this.success.size();
6344
    }
6345
 
6346
    public java.util.Iterator<Purchase> getSuccessIterator() {
6347
      return (this.success == null) ? null : this.success.iterator();
6348
    }
6349
 
6350
    public void addToSuccess(Purchase elem) {
6351
      if (this.success == null) {
6352
        this.success = new ArrayList<Purchase>();
6353
      }
6354
      this.success.add(elem);
6355
    }
6356
 
6357
    public List<Purchase> getSuccess() {
6358
      return this.success;
6359
    }
6360
 
6361
    public void setSuccess(List<Purchase> success) {
6362
      this.success = success;
6363
    }
6364
 
6365
    public void unsetSuccess() {
6366
      this.success = null;
6367
    }
6368
 
6369
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6370
    public boolean isSetSuccess() {
6371
      return this.success != null;
6372
    }
6373
 
6374
    public void setSuccessIsSet(boolean value) {
6375
      if (!value) {
6376
        this.success = null;
6377
      }
6378
    }
6379
 
6380
    public PurchaseServiceException getE() {
6381
      return this.e;
6382
    }
6383
 
6384
    public void setE(PurchaseServiceException e) {
6385
      this.e = e;
6386
    }
6387
 
6388
    public void unsetE() {
6389
      this.e = null;
6390
    }
6391
 
6392
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6393
    public boolean isSetE() {
6394
      return this.e != null;
6395
    }
6396
 
6397
    public void setEIsSet(boolean value) {
6398
      if (!value) {
6399
        this.e = null;
6400
      }
6401
    }
6402
 
6403
    public void setFieldValue(_Fields field, Object value) {
6404
      switch (field) {
6405
      case SUCCESS:
6406
        if (value == null) {
6407
          unsetSuccess();
6408
        } else {
6409
          setSuccess((List<Purchase>)value);
6410
        }
6411
        break;
6412
 
6413
      case E:
6414
        if (value == null) {
6415
          unsetE();
6416
        } else {
6417
          setE((PurchaseServiceException)value);
6418
        }
6419
        break;
6420
 
6421
      }
6422
    }
6423
 
6424
    public Object getFieldValue(_Fields field) {
6425
      switch (field) {
6426
      case SUCCESS:
6427
        return getSuccess();
6428
 
6429
      case E:
6430
        return getE();
6431
 
6432
      }
6433
      throw new IllegalStateException();
6434
    }
6435
 
6436
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6437
    public boolean isSet(_Fields field) {
6438
      if (field == null) {
6439
        throw new IllegalArgumentException();
6440
      }
6441
 
6442
      switch (field) {
6443
      case SUCCESS:
6444
        return isSetSuccess();
6445
      case E:
6446
        return isSetE();
6447
      }
6448
      throw new IllegalStateException();
6449
    }
6450
 
6451
    @Override
6452
    public boolean equals(Object that) {
6453
      if (that == null)
6454
        return false;
6455
      if (that instanceof getAllPurchases_result)
6456
        return this.equals((getAllPurchases_result)that);
6457
      return false;
6458
    }
6459
 
6460
    public boolean equals(getAllPurchases_result that) {
6461
      if (that == null)
6462
        return false;
6463
 
6464
      boolean this_present_success = true && this.isSetSuccess();
6465
      boolean that_present_success = true && that.isSetSuccess();
6466
      if (this_present_success || that_present_success) {
6467
        if (!(this_present_success && that_present_success))
6468
          return false;
6469
        if (!this.success.equals(that.success))
6470
          return false;
6471
      }
6472
 
6473
      boolean this_present_e = true && this.isSetE();
6474
      boolean that_present_e = true && that.isSetE();
6475
      if (this_present_e || that_present_e) {
6476
        if (!(this_present_e && that_present_e))
6477
          return false;
6478
        if (!this.e.equals(that.e))
6479
          return false;
6480
      }
6481
 
6482
      return true;
6483
    }
6484
 
6485
    @Override
6486
    public int hashCode() {
6487
      return 0;
6488
    }
6489
 
6490
    public int compareTo(getAllPurchases_result other) {
6491
      if (!getClass().equals(other.getClass())) {
6492
        return getClass().getName().compareTo(other.getClass().getName());
6493
      }
6494
 
6495
      int lastComparison = 0;
6496
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
6497
 
6498
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6499
      if (lastComparison != 0) {
6500
        return lastComparison;
6501
      }
6502
      if (isSetSuccess()) {
6503
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6504
        if (lastComparison != 0) {
6505
          return lastComparison;
6506
        }
6507
      }
6508
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6509
      if (lastComparison != 0) {
6510
        return lastComparison;
6511
      }
6512
      if (isSetE()) {
6513
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6514
        if (lastComparison != 0) {
6515
          return lastComparison;
6516
        }
6517
      }
6518
      return 0;
6519
    }
6520
 
6521
    public _Fields fieldForId(int fieldId) {
6522
      return _Fields.findByThriftId(fieldId);
6523
    }
6524
 
6525
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6526
      org.apache.thrift.protocol.TField field;
6527
      iprot.readStructBegin();
6528
      while (true)
6529
      {
6530
        field = iprot.readFieldBegin();
6531
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6532
          break;
6533
        }
6534
        switch (field.id) {
6535
          case 0: // SUCCESS
6536
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6537
              {
6538
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
6539
                this.success = new ArrayList<Purchase>(_list8.size);
6540
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
6541
                {
6542
                  Purchase _elem10; // required
6543
                  _elem10 = new Purchase();
6544
                  _elem10.read(iprot);
6545
                  this.success.add(_elem10);
6546
                }
6547
                iprot.readListEnd();
6548
              }
6549
            } else { 
6550
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6551
            }
6552
            break;
6553
          case 1: // E
6554
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6555
              this.e = new PurchaseServiceException();
6556
              this.e.read(iprot);
6557
            } else { 
6558
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6559
            }
6560
            break;
6561
          default:
6562
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6563
        }
6564
        iprot.readFieldEnd();
6565
      }
6566
      iprot.readStructEnd();
6567
      validate();
6568
    }
6569
 
6570
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6571
      oprot.writeStructBegin(STRUCT_DESC);
6572
 
6573
      if (this.isSetSuccess()) {
6574
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6575
        {
6576
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6577
          for (Purchase _iter11 : this.success)
6578
          {
6579
            _iter11.write(oprot);
6580
          }
6581
          oprot.writeListEnd();
6582
        }
6583
        oprot.writeFieldEnd();
6584
      } else if (this.isSetE()) {
6585
        oprot.writeFieldBegin(E_FIELD_DESC);
6586
        this.e.write(oprot);
6587
        oprot.writeFieldEnd();
6588
      }
6589
      oprot.writeFieldStop();
6590
      oprot.writeStructEnd();
6591
    }
6592
 
6593
    @Override
6594
    public String toString() {
6595
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
6596
      boolean first = true;
6597
 
6598
      sb.append("success:");
6599
      if (this.success == null) {
6600
        sb.append("null");
6601
      } else {
6602
        sb.append(this.success);
6603
      }
6604
      first = false;
6605
      if (!first) sb.append(", ");
6606
      sb.append("e:");
6607
      if (this.e == null) {
6608
        sb.append("null");
6609
      } else {
6610
        sb.append(this.e);
6611
      }
6612
      first = false;
6613
      sb.append(")");
6614
      return sb.toString();
6615
    }
6616
 
6617
    public void validate() throws org.apache.thrift.TException {
6618
      // check for required fields
6619
    }
6620
 
6621
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6622
      try {
6623
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6624
      } catch (org.apache.thrift.TException te) {
6625
        throw new java.io.IOException(te);
6626
      }
6627
    }
6628
 
6629
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6630
      try {
6631
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6632
      } catch (org.apache.thrift.TException te) {
6633
        throw new java.io.IOException(te);
6634
      }
6635
    }
6636
 
6637
  }
6638
 
4555 mandeep.dh 6639
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
6640
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 6641
 
6642
    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);
6643
 
6644
    private long purchaseId; // required
6645
 
6646
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6647
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 6648
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 6649
 
6650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6651
 
6652
      static {
6653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6654
          byName.put(field.getFieldName(), field);
6655
        }
6656
      }
6657
 
6658
      /**
6659
       * Find the _Fields constant that matches fieldId, or null if its not found.
6660
       */
6661
      public static _Fields findByThriftId(int fieldId) {
6662
        switch(fieldId) {
6663
          case 1: // PURCHASE_ID
6664
            return PURCHASE_ID;
6665
          default:
6666
            return null;
6667
        }
6668
      }
6669
 
6670
      /**
6671
       * Find the _Fields constant that matches fieldId, throwing an exception
6672
       * if it is not found.
6673
       */
6674
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6675
        _Fields fields = findByThriftId(fieldId);
6676
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6677
        return fields;
6678
      }
6679
 
6680
      /**
6681
       * Find the _Fields constant that matches name, or null if its not found.
6682
       */
6683
      public static _Fields findByName(String name) {
6684
        return byName.get(name);
6685
      }
6686
 
6687
      private final short _thriftId;
6688
      private final String _fieldName;
6689
 
6690
      _Fields(short thriftId, String fieldName) {
6691
        _thriftId = thriftId;
6692
        _fieldName = fieldName;
6693
      }
6694
 
6695
      public short getThriftFieldId() {
6696
        return _thriftId;
6697
      }
6698
 
6699
      public String getFieldName() {
6700
        return _fieldName;
6701
      }
6702
    }
6703
 
6704
    // isset id assignments
6705
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 6706
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 6707
 
6708
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6709
    static {
6710
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6711
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6712
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6713
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 6714
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 6715
    }
6716
 
4555 mandeep.dh 6717
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 6718
    }
6719
 
4555 mandeep.dh 6720
    public getPurchaseOrderForPurchase_args(
6721
      long purchaseId)
4496 mandeep.dh 6722
    {
6723
      this();
6724
      this.purchaseId = purchaseId;
6725
      setPurchaseIdIsSet(true);
6726
    }
6727
 
6728
    /**
6729
     * Performs a deep copy on <i>other</i>.
6730
     */
4555 mandeep.dh 6731
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 6732
      __isset_bit_vector.clear();
6733
      __isset_bit_vector.or(other.__isset_bit_vector);
6734
      this.purchaseId = other.purchaseId;
6735
    }
6736
 
4555 mandeep.dh 6737
    public getPurchaseOrderForPurchase_args deepCopy() {
6738
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 6739
    }
6740
 
6741
    @Override
6742
    public void clear() {
6743
      setPurchaseIdIsSet(false);
6744
      this.purchaseId = 0;
6745
    }
6746
 
6747
    public long getPurchaseId() {
6748
      return this.purchaseId;
6749
    }
6750
 
6751
    public void setPurchaseId(long purchaseId) {
6752
      this.purchaseId = purchaseId;
6753
      setPurchaseIdIsSet(true);
6754
    }
6755
 
6756
    public void unsetPurchaseId() {
6757
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6758
    }
6759
 
6760
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6761
    public boolean isSetPurchaseId() {
6762
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6763
    }
6764
 
6765
    public void setPurchaseIdIsSet(boolean value) {
6766
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6767
    }
6768
 
6769
    public void setFieldValue(_Fields field, Object value) {
6770
      switch (field) {
6771
      case PURCHASE_ID:
6772
        if (value == null) {
6773
          unsetPurchaseId();
6774
        } else {
6775
          setPurchaseId((Long)value);
6776
        }
6777
        break;
6778
 
6779
      }
6780
    }
6781
 
6782
    public Object getFieldValue(_Fields field) {
6783
      switch (field) {
6784
      case PURCHASE_ID:
6785
        return Long.valueOf(getPurchaseId());
6786
 
6787
      }
6788
      throw new IllegalStateException();
6789
    }
6790
 
6791
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6792
    public boolean isSet(_Fields field) {
6793
      if (field == null) {
6794
        throw new IllegalArgumentException();
6795
      }
6796
 
6797
      switch (field) {
6798
      case PURCHASE_ID:
6799
        return isSetPurchaseId();
6800
      }
6801
      throw new IllegalStateException();
6802
    }
6803
 
6804
    @Override
6805
    public boolean equals(Object that) {
6806
      if (that == null)
6807
        return false;
4555 mandeep.dh 6808
      if (that instanceof getPurchaseOrderForPurchase_args)
6809
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 6810
      return false;
6811
    }
6812
 
4555 mandeep.dh 6813
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 6814
      if (that == null)
6815
        return false;
6816
 
6817
      boolean this_present_purchaseId = true;
6818
      boolean that_present_purchaseId = true;
6819
      if (this_present_purchaseId || that_present_purchaseId) {
6820
        if (!(this_present_purchaseId && that_present_purchaseId))
6821
          return false;
6822
        if (this.purchaseId != that.purchaseId)
6823
          return false;
6824
      }
6825
 
6826
      return true;
6827
    }
6828
 
6829
    @Override
6830
    public int hashCode() {
6831
      return 0;
6832
    }
6833
 
4555 mandeep.dh 6834
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 6835
      if (!getClass().equals(other.getClass())) {
6836
        return getClass().getName().compareTo(other.getClass().getName());
6837
      }
6838
 
6839
      int lastComparison = 0;
4555 mandeep.dh 6840
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 6841
 
6842
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6843
      if (lastComparison != 0) {
6844
        return lastComparison;
6845
      }
6846
      if (isSetPurchaseId()) {
6847
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6848
        if (lastComparison != 0) {
6849
          return lastComparison;
6850
        }
6851
      }
6852
      return 0;
6853
    }
6854
 
6855
    public _Fields fieldForId(int fieldId) {
6856
      return _Fields.findByThriftId(fieldId);
6857
    }
6858
 
6859
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6860
      org.apache.thrift.protocol.TField field;
6861
      iprot.readStructBegin();
6862
      while (true)
6863
      {
6864
        field = iprot.readFieldBegin();
6865
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6866
          break;
6867
        }
6868
        switch (field.id) {
6869
          case 1: // PURCHASE_ID
6870
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6871
              this.purchaseId = iprot.readI64();
6872
              setPurchaseIdIsSet(true);
6873
            } else { 
6874
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6875
            }
6876
            break;
6877
          default:
6878
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6879
        }
6880
        iprot.readFieldEnd();
6881
      }
6882
      iprot.readStructEnd();
6883
      validate();
6884
    }
6885
 
6886
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6887
      validate();
6888
 
6889
      oprot.writeStructBegin(STRUCT_DESC);
6890
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6891
      oprot.writeI64(this.purchaseId);
6892
      oprot.writeFieldEnd();
6893
      oprot.writeFieldStop();
6894
      oprot.writeStructEnd();
6895
    }
6896
 
6897
    @Override
6898
    public String toString() {
4555 mandeep.dh 6899
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 6900
      boolean first = true;
6901
 
6902
      sb.append("purchaseId:");
6903
      sb.append(this.purchaseId);
6904
      first = false;
6905
      sb.append(")");
6906
      return sb.toString();
6907
    }
6908
 
6909
    public void validate() throws org.apache.thrift.TException {
6910
      // check for required fields
6911
    }
6912
 
6913
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6914
      try {
6915
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6916
      } catch (org.apache.thrift.TException te) {
6917
        throw new java.io.IOException(te);
6918
      }
6919
    }
6920
 
6921
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6922
      try {
4555 mandeep.dh 6923
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6924
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 6925
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6926
      } catch (org.apache.thrift.TException te) {
6927
        throw new java.io.IOException(te);
6928
      }
6929
    }
6930
 
6931
  }
6932
 
4555 mandeep.dh 6933
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6934
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 6935
 
4555 mandeep.dh 6936
    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 6937
 
4555 mandeep.dh 6938
    private PurchaseOrder success; // required
4496 mandeep.dh 6939
 
6940
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6941
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6942
      SUCCESS((short)0, "success");
6943
 
6944
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6945
 
6946
      static {
6947
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6948
          byName.put(field.getFieldName(), field);
6949
        }
6950
      }
6951
 
6952
      /**
6953
       * Find the _Fields constant that matches fieldId, or null if its not found.
6954
       */
6955
      public static _Fields findByThriftId(int fieldId) {
6956
        switch(fieldId) {
6957
          case 0: // SUCCESS
6958
            return SUCCESS;
6959
          default:
6960
            return null;
6961
        }
6962
      }
6963
 
6964
      /**
6965
       * Find the _Fields constant that matches fieldId, throwing an exception
6966
       * if it is not found.
6967
       */
6968
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6969
        _Fields fields = findByThriftId(fieldId);
6970
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6971
        return fields;
6972
      }
6973
 
6974
      /**
6975
       * Find the _Fields constant that matches name, or null if its not found.
6976
       */
6977
      public static _Fields findByName(String name) {
6978
        return byName.get(name);
6979
      }
6980
 
6981
      private final short _thriftId;
6982
      private final String _fieldName;
6983
 
6984
      _Fields(short thriftId, String fieldName) {
6985
        _thriftId = thriftId;
6986
        _fieldName = fieldName;
6987
      }
6988
 
6989
      public short getThriftFieldId() {
6990
        return _thriftId;
6991
      }
6992
 
6993
      public String getFieldName() {
6994
        return _fieldName;
6995
      }
6996
    }
6997
 
6998
    // isset id assignments
6999
 
7000
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7001
    static {
7002
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7003
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 7004
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 7005
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 7006
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 7007
    }
7008
 
4555 mandeep.dh 7009
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 7010
    }
7011
 
4555 mandeep.dh 7012
    public getPurchaseOrderForPurchase_result(
7013
      PurchaseOrder success)
4496 mandeep.dh 7014
    {
7015
      this();
7016
      this.success = success;
7017
    }
7018
 
7019
    /**
7020
     * Performs a deep copy on <i>other</i>.
7021
     */
4555 mandeep.dh 7022
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
7023
      if (other.isSetSuccess()) {
7024
        this.success = new PurchaseOrder(other.success);
7025
      }
4496 mandeep.dh 7026
    }
7027
 
4555 mandeep.dh 7028
    public getPurchaseOrderForPurchase_result deepCopy() {
7029
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 7030
    }
7031
 
7032
    @Override
7033
    public void clear() {
4555 mandeep.dh 7034
      this.success = null;
4496 mandeep.dh 7035
    }
7036
 
4555 mandeep.dh 7037
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 7038
      return this.success;
7039
    }
7040
 
4555 mandeep.dh 7041
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 7042
      this.success = success;
7043
    }
7044
 
7045
    public void unsetSuccess() {
4555 mandeep.dh 7046
      this.success = null;
4496 mandeep.dh 7047
    }
7048
 
7049
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7050
    public boolean isSetSuccess() {
4555 mandeep.dh 7051
      return this.success != null;
4496 mandeep.dh 7052
    }
7053
 
7054
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 7055
      if (!value) {
7056
        this.success = null;
7057
      }
4496 mandeep.dh 7058
    }
7059
 
7060
    public void setFieldValue(_Fields field, Object value) {
7061
      switch (field) {
7062
      case SUCCESS:
7063
        if (value == null) {
7064
          unsetSuccess();
7065
        } else {
4555 mandeep.dh 7066
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 7067
        }
7068
        break;
7069
 
7070
      }
7071
    }
7072
 
7073
    public Object getFieldValue(_Fields field) {
7074
      switch (field) {
7075
      case SUCCESS:
4555 mandeep.dh 7076
        return getSuccess();
4496 mandeep.dh 7077
 
7078
      }
7079
      throw new IllegalStateException();
7080
    }
7081
 
7082
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7083
    public boolean isSet(_Fields field) {
7084
      if (field == null) {
7085
        throw new IllegalArgumentException();
7086
      }
7087
 
7088
      switch (field) {
7089
      case SUCCESS:
7090
        return isSetSuccess();
7091
      }
7092
      throw new IllegalStateException();
7093
    }
7094
 
7095
    @Override
7096
    public boolean equals(Object that) {
7097
      if (that == null)
7098
        return false;
4555 mandeep.dh 7099
      if (that instanceof getPurchaseOrderForPurchase_result)
7100
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 7101
      return false;
7102
    }
7103
 
4555 mandeep.dh 7104
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 7105
      if (that == null)
7106
        return false;
7107
 
4555 mandeep.dh 7108
      boolean this_present_success = true && this.isSetSuccess();
7109
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 7110
      if (this_present_success || that_present_success) {
7111
        if (!(this_present_success && that_present_success))
7112
          return false;
4555 mandeep.dh 7113
        if (!this.success.equals(that.success))
4496 mandeep.dh 7114
          return false;
7115
      }
7116
 
7117
      return true;
7118
    }
7119
 
7120
    @Override
7121
    public int hashCode() {
7122
      return 0;
7123
    }
7124
 
4555 mandeep.dh 7125
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 7126
      if (!getClass().equals(other.getClass())) {
7127
        return getClass().getName().compareTo(other.getClass().getName());
7128
      }
7129
 
7130
      int lastComparison = 0;
4555 mandeep.dh 7131
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 7132
 
7133
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7134
      if (lastComparison != 0) {
7135
        return lastComparison;
7136
      }
7137
      if (isSetSuccess()) {
7138
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7139
        if (lastComparison != 0) {
7140
          return lastComparison;
7141
        }
7142
      }
7143
      return 0;
7144
    }
7145
 
7146
    public _Fields fieldForId(int fieldId) {
7147
      return _Fields.findByThriftId(fieldId);
7148
    }
7149
 
7150
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7151
      org.apache.thrift.protocol.TField field;
7152
      iprot.readStructBegin();
7153
      while (true)
7154
      {
7155
        field = iprot.readFieldBegin();
7156
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7157
          break;
7158
        }
7159
        switch (field.id) {
7160
          case 0: // SUCCESS
4555 mandeep.dh 7161
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7162
              this.success = new PurchaseOrder();
7163
              this.success.read(iprot);
4496 mandeep.dh 7164
            } else { 
7165
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7166
            }
7167
            break;
7168
          default:
7169
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7170
        }
7171
        iprot.readFieldEnd();
7172
      }
7173
      iprot.readStructEnd();
7174
      validate();
7175
    }
7176
 
7177
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7178
      oprot.writeStructBegin(STRUCT_DESC);
7179
 
7180
      if (this.isSetSuccess()) {
7181
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 7182
        this.success.write(oprot);
4496 mandeep.dh 7183
        oprot.writeFieldEnd();
7184
      }
7185
      oprot.writeFieldStop();
7186
      oprot.writeStructEnd();
7187
    }
7188
 
7189
    @Override
7190
    public String toString() {
4555 mandeep.dh 7191
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 7192
      boolean first = true;
7193
 
7194
      sb.append("success:");
4555 mandeep.dh 7195
      if (this.success == null) {
7196
        sb.append("null");
7197
      } else {
7198
        sb.append(this.success);
7199
      }
4496 mandeep.dh 7200
      first = false;
7201
      sb.append(")");
7202
      return sb.toString();
7203
    }
7204
 
7205
    public void validate() throws org.apache.thrift.TException {
7206
      // check for required fields
7207
    }
7208
 
7209
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7210
      try {
7211
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7212
      } catch (org.apache.thrift.TException te) {
7213
        throw new java.io.IOException(te);
7214
      }
7215
    }
7216
 
7217
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7218
      try {
7219
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7220
      } catch (org.apache.thrift.TException te) {
7221
        throw new java.io.IOException(te);
7222
      }
7223
    }
7224
 
7225
  }
7226
 
4754 mandeep.dh 7227
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
7228
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
7229
 
7230
    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);
7231
 
7232
    private long warehouseId; // required
7233
 
7234
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7235
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7236
      WAREHOUSE_ID((short)1, "warehouseId");
7237
 
7238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7239
 
7240
      static {
7241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7242
          byName.put(field.getFieldName(), field);
7243
        }
7244
      }
7245
 
7246
      /**
7247
       * Find the _Fields constant that matches fieldId, or null if its not found.
7248
       */
7249
      public static _Fields findByThriftId(int fieldId) {
7250
        switch(fieldId) {
7251
          case 1: // WAREHOUSE_ID
7252
            return WAREHOUSE_ID;
7253
          default:
7254
            return null;
7255
        }
7256
      }
7257
 
7258
      /**
7259
       * Find the _Fields constant that matches fieldId, throwing an exception
7260
       * if it is not found.
7261
       */
7262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7263
        _Fields fields = findByThriftId(fieldId);
7264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7265
        return fields;
7266
      }
7267
 
7268
      /**
7269
       * Find the _Fields constant that matches name, or null if its not found.
7270
       */
7271
      public static _Fields findByName(String name) {
7272
        return byName.get(name);
7273
      }
7274
 
7275
      private final short _thriftId;
7276
      private final String _fieldName;
7277
 
7278
      _Fields(short thriftId, String fieldName) {
7279
        _thriftId = thriftId;
7280
        _fieldName = fieldName;
7281
      }
7282
 
7283
      public short getThriftFieldId() {
7284
        return _thriftId;
7285
      }
7286
 
7287
      public String getFieldName() {
7288
        return _fieldName;
7289
      }
7290
    }
7291
 
7292
    // isset id assignments
7293
    private static final int __WAREHOUSEID_ISSET_ID = 0;
7294
    private BitSet __isset_bit_vector = new BitSet(1);
7295
 
7296
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7297
    static {
7298
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7299
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7300
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7301
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7302
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
7303
    }
7304
 
7305
    public getPendingPurchaseOrders_args() {
7306
    }
7307
 
7308
    public getPendingPurchaseOrders_args(
7309
      long warehouseId)
7310
    {
7311
      this();
7312
      this.warehouseId = warehouseId;
7313
      setWarehouseIdIsSet(true);
7314
    }
7315
 
7316
    /**
7317
     * Performs a deep copy on <i>other</i>.
7318
     */
7319
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
7320
      __isset_bit_vector.clear();
7321
      __isset_bit_vector.or(other.__isset_bit_vector);
7322
      this.warehouseId = other.warehouseId;
7323
    }
7324
 
7325
    public getPendingPurchaseOrders_args deepCopy() {
7326
      return new getPendingPurchaseOrders_args(this);
7327
    }
7328
 
7329
    @Override
7330
    public void clear() {
7331
      setWarehouseIdIsSet(false);
7332
      this.warehouseId = 0;
7333
    }
7334
 
7335
    public long getWarehouseId() {
7336
      return this.warehouseId;
7337
    }
7338
 
7339
    public void setWarehouseId(long warehouseId) {
7340
      this.warehouseId = warehouseId;
7341
      setWarehouseIdIsSet(true);
7342
    }
7343
 
7344
    public void unsetWarehouseId() {
7345
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
7346
    }
7347
 
7348
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
7349
    public boolean isSetWarehouseId() {
7350
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
7351
    }
7352
 
7353
    public void setWarehouseIdIsSet(boolean value) {
7354
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
7355
    }
7356
 
7357
    public void setFieldValue(_Fields field, Object value) {
7358
      switch (field) {
7359
      case WAREHOUSE_ID:
7360
        if (value == null) {
7361
          unsetWarehouseId();
7362
        } else {
7363
          setWarehouseId((Long)value);
7364
        }
7365
        break;
7366
 
7367
      }
7368
    }
7369
 
7370
    public Object getFieldValue(_Fields field) {
7371
      switch (field) {
7372
      case WAREHOUSE_ID:
7373
        return Long.valueOf(getWarehouseId());
7374
 
7375
      }
7376
      throw new IllegalStateException();
7377
    }
7378
 
7379
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7380
    public boolean isSet(_Fields field) {
7381
      if (field == null) {
7382
        throw new IllegalArgumentException();
7383
      }
7384
 
7385
      switch (field) {
7386
      case WAREHOUSE_ID:
7387
        return isSetWarehouseId();
7388
      }
7389
      throw new IllegalStateException();
7390
    }
7391
 
7392
    @Override
7393
    public boolean equals(Object that) {
7394
      if (that == null)
7395
        return false;
7396
      if (that instanceof getPendingPurchaseOrders_args)
7397
        return this.equals((getPendingPurchaseOrders_args)that);
7398
      return false;
7399
    }
7400
 
7401
    public boolean equals(getPendingPurchaseOrders_args that) {
7402
      if (that == null)
7403
        return false;
7404
 
7405
      boolean this_present_warehouseId = true;
7406
      boolean that_present_warehouseId = true;
7407
      if (this_present_warehouseId || that_present_warehouseId) {
7408
        if (!(this_present_warehouseId && that_present_warehouseId))
7409
          return false;
7410
        if (this.warehouseId != that.warehouseId)
7411
          return false;
7412
      }
7413
 
7414
      return true;
7415
    }
7416
 
7417
    @Override
7418
    public int hashCode() {
7419
      return 0;
7420
    }
7421
 
7422
    public int compareTo(getPendingPurchaseOrders_args other) {
7423
      if (!getClass().equals(other.getClass())) {
7424
        return getClass().getName().compareTo(other.getClass().getName());
7425
      }
7426
 
7427
      int lastComparison = 0;
7428
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
7429
 
7430
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
7431
      if (lastComparison != 0) {
7432
        return lastComparison;
7433
      }
7434
      if (isSetWarehouseId()) {
7435
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
7436
        if (lastComparison != 0) {
7437
          return lastComparison;
7438
        }
7439
      }
7440
      return 0;
7441
    }
7442
 
7443
    public _Fields fieldForId(int fieldId) {
7444
      return _Fields.findByThriftId(fieldId);
7445
    }
7446
 
7447
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7448
      org.apache.thrift.protocol.TField field;
7449
      iprot.readStructBegin();
7450
      while (true)
7451
      {
7452
        field = iprot.readFieldBegin();
7453
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7454
          break;
7455
        }
7456
        switch (field.id) {
7457
          case 1: // WAREHOUSE_ID
7458
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7459
              this.warehouseId = iprot.readI64();
7460
              setWarehouseIdIsSet(true);
7461
            } else { 
7462
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7463
            }
7464
            break;
7465
          default:
7466
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7467
        }
7468
        iprot.readFieldEnd();
7469
      }
7470
      iprot.readStructEnd();
7471
      validate();
7472
    }
7473
 
7474
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7475
      validate();
7476
 
7477
      oprot.writeStructBegin(STRUCT_DESC);
7478
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7479
      oprot.writeI64(this.warehouseId);
7480
      oprot.writeFieldEnd();
7481
      oprot.writeFieldStop();
7482
      oprot.writeStructEnd();
7483
    }
7484
 
7485
    @Override
7486
    public String toString() {
7487
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
7488
      boolean first = true;
7489
 
7490
      sb.append("warehouseId:");
7491
      sb.append(this.warehouseId);
7492
      first = false;
7493
      sb.append(")");
7494
      return sb.toString();
7495
    }
7496
 
7497
    public void validate() throws org.apache.thrift.TException {
7498
      // check for required fields
7499
    }
7500
 
7501
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7502
      try {
7503
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7504
      } catch (org.apache.thrift.TException te) {
7505
        throw new java.io.IOException(te);
7506
      }
7507
    }
7508
 
7509
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7510
      try {
7511
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7512
        __isset_bit_vector = new BitSet(1);
7513
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7514
      } catch (org.apache.thrift.TException te) {
7515
        throw new java.io.IOException(te);
7516
      }
7517
    }
7518
 
7519
  }
7520
 
7521
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
7522
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
7523
 
7524
    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);
7525
    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);
7526
 
7527
    private List<PurchaseOrder> success; // required
7528
    private PurchaseServiceException e; // required
7529
 
7530
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7531
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7532
      SUCCESS((short)0, "success"),
7533
      E((short)1, "e");
7534
 
7535
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7536
 
7537
      static {
7538
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7539
          byName.put(field.getFieldName(), field);
7540
        }
7541
      }
7542
 
7543
      /**
7544
       * Find the _Fields constant that matches fieldId, or null if its not found.
7545
       */
7546
      public static _Fields findByThriftId(int fieldId) {
7547
        switch(fieldId) {
7548
          case 0: // SUCCESS
7549
            return SUCCESS;
7550
          case 1: // E
7551
            return E;
7552
          default:
7553
            return null;
7554
        }
7555
      }
7556
 
7557
      /**
7558
       * Find the _Fields constant that matches fieldId, throwing an exception
7559
       * if it is not found.
7560
       */
7561
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7562
        _Fields fields = findByThriftId(fieldId);
7563
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7564
        return fields;
7565
      }
7566
 
7567
      /**
7568
       * Find the _Fields constant that matches name, or null if its not found.
7569
       */
7570
      public static _Fields findByName(String name) {
7571
        return byName.get(name);
7572
      }
7573
 
7574
      private final short _thriftId;
7575
      private final String _fieldName;
7576
 
7577
      _Fields(short thriftId, String fieldName) {
7578
        _thriftId = thriftId;
7579
        _fieldName = fieldName;
7580
      }
7581
 
7582
      public short getThriftFieldId() {
7583
        return _thriftId;
7584
      }
7585
 
7586
      public String getFieldName() {
7587
        return _fieldName;
7588
      }
7589
    }
7590
 
7591
    // isset id assignments
7592
 
7593
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7594
    static {
7595
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7596
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7597
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7598
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
7599
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7600
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7601
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7602
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
7603
    }
7604
 
7605
    public getPendingPurchaseOrders_result() {
7606
    }
7607
 
7608
    public getPendingPurchaseOrders_result(
7609
      List<PurchaseOrder> success,
7610
      PurchaseServiceException e)
7611
    {
7612
      this();
7613
      this.success = success;
7614
      this.e = e;
7615
    }
7616
 
7617
    /**
7618
     * Performs a deep copy on <i>other</i>.
7619
     */
7620
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
7621
      if (other.isSetSuccess()) {
7622
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
7623
        for (PurchaseOrder other_element : other.success) {
7624
          __this__success.add(new PurchaseOrder(other_element));
7625
        }
7626
        this.success = __this__success;
7627
      }
7628
      if (other.isSetE()) {
7629
        this.e = new PurchaseServiceException(other.e);
7630
      }
7631
    }
7632
 
7633
    public getPendingPurchaseOrders_result deepCopy() {
7634
      return new getPendingPurchaseOrders_result(this);
7635
    }
7636
 
7637
    @Override
7638
    public void clear() {
7639
      this.success = null;
7640
      this.e = null;
7641
    }
7642
 
7643
    public int getSuccessSize() {
7644
      return (this.success == null) ? 0 : this.success.size();
7645
    }
7646
 
7647
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
7648
      return (this.success == null) ? null : this.success.iterator();
7649
    }
7650
 
7651
    public void addToSuccess(PurchaseOrder elem) {
7652
      if (this.success == null) {
7653
        this.success = new ArrayList<PurchaseOrder>();
7654
      }
7655
      this.success.add(elem);
7656
    }
7657
 
7658
    public List<PurchaseOrder> getSuccess() {
7659
      return this.success;
7660
    }
7661
 
7662
    public void setSuccess(List<PurchaseOrder> success) {
7663
      this.success = success;
7664
    }
7665
 
7666
    public void unsetSuccess() {
7667
      this.success = null;
7668
    }
7669
 
7670
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7671
    public boolean isSetSuccess() {
7672
      return this.success != null;
7673
    }
7674
 
7675
    public void setSuccessIsSet(boolean value) {
7676
      if (!value) {
7677
        this.success = null;
7678
      }
7679
    }
7680
 
7681
    public PurchaseServiceException getE() {
7682
      return this.e;
7683
    }
7684
 
7685
    public void setE(PurchaseServiceException e) {
7686
      this.e = e;
7687
    }
7688
 
7689
    public void unsetE() {
7690
      this.e = null;
7691
    }
7692
 
7693
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7694
    public boolean isSetE() {
7695
      return this.e != null;
7696
    }
7697
 
7698
    public void setEIsSet(boolean value) {
7699
      if (!value) {
7700
        this.e = null;
7701
      }
7702
    }
7703
 
7704
    public void setFieldValue(_Fields field, Object value) {
7705
      switch (field) {
7706
      case SUCCESS:
7707
        if (value == null) {
7708
          unsetSuccess();
7709
        } else {
7710
          setSuccess((List<PurchaseOrder>)value);
7711
        }
7712
        break;
7713
 
7714
      case E:
7715
        if (value == null) {
7716
          unsetE();
7717
        } else {
7718
          setE((PurchaseServiceException)value);
7719
        }
7720
        break;
7721
 
7722
      }
7723
    }
7724
 
7725
    public Object getFieldValue(_Fields field) {
7726
      switch (field) {
7727
      case SUCCESS:
7728
        return getSuccess();
7729
 
7730
      case E:
7731
        return getE();
7732
 
7733
      }
7734
      throw new IllegalStateException();
7735
    }
7736
 
7737
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7738
    public boolean isSet(_Fields field) {
7739
      if (field == null) {
7740
        throw new IllegalArgumentException();
7741
      }
7742
 
7743
      switch (field) {
7744
      case SUCCESS:
7745
        return isSetSuccess();
7746
      case E:
7747
        return isSetE();
7748
      }
7749
      throw new IllegalStateException();
7750
    }
7751
 
7752
    @Override
7753
    public boolean equals(Object that) {
7754
      if (that == null)
7755
        return false;
7756
      if (that instanceof getPendingPurchaseOrders_result)
7757
        return this.equals((getPendingPurchaseOrders_result)that);
7758
      return false;
7759
    }
7760
 
7761
    public boolean equals(getPendingPurchaseOrders_result that) {
7762
      if (that == null)
7763
        return false;
7764
 
7765
      boolean this_present_success = true && this.isSetSuccess();
7766
      boolean that_present_success = true && that.isSetSuccess();
7767
      if (this_present_success || that_present_success) {
7768
        if (!(this_present_success && that_present_success))
7769
          return false;
7770
        if (!this.success.equals(that.success))
7771
          return false;
7772
      }
7773
 
7774
      boolean this_present_e = true && this.isSetE();
7775
      boolean that_present_e = true && that.isSetE();
7776
      if (this_present_e || that_present_e) {
7777
        if (!(this_present_e && that_present_e))
7778
          return false;
7779
        if (!this.e.equals(that.e))
7780
          return false;
7781
      }
7782
 
7783
      return true;
7784
    }
7785
 
7786
    @Override
7787
    public int hashCode() {
7788
      return 0;
7789
    }
7790
 
7791
    public int compareTo(getPendingPurchaseOrders_result other) {
7792
      if (!getClass().equals(other.getClass())) {
7793
        return getClass().getName().compareTo(other.getClass().getName());
7794
      }
7795
 
7796
      int lastComparison = 0;
7797
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
7798
 
7799
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7800
      if (lastComparison != 0) {
7801
        return lastComparison;
7802
      }
7803
      if (isSetSuccess()) {
7804
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7805
        if (lastComparison != 0) {
7806
          return lastComparison;
7807
        }
7808
      }
7809
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7810
      if (lastComparison != 0) {
7811
        return lastComparison;
7812
      }
7813
      if (isSetE()) {
7814
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7815
        if (lastComparison != 0) {
7816
          return lastComparison;
7817
        }
7818
      }
7819
      return 0;
7820
    }
7821
 
7822
    public _Fields fieldForId(int fieldId) {
7823
      return _Fields.findByThriftId(fieldId);
7824
    }
7825
 
7826
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7827
      org.apache.thrift.protocol.TField field;
7828
      iprot.readStructBegin();
7829
      while (true)
7830
      {
7831
        field = iprot.readFieldBegin();
7832
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7833
          break;
7834
        }
7835
        switch (field.id) {
7836
          case 0: // SUCCESS
7837
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7838
              {
7839
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
7840
                this.success = new ArrayList<PurchaseOrder>(_list12.size);
7841
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
7842
                {
7843
                  PurchaseOrder _elem14; // required
7844
                  _elem14 = new PurchaseOrder();
7845
                  _elem14.read(iprot);
7846
                  this.success.add(_elem14);
7847
                }
7848
                iprot.readListEnd();
7849
              }
7850
            } else { 
7851
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7852
            }
7853
            break;
7854
          case 1: // E
7855
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7856
              this.e = new PurchaseServiceException();
7857
              this.e.read(iprot);
7858
            } else { 
7859
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7860
            }
7861
            break;
7862
          default:
7863
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7864
        }
7865
        iprot.readFieldEnd();
7866
      }
7867
      iprot.readStructEnd();
7868
      validate();
7869
    }
7870
 
7871
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7872
      oprot.writeStructBegin(STRUCT_DESC);
7873
 
7874
      if (this.isSetSuccess()) {
7875
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7876
        {
7877
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7878
          for (PurchaseOrder _iter15 : this.success)
7879
          {
7880
            _iter15.write(oprot);
7881
          }
7882
          oprot.writeListEnd();
7883
        }
7884
        oprot.writeFieldEnd();
7885
      } else if (this.isSetE()) {
7886
        oprot.writeFieldBegin(E_FIELD_DESC);
7887
        this.e.write(oprot);
7888
        oprot.writeFieldEnd();
7889
      }
7890
      oprot.writeFieldStop();
7891
      oprot.writeStructEnd();
7892
    }
7893
 
7894
    @Override
7895
    public String toString() {
7896
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
7897
      boolean first = true;
7898
 
7899
      sb.append("success:");
7900
      if (this.success == null) {
7901
        sb.append("null");
7902
      } else {
7903
        sb.append(this.success);
7904
      }
7905
      first = false;
7906
      if (!first) sb.append(", ");
7907
      sb.append("e:");
7908
      if (this.e == null) {
7909
        sb.append("null");
7910
      } else {
7911
        sb.append(this.e);
7912
      }
7913
      first = false;
7914
      sb.append(")");
7915
      return sb.toString();
7916
    }
7917
 
7918
    public void validate() throws org.apache.thrift.TException {
7919
      // check for required fields
7920
    }
7921
 
7922
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7923
      try {
7924
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7925
      } catch (org.apache.thrift.TException te) {
7926
        throw new java.io.IOException(te);
7927
      }
7928
    }
7929
 
7930
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7931
      try {
7932
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7933
      } catch (org.apache.thrift.TException te) {
7934
        throw new java.io.IOException(te);
7935
      }
7936
    }
7937
 
7938
  }
7939
 
7940
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
7941
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
7942
 
7943
 
7944
 
7945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7946
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7947
;
7948
 
7949
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7950
 
7951
      static {
7952
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7953
          byName.put(field.getFieldName(), field);
7954
        }
7955
      }
7956
 
7957
      /**
7958
       * Find the _Fields constant that matches fieldId, or null if its not found.
7959
       */
7960
      public static _Fields findByThriftId(int fieldId) {
7961
        switch(fieldId) {
7962
          default:
7963
            return null;
7964
        }
7965
      }
7966
 
7967
      /**
7968
       * Find the _Fields constant that matches fieldId, throwing an exception
7969
       * if it is not found.
7970
       */
7971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7972
        _Fields fields = findByThriftId(fieldId);
7973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7974
        return fields;
7975
      }
7976
 
7977
      /**
7978
       * Find the _Fields constant that matches name, or null if its not found.
7979
       */
7980
      public static _Fields findByName(String name) {
7981
        return byName.get(name);
7982
      }
7983
 
7984
      private final short _thriftId;
7985
      private final String _fieldName;
7986
 
7987
      _Fields(short thriftId, String fieldName) {
7988
        _thriftId = thriftId;
7989
        _fieldName = fieldName;
7990
      }
7991
 
7992
      public short getThriftFieldId() {
7993
        return _thriftId;
7994
      }
7995
 
7996
      public String getFieldName() {
7997
        return _fieldName;
7998
      }
7999
    }
8000
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8001
    static {
8002
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8003
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8004
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
8005
    }
8006
 
8007
    public getSuppliers_args() {
8008
    }
8009
 
8010
    /**
8011
     * Performs a deep copy on <i>other</i>.
8012
     */
8013
    public getSuppliers_args(getSuppliers_args other) {
8014
    }
8015
 
8016
    public getSuppliers_args deepCopy() {
8017
      return new getSuppliers_args(this);
8018
    }
8019
 
8020
    @Override
8021
    public void clear() {
8022
    }
8023
 
8024
    public void setFieldValue(_Fields field, Object value) {
8025
      switch (field) {
8026
      }
8027
    }
8028
 
8029
    public Object getFieldValue(_Fields field) {
8030
      switch (field) {
8031
      }
8032
      throw new IllegalStateException();
8033
    }
8034
 
8035
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8036
    public boolean isSet(_Fields field) {
8037
      if (field == null) {
8038
        throw new IllegalArgumentException();
8039
      }
8040
 
8041
      switch (field) {
8042
      }
8043
      throw new IllegalStateException();
8044
    }
8045
 
8046
    @Override
8047
    public boolean equals(Object that) {
8048
      if (that == null)
8049
        return false;
8050
      if (that instanceof getSuppliers_args)
8051
        return this.equals((getSuppliers_args)that);
8052
      return false;
8053
    }
8054
 
8055
    public boolean equals(getSuppliers_args that) {
8056
      if (that == null)
8057
        return false;
8058
 
8059
      return true;
8060
    }
8061
 
8062
    @Override
8063
    public int hashCode() {
8064
      return 0;
8065
    }
8066
 
8067
    public int compareTo(getSuppliers_args other) {
8068
      if (!getClass().equals(other.getClass())) {
8069
        return getClass().getName().compareTo(other.getClass().getName());
8070
      }
8071
 
8072
      int lastComparison = 0;
8073
      getSuppliers_args typedOther = (getSuppliers_args)other;
8074
 
8075
      return 0;
8076
    }
8077
 
8078
    public _Fields fieldForId(int fieldId) {
8079
      return _Fields.findByThriftId(fieldId);
8080
    }
8081
 
8082
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8083
      org.apache.thrift.protocol.TField field;
8084
      iprot.readStructBegin();
8085
      while (true)
8086
      {
8087
        field = iprot.readFieldBegin();
8088
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8089
          break;
8090
        }
8091
        switch (field.id) {
8092
          default:
8093
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8094
        }
8095
        iprot.readFieldEnd();
8096
      }
8097
      iprot.readStructEnd();
8098
      validate();
8099
    }
8100
 
8101
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8102
      validate();
8103
 
8104
      oprot.writeStructBegin(STRUCT_DESC);
8105
      oprot.writeFieldStop();
8106
      oprot.writeStructEnd();
8107
    }
8108
 
8109
    @Override
8110
    public String toString() {
8111
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
8112
      boolean first = true;
8113
 
8114
      sb.append(")");
8115
      return sb.toString();
8116
    }
8117
 
8118
    public void validate() throws org.apache.thrift.TException {
8119
      // check for required fields
8120
    }
8121
 
8122
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8123
      try {
8124
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8125
      } catch (org.apache.thrift.TException te) {
8126
        throw new java.io.IOException(te);
8127
      }
8128
    }
8129
 
8130
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8131
      try {
8132
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8133
      } catch (org.apache.thrift.TException te) {
8134
        throw new java.io.IOException(te);
8135
      }
8136
    }
8137
 
8138
  }
8139
 
8140
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
8141
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
8142
 
8143
    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);
8144
    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);
8145
 
8146
    private List<Supplier> success; // required
8147
    private PurchaseServiceException e; // required
8148
 
8149
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8150
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8151
      SUCCESS((short)0, "success"),
8152
      E((short)1, "e");
8153
 
8154
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8155
 
8156
      static {
8157
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8158
          byName.put(field.getFieldName(), field);
8159
        }
8160
      }
8161
 
8162
      /**
8163
       * Find the _Fields constant that matches fieldId, or null if its not found.
8164
       */
8165
      public static _Fields findByThriftId(int fieldId) {
8166
        switch(fieldId) {
8167
          case 0: // SUCCESS
8168
            return SUCCESS;
8169
          case 1: // E
8170
            return E;
8171
          default:
8172
            return null;
8173
        }
8174
      }
8175
 
8176
      /**
8177
       * Find the _Fields constant that matches fieldId, throwing an exception
8178
       * if it is not found.
8179
       */
8180
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8181
        _Fields fields = findByThriftId(fieldId);
8182
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8183
        return fields;
8184
      }
8185
 
8186
      /**
8187
       * Find the _Fields constant that matches name, or null if its not found.
8188
       */
8189
      public static _Fields findByName(String name) {
8190
        return byName.get(name);
8191
      }
8192
 
8193
      private final short _thriftId;
8194
      private final String _fieldName;
8195
 
8196
      _Fields(short thriftId, String fieldName) {
8197
        _thriftId = thriftId;
8198
        _fieldName = fieldName;
8199
      }
8200
 
8201
      public short getThriftFieldId() {
8202
        return _thriftId;
8203
      }
8204
 
8205
      public String getFieldName() {
8206
        return _fieldName;
8207
      }
8208
    }
8209
 
8210
    // isset id assignments
8211
 
8212
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8213
    static {
8214
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8215
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8216
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8217
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
8218
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8219
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8220
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8221
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
8222
    }
8223
 
8224
    public getSuppliers_result() {
8225
    }
8226
 
8227
    public getSuppliers_result(
8228
      List<Supplier> success,
8229
      PurchaseServiceException e)
8230
    {
8231
      this();
8232
      this.success = success;
8233
      this.e = e;
8234
    }
8235
 
8236
    /**
8237
     * Performs a deep copy on <i>other</i>.
8238
     */
8239
    public getSuppliers_result(getSuppliers_result other) {
8240
      if (other.isSetSuccess()) {
8241
        List<Supplier> __this__success = new ArrayList<Supplier>();
8242
        for (Supplier other_element : other.success) {
8243
          __this__success.add(new Supplier(other_element));
8244
        }
8245
        this.success = __this__success;
8246
      }
8247
      if (other.isSetE()) {
8248
        this.e = new PurchaseServiceException(other.e);
8249
      }
8250
    }
8251
 
8252
    public getSuppliers_result deepCopy() {
8253
      return new getSuppliers_result(this);
8254
    }
8255
 
8256
    @Override
8257
    public void clear() {
8258
      this.success = null;
8259
      this.e = null;
8260
    }
8261
 
8262
    public int getSuccessSize() {
8263
      return (this.success == null) ? 0 : this.success.size();
8264
    }
8265
 
8266
    public java.util.Iterator<Supplier> getSuccessIterator() {
8267
      return (this.success == null) ? null : this.success.iterator();
8268
    }
8269
 
8270
    public void addToSuccess(Supplier elem) {
8271
      if (this.success == null) {
8272
        this.success = new ArrayList<Supplier>();
8273
      }
8274
      this.success.add(elem);
8275
    }
8276
 
8277
    public List<Supplier> getSuccess() {
8278
      return this.success;
8279
    }
8280
 
8281
    public void setSuccess(List<Supplier> success) {
8282
      this.success = success;
8283
    }
8284
 
8285
    public void unsetSuccess() {
8286
      this.success = null;
8287
    }
8288
 
8289
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8290
    public boolean isSetSuccess() {
8291
      return this.success != null;
8292
    }
8293
 
8294
    public void setSuccessIsSet(boolean value) {
8295
      if (!value) {
8296
        this.success = null;
8297
      }
8298
    }
8299
 
8300
    public PurchaseServiceException getE() {
8301
      return this.e;
8302
    }
8303
 
8304
    public void setE(PurchaseServiceException e) {
8305
      this.e = e;
8306
    }
8307
 
8308
    public void unsetE() {
8309
      this.e = null;
8310
    }
8311
 
8312
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8313
    public boolean isSetE() {
8314
      return this.e != null;
8315
    }
8316
 
8317
    public void setEIsSet(boolean value) {
8318
      if (!value) {
8319
        this.e = null;
8320
      }
8321
    }
8322
 
8323
    public void setFieldValue(_Fields field, Object value) {
8324
      switch (field) {
8325
      case SUCCESS:
8326
        if (value == null) {
8327
          unsetSuccess();
8328
        } else {
8329
          setSuccess((List<Supplier>)value);
8330
        }
8331
        break;
8332
 
8333
      case E:
8334
        if (value == null) {
8335
          unsetE();
8336
        } else {
8337
          setE((PurchaseServiceException)value);
8338
        }
8339
        break;
8340
 
8341
      }
8342
    }
8343
 
8344
    public Object getFieldValue(_Fields field) {
8345
      switch (field) {
8346
      case SUCCESS:
8347
        return getSuccess();
8348
 
8349
      case E:
8350
        return getE();
8351
 
8352
      }
8353
      throw new IllegalStateException();
8354
    }
8355
 
8356
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8357
    public boolean isSet(_Fields field) {
8358
      if (field == null) {
8359
        throw new IllegalArgumentException();
8360
      }
8361
 
8362
      switch (field) {
8363
      case SUCCESS:
8364
        return isSetSuccess();
8365
      case E:
8366
        return isSetE();
8367
      }
8368
      throw new IllegalStateException();
8369
    }
8370
 
8371
    @Override
8372
    public boolean equals(Object that) {
8373
      if (that == null)
8374
        return false;
8375
      if (that instanceof getSuppliers_result)
8376
        return this.equals((getSuppliers_result)that);
8377
      return false;
8378
    }
8379
 
8380
    public boolean equals(getSuppliers_result that) {
8381
      if (that == null)
8382
        return false;
8383
 
8384
      boolean this_present_success = true && this.isSetSuccess();
8385
      boolean that_present_success = true && that.isSetSuccess();
8386
      if (this_present_success || that_present_success) {
8387
        if (!(this_present_success && that_present_success))
8388
          return false;
8389
        if (!this.success.equals(that.success))
8390
          return false;
8391
      }
8392
 
8393
      boolean this_present_e = true && this.isSetE();
8394
      boolean that_present_e = true && that.isSetE();
8395
      if (this_present_e || that_present_e) {
8396
        if (!(this_present_e && that_present_e))
8397
          return false;
8398
        if (!this.e.equals(that.e))
8399
          return false;
8400
      }
8401
 
8402
      return true;
8403
    }
8404
 
8405
    @Override
8406
    public int hashCode() {
8407
      return 0;
8408
    }
8409
 
8410
    public int compareTo(getSuppliers_result other) {
8411
      if (!getClass().equals(other.getClass())) {
8412
        return getClass().getName().compareTo(other.getClass().getName());
8413
      }
8414
 
8415
      int lastComparison = 0;
8416
      getSuppliers_result typedOther = (getSuppliers_result)other;
8417
 
8418
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8419
      if (lastComparison != 0) {
8420
        return lastComparison;
8421
      }
8422
      if (isSetSuccess()) {
8423
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8424
        if (lastComparison != 0) {
8425
          return lastComparison;
8426
        }
8427
      }
8428
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8429
      if (lastComparison != 0) {
8430
        return lastComparison;
8431
      }
8432
      if (isSetE()) {
8433
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8434
        if (lastComparison != 0) {
8435
          return lastComparison;
8436
        }
8437
      }
8438
      return 0;
8439
    }
8440
 
8441
    public _Fields fieldForId(int fieldId) {
8442
      return _Fields.findByThriftId(fieldId);
8443
    }
8444
 
8445
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8446
      org.apache.thrift.protocol.TField field;
8447
      iprot.readStructBegin();
8448
      while (true)
8449
      {
8450
        field = iprot.readFieldBegin();
8451
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8452
          break;
8453
        }
8454
        switch (field.id) {
8455
          case 0: // SUCCESS
8456
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8457
              {
8458
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
8459
                this.success = new ArrayList<Supplier>(_list16.size);
8460
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
8461
                {
8462
                  Supplier _elem18; // required
8463
                  _elem18 = new Supplier();
8464
                  _elem18.read(iprot);
8465
                  this.success.add(_elem18);
8466
                }
8467
                iprot.readListEnd();
8468
              }
8469
            } else { 
8470
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8471
            }
8472
            break;
8473
          case 1: // E
8474
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8475
              this.e = new PurchaseServiceException();
8476
              this.e.read(iprot);
8477
            } else { 
8478
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8479
            }
8480
            break;
8481
          default:
8482
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8483
        }
8484
        iprot.readFieldEnd();
8485
      }
8486
      iprot.readStructEnd();
8487
      validate();
8488
    }
8489
 
8490
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8491
      oprot.writeStructBegin(STRUCT_DESC);
8492
 
8493
      if (this.isSetSuccess()) {
8494
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8495
        {
8496
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8497
          for (Supplier _iter19 : this.success)
8498
          {
8499
            _iter19.write(oprot);
8500
          }
8501
          oprot.writeListEnd();
8502
        }
8503
        oprot.writeFieldEnd();
8504
      } else if (this.isSetE()) {
8505
        oprot.writeFieldBegin(E_FIELD_DESC);
8506
        this.e.write(oprot);
8507
        oprot.writeFieldEnd();
8508
      }
8509
      oprot.writeFieldStop();
8510
      oprot.writeStructEnd();
8511
    }
8512
 
8513
    @Override
8514
    public String toString() {
8515
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
8516
      boolean first = true;
8517
 
8518
      sb.append("success:");
8519
      if (this.success == null) {
8520
        sb.append("null");
8521
      } else {
8522
        sb.append(this.success);
8523
      }
8524
      first = false;
8525
      if (!first) sb.append(", ");
8526
      sb.append("e:");
8527
      if (this.e == null) {
8528
        sb.append("null");
8529
      } else {
8530
        sb.append(this.e);
8531
      }
8532
      first = false;
8533
      sb.append(")");
8534
      return sb.toString();
8535
    }
8536
 
8537
    public void validate() throws org.apache.thrift.TException {
8538
      // check for required fields
8539
    }
8540
 
8541
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8542
      try {
8543
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8544
      } catch (org.apache.thrift.TException te) {
8545
        throw new java.io.IOException(te);
8546
      }
8547
    }
8548
 
8549
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8550
      try {
8551
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8552
      } catch (org.apache.thrift.TException te) {
8553
        throw new java.io.IOException(te);
8554
      }
8555
    }
8556
 
8557
  }
8558
 
8559
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
8560
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
8561
 
8562
    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);
8563
    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);
8564
    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);
8565
 
8566
    private long purchaseOrderId; // required
8567
    private long itemId; // required
8568
    private long quantity; // required
8569
 
8570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8571
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8572
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
8573
      ITEM_ID((short)2, "itemId"),
8574
      QUANTITY((short)3, "quantity");
8575
 
8576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8577
 
8578
      static {
8579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8580
          byName.put(field.getFieldName(), field);
8581
        }
8582
      }
8583
 
8584
      /**
8585
       * Find the _Fields constant that matches fieldId, or null if its not found.
8586
       */
8587
      public static _Fields findByThriftId(int fieldId) {
8588
        switch(fieldId) {
8589
          case 1: // PURCHASE_ORDER_ID
8590
            return PURCHASE_ORDER_ID;
8591
          case 2: // ITEM_ID
8592
            return ITEM_ID;
8593
          case 3: // QUANTITY
8594
            return QUANTITY;
8595
          default:
8596
            return null;
8597
        }
8598
      }
8599
 
8600
      /**
8601
       * Find the _Fields constant that matches fieldId, throwing an exception
8602
       * if it is not found.
8603
       */
8604
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8605
        _Fields fields = findByThriftId(fieldId);
8606
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8607
        return fields;
8608
      }
8609
 
8610
      /**
8611
       * Find the _Fields constant that matches name, or null if its not found.
8612
       */
8613
      public static _Fields findByName(String name) {
8614
        return byName.get(name);
8615
      }
8616
 
8617
      private final short _thriftId;
8618
      private final String _fieldName;
8619
 
8620
      _Fields(short thriftId, String fieldName) {
8621
        _thriftId = thriftId;
8622
        _fieldName = fieldName;
8623
      }
8624
 
8625
      public short getThriftFieldId() {
8626
        return _thriftId;
8627
      }
8628
 
8629
      public String getFieldName() {
8630
        return _fieldName;
8631
      }
8632
    }
8633
 
8634
    // isset id assignments
8635
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
8636
    private static final int __ITEMID_ISSET_ID = 1;
8637
    private static final int __QUANTITY_ISSET_ID = 2;
8638
    private BitSet __isset_bit_vector = new BitSet(3);
8639
 
8640
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8641
    static {
8642
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8643
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8644
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8645
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8646
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8647
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8648
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8649
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8650
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
8651
    }
8652
 
8653
    public fulfillPO_args() {
8654
    }
8655
 
8656
    public fulfillPO_args(
8657
      long purchaseOrderId,
8658
      long itemId,
8659
      long quantity)
8660
    {
8661
      this();
8662
      this.purchaseOrderId = purchaseOrderId;
8663
      setPurchaseOrderIdIsSet(true);
8664
      this.itemId = itemId;
8665
      setItemIdIsSet(true);
8666
      this.quantity = quantity;
8667
      setQuantityIsSet(true);
8668
    }
8669
 
8670
    /**
8671
     * Performs a deep copy on <i>other</i>.
8672
     */
8673
    public fulfillPO_args(fulfillPO_args other) {
8674
      __isset_bit_vector.clear();
8675
      __isset_bit_vector.or(other.__isset_bit_vector);
8676
      this.purchaseOrderId = other.purchaseOrderId;
8677
      this.itemId = other.itemId;
8678
      this.quantity = other.quantity;
8679
    }
8680
 
8681
    public fulfillPO_args deepCopy() {
8682
      return new fulfillPO_args(this);
8683
    }
8684
 
8685
    @Override
8686
    public void clear() {
8687
      setPurchaseOrderIdIsSet(false);
8688
      this.purchaseOrderId = 0;
8689
      setItemIdIsSet(false);
8690
      this.itemId = 0;
8691
      setQuantityIsSet(false);
8692
      this.quantity = 0;
8693
    }
8694
 
8695
    public long getPurchaseOrderId() {
8696
      return this.purchaseOrderId;
8697
    }
8698
 
8699
    public void setPurchaseOrderId(long purchaseOrderId) {
8700
      this.purchaseOrderId = purchaseOrderId;
8701
      setPurchaseOrderIdIsSet(true);
8702
    }
8703
 
8704
    public void unsetPurchaseOrderId() {
8705
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
8706
    }
8707
 
8708
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
8709
    public boolean isSetPurchaseOrderId() {
8710
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
8711
    }
8712
 
8713
    public void setPurchaseOrderIdIsSet(boolean value) {
8714
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
8715
    }
8716
 
8717
    public long getItemId() {
8718
      return this.itemId;
8719
    }
8720
 
8721
    public void setItemId(long itemId) {
8722
      this.itemId = itemId;
8723
      setItemIdIsSet(true);
8724
    }
8725
 
8726
    public void unsetItemId() {
8727
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
8728
    }
8729
 
8730
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
8731
    public boolean isSetItemId() {
8732
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
8733
    }
8734
 
8735
    public void setItemIdIsSet(boolean value) {
8736
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
8737
    }
8738
 
8739
    public long getQuantity() {
8740
      return this.quantity;
8741
    }
8742
 
8743
    public void setQuantity(long quantity) {
8744
      this.quantity = quantity;
8745
      setQuantityIsSet(true);
8746
    }
8747
 
8748
    public void unsetQuantity() {
8749
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
8750
    }
8751
 
8752
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
8753
    public boolean isSetQuantity() {
8754
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
8755
    }
8756
 
8757
    public void setQuantityIsSet(boolean value) {
8758
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
8759
    }
8760
 
8761
    public void setFieldValue(_Fields field, Object value) {
8762
      switch (field) {
8763
      case PURCHASE_ORDER_ID:
8764
        if (value == null) {
8765
          unsetPurchaseOrderId();
8766
        } else {
8767
          setPurchaseOrderId((Long)value);
8768
        }
8769
        break;
8770
 
8771
      case ITEM_ID:
8772
        if (value == null) {
8773
          unsetItemId();
8774
        } else {
8775
          setItemId((Long)value);
8776
        }
8777
        break;
8778
 
8779
      case QUANTITY:
8780
        if (value == null) {
8781
          unsetQuantity();
8782
        } else {
8783
          setQuantity((Long)value);
8784
        }
8785
        break;
8786
 
8787
      }
8788
    }
8789
 
8790
    public Object getFieldValue(_Fields field) {
8791
      switch (field) {
8792
      case PURCHASE_ORDER_ID:
8793
        return Long.valueOf(getPurchaseOrderId());
8794
 
8795
      case ITEM_ID:
8796
        return Long.valueOf(getItemId());
8797
 
8798
      case QUANTITY:
8799
        return Long.valueOf(getQuantity());
8800
 
8801
      }
8802
      throw new IllegalStateException();
8803
    }
8804
 
8805
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8806
    public boolean isSet(_Fields field) {
8807
      if (field == null) {
8808
        throw new IllegalArgumentException();
8809
      }
8810
 
8811
      switch (field) {
8812
      case PURCHASE_ORDER_ID:
8813
        return isSetPurchaseOrderId();
8814
      case ITEM_ID:
8815
        return isSetItemId();
8816
      case QUANTITY:
8817
        return isSetQuantity();
8818
      }
8819
      throw new IllegalStateException();
8820
    }
8821
 
8822
    @Override
8823
    public boolean equals(Object that) {
8824
      if (that == null)
8825
        return false;
8826
      if (that instanceof fulfillPO_args)
8827
        return this.equals((fulfillPO_args)that);
8828
      return false;
8829
    }
8830
 
8831
    public boolean equals(fulfillPO_args that) {
8832
      if (that == null)
8833
        return false;
8834
 
8835
      boolean this_present_purchaseOrderId = true;
8836
      boolean that_present_purchaseOrderId = true;
8837
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8838
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8839
          return false;
8840
        if (this.purchaseOrderId != that.purchaseOrderId)
8841
          return false;
8842
      }
8843
 
8844
      boolean this_present_itemId = true;
8845
      boolean that_present_itemId = true;
8846
      if (this_present_itemId || that_present_itemId) {
8847
        if (!(this_present_itemId && that_present_itemId))
8848
          return false;
8849
        if (this.itemId != that.itemId)
8850
          return false;
8851
      }
8852
 
8853
      boolean this_present_quantity = true;
8854
      boolean that_present_quantity = true;
8855
      if (this_present_quantity || that_present_quantity) {
8856
        if (!(this_present_quantity && that_present_quantity))
8857
          return false;
8858
        if (this.quantity != that.quantity)
8859
          return false;
8860
      }
8861
 
8862
      return true;
8863
    }
8864
 
8865
    @Override
8866
    public int hashCode() {
8867
      return 0;
8868
    }
8869
 
8870
    public int compareTo(fulfillPO_args other) {
8871
      if (!getClass().equals(other.getClass())) {
8872
        return getClass().getName().compareTo(other.getClass().getName());
8873
      }
8874
 
8875
      int lastComparison = 0;
8876
      fulfillPO_args typedOther = (fulfillPO_args)other;
8877
 
8878
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8879
      if (lastComparison != 0) {
8880
        return lastComparison;
8881
      }
8882
      if (isSetPurchaseOrderId()) {
8883
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8884
        if (lastComparison != 0) {
8885
          return lastComparison;
8886
        }
8887
      }
8888
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
8889
      if (lastComparison != 0) {
8890
        return lastComparison;
8891
      }
8892
      if (isSetItemId()) {
8893
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
8894
        if (lastComparison != 0) {
8895
          return lastComparison;
8896
        }
8897
      }
8898
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
8899
      if (lastComparison != 0) {
8900
        return lastComparison;
8901
      }
8902
      if (isSetQuantity()) {
8903
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
8904
        if (lastComparison != 0) {
8905
          return lastComparison;
8906
        }
8907
      }
8908
      return 0;
8909
    }
8910
 
8911
    public _Fields fieldForId(int fieldId) {
8912
      return _Fields.findByThriftId(fieldId);
8913
    }
8914
 
8915
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8916
      org.apache.thrift.protocol.TField field;
8917
      iprot.readStructBegin();
8918
      while (true)
8919
      {
8920
        field = iprot.readFieldBegin();
8921
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8922
          break;
8923
        }
8924
        switch (field.id) {
8925
          case 1: // PURCHASE_ORDER_ID
8926
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8927
              this.purchaseOrderId = iprot.readI64();
8928
              setPurchaseOrderIdIsSet(true);
8929
            } else { 
8930
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8931
            }
8932
            break;
8933
          case 2: // ITEM_ID
8934
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8935
              this.itemId = iprot.readI64();
8936
              setItemIdIsSet(true);
8937
            } else { 
8938
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8939
            }
8940
            break;
8941
          case 3: // QUANTITY
8942
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8943
              this.quantity = iprot.readI64();
8944
              setQuantityIsSet(true);
8945
            } else { 
8946
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8947
            }
8948
            break;
8949
          default:
8950
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8951
        }
8952
        iprot.readFieldEnd();
8953
      }
8954
      iprot.readStructEnd();
8955
      validate();
8956
    }
8957
 
8958
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8959
      validate();
8960
 
8961
      oprot.writeStructBegin(STRUCT_DESC);
8962
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8963
      oprot.writeI64(this.purchaseOrderId);
8964
      oprot.writeFieldEnd();
8965
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
8966
      oprot.writeI64(this.itemId);
8967
      oprot.writeFieldEnd();
8968
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
8969
      oprot.writeI64(this.quantity);
8970
      oprot.writeFieldEnd();
8971
      oprot.writeFieldStop();
8972
      oprot.writeStructEnd();
8973
    }
8974
 
8975
    @Override
8976
    public String toString() {
8977
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
8978
      boolean first = true;
8979
 
8980
      sb.append("purchaseOrderId:");
8981
      sb.append(this.purchaseOrderId);
8982
      first = false;
8983
      if (!first) sb.append(", ");
8984
      sb.append("itemId:");
8985
      sb.append(this.itemId);
8986
      first = false;
8987
      if (!first) sb.append(", ");
8988
      sb.append("quantity:");
8989
      sb.append(this.quantity);
8990
      first = false;
8991
      sb.append(")");
8992
      return sb.toString();
8993
    }
8994
 
8995
    public void validate() throws org.apache.thrift.TException {
8996
      // check for required fields
8997
    }
8998
 
8999
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9000
      try {
9001
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9002
      } catch (org.apache.thrift.TException te) {
9003
        throw new java.io.IOException(te);
9004
      }
9005
    }
9006
 
9007
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9008
      try {
9009
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9010
        __isset_bit_vector = new BitSet(1);
9011
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9012
      } catch (org.apache.thrift.TException te) {
9013
        throw new java.io.IOException(te);
9014
      }
9015
    }
9016
 
9017
  }
9018
 
9019
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
9020
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
9021
 
9022
    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);
9023
 
9024
    private PurchaseServiceException e; // required
9025
 
9026
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9027
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9028
      E((short)1, "e");
9029
 
9030
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9031
 
9032
      static {
9033
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9034
          byName.put(field.getFieldName(), field);
9035
        }
9036
      }
9037
 
9038
      /**
9039
       * Find the _Fields constant that matches fieldId, or null if its not found.
9040
       */
9041
      public static _Fields findByThriftId(int fieldId) {
9042
        switch(fieldId) {
9043
          case 1: // E
9044
            return E;
9045
          default:
9046
            return null;
9047
        }
9048
      }
9049
 
9050
      /**
9051
       * Find the _Fields constant that matches fieldId, throwing an exception
9052
       * if it is not found.
9053
       */
9054
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9055
        _Fields fields = findByThriftId(fieldId);
9056
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9057
        return fields;
9058
      }
9059
 
9060
      /**
9061
       * Find the _Fields constant that matches name, or null if its not found.
9062
       */
9063
      public static _Fields findByName(String name) {
9064
        return byName.get(name);
9065
      }
9066
 
9067
      private final short _thriftId;
9068
      private final String _fieldName;
9069
 
9070
      _Fields(short thriftId, String fieldName) {
9071
        _thriftId = thriftId;
9072
        _fieldName = fieldName;
9073
      }
9074
 
9075
      public short getThriftFieldId() {
9076
        return _thriftId;
9077
      }
9078
 
9079
      public String getFieldName() {
9080
        return _fieldName;
9081
      }
9082
    }
9083
 
9084
    // isset id assignments
9085
 
9086
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9087
    static {
9088
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9089
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9090
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9091
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9092
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
9093
    }
9094
 
9095
    public fulfillPO_result() {
9096
    }
9097
 
9098
    public fulfillPO_result(
9099
      PurchaseServiceException e)
9100
    {
9101
      this();
9102
      this.e = e;
9103
    }
9104
 
9105
    /**
9106
     * Performs a deep copy on <i>other</i>.
9107
     */
9108
    public fulfillPO_result(fulfillPO_result other) {
9109
      if (other.isSetE()) {
9110
        this.e = new PurchaseServiceException(other.e);
9111
      }
9112
    }
9113
 
9114
    public fulfillPO_result deepCopy() {
9115
      return new fulfillPO_result(this);
9116
    }
9117
 
9118
    @Override
9119
    public void clear() {
9120
      this.e = null;
9121
    }
9122
 
9123
    public PurchaseServiceException getE() {
9124
      return this.e;
9125
    }
9126
 
9127
    public void setE(PurchaseServiceException e) {
9128
      this.e = e;
9129
    }
9130
 
9131
    public void unsetE() {
9132
      this.e = null;
9133
    }
9134
 
9135
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9136
    public boolean isSetE() {
9137
      return this.e != null;
9138
    }
9139
 
9140
    public void setEIsSet(boolean value) {
9141
      if (!value) {
9142
        this.e = null;
9143
      }
9144
    }
9145
 
9146
    public void setFieldValue(_Fields field, Object value) {
9147
      switch (field) {
9148
      case E:
9149
        if (value == null) {
9150
          unsetE();
9151
        } else {
9152
          setE((PurchaseServiceException)value);
9153
        }
9154
        break;
9155
 
9156
      }
9157
    }
9158
 
9159
    public Object getFieldValue(_Fields field) {
9160
      switch (field) {
9161
      case E:
9162
        return getE();
9163
 
9164
      }
9165
      throw new IllegalStateException();
9166
    }
9167
 
9168
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9169
    public boolean isSet(_Fields field) {
9170
      if (field == null) {
9171
        throw new IllegalArgumentException();
9172
      }
9173
 
9174
      switch (field) {
9175
      case E:
9176
        return isSetE();
9177
      }
9178
      throw new IllegalStateException();
9179
    }
9180
 
9181
    @Override
9182
    public boolean equals(Object that) {
9183
      if (that == null)
9184
        return false;
9185
      if (that instanceof fulfillPO_result)
9186
        return this.equals((fulfillPO_result)that);
9187
      return false;
9188
    }
9189
 
9190
    public boolean equals(fulfillPO_result that) {
9191
      if (that == null)
9192
        return false;
9193
 
9194
      boolean this_present_e = true && this.isSetE();
9195
      boolean that_present_e = true && that.isSetE();
9196
      if (this_present_e || that_present_e) {
9197
        if (!(this_present_e && that_present_e))
9198
          return false;
9199
        if (!this.e.equals(that.e))
9200
          return false;
9201
      }
9202
 
9203
      return true;
9204
    }
9205
 
9206
    @Override
9207
    public int hashCode() {
9208
      return 0;
9209
    }
9210
 
9211
    public int compareTo(fulfillPO_result other) {
9212
      if (!getClass().equals(other.getClass())) {
9213
        return getClass().getName().compareTo(other.getClass().getName());
9214
      }
9215
 
9216
      int lastComparison = 0;
9217
      fulfillPO_result typedOther = (fulfillPO_result)other;
9218
 
9219
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9220
      if (lastComparison != 0) {
9221
        return lastComparison;
9222
      }
9223
      if (isSetE()) {
9224
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9225
        if (lastComparison != 0) {
9226
          return lastComparison;
9227
        }
9228
      }
9229
      return 0;
9230
    }
9231
 
9232
    public _Fields fieldForId(int fieldId) {
9233
      return _Fields.findByThriftId(fieldId);
9234
    }
9235
 
9236
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9237
      org.apache.thrift.protocol.TField field;
9238
      iprot.readStructBegin();
9239
      while (true)
9240
      {
9241
        field = iprot.readFieldBegin();
9242
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9243
          break;
9244
        }
9245
        switch (field.id) {
9246
          case 1: // E
9247
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9248
              this.e = new PurchaseServiceException();
9249
              this.e.read(iprot);
9250
            } else { 
9251
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9252
            }
9253
            break;
9254
          default:
9255
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9256
        }
9257
        iprot.readFieldEnd();
9258
      }
9259
      iprot.readStructEnd();
9260
      validate();
9261
    }
9262
 
9263
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9264
      oprot.writeStructBegin(STRUCT_DESC);
9265
 
9266
      if (this.isSetE()) {
9267
        oprot.writeFieldBegin(E_FIELD_DESC);
9268
        this.e.write(oprot);
9269
        oprot.writeFieldEnd();
9270
      }
9271
      oprot.writeFieldStop();
9272
      oprot.writeStructEnd();
9273
    }
9274
 
9275
    @Override
9276
    public String toString() {
9277
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
9278
      boolean first = true;
9279
 
9280
      sb.append("e:");
9281
      if (this.e == null) {
9282
        sb.append("null");
9283
      } else {
9284
        sb.append(this.e);
9285
      }
9286
      first = false;
9287
      sb.append(")");
9288
      return sb.toString();
9289
    }
9290
 
9291
    public void validate() throws org.apache.thrift.TException {
9292
      // check for required fields
9293
    }
9294
 
9295
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9296
      try {
9297
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9298
      } catch (org.apache.thrift.TException te) {
9299
        throw new java.io.IOException(te);
9300
      }
9301
    }
9302
 
9303
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9304
      try {
9305
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9306
      } catch (org.apache.thrift.TException te) {
9307
        throw new java.io.IOException(te);
9308
      }
9309
    }
9310
 
9311
  }
9312
 
9313
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
9314
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
9315
 
9316
    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);
9317
 
9318
    private PurchaseOrder purchaseOrder; // required
9319
 
9320
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9321
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9322
      PURCHASE_ORDER((short)1, "purchaseOrder");
9323
 
9324
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9325
 
9326
      static {
9327
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9328
          byName.put(field.getFieldName(), field);
9329
        }
9330
      }
9331
 
9332
      /**
9333
       * Find the _Fields constant that matches fieldId, or null if its not found.
9334
       */
9335
      public static _Fields findByThriftId(int fieldId) {
9336
        switch(fieldId) {
9337
          case 1: // PURCHASE_ORDER
9338
            return PURCHASE_ORDER;
9339
          default:
9340
            return null;
9341
        }
9342
      }
9343
 
9344
      /**
9345
       * Find the _Fields constant that matches fieldId, throwing an exception
9346
       * if it is not found.
9347
       */
9348
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9349
        _Fields fields = findByThriftId(fieldId);
9350
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9351
        return fields;
9352
      }
9353
 
9354
      /**
9355
       * Find the _Fields constant that matches name, or null if its not found.
9356
       */
9357
      public static _Fields findByName(String name) {
9358
        return byName.get(name);
9359
      }
9360
 
9361
      private final short _thriftId;
9362
      private final String _fieldName;
9363
 
9364
      _Fields(short thriftId, String fieldName) {
9365
        _thriftId = thriftId;
9366
        _fieldName = fieldName;
9367
      }
9368
 
9369
      public short getThriftFieldId() {
9370
        return _thriftId;
9371
      }
9372
 
9373
      public String getFieldName() {
9374
        return _fieldName;
9375
      }
9376
    }
9377
 
9378
    // isset id assignments
9379
 
9380
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9381
    static {
9382
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9383
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9384
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
9385
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9386
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
9387
    }
9388
 
9389
    public updatePurchaseOrder_args() {
9390
    }
9391
 
9392
    public updatePurchaseOrder_args(
9393
      PurchaseOrder purchaseOrder)
9394
    {
9395
      this();
9396
      this.purchaseOrder = purchaseOrder;
9397
    }
9398
 
9399
    /**
9400
     * Performs a deep copy on <i>other</i>.
9401
     */
9402
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
9403
      if (other.isSetPurchaseOrder()) {
9404
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
9405
      }
9406
    }
9407
 
9408
    public updatePurchaseOrder_args deepCopy() {
9409
      return new updatePurchaseOrder_args(this);
9410
    }
9411
 
9412
    @Override
9413
    public void clear() {
9414
      this.purchaseOrder = null;
9415
    }
9416
 
9417
    public PurchaseOrder getPurchaseOrder() {
9418
      return this.purchaseOrder;
9419
    }
9420
 
9421
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
9422
      this.purchaseOrder = purchaseOrder;
9423
    }
9424
 
9425
    public void unsetPurchaseOrder() {
9426
      this.purchaseOrder = null;
9427
    }
9428
 
9429
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
9430
    public boolean isSetPurchaseOrder() {
9431
      return this.purchaseOrder != null;
9432
    }
9433
 
9434
    public void setPurchaseOrderIsSet(boolean value) {
9435
      if (!value) {
9436
        this.purchaseOrder = null;
9437
      }
9438
    }
9439
 
9440
    public void setFieldValue(_Fields field, Object value) {
9441
      switch (field) {
9442
      case PURCHASE_ORDER:
9443
        if (value == null) {
9444
          unsetPurchaseOrder();
9445
        } else {
9446
          setPurchaseOrder((PurchaseOrder)value);
9447
        }
9448
        break;
9449
 
9450
      }
9451
    }
9452
 
9453
    public Object getFieldValue(_Fields field) {
9454
      switch (field) {
9455
      case PURCHASE_ORDER:
9456
        return getPurchaseOrder();
9457
 
9458
      }
9459
      throw new IllegalStateException();
9460
    }
9461
 
9462
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9463
    public boolean isSet(_Fields field) {
9464
      if (field == null) {
9465
        throw new IllegalArgumentException();
9466
      }
9467
 
9468
      switch (field) {
9469
      case PURCHASE_ORDER:
9470
        return isSetPurchaseOrder();
9471
      }
9472
      throw new IllegalStateException();
9473
    }
9474
 
9475
    @Override
9476
    public boolean equals(Object that) {
9477
      if (that == null)
9478
        return false;
9479
      if (that instanceof updatePurchaseOrder_args)
9480
        return this.equals((updatePurchaseOrder_args)that);
9481
      return false;
9482
    }
9483
 
9484
    public boolean equals(updatePurchaseOrder_args that) {
9485
      if (that == null)
9486
        return false;
9487
 
9488
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
9489
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
9490
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
9491
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
9492
          return false;
9493
        if (!this.purchaseOrder.equals(that.purchaseOrder))
9494
          return false;
9495
      }
9496
 
9497
      return true;
9498
    }
9499
 
9500
    @Override
9501
    public int hashCode() {
9502
      return 0;
9503
    }
9504
 
9505
    public int compareTo(updatePurchaseOrder_args other) {
9506
      if (!getClass().equals(other.getClass())) {
9507
        return getClass().getName().compareTo(other.getClass().getName());
9508
      }
9509
 
9510
      int lastComparison = 0;
9511
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
9512
 
9513
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
9514
      if (lastComparison != 0) {
9515
        return lastComparison;
9516
      }
9517
      if (isSetPurchaseOrder()) {
9518
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
9519
        if (lastComparison != 0) {
9520
          return lastComparison;
9521
        }
9522
      }
9523
      return 0;
9524
    }
9525
 
9526
    public _Fields fieldForId(int fieldId) {
9527
      return _Fields.findByThriftId(fieldId);
9528
    }
9529
 
9530
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9531
      org.apache.thrift.protocol.TField field;
9532
      iprot.readStructBegin();
9533
      while (true)
9534
      {
9535
        field = iprot.readFieldBegin();
9536
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9537
          break;
9538
        }
9539
        switch (field.id) {
9540
          case 1: // PURCHASE_ORDER
9541
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9542
              this.purchaseOrder = new PurchaseOrder();
9543
              this.purchaseOrder.read(iprot);
9544
            } else { 
9545
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9546
            }
9547
            break;
9548
          default:
9549
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9550
        }
9551
        iprot.readFieldEnd();
9552
      }
9553
      iprot.readStructEnd();
9554
      validate();
9555
    }
9556
 
9557
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9558
      validate();
9559
 
9560
      oprot.writeStructBegin(STRUCT_DESC);
9561
      if (this.purchaseOrder != null) {
9562
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
9563
        this.purchaseOrder.write(oprot);
9564
        oprot.writeFieldEnd();
9565
      }
9566
      oprot.writeFieldStop();
9567
      oprot.writeStructEnd();
9568
    }
9569
 
9570
    @Override
9571
    public String toString() {
9572
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
9573
      boolean first = true;
9574
 
9575
      sb.append("purchaseOrder:");
9576
      if (this.purchaseOrder == null) {
9577
        sb.append("null");
9578
      } else {
9579
        sb.append(this.purchaseOrder);
9580
      }
9581
      first = false;
9582
      sb.append(")");
9583
      return sb.toString();
9584
    }
9585
 
9586
    public void validate() throws org.apache.thrift.TException {
9587
      // check for required fields
9588
    }
9589
 
9590
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9591
      try {
9592
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9593
      } catch (org.apache.thrift.TException te) {
9594
        throw new java.io.IOException(te);
9595
      }
9596
    }
9597
 
9598
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9599
      try {
9600
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9601
      } catch (org.apache.thrift.TException te) {
9602
        throw new java.io.IOException(te);
9603
      }
9604
    }
9605
 
9606
  }
9607
 
9608
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
9609
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
9610
 
9611
    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);
9612
 
9613
    private PurchaseServiceException e; // required
9614
 
9615
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9616
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9617
      E((short)1, "e");
9618
 
9619
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9620
 
9621
      static {
9622
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9623
          byName.put(field.getFieldName(), field);
9624
        }
9625
      }
9626
 
9627
      /**
9628
       * Find the _Fields constant that matches fieldId, or null if its not found.
9629
       */
9630
      public static _Fields findByThriftId(int fieldId) {
9631
        switch(fieldId) {
9632
          case 1: // E
9633
            return E;
9634
          default:
9635
            return null;
9636
        }
9637
      }
9638
 
9639
      /**
9640
       * Find the _Fields constant that matches fieldId, throwing an exception
9641
       * if it is not found.
9642
       */
9643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9644
        _Fields fields = findByThriftId(fieldId);
9645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9646
        return fields;
9647
      }
9648
 
9649
      /**
9650
       * Find the _Fields constant that matches name, or null if its not found.
9651
       */
9652
      public static _Fields findByName(String name) {
9653
        return byName.get(name);
9654
      }
9655
 
9656
      private final short _thriftId;
9657
      private final String _fieldName;
9658
 
9659
      _Fields(short thriftId, String fieldName) {
9660
        _thriftId = thriftId;
9661
        _fieldName = fieldName;
9662
      }
9663
 
9664
      public short getThriftFieldId() {
9665
        return _thriftId;
9666
      }
9667
 
9668
      public String getFieldName() {
9669
        return _fieldName;
9670
      }
9671
    }
9672
 
9673
    // isset id assignments
9674
 
9675
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9676
    static {
9677
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9678
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9679
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9680
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9681
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
9682
    }
9683
 
9684
    public updatePurchaseOrder_result() {
9685
    }
9686
 
9687
    public updatePurchaseOrder_result(
9688
      PurchaseServiceException e)
9689
    {
9690
      this();
9691
      this.e = e;
9692
    }
9693
 
9694
    /**
9695
     * Performs a deep copy on <i>other</i>.
9696
     */
9697
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
9698
      if (other.isSetE()) {
9699
        this.e = new PurchaseServiceException(other.e);
9700
      }
9701
    }
9702
 
9703
    public updatePurchaseOrder_result deepCopy() {
9704
      return new updatePurchaseOrder_result(this);
9705
    }
9706
 
9707
    @Override
9708
    public void clear() {
9709
      this.e = null;
9710
    }
9711
 
9712
    public PurchaseServiceException getE() {
9713
      return this.e;
9714
    }
9715
 
9716
    public void setE(PurchaseServiceException e) {
9717
      this.e = e;
9718
    }
9719
 
9720
    public void unsetE() {
9721
      this.e = null;
9722
    }
9723
 
9724
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9725
    public boolean isSetE() {
9726
      return this.e != null;
9727
    }
9728
 
9729
    public void setEIsSet(boolean value) {
9730
      if (!value) {
9731
        this.e = null;
9732
      }
9733
    }
9734
 
9735
    public void setFieldValue(_Fields field, Object value) {
9736
      switch (field) {
9737
      case E:
9738
        if (value == null) {
9739
          unsetE();
9740
        } else {
9741
          setE((PurchaseServiceException)value);
9742
        }
9743
        break;
9744
 
9745
      }
9746
    }
9747
 
9748
    public Object getFieldValue(_Fields field) {
9749
      switch (field) {
9750
      case E:
9751
        return getE();
9752
 
9753
      }
9754
      throw new IllegalStateException();
9755
    }
9756
 
9757
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9758
    public boolean isSet(_Fields field) {
9759
      if (field == null) {
9760
        throw new IllegalArgumentException();
9761
      }
9762
 
9763
      switch (field) {
9764
      case E:
9765
        return isSetE();
9766
      }
9767
      throw new IllegalStateException();
9768
    }
9769
 
9770
    @Override
9771
    public boolean equals(Object that) {
9772
      if (that == null)
9773
        return false;
9774
      if (that instanceof updatePurchaseOrder_result)
9775
        return this.equals((updatePurchaseOrder_result)that);
9776
      return false;
9777
    }
9778
 
9779
    public boolean equals(updatePurchaseOrder_result that) {
9780
      if (that == null)
9781
        return false;
9782
 
9783
      boolean this_present_e = true && this.isSetE();
9784
      boolean that_present_e = true && that.isSetE();
9785
      if (this_present_e || that_present_e) {
9786
        if (!(this_present_e && that_present_e))
9787
          return false;
9788
        if (!this.e.equals(that.e))
9789
          return false;
9790
      }
9791
 
9792
      return true;
9793
    }
9794
 
9795
    @Override
9796
    public int hashCode() {
9797
      return 0;
9798
    }
9799
 
9800
    public int compareTo(updatePurchaseOrder_result other) {
9801
      if (!getClass().equals(other.getClass())) {
9802
        return getClass().getName().compareTo(other.getClass().getName());
9803
      }
9804
 
9805
      int lastComparison = 0;
9806
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
9807
 
9808
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9809
      if (lastComparison != 0) {
9810
        return lastComparison;
9811
      }
9812
      if (isSetE()) {
9813
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9814
        if (lastComparison != 0) {
9815
          return lastComparison;
9816
        }
9817
      }
9818
      return 0;
9819
    }
9820
 
9821
    public _Fields fieldForId(int fieldId) {
9822
      return _Fields.findByThriftId(fieldId);
9823
    }
9824
 
9825
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9826
      org.apache.thrift.protocol.TField field;
9827
      iprot.readStructBegin();
9828
      while (true)
9829
      {
9830
        field = iprot.readFieldBegin();
9831
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9832
          break;
9833
        }
9834
        switch (field.id) {
9835
          case 1: // E
9836
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9837
              this.e = new PurchaseServiceException();
9838
              this.e.read(iprot);
9839
            } else { 
9840
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9841
            }
9842
            break;
9843
          default:
9844
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9845
        }
9846
        iprot.readFieldEnd();
9847
      }
9848
      iprot.readStructEnd();
9849
      validate();
9850
    }
9851
 
9852
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9853
      oprot.writeStructBegin(STRUCT_DESC);
9854
 
9855
      if (this.isSetE()) {
9856
        oprot.writeFieldBegin(E_FIELD_DESC);
9857
        this.e.write(oprot);
9858
        oprot.writeFieldEnd();
9859
      }
9860
      oprot.writeFieldStop();
9861
      oprot.writeStructEnd();
9862
    }
9863
 
9864
    @Override
9865
    public String toString() {
9866
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
9867
      boolean first = true;
9868
 
9869
      sb.append("e:");
9870
      if (this.e == null) {
9871
        sb.append("null");
9872
      } else {
9873
        sb.append(this.e);
9874
      }
9875
      first = false;
9876
      sb.append(")");
9877
      return sb.toString();
9878
    }
9879
 
9880
    public void validate() throws org.apache.thrift.TException {
9881
      // check for required fields
9882
    }
9883
 
9884
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9885
      try {
9886
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9887
      } catch (org.apache.thrift.TException te) {
9888
        throw new java.io.IOException(te);
9889
      }
9890
    }
9891
 
9892
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9893
      try {
9894
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9895
      } catch (org.apache.thrift.TException te) {
9896
        throw new java.io.IOException(te);
9897
      }
9898
    }
9899
 
9900
  }
9901
 
5185 mandeep.dh 9902
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
9903
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
9904
 
9905
    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);
9906
    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);
9907
    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);
9908
 
9909
    private long purchaseId; // required
9910
    private long itemId; // required
9911
    private long quantity; // required
9912
 
9913
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9914
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9915
      PURCHASE_ID((short)1, "purchaseId"),
9916
      ITEM_ID((short)2, "itemId"),
9917
      QUANTITY((short)3, "quantity");
9918
 
9919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9920
 
9921
      static {
9922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9923
          byName.put(field.getFieldName(), field);
9924
        }
9925
      }
9926
 
9927
      /**
9928
       * Find the _Fields constant that matches fieldId, or null if its not found.
9929
       */
9930
      public static _Fields findByThriftId(int fieldId) {
9931
        switch(fieldId) {
9932
          case 1: // PURCHASE_ID
9933
            return PURCHASE_ID;
9934
          case 2: // ITEM_ID
9935
            return ITEM_ID;
9936
          case 3: // QUANTITY
9937
            return QUANTITY;
9938
          default:
9939
            return null;
9940
        }
9941
      }
9942
 
9943
      /**
9944
       * Find the _Fields constant that matches fieldId, throwing an exception
9945
       * if it is not found.
9946
       */
9947
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9948
        _Fields fields = findByThriftId(fieldId);
9949
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9950
        return fields;
9951
      }
9952
 
9953
      /**
9954
       * Find the _Fields constant that matches name, or null if its not found.
9955
       */
9956
      public static _Fields findByName(String name) {
9957
        return byName.get(name);
9958
      }
9959
 
9960
      private final short _thriftId;
9961
      private final String _fieldName;
9962
 
9963
      _Fields(short thriftId, String fieldName) {
9964
        _thriftId = thriftId;
9965
        _fieldName = fieldName;
9966
      }
9967
 
9968
      public short getThriftFieldId() {
9969
        return _thriftId;
9970
      }
9971
 
9972
      public String getFieldName() {
9973
        return _fieldName;
9974
      }
9975
    }
9976
 
9977
    // isset id assignments
9978
    private static final int __PURCHASEID_ISSET_ID = 0;
9979
    private static final int __ITEMID_ISSET_ID = 1;
9980
    private static final int __QUANTITY_ISSET_ID = 2;
9981
    private BitSet __isset_bit_vector = new BitSet(3);
9982
 
9983
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9984
    static {
9985
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9986
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9987
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9988
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9989
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9990
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9991
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9992
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9993
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
9994
    }
9995
 
9996
    public unFulfillPO_args() {
9997
    }
9998
 
9999
    public unFulfillPO_args(
10000
      long purchaseId,
10001
      long itemId,
10002
      long quantity)
10003
    {
10004
      this();
10005
      this.purchaseId = purchaseId;
10006
      setPurchaseIdIsSet(true);
10007
      this.itemId = itemId;
10008
      setItemIdIsSet(true);
10009
      this.quantity = quantity;
10010
      setQuantityIsSet(true);
10011
    }
10012
 
10013
    /**
10014
     * Performs a deep copy on <i>other</i>.
10015
     */
10016
    public unFulfillPO_args(unFulfillPO_args other) {
10017
      __isset_bit_vector.clear();
10018
      __isset_bit_vector.or(other.__isset_bit_vector);
10019
      this.purchaseId = other.purchaseId;
10020
      this.itemId = other.itemId;
10021
      this.quantity = other.quantity;
10022
    }
10023
 
10024
    public unFulfillPO_args deepCopy() {
10025
      return new unFulfillPO_args(this);
10026
    }
10027
 
10028
    @Override
10029
    public void clear() {
10030
      setPurchaseIdIsSet(false);
10031
      this.purchaseId = 0;
10032
      setItemIdIsSet(false);
10033
      this.itemId = 0;
10034
      setQuantityIsSet(false);
10035
      this.quantity = 0;
10036
    }
10037
 
10038
    public long getPurchaseId() {
10039
      return this.purchaseId;
10040
    }
10041
 
10042
    public void setPurchaseId(long purchaseId) {
10043
      this.purchaseId = purchaseId;
10044
      setPurchaseIdIsSet(true);
10045
    }
10046
 
10047
    public void unsetPurchaseId() {
10048
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
10049
    }
10050
 
10051
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
10052
    public boolean isSetPurchaseId() {
10053
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
10054
    }
10055
 
10056
    public void setPurchaseIdIsSet(boolean value) {
10057
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
10058
    }
10059
 
10060
    public long getItemId() {
10061
      return this.itemId;
10062
    }
10063
 
10064
    public void setItemId(long itemId) {
10065
      this.itemId = itemId;
10066
      setItemIdIsSet(true);
10067
    }
10068
 
10069
    public void unsetItemId() {
10070
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10071
    }
10072
 
10073
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10074
    public boolean isSetItemId() {
10075
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10076
    }
10077
 
10078
    public void setItemIdIsSet(boolean value) {
10079
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10080
    }
10081
 
10082
    public long getQuantity() {
10083
      return this.quantity;
10084
    }
10085
 
10086
    public void setQuantity(long quantity) {
10087
      this.quantity = quantity;
10088
      setQuantityIsSet(true);
10089
    }
10090
 
10091
    public void unsetQuantity() {
10092
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10093
    }
10094
 
10095
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10096
    public boolean isSetQuantity() {
10097
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10098
    }
10099
 
10100
    public void setQuantityIsSet(boolean value) {
10101
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10102
    }
10103
 
10104
    public void setFieldValue(_Fields field, Object value) {
10105
      switch (field) {
10106
      case PURCHASE_ID:
10107
        if (value == null) {
10108
          unsetPurchaseId();
10109
        } else {
10110
          setPurchaseId((Long)value);
10111
        }
10112
        break;
10113
 
10114
      case ITEM_ID:
10115
        if (value == null) {
10116
          unsetItemId();
10117
        } else {
10118
          setItemId((Long)value);
10119
        }
10120
        break;
10121
 
10122
      case QUANTITY:
10123
        if (value == null) {
10124
          unsetQuantity();
10125
        } else {
10126
          setQuantity((Long)value);
10127
        }
10128
        break;
10129
 
10130
      }
10131
    }
10132
 
10133
    public Object getFieldValue(_Fields field) {
10134
      switch (field) {
10135
      case PURCHASE_ID:
10136
        return Long.valueOf(getPurchaseId());
10137
 
10138
      case ITEM_ID:
10139
        return Long.valueOf(getItemId());
10140
 
10141
      case QUANTITY:
10142
        return Long.valueOf(getQuantity());
10143
 
10144
      }
10145
      throw new IllegalStateException();
10146
    }
10147
 
10148
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10149
    public boolean isSet(_Fields field) {
10150
      if (field == null) {
10151
        throw new IllegalArgumentException();
10152
      }
10153
 
10154
      switch (field) {
10155
      case PURCHASE_ID:
10156
        return isSetPurchaseId();
10157
      case ITEM_ID:
10158
        return isSetItemId();
10159
      case QUANTITY:
10160
        return isSetQuantity();
10161
      }
10162
      throw new IllegalStateException();
10163
    }
10164
 
10165
    @Override
10166
    public boolean equals(Object that) {
10167
      if (that == null)
10168
        return false;
10169
      if (that instanceof unFulfillPO_args)
10170
        return this.equals((unFulfillPO_args)that);
10171
      return false;
10172
    }
10173
 
10174
    public boolean equals(unFulfillPO_args that) {
10175
      if (that == null)
10176
        return false;
10177
 
10178
      boolean this_present_purchaseId = true;
10179
      boolean that_present_purchaseId = true;
10180
      if (this_present_purchaseId || that_present_purchaseId) {
10181
        if (!(this_present_purchaseId && that_present_purchaseId))
10182
          return false;
10183
        if (this.purchaseId != that.purchaseId)
10184
          return false;
10185
      }
10186
 
10187
      boolean this_present_itemId = true;
10188
      boolean that_present_itemId = true;
10189
      if (this_present_itemId || that_present_itemId) {
10190
        if (!(this_present_itemId && that_present_itemId))
10191
          return false;
10192
        if (this.itemId != that.itemId)
10193
          return false;
10194
      }
10195
 
10196
      boolean this_present_quantity = true;
10197
      boolean that_present_quantity = true;
10198
      if (this_present_quantity || that_present_quantity) {
10199
        if (!(this_present_quantity && that_present_quantity))
10200
          return false;
10201
        if (this.quantity != that.quantity)
10202
          return false;
10203
      }
10204
 
10205
      return true;
10206
    }
10207
 
10208
    @Override
10209
    public int hashCode() {
10210
      return 0;
10211
    }
10212
 
10213
    public int compareTo(unFulfillPO_args other) {
10214
      if (!getClass().equals(other.getClass())) {
10215
        return getClass().getName().compareTo(other.getClass().getName());
10216
      }
10217
 
10218
      int lastComparison = 0;
10219
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
10220
 
10221
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
10222
      if (lastComparison != 0) {
10223
        return lastComparison;
10224
      }
10225
      if (isSetPurchaseId()) {
10226
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
10227
        if (lastComparison != 0) {
10228
          return lastComparison;
10229
        }
10230
      }
10231
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10232
      if (lastComparison != 0) {
10233
        return lastComparison;
10234
      }
10235
      if (isSetItemId()) {
10236
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10237
        if (lastComparison != 0) {
10238
          return lastComparison;
10239
        }
10240
      }
10241
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
10242
      if (lastComparison != 0) {
10243
        return lastComparison;
10244
      }
10245
      if (isSetQuantity()) {
10246
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
10247
        if (lastComparison != 0) {
10248
          return lastComparison;
10249
        }
10250
      }
10251
      return 0;
10252
    }
10253
 
10254
    public _Fields fieldForId(int fieldId) {
10255
      return _Fields.findByThriftId(fieldId);
10256
    }
10257
 
10258
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10259
      org.apache.thrift.protocol.TField field;
10260
      iprot.readStructBegin();
10261
      while (true)
10262
      {
10263
        field = iprot.readFieldBegin();
10264
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10265
          break;
10266
        }
10267
        switch (field.id) {
10268
          case 1: // PURCHASE_ID
10269
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10270
              this.purchaseId = iprot.readI64();
10271
              setPurchaseIdIsSet(true);
10272
            } else { 
10273
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10274
            }
10275
            break;
10276
          case 2: // ITEM_ID
10277
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10278
              this.itemId = iprot.readI64();
10279
              setItemIdIsSet(true);
10280
            } else { 
10281
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10282
            }
10283
            break;
10284
          case 3: // QUANTITY
10285
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10286
              this.quantity = iprot.readI64();
10287
              setQuantityIsSet(true);
10288
            } else { 
10289
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10290
            }
10291
            break;
10292
          default:
10293
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10294
        }
10295
        iprot.readFieldEnd();
10296
      }
10297
      iprot.readStructEnd();
10298
      validate();
10299
    }
10300
 
10301
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10302
      validate();
10303
 
10304
      oprot.writeStructBegin(STRUCT_DESC);
10305
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
10306
      oprot.writeI64(this.purchaseId);
10307
      oprot.writeFieldEnd();
10308
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10309
      oprot.writeI64(this.itemId);
10310
      oprot.writeFieldEnd();
10311
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10312
      oprot.writeI64(this.quantity);
10313
      oprot.writeFieldEnd();
10314
      oprot.writeFieldStop();
10315
      oprot.writeStructEnd();
10316
    }
10317
 
10318
    @Override
10319
    public String toString() {
10320
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
10321
      boolean first = true;
10322
 
10323
      sb.append("purchaseId:");
10324
      sb.append(this.purchaseId);
10325
      first = false;
10326
      if (!first) sb.append(", ");
10327
      sb.append("itemId:");
10328
      sb.append(this.itemId);
10329
      first = false;
10330
      if (!first) sb.append(", ");
10331
      sb.append("quantity:");
10332
      sb.append(this.quantity);
10333
      first = false;
10334
      sb.append(")");
10335
      return sb.toString();
10336
    }
10337
 
10338
    public void validate() throws org.apache.thrift.TException {
10339
      // check for required fields
10340
    }
10341
 
10342
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10343
      try {
10344
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10345
      } catch (org.apache.thrift.TException te) {
10346
        throw new java.io.IOException(te);
10347
      }
10348
    }
10349
 
10350
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10351
      try {
10352
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10353
        __isset_bit_vector = new BitSet(1);
10354
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10355
      } catch (org.apache.thrift.TException te) {
10356
        throw new java.io.IOException(te);
10357
      }
10358
    }
10359
 
10360
  }
10361
 
10362
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10363
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
10364
 
10365
    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);
10366
 
10367
    private PurchaseServiceException e; // required
10368
 
10369
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10370
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10371
      E((short)1, "e");
10372
 
10373
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10374
 
10375
      static {
10376
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10377
          byName.put(field.getFieldName(), field);
10378
        }
10379
      }
10380
 
10381
      /**
10382
       * Find the _Fields constant that matches fieldId, or null if its not found.
10383
       */
10384
      public static _Fields findByThriftId(int fieldId) {
10385
        switch(fieldId) {
10386
          case 1: // E
10387
            return E;
10388
          default:
10389
            return null;
10390
        }
10391
      }
10392
 
10393
      /**
10394
       * Find the _Fields constant that matches fieldId, throwing an exception
10395
       * if it is not found.
10396
       */
10397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10398
        _Fields fields = findByThriftId(fieldId);
10399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10400
        return fields;
10401
      }
10402
 
10403
      /**
10404
       * Find the _Fields constant that matches name, or null if its not found.
10405
       */
10406
      public static _Fields findByName(String name) {
10407
        return byName.get(name);
10408
      }
10409
 
10410
      private final short _thriftId;
10411
      private final String _fieldName;
10412
 
10413
      _Fields(short thriftId, String fieldName) {
10414
        _thriftId = thriftId;
10415
        _fieldName = fieldName;
10416
      }
10417
 
10418
      public short getThriftFieldId() {
10419
        return _thriftId;
10420
      }
10421
 
10422
      public String getFieldName() {
10423
        return _fieldName;
10424
      }
10425
    }
10426
 
10427
    // isset id assignments
10428
 
10429
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10430
    static {
10431
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10432
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10433
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10434
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10435
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
10436
    }
10437
 
10438
    public unFulfillPO_result() {
10439
    }
10440
 
10441
    public unFulfillPO_result(
10442
      PurchaseServiceException e)
10443
    {
10444
      this();
10445
      this.e = e;
10446
    }
10447
 
10448
    /**
10449
     * Performs a deep copy on <i>other</i>.
10450
     */
10451
    public unFulfillPO_result(unFulfillPO_result other) {
10452
      if (other.isSetE()) {
10453
        this.e = new PurchaseServiceException(other.e);
10454
      }
10455
    }
10456
 
10457
    public unFulfillPO_result deepCopy() {
10458
      return new unFulfillPO_result(this);
10459
    }
10460
 
10461
    @Override
10462
    public void clear() {
10463
      this.e = null;
10464
    }
10465
 
10466
    public PurchaseServiceException getE() {
10467
      return this.e;
10468
    }
10469
 
10470
    public void setE(PurchaseServiceException e) {
10471
      this.e = e;
10472
    }
10473
 
10474
    public void unsetE() {
10475
      this.e = null;
10476
    }
10477
 
10478
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10479
    public boolean isSetE() {
10480
      return this.e != null;
10481
    }
10482
 
10483
    public void setEIsSet(boolean value) {
10484
      if (!value) {
10485
        this.e = null;
10486
      }
10487
    }
10488
 
10489
    public void setFieldValue(_Fields field, Object value) {
10490
      switch (field) {
10491
      case E:
10492
        if (value == null) {
10493
          unsetE();
10494
        } else {
10495
          setE((PurchaseServiceException)value);
10496
        }
10497
        break;
10498
 
10499
      }
10500
    }
10501
 
10502
    public Object getFieldValue(_Fields field) {
10503
      switch (field) {
10504
      case E:
10505
        return getE();
10506
 
10507
      }
10508
      throw new IllegalStateException();
10509
    }
10510
 
10511
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10512
    public boolean isSet(_Fields field) {
10513
      if (field == null) {
10514
        throw new IllegalArgumentException();
10515
      }
10516
 
10517
      switch (field) {
10518
      case E:
10519
        return isSetE();
10520
      }
10521
      throw new IllegalStateException();
10522
    }
10523
 
10524
    @Override
10525
    public boolean equals(Object that) {
10526
      if (that == null)
10527
        return false;
10528
      if (that instanceof unFulfillPO_result)
10529
        return this.equals((unFulfillPO_result)that);
10530
      return false;
10531
    }
10532
 
10533
    public boolean equals(unFulfillPO_result that) {
10534
      if (that == null)
10535
        return false;
10536
 
10537
      boolean this_present_e = true && this.isSetE();
10538
      boolean that_present_e = true && that.isSetE();
10539
      if (this_present_e || that_present_e) {
10540
        if (!(this_present_e && that_present_e))
10541
          return false;
10542
        if (!this.e.equals(that.e))
10543
          return false;
10544
      }
10545
 
10546
      return true;
10547
    }
10548
 
10549
    @Override
10550
    public int hashCode() {
10551
      return 0;
10552
    }
10553
 
10554
    public int compareTo(unFulfillPO_result other) {
10555
      if (!getClass().equals(other.getClass())) {
10556
        return getClass().getName().compareTo(other.getClass().getName());
10557
      }
10558
 
10559
      int lastComparison = 0;
10560
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
10561
 
10562
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10563
      if (lastComparison != 0) {
10564
        return lastComparison;
10565
      }
10566
      if (isSetE()) {
10567
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10568
        if (lastComparison != 0) {
10569
          return lastComparison;
10570
        }
10571
      }
10572
      return 0;
10573
    }
10574
 
10575
    public _Fields fieldForId(int fieldId) {
10576
      return _Fields.findByThriftId(fieldId);
10577
    }
10578
 
10579
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10580
      org.apache.thrift.protocol.TField field;
10581
      iprot.readStructBegin();
10582
      while (true)
10583
      {
10584
        field = iprot.readFieldBegin();
10585
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10586
          break;
10587
        }
10588
        switch (field.id) {
10589
          case 1: // E
10590
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10591
              this.e = new PurchaseServiceException();
10592
              this.e.read(iprot);
10593
            } else { 
10594
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10595
            }
10596
            break;
10597
          default:
10598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10599
        }
10600
        iprot.readFieldEnd();
10601
      }
10602
      iprot.readStructEnd();
10603
      validate();
10604
    }
10605
 
10606
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10607
      oprot.writeStructBegin(STRUCT_DESC);
10608
 
10609
      if (this.isSetE()) {
10610
        oprot.writeFieldBegin(E_FIELD_DESC);
10611
        this.e.write(oprot);
10612
        oprot.writeFieldEnd();
10613
      }
10614
      oprot.writeFieldStop();
10615
      oprot.writeStructEnd();
10616
    }
10617
 
10618
    @Override
10619
    public String toString() {
10620
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
10621
      boolean first = true;
10622
 
10623
      sb.append("e:");
10624
      if (this.e == null) {
10625
        sb.append("null");
10626
      } else {
10627
        sb.append(this.e);
10628
      }
10629
      first = false;
10630
      sb.append(")");
10631
      return sb.toString();
10632
    }
10633
 
10634
    public void validate() throws org.apache.thrift.TException {
10635
      // check for required fields
10636
    }
10637
 
10638
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10639
      try {
10640
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10641
      } catch (org.apache.thrift.TException te) {
10642
        throw new java.io.IOException(te);
10643
      }
10644
    }
10645
 
10646
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10647
      try {
10648
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10649
      } catch (org.apache.thrift.TException te) {
10650
        throw new java.io.IOException(te);
10651
      }
10652
    }
10653
 
10654
  }
10655
 
5443 mandeep.dh 10656
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
10657
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
10658
 
10659
    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);
10660
 
10661
    private long date; // required
10662
 
10663
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10664
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10665
      DATE((short)1, "date");
10666
 
10667
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10668
 
10669
      static {
10670
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10671
          byName.put(field.getFieldName(), field);
10672
        }
10673
      }
10674
 
10675
      /**
10676
       * Find the _Fields constant that matches fieldId, or null if its not found.
10677
       */
10678
      public static _Fields findByThriftId(int fieldId) {
10679
        switch(fieldId) {
10680
          case 1: // DATE
10681
            return DATE;
10682
          default:
10683
            return null;
10684
        }
10685
      }
10686
 
10687
      /**
10688
       * Find the _Fields constant that matches fieldId, throwing an exception
10689
       * if it is not found.
10690
       */
10691
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10692
        _Fields fields = findByThriftId(fieldId);
10693
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10694
        return fields;
10695
      }
10696
 
10697
      /**
10698
       * Find the _Fields constant that matches name, or null if its not found.
10699
       */
10700
      public static _Fields findByName(String name) {
10701
        return byName.get(name);
10702
      }
10703
 
10704
      private final short _thriftId;
10705
      private final String _fieldName;
10706
 
10707
      _Fields(short thriftId, String fieldName) {
10708
        _thriftId = thriftId;
10709
        _fieldName = fieldName;
10710
      }
10711
 
10712
      public short getThriftFieldId() {
10713
        return _thriftId;
10714
      }
10715
 
10716
      public String getFieldName() {
10717
        return _fieldName;
10718
      }
10719
    }
10720
 
10721
    // isset id assignments
10722
    private static final int __DATE_ISSET_ID = 0;
10723
    private BitSet __isset_bit_vector = new BitSet(1);
10724
 
10725
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10726
    static {
10727
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10728
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10729
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10730
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10731
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
10732
    }
10733
 
10734
    public getInvoices_args() {
10735
    }
10736
 
10737
    public getInvoices_args(
10738
      long date)
10739
    {
10740
      this();
10741
      this.date = date;
10742
      setDateIsSet(true);
10743
    }
10744
 
10745
    /**
10746
     * Performs a deep copy on <i>other</i>.
10747
     */
10748
    public getInvoices_args(getInvoices_args other) {
10749
      __isset_bit_vector.clear();
10750
      __isset_bit_vector.or(other.__isset_bit_vector);
10751
      this.date = other.date;
10752
    }
10753
 
10754
    public getInvoices_args deepCopy() {
10755
      return new getInvoices_args(this);
10756
    }
10757
 
10758
    @Override
10759
    public void clear() {
10760
      setDateIsSet(false);
10761
      this.date = 0;
10762
    }
10763
 
10764
    public long getDate() {
10765
      return this.date;
10766
    }
10767
 
10768
    public void setDate(long date) {
10769
      this.date = date;
10770
      setDateIsSet(true);
10771
    }
10772
 
10773
    public void unsetDate() {
10774
      __isset_bit_vector.clear(__DATE_ISSET_ID);
10775
    }
10776
 
10777
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
10778
    public boolean isSetDate() {
10779
      return __isset_bit_vector.get(__DATE_ISSET_ID);
10780
    }
10781
 
10782
    public void setDateIsSet(boolean value) {
10783
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
10784
    }
10785
 
10786
    public void setFieldValue(_Fields field, Object value) {
10787
      switch (field) {
10788
      case DATE:
10789
        if (value == null) {
10790
          unsetDate();
10791
        } else {
10792
          setDate((Long)value);
10793
        }
10794
        break;
10795
 
10796
      }
10797
    }
10798
 
10799
    public Object getFieldValue(_Fields field) {
10800
      switch (field) {
10801
      case DATE:
10802
        return Long.valueOf(getDate());
10803
 
10804
      }
10805
      throw new IllegalStateException();
10806
    }
10807
 
10808
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10809
    public boolean isSet(_Fields field) {
10810
      if (field == null) {
10811
        throw new IllegalArgumentException();
10812
      }
10813
 
10814
      switch (field) {
10815
      case DATE:
10816
        return isSetDate();
10817
      }
10818
      throw new IllegalStateException();
10819
    }
10820
 
10821
    @Override
10822
    public boolean equals(Object that) {
10823
      if (that == null)
10824
        return false;
10825
      if (that instanceof getInvoices_args)
10826
        return this.equals((getInvoices_args)that);
10827
      return false;
10828
    }
10829
 
10830
    public boolean equals(getInvoices_args that) {
10831
      if (that == null)
10832
        return false;
10833
 
10834
      boolean this_present_date = true;
10835
      boolean that_present_date = true;
10836
      if (this_present_date || that_present_date) {
10837
        if (!(this_present_date && that_present_date))
10838
          return false;
10839
        if (this.date != that.date)
10840
          return false;
10841
      }
10842
 
10843
      return true;
10844
    }
10845
 
10846
    @Override
10847
    public int hashCode() {
10848
      return 0;
10849
    }
10850
 
10851
    public int compareTo(getInvoices_args other) {
10852
      if (!getClass().equals(other.getClass())) {
10853
        return getClass().getName().compareTo(other.getClass().getName());
10854
      }
10855
 
10856
      int lastComparison = 0;
10857
      getInvoices_args typedOther = (getInvoices_args)other;
10858
 
10859
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
10860
      if (lastComparison != 0) {
10861
        return lastComparison;
10862
      }
10863
      if (isSetDate()) {
10864
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
10865
        if (lastComparison != 0) {
10866
          return lastComparison;
10867
        }
10868
      }
10869
      return 0;
10870
    }
10871
 
10872
    public _Fields fieldForId(int fieldId) {
10873
      return _Fields.findByThriftId(fieldId);
10874
    }
10875
 
10876
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10877
      org.apache.thrift.protocol.TField field;
10878
      iprot.readStructBegin();
10879
      while (true)
10880
      {
10881
        field = iprot.readFieldBegin();
10882
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10883
          break;
10884
        }
10885
        switch (field.id) {
10886
          case 1: // DATE
10887
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10888
              this.date = iprot.readI64();
10889
              setDateIsSet(true);
10890
            } else { 
10891
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10892
            }
10893
            break;
10894
          default:
10895
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10896
        }
10897
        iprot.readFieldEnd();
10898
      }
10899
      iprot.readStructEnd();
10900
      validate();
10901
    }
10902
 
10903
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10904
      validate();
10905
 
10906
      oprot.writeStructBegin(STRUCT_DESC);
10907
      oprot.writeFieldBegin(DATE_FIELD_DESC);
10908
      oprot.writeI64(this.date);
10909
      oprot.writeFieldEnd();
10910
      oprot.writeFieldStop();
10911
      oprot.writeStructEnd();
10912
    }
10913
 
10914
    @Override
10915
    public String toString() {
10916
      StringBuilder sb = new StringBuilder("getInvoices_args(");
10917
      boolean first = true;
10918
 
10919
      sb.append("date:");
10920
      sb.append(this.date);
10921
      first = false;
10922
      sb.append(")");
10923
      return sb.toString();
10924
    }
10925
 
10926
    public void validate() throws org.apache.thrift.TException {
10927
      // check for required fields
10928
    }
10929
 
10930
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10931
      try {
10932
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10933
      } catch (org.apache.thrift.TException te) {
10934
        throw new java.io.IOException(te);
10935
      }
10936
    }
10937
 
10938
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10939
      try {
10940
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10941
        __isset_bit_vector = new BitSet(1);
10942
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10943
      } catch (org.apache.thrift.TException te) {
10944
        throw new java.io.IOException(te);
10945
      }
10946
    }
10947
 
10948
  }
10949
 
10950
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
10951
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
10952
 
10953
    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);
10954
 
10955
    private List<Invoice> success; // required
10956
 
10957
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10958
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10959
      SUCCESS((short)0, "success");
10960
 
10961
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10962
 
10963
      static {
10964
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10965
          byName.put(field.getFieldName(), field);
10966
        }
10967
      }
10968
 
10969
      /**
10970
       * Find the _Fields constant that matches fieldId, or null if its not found.
10971
       */
10972
      public static _Fields findByThriftId(int fieldId) {
10973
        switch(fieldId) {
10974
          case 0: // SUCCESS
10975
            return SUCCESS;
10976
          default:
10977
            return null;
10978
        }
10979
      }
10980
 
10981
      /**
10982
       * Find the _Fields constant that matches fieldId, throwing an exception
10983
       * if it is not found.
10984
       */
10985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10986
        _Fields fields = findByThriftId(fieldId);
10987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10988
        return fields;
10989
      }
10990
 
10991
      /**
10992
       * Find the _Fields constant that matches name, or null if its not found.
10993
       */
10994
      public static _Fields findByName(String name) {
10995
        return byName.get(name);
10996
      }
10997
 
10998
      private final short _thriftId;
10999
      private final String _fieldName;
11000
 
11001
      _Fields(short thriftId, String fieldName) {
11002
        _thriftId = thriftId;
11003
        _fieldName = fieldName;
11004
      }
11005
 
11006
      public short getThriftFieldId() {
11007
        return _thriftId;
11008
      }
11009
 
11010
      public String getFieldName() {
11011
        return _fieldName;
11012
      }
11013
    }
11014
 
11015
    // isset id assignments
11016
 
11017
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11018
    static {
11019
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11020
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11021
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11022
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
11023
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11024
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
11025
    }
11026
 
11027
    public getInvoices_result() {
11028
    }
11029
 
11030
    public getInvoices_result(
11031
      List<Invoice> success)
11032
    {
11033
      this();
11034
      this.success = success;
11035
    }
11036
 
11037
    /**
11038
     * Performs a deep copy on <i>other</i>.
11039
     */
11040
    public getInvoices_result(getInvoices_result other) {
11041
      if (other.isSetSuccess()) {
11042
        List<Invoice> __this__success = new ArrayList<Invoice>();
11043
        for (Invoice other_element : other.success) {
11044
          __this__success.add(new Invoice(other_element));
11045
        }
11046
        this.success = __this__success;
11047
      }
11048
    }
11049
 
11050
    public getInvoices_result deepCopy() {
11051
      return new getInvoices_result(this);
11052
    }
11053
 
11054
    @Override
11055
    public void clear() {
11056
      this.success = null;
11057
    }
11058
 
11059
    public int getSuccessSize() {
11060
      return (this.success == null) ? 0 : this.success.size();
11061
    }
11062
 
11063
    public java.util.Iterator<Invoice> getSuccessIterator() {
11064
      return (this.success == null) ? null : this.success.iterator();
11065
    }
11066
 
11067
    public void addToSuccess(Invoice elem) {
11068
      if (this.success == null) {
11069
        this.success = new ArrayList<Invoice>();
11070
      }
11071
      this.success.add(elem);
11072
    }
11073
 
11074
    public List<Invoice> getSuccess() {
11075
      return this.success;
11076
    }
11077
 
11078
    public void setSuccess(List<Invoice> success) {
11079
      this.success = success;
11080
    }
11081
 
11082
    public void unsetSuccess() {
11083
      this.success = null;
11084
    }
11085
 
11086
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11087
    public boolean isSetSuccess() {
11088
      return this.success != null;
11089
    }
11090
 
11091
    public void setSuccessIsSet(boolean value) {
11092
      if (!value) {
11093
        this.success = null;
11094
      }
11095
    }
11096
 
11097
    public void setFieldValue(_Fields field, Object value) {
11098
      switch (field) {
11099
      case SUCCESS:
11100
        if (value == null) {
11101
          unsetSuccess();
11102
        } else {
11103
          setSuccess((List<Invoice>)value);
11104
        }
11105
        break;
11106
 
11107
      }
11108
    }
11109
 
11110
    public Object getFieldValue(_Fields field) {
11111
      switch (field) {
11112
      case SUCCESS:
11113
        return getSuccess();
11114
 
11115
      }
11116
      throw new IllegalStateException();
11117
    }
11118
 
11119
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11120
    public boolean isSet(_Fields field) {
11121
      if (field == null) {
11122
        throw new IllegalArgumentException();
11123
      }
11124
 
11125
      switch (field) {
11126
      case SUCCESS:
11127
        return isSetSuccess();
11128
      }
11129
      throw new IllegalStateException();
11130
    }
11131
 
11132
    @Override
11133
    public boolean equals(Object that) {
11134
      if (that == null)
11135
        return false;
11136
      if (that instanceof getInvoices_result)
11137
        return this.equals((getInvoices_result)that);
11138
      return false;
11139
    }
11140
 
11141
    public boolean equals(getInvoices_result that) {
11142
      if (that == null)
11143
        return false;
11144
 
11145
      boolean this_present_success = true && this.isSetSuccess();
11146
      boolean that_present_success = true && that.isSetSuccess();
11147
      if (this_present_success || that_present_success) {
11148
        if (!(this_present_success && that_present_success))
11149
          return false;
11150
        if (!this.success.equals(that.success))
11151
          return false;
11152
      }
11153
 
11154
      return true;
11155
    }
11156
 
11157
    @Override
11158
    public int hashCode() {
11159
      return 0;
11160
    }
11161
 
11162
    public int compareTo(getInvoices_result other) {
11163
      if (!getClass().equals(other.getClass())) {
11164
        return getClass().getName().compareTo(other.getClass().getName());
11165
      }
11166
 
11167
      int lastComparison = 0;
11168
      getInvoices_result typedOther = (getInvoices_result)other;
11169
 
11170
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11171
      if (lastComparison != 0) {
11172
        return lastComparison;
11173
      }
11174
      if (isSetSuccess()) {
11175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11176
        if (lastComparison != 0) {
11177
          return lastComparison;
11178
        }
11179
      }
11180
      return 0;
11181
    }
11182
 
11183
    public _Fields fieldForId(int fieldId) {
11184
      return _Fields.findByThriftId(fieldId);
11185
    }
11186
 
11187
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11188
      org.apache.thrift.protocol.TField field;
11189
      iprot.readStructBegin();
11190
      while (true)
11191
      {
11192
        field = iprot.readFieldBegin();
11193
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11194
          break;
11195
        }
11196
        switch (field.id) {
11197
          case 0: // SUCCESS
11198
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11199
              {
11200
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
11201
                this.success = new ArrayList<Invoice>(_list20.size);
11202
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
11203
                {
11204
                  Invoice _elem22; // required
11205
                  _elem22 = new Invoice();
11206
                  _elem22.read(iprot);
11207
                  this.success.add(_elem22);
11208
                }
11209
                iprot.readListEnd();
11210
              }
11211
            } else { 
11212
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11213
            }
11214
            break;
11215
          default:
11216
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11217
        }
11218
        iprot.readFieldEnd();
11219
      }
11220
      iprot.readStructEnd();
11221
      validate();
11222
    }
11223
 
11224
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11225
      oprot.writeStructBegin(STRUCT_DESC);
11226
 
11227
      if (this.isSetSuccess()) {
11228
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11229
        {
11230
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11231
          for (Invoice _iter23 : this.success)
11232
          {
11233
            _iter23.write(oprot);
11234
          }
11235
          oprot.writeListEnd();
11236
        }
11237
        oprot.writeFieldEnd();
11238
      }
11239
      oprot.writeFieldStop();
11240
      oprot.writeStructEnd();
11241
    }
11242
 
11243
    @Override
11244
    public String toString() {
11245
      StringBuilder sb = new StringBuilder("getInvoices_result(");
11246
      boolean first = true;
11247
 
11248
      sb.append("success:");
11249
      if (this.success == null) {
11250
        sb.append("null");
11251
      } else {
11252
        sb.append(this.success);
11253
      }
11254
      first = false;
11255
      sb.append(")");
11256
      return sb.toString();
11257
    }
11258
 
11259
    public void validate() throws org.apache.thrift.TException {
11260
      // check for required fields
11261
    }
11262
 
11263
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11264
      try {
11265
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11266
      } catch (org.apache.thrift.TException te) {
11267
        throw new java.io.IOException(te);
11268
      }
11269
    }
11270
 
11271
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11272
      try {
11273
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11274
      } catch (org.apache.thrift.TException te) {
11275
        throw new java.io.IOException(te);
11276
      }
11277
    }
11278
 
11279
  }
11280
 
11281
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
11282
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
11283
 
11284
    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);
11285
 
11286
    private Invoice invoice; // required
11287
 
11288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11289
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11290
      INVOICE((short)1, "invoice");
11291
 
11292
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11293
 
11294
      static {
11295
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11296
          byName.put(field.getFieldName(), field);
11297
        }
11298
      }
11299
 
11300
      /**
11301
       * Find the _Fields constant that matches fieldId, or null if its not found.
11302
       */
11303
      public static _Fields findByThriftId(int fieldId) {
11304
        switch(fieldId) {
11305
          case 1: // INVOICE
11306
            return INVOICE;
11307
          default:
11308
            return null;
11309
        }
11310
      }
11311
 
11312
      /**
11313
       * Find the _Fields constant that matches fieldId, throwing an exception
11314
       * if it is not found.
11315
       */
11316
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11317
        _Fields fields = findByThriftId(fieldId);
11318
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11319
        return fields;
11320
      }
11321
 
11322
      /**
11323
       * Find the _Fields constant that matches name, or null if its not found.
11324
       */
11325
      public static _Fields findByName(String name) {
11326
        return byName.get(name);
11327
      }
11328
 
11329
      private final short _thriftId;
11330
      private final String _fieldName;
11331
 
11332
      _Fields(short thriftId, String fieldName) {
11333
        _thriftId = thriftId;
11334
        _fieldName = fieldName;
11335
      }
11336
 
11337
      public short getThriftFieldId() {
11338
        return _thriftId;
11339
      }
11340
 
11341
      public String getFieldName() {
11342
        return _fieldName;
11343
      }
11344
    }
11345
 
11346
    // isset id assignments
11347
 
11348
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11349
    static {
11350
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11351
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11352
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
11353
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11354
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
11355
    }
11356
 
11357
    public createInvoice_args() {
11358
    }
11359
 
11360
    public createInvoice_args(
11361
      Invoice invoice)
11362
    {
11363
      this();
11364
      this.invoice = invoice;
11365
    }
11366
 
11367
    /**
11368
     * Performs a deep copy on <i>other</i>.
11369
     */
11370
    public createInvoice_args(createInvoice_args other) {
11371
      if (other.isSetInvoice()) {
11372
        this.invoice = new Invoice(other.invoice);
11373
      }
11374
    }
11375
 
11376
    public createInvoice_args deepCopy() {
11377
      return new createInvoice_args(this);
11378
    }
11379
 
11380
    @Override
11381
    public void clear() {
11382
      this.invoice = null;
11383
    }
11384
 
11385
    public Invoice getInvoice() {
11386
      return this.invoice;
11387
    }
11388
 
11389
    public void setInvoice(Invoice invoice) {
11390
      this.invoice = invoice;
11391
    }
11392
 
11393
    public void unsetInvoice() {
11394
      this.invoice = null;
11395
    }
11396
 
11397
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
11398
    public boolean isSetInvoice() {
11399
      return this.invoice != null;
11400
    }
11401
 
11402
    public void setInvoiceIsSet(boolean value) {
11403
      if (!value) {
11404
        this.invoice = null;
11405
      }
11406
    }
11407
 
11408
    public void setFieldValue(_Fields field, Object value) {
11409
      switch (field) {
11410
      case INVOICE:
11411
        if (value == null) {
11412
          unsetInvoice();
11413
        } else {
11414
          setInvoice((Invoice)value);
11415
        }
11416
        break;
11417
 
11418
      }
11419
    }
11420
 
11421
    public Object getFieldValue(_Fields field) {
11422
      switch (field) {
11423
      case INVOICE:
11424
        return getInvoice();
11425
 
11426
      }
11427
      throw new IllegalStateException();
11428
    }
11429
 
11430
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11431
    public boolean isSet(_Fields field) {
11432
      if (field == null) {
11433
        throw new IllegalArgumentException();
11434
      }
11435
 
11436
      switch (field) {
11437
      case INVOICE:
11438
        return isSetInvoice();
11439
      }
11440
      throw new IllegalStateException();
11441
    }
11442
 
11443
    @Override
11444
    public boolean equals(Object that) {
11445
      if (that == null)
11446
        return false;
11447
      if (that instanceof createInvoice_args)
11448
        return this.equals((createInvoice_args)that);
11449
      return false;
11450
    }
11451
 
11452
    public boolean equals(createInvoice_args that) {
11453
      if (that == null)
11454
        return false;
11455
 
11456
      boolean this_present_invoice = true && this.isSetInvoice();
11457
      boolean that_present_invoice = true && that.isSetInvoice();
11458
      if (this_present_invoice || that_present_invoice) {
11459
        if (!(this_present_invoice && that_present_invoice))
11460
          return false;
11461
        if (!this.invoice.equals(that.invoice))
11462
          return false;
11463
      }
11464
 
11465
      return true;
11466
    }
11467
 
11468
    @Override
11469
    public int hashCode() {
11470
      return 0;
11471
    }
11472
 
11473
    public int compareTo(createInvoice_args other) {
11474
      if (!getClass().equals(other.getClass())) {
11475
        return getClass().getName().compareTo(other.getClass().getName());
11476
      }
11477
 
11478
      int lastComparison = 0;
11479
      createInvoice_args typedOther = (createInvoice_args)other;
11480
 
11481
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
11482
      if (lastComparison != 0) {
11483
        return lastComparison;
11484
      }
11485
      if (isSetInvoice()) {
11486
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
11487
        if (lastComparison != 0) {
11488
          return lastComparison;
11489
        }
11490
      }
11491
      return 0;
11492
    }
11493
 
11494
    public _Fields fieldForId(int fieldId) {
11495
      return _Fields.findByThriftId(fieldId);
11496
    }
11497
 
11498
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11499
      org.apache.thrift.protocol.TField field;
11500
      iprot.readStructBegin();
11501
      while (true)
11502
      {
11503
        field = iprot.readFieldBegin();
11504
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11505
          break;
11506
        }
11507
        switch (field.id) {
11508
          case 1: // INVOICE
11509
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11510
              this.invoice = new Invoice();
11511
              this.invoice.read(iprot);
11512
            } else { 
11513
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11514
            }
11515
            break;
11516
          default:
11517
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11518
        }
11519
        iprot.readFieldEnd();
11520
      }
11521
      iprot.readStructEnd();
11522
      validate();
11523
    }
11524
 
11525
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11526
      validate();
11527
 
11528
      oprot.writeStructBegin(STRUCT_DESC);
11529
      if (this.invoice != null) {
11530
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
11531
        this.invoice.write(oprot);
11532
        oprot.writeFieldEnd();
11533
      }
11534
      oprot.writeFieldStop();
11535
      oprot.writeStructEnd();
11536
    }
11537
 
11538
    @Override
11539
    public String toString() {
11540
      StringBuilder sb = new StringBuilder("createInvoice_args(");
11541
      boolean first = true;
11542
 
11543
      sb.append("invoice:");
11544
      if (this.invoice == null) {
11545
        sb.append("null");
11546
      } else {
11547
        sb.append(this.invoice);
11548
      }
11549
      first = false;
11550
      sb.append(")");
11551
      return sb.toString();
11552
    }
11553
 
11554
    public void validate() throws org.apache.thrift.TException {
11555
      // check for required fields
11556
    }
11557
 
11558
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11559
      try {
11560
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11561
      } catch (org.apache.thrift.TException te) {
11562
        throw new java.io.IOException(te);
11563
      }
11564
    }
11565
 
11566
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11567
      try {
11568
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11569
      } catch (org.apache.thrift.TException te) {
11570
        throw new java.io.IOException(te);
11571
      }
11572
    }
11573
 
11574
  }
11575
 
11576
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
11577
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
11578
 
11579
    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);
11580
 
11581
    private PurchaseServiceException e; // required
11582
 
11583
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11584
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11585
      E((short)1, "e");
11586
 
11587
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11588
 
11589
      static {
11590
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11591
          byName.put(field.getFieldName(), field);
11592
        }
11593
      }
11594
 
11595
      /**
11596
       * Find the _Fields constant that matches fieldId, or null if its not found.
11597
       */
11598
      public static _Fields findByThriftId(int fieldId) {
11599
        switch(fieldId) {
11600
          case 1: // E
11601
            return E;
11602
          default:
11603
            return null;
11604
        }
11605
      }
11606
 
11607
      /**
11608
       * Find the _Fields constant that matches fieldId, throwing an exception
11609
       * if it is not found.
11610
       */
11611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11612
        _Fields fields = findByThriftId(fieldId);
11613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11614
        return fields;
11615
      }
11616
 
11617
      /**
11618
       * Find the _Fields constant that matches name, or null if its not found.
11619
       */
11620
      public static _Fields findByName(String name) {
11621
        return byName.get(name);
11622
      }
11623
 
11624
      private final short _thriftId;
11625
      private final String _fieldName;
11626
 
11627
      _Fields(short thriftId, String fieldName) {
11628
        _thriftId = thriftId;
11629
        _fieldName = fieldName;
11630
      }
11631
 
11632
      public short getThriftFieldId() {
11633
        return _thriftId;
11634
      }
11635
 
11636
      public String getFieldName() {
11637
        return _fieldName;
11638
      }
11639
    }
11640
 
11641
    // isset id assignments
11642
 
11643
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11644
    static {
11645
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11646
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11647
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11648
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11649
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
11650
    }
11651
 
11652
    public createInvoice_result() {
11653
    }
11654
 
11655
    public createInvoice_result(
11656
      PurchaseServiceException e)
11657
    {
11658
      this();
11659
      this.e = e;
11660
    }
11661
 
11662
    /**
11663
     * Performs a deep copy on <i>other</i>.
11664
     */
11665
    public createInvoice_result(createInvoice_result other) {
11666
      if (other.isSetE()) {
11667
        this.e = new PurchaseServiceException(other.e);
11668
      }
11669
    }
11670
 
11671
    public createInvoice_result deepCopy() {
11672
      return new createInvoice_result(this);
11673
    }
11674
 
11675
    @Override
11676
    public void clear() {
11677
      this.e = null;
11678
    }
11679
 
11680
    public PurchaseServiceException getE() {
11681
      return this.e;
11682
    }
11683
 
11684
    public void setE(PurchaseServiceException e) {
11685
      this.e = e;
11686
    }
11687
 
11688
    public void unsetE() {
11689
      this.e = null;
11690
    }
11691
 
11692
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
11693
    public boolean isSetE() {
11694
      return this.e != null;
11695
    }
11696
 
11697
    public void setEIsSet(boolean value) {
11698
      if (!value) {
11699
        this.e = null;
11700
      }
11701
    }
11702
 
11703
    public void setFieldValue(_Fields field, Object value) {
11704
      switch (field) {
11705
      case E:
11706
        if (value == null) {
11707
          unsetE();
11708
        } else {
11709
          setE((PurchaseServiceException)value);
11710
        }
11711
        break;
11712
 
11713
      }
11714
    }
11715
 
11716
    public Object getFieldValue(_Fields field) {
11717
      switch (field) {
11718
      case E:
11719
        return getE();
11720
 
11721
      }
11722
      throw new IllegalStateException();
11723
    }
11724
 
11725
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11726
    public boolean isSet(_Fields field) {
11727
      if (field == null) {
11728
        throw new IllegalArgumentException();
11729
      }
11730
 
11731
      switch (field) {
11732
      case E:
11733
        return isSetE();
11734
      }
11735
      throw new IllegalStateException();
11736
    }
11737
 
11738
    @Override
11739
    public boolean equals(Object that) {
11740
      if (that == null)
11741
        return false;
11742
      if (that instanceof createInvoice_result)
11743
        return this.equals((createInvoice_result)that);
11744
      return false;
11745
    }
11746
 
11747
    public boolean equals(createInvoice_result that) {
11748
      if (that == null)
11749
        return false;
11750
 
11751
      boolean this_present_e = true && this.isSetE();
11752
      boolean that_present_e = true && that.isSetE();
11753
      if (this_present_e || that_present_e) {
11754
        if (!(this_present_e && that_present_e))
11755
          return false;
11756
        if (!this.e.equals(that.e))
11757
          return false;
11758
      }
11759
 
11760
      return true;
11761
    }
11762
 
11763
    @Override
11764
    public int hashCode() {
11765
      return 0;
11766
    }
11767
 
11768
    public int compareTo(createInvoice_result other) {
11769
      if (!getClass().equals(other.getClass())) {
11770
        return getClass().getName().compareTo(other.getClass().getName());
11771
      }
11772
 
11773
      int lastComparison = 0;
11774
      createInvoice_result typedOther = (createInvoice_result)other;
11775
 
11776
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
11777
      if (lastComparison != 0) {
11778
        return lastComparison;
11779
      }
11780
      if (isSetE()) {
11781
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
11782
        if (lastComparison != 0) {
11783
          return lastComparison;
11784
        }
11785
      }
11786
      return 0;
11787
    }
11788
 
11789
    public _Fields fieldForId(int fieldId) {
11790
      return _Fields.findByThriftId(fieldId);
11791
    }
11792
 
11793
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11794
      org.apache.thrift.protocol.TField field;
11795
      iprot.readStructBegin();
11796
      while (true)
11797
      {
11798
        field = iprot.readFieldBegin();
11799
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11800
          break;
11801
        }
11802
        switch (field.id) {
11803
          case 1: // E
11804
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11805
              this.e = new PurchaseServiceException();
11806
              this.e.read(iprot);
11807
            } else { 
11808
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11809
            }
11810
            break;
11811
          default:
11812
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11813
        }
11814
        iprot.readFieldEnd();
11815
      }
11816
      iprot.readStructEnd();
11817
      validate();
11818
    }
11819
 
11820
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11821
      oprot.writeStructBegin(STRUCT_DESC);
11822
 
11823
      if (this.isSetE()) {
11824
        oprot.writeFieldBegin(E_FIELD_DESC);
11825
        this.e.write(oprot);
11826
        oprot.writeFieldEnd();
11827
      }
11828
      oprot.writeFieldStop();
11829
      oprot.writeStructEnd();
11830
    }
11831
 
11832
    @Override
11833
    public String toString() {
11834
      StringBuilder sb = new StringBuilder("createInvoice_result(");
11835
      boolean first = true;
11836
 
11837
      sb.append("e:");
11838
      if (this.e == null) {
11839
        sb.append("null");
11840
      } else {
11841
        sb.append(this.e);
11842
      }
11843
      first = false;
11844
      sb.append(")");
11845
      return sb.toString();
11846
    }
11847
 
11848
    public void validate() throws org.apache.thrift.TException {
11849
      // check for required fields
11850
    }
11851
 
11852
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11853
      try {
11854
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11855
      } catch (org.apache.thrift.TException te) {
11856
        throw new java.io.IOException(te);
11857
      }
11858
    }
11859
 
11860
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11861
      try {
11862
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11863
      } catch (org.apache.thrift.TException te) {
11864
        throw new java.io.IOException(te);
11865
      }
11866
    }
11867
 
11868
  }
11869
 
5591 mandeep.dh 11870
  public static class addSupplier_args implements org.apache.thrift.TBase<addSupplier_args, addSupplier_args._Fields>, java.io.Serializable, Cloneable   {
11871
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_args");
11872
 
11873
    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);
11874
 
11875
    private Supplier supplier; // required
11876
 
11877
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11878
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11879
      SUPPLIER((short)1, "supplier");
11880
 
11881
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11882
 
11883
      static {
11884
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11885
          byName.put(field.getFieldName(), field);
11886
        }
11887
      }
11888
 
11889
      /**
11890
       * Find the _Fields constant that matches fieldId, or null if its not found.
11891
       */
11892
      public static _Fields findByThriftId(int fieldId) {
11893
        switch(fieldId) {
11894
          case 1: // SUPPLIER
11895
            return SUPPLIER;
11896
          default:
11897
            return null;
11898
        }
11899
      }
11900
 
11901
      /**
11902
       * Find the _Fields constant that matches fieldId, throwing an exception
11903
       * if it is not found.
11904
       */
11905
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11906
        _Fields fields = findByThriftId(fieldId);
11907
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11908
        return fields;
11909
      }
11910
 
11911
      /**
11912
       * Find the _Fields constant that matches name, or null if its not found.
11913
       */
11914
      public static _Fields findByName(String name) {
11915
        return byName.get(name);
11916
      }
11917
 
11918
      private final short _thriftId;
11919
      private final String _fieldName;
11920
 
11921
      _Fields(short thriftId, String fieldName) {
11922
        _thriftId = thriftId;
11923
        _fieldName = fieldName;
11924
      }
11925
 
11926
      public short getThriftFieldId() {
11927
        return _thriftId;
11928
      }
11929
 
11930
      public String getFieldName() {
11931
        return _fieldName;
11932
      }
11933
    }
11934
 
11935
    // isset id assignments
11936
 
11937
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11938
    static {
11939
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11940
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11941
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
11942
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11943
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_args.class, metaDataMap);
11944
    }
11945
 
11946
    public addSupplier_args() {
11947
    }
11948
 
11949
    public addSupplier_args(
11950
      Supplier supplier)
11951
    {
11952
      this();
11953
      this.supplier = supplier;
11954
    }
11955
 
11956
    /**
11957
     * Performs a deep copy on <i>other</i>.
11958
     */
11959
    public addSupplier_args(addSupplier_args other) {
11960
      if (other.isSetSupplier()) {
11961
        this.supplier = new Supplier(other.supplier);
11962
      }
11963
    }
11964
 
11965
    public addSupplier_args deepCopy() {
11966
      return new addSupplier_args(this);
11967
    }
11968
 
11969
    @Override
11970
    public void clear() {
11971
      this.supplier = null;
11972
    }
11973
 
11974
    public Supplier getSupplier() {
11975
      return this.supplier;
11976
    }
11977
 
11978
    public void setSupplier(Supplier supplier) {
11979
      this.supplier = supplier;
11980
    }
11981
 
11982
    public void unsetSupplier() {
11983
      this.supplier = null;
11984
    }
11985
 
11986
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
11987
    public boolean isSetSupplier() {
11988
      return this.supplier != null;
11989
    }
11990
 
11991
    public void setSupplierIsSet(boolean value) {
11992
      if (!value) {
11993
        this.supplier = null;
11994
      }
11995
    }
11996
 
11997
    public void setFieldValue(_Fields field, Object value) {
11998
      switch (field) {
11999
      case SUPPLIER:
12000
        if (value == null) {
12001
          unsetSupplier();
12002
        } else {
12003
          setSupplier((Supplier)value);
12004
        }
12005
        break;
12006
 
12007
      }
12008
    }
12009
 
12010
    public Object getFieldValue(_Fields field) {
12011
      switch (field) {
12012
      case SUPPLIER:
12013
        return getSupplier();
12014
 
12015
      }
12016
      throw new IllegalStateException();
12017
    }
12018
 
12019
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12020
    public boolean isSet(_Fields field) {
12021
      if (field == null) {
12022
        throw new IllegalArgumentException();
12023
      }
12024
 
12025
      switch (field) {
12026
      case SUPPLIER:
12027
        return isSetSupplier();
12028
      }
12029
      throw new IllegalStateException();
12030
    }
12031
 
12032
    @Override
12033
    public boolean equals(Object that) {
12034
      if (that == null)
12035
        return false;
12036
      if (that instanceof addSupplier_args)
12037
        return this.equals((addSupplier_args)that);
12038
      return false;
12039
    }
12040
 
12041
    public boolean equals(addSupplier_args that) {
12042
      if (that == null)
12043
        return false;
12044
 
12045
      boolean this_present_supplier = true && this.isSetSupplier();
12046
      boolean that_present_supplier = true && that.isSetSupplier();
12047
      if (this_present_supplier || that_present_supplier) {
12048
        if (!(this_present_supplier && that_present_supplier))
12049
          return false;
12050
        if (!this.supplier.equals(that.supplier))
12051
          return false;
12052
      }
12053
 
12054
      return true;
12055
    }
12056
 
12057
    @Override
12058
    public int hashCode() {
12059
      return 0;
12060
    }
12061
 
12062
    public int compareTo(addSupplier_args other) {
12063
      if (!getClass().equals(other.getClass())) {
12064
        return getClass().getName().compareTo(other.getClass().getName());
12065
      }
12066
 
12067
      int lastComparison = 0;
12068
      addSupplier_args typedOther = (addSupplier_args)other;
12069
 
12070
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
12071
      if (lastComparison != 0) {
12072
        return lastComparison;
12073
      }
12074
      if (isSetSupplier()) {
12075
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
12076
        if (lastComparison != 0) {
12077
          return lastComparison;
12078
        }
12079
      }
12080
      return 0;
12081
    }
12082
 
12083
    public _Fields fieldForId(int fieldId) {
12084
      return _Fields.findByThriftId(fieldId);
12085
    }
12086
 
12087
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12088
      org.apache.thrift.protocol.TField field;
12089
      iprot.readStructBegin();
12090
      while (true)
12091
      {
12092
        field = iprot.readFieldBegin();
12093
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12094
          break;
12095
        }
12096
        switch (field.id) {
12097
          case 1: // SUPPLIER
12098
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12099
              this.supplier = new Supplier();
12100
              this.supplier.read(iprot);
12101
            } else { 
12102
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12103
            }
12104
            break;
12105
          default:
12106
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12107
        }
12108
        iprot.readFieldEnd();
12109
      }
12110
      iprot.readStructEnd();
12111
      validate();
12112
    }
12113
 
12114
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12115
      validate();
12116
 
12117
      oprot.writeStructBegin(STRUCT_DESC);
12118
      if (this.supplier != null) {
12119
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
12120
        this.supplier.write(oprot);
12121
        oprot.writeFieldEnd();
12122
      }
12123
      oprot.writeFieldStop();
12124
      oprot.writeStructEnd();
12125
    }
12126
 
12127
    @Override
12128
    public String toString() {
12129
      StringBuilder sb = new StringBuilder("addSupplier_args(");
12130
      boolean first = true;
12131
 
12132
      sb.append("supplier:");
12133
      if (this.supplier == null) {
12134
        sb.append("null");
12135
      } else {
12136
        sb.append(this.supplier);
12137
      }
12138
      first = false;
12139
      sb.append(")");
12140
      return sb.toString();
12141
    }
12142
 
12143
    public void validate() throws org.apache.thrift.TException {
12144
      // check for required fields
12145
    }
12146
 
12147
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12148
      try {
12149
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12150
      } catch (org.apache.thrift.TException te) {
12151
        throw new java.io.IOException(te);
12152
      }
12153
    }
12154
 
12155
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12156
      try {
12157
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12158
      } catch (org.apache.thrift.TException te) {
12159
        throw new java.io.IOException(te);
12160
      }
12161
    }
12162
 
12163
  }
12164
 
12165
  public static class addSupplier_result implements org.apache.thrift.TBase<addSupplier_result, addSupplier_result._Fields>, java.io.Serializable, Cloneable   {
12166
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSupplier_result");
12167
 
12168
    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);
12169
 
12170
    private Supplier success; // required
12171
 
12172
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12173
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12174
      SUCCESS((short)0, "success");
12175
 
12176
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12177
 
12178
      static {
12179
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12180
          byName.put(field.getFieldName(), field);
12181
        }
12182
      }
12183
 
12184
      /**
12185
       * Find the _Fields constant that matches fieldId, or null if its not found.
12186
       */
12187
      public static _Fields findByThriftId(int fieldId) {
12188
        switch(fieldId) {
12189
          case 0: // SUCCESS
12190
            return SUCCESS;
12191
          default:
12192
            return null;
12193
        }
12194
      }
12195
 
12196
      /**
12197
       * Find the _Fields constant that matches fieldId, throwing an exception
12198
       * if it is not found.
12199
       */
12200
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12201
        _Fields fields = findByThriftId(fieldId);
12202
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12203
        return fields;
12204
      }
12205
 
12206
      /**
12207
       * Find the _Fields constant that matches name, or null if its not found.
12208
       */
12209
      public static _Fields findByName(String name) {
12210
        return byName.get(name);
12211
      }
12212
 
12213
      private final short _thriftId;
12214
      private final String _fieldName;
12215
 
12216
      _Fields(short thriftId, String fieldName) {
12217
        _thriftId = thriftId;
12218
        _fieldName = fieldName;
12219
      }
12220
 
12221
      public short getThriftFieldId() {
12222
        return _thriftId;
12223
      }
12224
 
12225
      public String getFieldName() {
12226
        return _fieldName;
12227
      }
12228
    }
12229
 
12230
    // isset id assignments
12231
 
12232
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12233
    static {
12234
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12235
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12236
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
12237
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12238
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSupplier_result.class, metaDataMap);
12239
    }
12240
 
12241
    public addSupplier_result() {
12242
    }
12243
 
12244
    public addSupplier_result(
12245
      Supplier success)
12246
    {
12247
      this();
12248
      this.success = success;
12249
    }
12250
 
12251
    /**
12252
     * Performs a deep copy on <i>other</i>.
12253
     */
12254
    public addSupplier_result(addSupplier_result other) {
12255
      if (other.isSetSuccess()) {
12256
        this.success = new Supplier(other.success);
12257
      }
12258
    }
12259
 
12260
    public addSupplier_result deepCopy() {
12261
      return new addSupplier_result(this);
12262
    }
12263
 
12264
    @Override
12265
    public void clear() {
12266
      this.success = null;
12267
    }
12268
 
12269
    public Supplier getSuccess() {
12270
      return this.success;
12271
    }
12272
 
12273
    public void setSuccess(Supplier success) {
12274
      this.success = success;
12275
    }
12276
 
12277
    public void unsetSuccess() {
12278
      this.success = null;
12279
    }
12280
 
12281
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12282
    public boolean isSetSuccess() {
12283
      return this.success != null;
12284
    }
12285
 
12286
    public void setSuccessIsSet(boolean value) {
12287
      if (!value) {
12288
        this.success = null;
12289
      }
12290
    }
12291
 
12292
    public void setFieldValue(_Fields field, Object value) {
12293
      switch (field) {
12294
      case SUCCESS:
12295
        if (value == null) {
12296
          unsetSuccess();
12297
        } else {
12298
          setSuccess((Supplier)value);
12299
        }
12300
        break;
12301
 
12302
      }
12303
    }
12304
 
12305
    public Object getFieldValue(_Fields field) {
12306
      switch (field) {
12307
      case SUCCESS:
12308
        return getSuccess();
12309
 
12310
      }
12311
      throw new IllegalStateException();
12312
    }
12313
 
12314
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12315
    public boolean isSet(_Fields field) {
12316
      if (field == null) {
12317
        throw new IllegalArgumentException();
12318
      }
12319
 
12320
      switch (field) {
12321
      case SUCCESS:
12322
        return isSetSuccess();
12323
      }
12324
      throw new IllegalStateException();
12325
    }
12326
 
12327
    @Override
12328
    public boolean equals(Object that) {
12329
      if (that == null)
12330
        return false;
12331
      if (that instanceof addSupplier_result)
12332
        return this.equals((addSupplier_result)that);
12333
      return false;
12334
    }
12335
 
12336
    public boolean equals(addSupplier_result that) {
12337
      if (that == null)
12338
        return false;
12339
 
12340
      boolean this_present_success = true && this.isSetSuccess();
12341
      boolean that_present_success = true && that.isSetSuccess();
12342
      if (this_present_success || that_present_success) {
12343
        if (!(this_present_success && that_present_success))
12344
          return false;
12345
        if (!this.success.equals(that.success))
12346
          return false;
12347
      }
12348
 
12349
      return true;
12350
    }
12351
 
12352
    @Override
12353
    public int hashCode() {
12354
      return 0;
12355
    }
12356
 
12357
    public int compareTo(addSupplier_result other) {
12358
      if (!getClass().equals(other.getClass())) {
12359
        return getClass().getName().compareTo(other.getClass().getName());
12360
      }
12361
 
12362
      int lastComparison = 0;
12363
      addSupplier_result typedOther = (addSupplier_result)other;
12364
 
12365
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12366
      if (lastComparison != 0) {
12367
        return lastComparison;
12368
      }
12369
      if (isSetSuccess()) {
12370
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12371
        if (lastComparison != 0) {
12372
          return lastComparison;
12373
        }
12374
      }
12375
      return 0;
12376
    }
12377
 
12378
    public _Fields fieldForId(int fieldId) {
12379
      return _Fields.findByThriftId(fieldId);
12380
    }
12381
 
12382
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12383
      org.apache.thrift.protocol.TField field;
12384
      iprot.readStructBegin();
12385
      while (true)
12386
      {
12387
        field = iprot.readFieldBegin();
12388
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12389
          break;
12390
        }
12391
        switch (field.id) {
12392
          case 0: // SUCCESS
12393
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12394
              this.success = new Supplier();
12395
              this.success.read(iprot);
12396
            } else { 
12397
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12398
            }
12399
            break;
12400
          default:
12401
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12402
        }
12403
        iprot.readFieldEnd();
12404
      }
12405
      iprot.readStructEnd();
12406
      validate();
12407
    }
12408
 
12409
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12410
      oprot.writeStructBegin(STRUCT_DESC);
12411
 
12412
      if (this.isSetSuccess()) {
12413
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12414
        this.success.write(oprot);
12415
        oprot.writeFieldEnd();
12416
      }
12417
      oprot.writeFieldStop();
12418
      oprot.writeStructEnd();
12419
    }
12420
 
12421
    @Override
12422
    public String toString() {
12423
      StringBuilder sb = new StringBuilder("addSupplier_result(");
12424
      boolean first = true;
12425
 
12426
      sb.append("success:");
12427
      if (this.success == null) {
12428
        sb.append("null");
12429
      } else {
12430
        sb.append(this.success);
12431
      }
12432
      first = false;
12433
      sb.append(")");
12434
      return sb.toString();
12435
    }
12436
 
12437
    public void validate() throws org.apache.thrift.TException {
12438
      // check for required fields
12439
    }
12440
 
12441
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12442
      try {
12443
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12444
      } catch (org.apache.thrift.TException te) {
12445
        throw new java.io.IOException(te);
12446
      }
12447
    }
12448
 
12449
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12450
      try {
12451
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12452
      } catch (org.apache.thrift.TException te) {
12453
        throw new java.io.IOException(te);
12454
      }
12455
    }
12456
 
12457
  }
12458
 
12459
  public static class updateSupplier_args implements org.apache.thrift.TBase<updateSupplier_args, updateSupplier_args._Fields>, java.io.Serializable, Cloneable   {
12460
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_args");
12461
 
12462
    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);
12463
 
12464
    private Supplier supplier; // required
12465
 
12466
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12467
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12468
      SUPPLIER((short)1, "supplier");
12469
 
12470
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12471
 
12472
      static {
12473
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12474
          byName.put(field.getFieldName(), field);
12475
        }
12476
      }
12477
 
12478
      /**
12479
       * Find the _Fields constant that matches fieldId, or null if its not found.
12480
       */
12481
      public static _Fields findByThriftId(int fieldId) {
12482
        switch(fieldId) {
12483
          case 1: // SUPPLIER
12484
            return SUPPLIER;
12485
          default:
12486
            return null;
12487
        }
12488
      }
12489
 
12490
      /**
12491
       * Find the _Fields constant that matches fieldId, throwing an exception
12492
       * if it is not found.
12493
       */
12494
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12495
        _Fields fields = findByThriftId(fieldId);
12496
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12497
        return fields;
12498
      }
12499
 
12500
      /**
12501
       * Find the _Fields constant that matches name, or null if its not found.
12502
       */
12503
      public static _Fields findByName(String name) {
12504
        return byName.get(name);
12505
      }
12506
 
12507
      private final short _thriftId;
12508
      private final String _fieldName;
12509
 
12510
      _Fields(short thriftId, String fieldName) {
12511
        _thriftId = thriftId;
12512
        _fieldName = fieldName;
12513
      }
12514
 
12515
      public short getThriftFieldId() {
12516
        return _thriftId;
12517
      }
12518
 
12519
      public String getFieldName() {
12520
        return _fieldName;
12521
      }
12522
    }
12523
 
12524
    // isset id assignments
12525
 
12526
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12527
    static {
12528
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12529
      tmpMap.put(_Fields.SUPPLIER, new org.apache.thrift.meta_data.FieldMetaData("supplier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12530
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
12531
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12532
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_args.class, metaDataMap);
12533
    }
12534
 
12535
    public updateSupplier_args() {
12536
    }
12537
 
12538
    public updateSupplier_args(
12539
      Supplier supplier)
12540
    {
12541
      this();
12542
      this.supplier = supplier;
12543
    }
12544
 
12545
    /**
12546
     * Performs a deep copy on <i>other</i>.
12547
     */
12548
    public updateSupplier_args(updateSupplier_args other) {
12549
      if (other.isSetSupplier()) {
12550
        this.supplier = new Supplier(other.supplier);
12551
      }
12552
    }
12553
 
12554
    public updateSupplier_args deepCopy() {
12555
      return new updateSupplier_args(this);
12556
    }
12557
 
12558
    @Override
12559
    public void clear() {
12560
      this.supplier = null;
12561
    }
12562
 
12563
    public Supplier getSupplier() {
12564
      return this.supplier;
12565
    }
12566
 
12567
    public void setSupplier(Supplier supplier) {
12568
      this.supplier = supplier;
12569
    }
12570
 
12571
    public void unsetSupplier() {
12572
      this.supplier = null;
12573
    }
12574
 
12575
    /** Returns true if field supplier is set (has been assigned a value) and false otherwise */
12576
    public boolean isSetSupplier() {
12577
      return this.supplier != null;
12578
    }
12579
 
12580
    public void setSupplierIsSet(boolean value) {
12581
      if (!value) {
12582
        this.supplier = null;
12583
      }
12584
    }
12585
 
12586
    public void setFieldValue(_Fields field, Object value) {
12587
      switch (field) {
12588
      case SUPPLIER:
12589
        if (value == null) {
12590
          unsetSupplier();
12591
        } else {
12592
          setSupplier((Supplier)value);
12593
        }
12594
        break;
12595
 
12596
      }
12597
    }
12598
 
12599
    public Object getFieldValue(_Fields field) {
12600
      switch (field) {
12601
      case SUPPLIER:
12602
        return getSupplier();
12603
 
12604
      }
12605
      throw new IllegalStateException();
12606
    }
12607
 
12608
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12609
    public boolean isSet(_Fields field) {
12610
      if (field == null) {
12611
        throw new IllegalArgumentException();
12612
      }
12613
 
12614
      switch (field) {
12615
      case SUPPLIER:
12616
        return isSetSupplier();
12617
      }
12618
      throw new IllegalStateException();
12619
    }
12620
 
12621
    @Override
12622
    public boolean equals(Object that) {
12623
      if (that == null)
12624
        return false;
12625
      if (that instanceof updateSupplier_args)
12626
        return this.equals((updateSupplier_args)that);
12627
      return false;
12628
    }
12629
 
12630
    public boolean equals(updateSupplier_args that) {
12631
      if (that == null)
12632
        return false;
12633
 
12634
      boolean this_present_supplier = true && this.isSetSupplier();
12635
      boolean that_present_supplier = true && that.isSetSupplier();
12636
      if (this_present_supplier || that_present_supplier) {
12637
        if (!(this_present_supplier && that_present_supplier))
12638
          return false;
12639
        if (!this.supplier.equals(that.supplier))
12640
          return false;
12641
      }
12642
 
12643
      return true;
12644
    }
12645
 
12646
    @Override
12647
    public int hashCode() {
12648
      return 0;
12649
    }
12650
 
12651
    public int compareTo(updateSupplier_args other) {
12652
      if (!getClass().equals(other.getClass())) {
12653
        return getClass().getName().compareTo(other.getClass().getName());
12654
      }
12655
 
12656
      int lastComparison = 0;
12657
      updateSupplier_args typedOther = (updateSupplier_args)other;
12658
 
12659
      lastComparison = Boolean.valueOf(isSetSupplier()).compareTo(typedOther.isSetSupplier());
12660
      if (lastComparison != 0) {
12661
        return lastComparison;
12662
      }
12663
      if (isSetSupplier()) {
12664
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplier, typedOther.supplier);
12665
        if (lastComparison != 0) {
12666
          return lastComparison;
12667
        }
12668
      }
12669
      return 0;
12670
    }
12671
 
12672
    public _Fields fieldForId(int fieldId) {
12673
      return _Fields.findByThriftId(fieldId);
12674
    }
12675
 
12676
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12677
      org.apache.thrift.protocol.TField field;
12678
      iprot.readStructBegin();
12679
      while (true)
12680
      {
12681
        field = iprot.readFieldBegin();
12682
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12683
          break;
12684
        }
12685
        switch (field.id) {
12686
          case 1: // SUPPLIER
12687
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12688
              this.supplier = new Supplier();
12689
              this.supplier.read(iprot);
12690
            } else { 
12691
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12692
            }
12693
            break;
12694
          default:
12695
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12696
        }
12697
        iprot.readFieldEnd();
12698
      }
12699
      iprot.readStructEnd();
12700
      validate();
12701
    }
12702
 
12703
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12704
      validate();
12705
 
12706
      oprot.writeStructBegin(STRUCT_DESC);
12707
      if (this.supplier != null) {
12708
        oprot.writeFieldBegin(SUPPLIER_FIELD_DESC);
12709
        this.supplier.write(oprot);
12710
        oprot.writeFieldEnd();
12711
      }
12712
      oprot.writeFieldStop();
12713
      oprot.writeStructEnd();
12714
    }
12715
 
12716
    @Override
12717
    public String toString() {
12718
      StringBuilder sb = new StringBuilder("updateSupplier_args(");
12719
      boolean first = true;
12720
 
12721
      sb.append("supplier:");
12722
      if (this.supplier == null) {
12723
        sb.append("null");
12724
      } else {
12725
        sb.append(this.supplier);
12726
      }
12727
      first = false;
12728
      sb.append(")");
12729
      return sb.toString();
12730
    }
12731
 
12732
    public void validate() throws org.apache.thrift.TException {
12733
      // check for required fields
12734
    }
12735
 
12736
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12737
      try {
12738
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12739
      } catch (org.apache.thrift.TException te) {
12740
        throw new java.io.IOException(te);
12741
      }
12742
    }
12743
 
12744
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12745
      try {
12746
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12747
      } catch (org.apache.thrift.TException te) {
12748
        throw new java.io.IOException(te);
12749
      }
12750
    }
12751
 
12752
  }
12753
 
12754
  public static class updateSupplier_result implements org.apache.thrift.TBase<updateSupplier_result, updateSupplier_result._Fields>, java.io.Serializable, Cloneable   {
12755
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSupplier_result");
12756
 
12757
 
12758
 
12759
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12760
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12761
;
12762
 
12763
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12764
 
12765
      static {
12766
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12767
          byName.put(field.getFieldName(), field);
12768
        }
12769
      }
12770
 
12771
      /**
12772
       * Find the _Fields constant that matches fieldId, or null if its not found.
12773
       */
12774
      public static _Fields findByThriftId(int fieldId) {
12775
        switch(fieldId) {
12776
          default:
12777
            return null;
12778
        }
12779
      }
12780
 
12781
      /**
12782
       * Find the _Fields constant that matches fieldId, throwing an exception
12783
       * if it is not found.
12784
       */
12785
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12786
        _Fields fields = findByThriftId(fieldId);
12787
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12788
        return fields;
12789
      }
12790
 
12791
      /**
12792
       * Find the _Fields constant that matches name, or null if its not found.
12793
       */
12794
      public static _Fields findByName(String name) {
12795
        return byName.get(name);
12796
      }
12797
 
12798
      private final short _thriftId;
12799
      private final String _fieldName;
12800
 
12801
      _Fields(short thriftId, String fieldName) {
12802
        _thriftId = thriftId;
12803
        _fieldName = fieldName;
12804
      }
12805
 
12806
      public short getThriftFieldId() {
12807
        return _thriftId;
12808
      }
12809
 
12810
      public String getFieldName() {
12811
        return _fieldName;
12812
      }
12813
    }
12814
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12815
    static {
12816
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12817
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12818
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSupplier_result.class, metaDataMap);
12819
    }
12820
 
12821
    public updateSupplier_result() {
12822
    }
12823
 
12824
    /**
12825
     * Performs a deep copy on <i>other</i>.
12826
     */
12827
    public updateSupplier_result(updateSupplier_result other) {
12828
    }
12829
 
12830
    public updateSupplier_result deepCopy() {
12831
      return new updateSupplier_result(this);
12832
    }
12833
 
12834
    @Override
12835
    public void clear() {
12836
    }
12837
 
12838
    public void setFieldValue(_Fields field, Object value) {
12839
      switch (field) {
12840
      }
12841
    }
12842
 
12843
    public Object getFieldValue(_Fields field) {
12844
      switch (field) {
12845
      }
12846
      throw new IllegalStateException();
12847
    }
12848
 
12849
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12850
    public boolean isSet(_Fields field) {
12851
      if (field == null) {
12852
        throw new IllegalArgumentException();
12853
      }
12854
 
12855
      switch (field) {
12856
      }
12857
      throw new IllegalStateException();
12858
    }
12859
 
12860
    @Override
12861
    public boolean equals(Object that) {
12862
      if (that == null)
12863
        return false;
12864
      if (that instanceof updateSupplier_result)
12865
        return this.equals((updateSupplier_result)that);
12866
      return false;
12867
    }
12868
 
12869
    public boolean equals(updateSupplier_result that) {
12870
      if (that == null)
12871
        return false;
12872
 
12873
      return true;
12874
    }
12875
 
12876
    @Override
12877
    public int hashCode() {
12878
      return 0;
12879
    }
12880
 
12881
    public int compareTo(updateSupplier_result other) {
12882
      if (!getClass().equals(other.getClass())) {
12883
        return getClass().getName().compareTo(other.getClass().getName());
12884
      }
12885
 
12886
      int lastComparison = 0;
12887
      updateSupplier_result typedOther = (updateSupplier_result)other;
12888
 
12889
      return 0;
12890
    }
12891
 
12892
    public _Fields fieldForId(int fieldId) {
12893
      return _Fields.findByThriftId(fieldId);
12894
    }
12895
 
12896
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12897
      org.apache.thrift.protocol.TField field;
12898
      iprot.readStructBegin();
12899
      while (true)
12900
      {
12901
        field = iprot.readFieldBegin();
12902
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12903
          break;
12904
        }
12905
        switch (field.id) {
12906
          default:
12907
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12908
        }
12909
        iprot.readFieldEnd();
12910
      }
12911
      iprot.readStructEnd();
12912
      validate();
12913
    }
12914
 
12915
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12916
      oprot.writeStructBegin(STRUCT_DESC);
12917
 
12918
      oprot.writeFieldStop();
12919
      oprot.writeStructEnd();
12920
    }
12921
 
12922
    @Override
12923
    public String toString() {
12924
      StringBuilder sb = new StringBuilder("updateSupplier_result(");
12925
      boolean first = true;
12926
 
12927
      sb.append(")");
12928
      return sb.toString();
12929
    }
12930
 
12931
    public void validate() throws org.apache.thrift.TException {
12932
      // check for required fields
12933
    }
12934
 
12935
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12936
      try {
12937
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12938
      } catch (org.apache.thrift.TException te) {
12939
        throw new java.io.IOException(te);
12940
      }
12941
    }
12942
 
12943
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12944
      try {
12945
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12946
      } catch (org.apache.thrift.TException te) {
12947
        throw new java.io.IOException(te);
12948
      }
12949
    }
12950
 
12951
  }
12952
 
4496 mandeep.dh 12953
}