Subversion Repositories SmartDukaan

Rev

Rev 4754 | Rev 5443 | 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
 
4496 mandeep.dh 126
  }
127
 
128
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
129
 
130
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
131
 
132
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
133
 
134
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
135
 
136
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
137
 
138
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
139
 
140
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
141
 
142
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
143
 
4555 mandeep.dh 144
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 145
 
4754 mandeep.dh 146
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
147
 
148
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuppliers_call> resultHandler) throws org.apache.thrift.TException;
149
 
150
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
151
 
152
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
153
 
5185 mandeep.dh 154
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
155
 
4496 mandeep.dh 156
  }
157
 
158
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
159
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
160
      public Factory() {}
161
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
162
        return new Client(prot);
163
      }
164
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
165
        return new Client(iprot, oprot);
166
      }
167
    }
168
 
169
    public Client(org.apache.thrift.protocol.TProtocol prot)
170
    {
171
      super(prot, prot);
172
    }
173
 
174
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
175
      super(iprot, oprot);
176
    }
177
 
178
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
179
    {
180
      send_createPurchaseOrder(purchaseOrder);
181
      return recv_createPurchaseOrder();
182
    }
183
 
184
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
185
    {
186
      createPurchaseOrder_args args = new createPurchaseOrder_args();
187
      args.setPurchaseOrder(purchaseOrder);
188
      sendBase("createPurchaseOrder", args);
189
    }
190
 
191
    public long recv_createPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
192
    {
193
      createPurchaseOrder_result result = new createPurchaseOrder_result();
194
      receiveBase(result, "createPurchaseOrder");
195
      if (result.isSetSuccess()) {
196
        return result.success;
197
      }
198
      if (result.e != null) {
199
        throw result.e;
200
      }
201
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
202
    }
203
 
204
    public PurchaseOrder getPurchaseOrder(long id) throws PurchaseServiceException, org.apache.thrift.TException
205
    {
206
      send_getPurchaseOrder(id);
207
      return recv_getPurchaseOrder();
208
    }
209
 
210
    public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException
211
    {
212
      getPurchaseOrder_args args = new getPurchaseOrder_args();
213
      args.setId(id);
214
      sendBase("getPurchaseOrder", args);
215
    }
216
 
217
    public PurchaseOrder recv_getPurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
218
    {
219
      getPurchaseOrder_result result = new getPurchaseOrder_result();
220
      receiveBase(result, "getPurchaseOrder");
221
      if (result.isSetSuccess()) {
222
        return result.success;
223
      }
224
      if (result.e != null) {
225
        throw result.e;
226
      }
227
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
228
    }
229
 
230
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws PurchaseServiceException, org.apache.thrift.TException
231
    {
232
      send_getAllPurchaseOrders(status);
233
      return recv_getAllPurchaseOrders();
234
    }
235
 
236
    public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException
237
    {
238
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
239
      args.setStatus(status);
240
      sendBase("getAllPurchaseOrders", args);
241
    }
242
 
243
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
244
    {
245
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
246
      receiveBase(result, "getAllPurchaseOrders");
247
      if (result.isSetSuccess()) {
248
        return result.success;
249
      }
250
      if (result.e != null) {
251
        throw result.e;
252
      }
253
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
254
    }
255
 
256
    public Supplier getSupplier(long id) throws PurchaseServiceException, org.apache.thrift.TException
257
    {
258
      send_getSupplier(id);
259
      return recv_getSupplier();
260
    }
261
 
262
    public void send_getSupplier(long id) throws org.apache.thrift.TException
263
    {
264
      getSupplier_args args = new getSupplier_args();
265
      args.setId(id);
266
      sendBase("getSupplier", args);
267
    }
268
 
269
    public Supplier recv_getSupplier() throws PurchaseServiceException, org.apache.thrift.TException
270
    {
271
      getSupplier_result result = new getSupplier_result();
272
      receiveBase(result, "getSupplier");
273
      if (result.isSetSuccess()) {
274
        return result.success;
275
      }
276
      if (result.e != null) {
277
        throw result.e;
278
      }
279
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
280
    }
281
 
282
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
283
    {
284
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
285
      return recv_startPurchase();
286
    }
287
 
288
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
289
    {
290
      startPurchase_args args = new startPurchase_args();
291
      args.setPurchaseOrderId(purchaseOrderId);
292
      args.setInvoiceNumber(invoiceNumber);
293
      args.setFreightCharges(freightCharges);
294
      sendBase("startPurchase", args);
295
    }
296
 
297
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
298
    {
299
      startPurchase_result result = new startPurchase_result();
300
      receiveBase(result, "startPurchase");
301
      if (result.isSetSuccess()) {
302
        return result.success;
303
      }
304
      if (result.e != null) {
305
        throw result.e;
306
      }
307
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
308
    }
309
 
310
    public long closePurchase(long purchaseId) throws PurchaseServiceException, org.apache.thrift.TException
311
    {
312
      send_closePurchase(purchaseId);
313
      return recv_closePurchase();
314
    }
315
 
316
    public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException
317
    {
318
      closePurchase_args args = new closePurchase_args();
319
      args.setPurchaseId(purchaseId);
320
      sendBase("closePurchase", args);
321
    }
322
 
323
    public long recv_closePurchase() throws PurchaseServiceException, org.apache.thrift.TException
324
    {
325
      closePurchase_result result = new closePurchase_result();
326
      receiveBase(result, "closePurchase");
327
      if (result.isSetSuccess()) {
328
        return result.success;
329
      }
330
      if (result.e != null) {
331
        throw result.e;
332
      }
333
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
334
    }
335
 
336
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws PurchaseServiceException, org.apache.thrift.TException
337
    {
338
      send_getAllPurchases(purchaseOrderId, open);
339
      return recv_getAllPurchases();
340
    }
341
 
342
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException
343
    {
344
      getAllPurchases_args args = new getAllPurchases_args();
345
      args.setPurchaseOrderId(purchaseOrderId);
346
      args.setOpen(open);
347
      sendBase("getAllPurchases", args);
348
    }
349
 
350
    public List<Purchase> recv_getAllPurchases() throws PurchaseServiceException, org.apache.thrift.TException
351
    {
352
      getAllPurchases_result result = new getAllPurchases_result();
353
      receiveBase(result, "getAllPurchases");
354
      if (result.isSetSuccess()) {
355
        return result.success;
356
      }
357
      if (result.e != null) {
358
        throw result.e;
359
      }
360
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
361
    }
362
 
4555 mandeep.dh 363
    public PurchaseOrder getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 364
    {
4555 mandeep.dh 365
      send_getPurchaseOrderForPurchase(purchaseId);
366
      return recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 367
    }
368
 
4555 mandeep.dh 369
    public void send_getPurchaseOrderForPurchase(long purchaseId) throws org.apache.thrift.TException
4496 mandeep.dh 370
    {
4555 mandeep.dh 371
      getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 372
      args.setPurchaseId(purchaseId);
4555 mandeep.dh 373
      sendBase("getPurchaseOrderForPurchase", args);
4496 mandeep.dh 374
    }
375
 
4555 mandeep.dh 376
    public PurchaseOrder recv_getPurchaseOrderForPurchase() throws org.apache.thrift.TException
4496 mandeep.dh 377
    {
4555 mandeep.dh 378
      getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
379
      receiveBase(result, "getPurchaseOrderForPurchase");
4496 mandeep.dh 380
      if (result.isSetSuccess()) {
381
        return result.success;
382
      }
4555 mandeep.dh 383
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4496 mandeep.dh 384
    }
385
 
4754 mandeep.dh 386
    public List<PurchaseOrder> getPendingPurchaseOrders(long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
387
    {
388
      send_getPendingPurchaseOrders(warehouseId);
389
      return recv_getPendingPurchaseOrders();
390
    }
391
 
392
    public void send_getPendingPurchaseOrders(long warehouseId) throws org.apache.thrift.TException
393
    {
394
      getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
395
      args.setWarehouseId(warehouseId);
396
      sendBase("getPendingPurchaseOrders", args);
397
    }
398
 
399
    public List<PurchaseOrder> recv_getPendingPurchaseOrders() throws PurchaseServiceException, org.apache.thrift.TException
400
    {
401
      getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
402
      receiveBase(result, "getPendingPurchaseOrders");
403
      if (result.isSetSuccess()) {
404
        return result.success;
405
      }
406
      if (result.e != null) {
407
        throw result.e;
408
      }
409
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
410
    }
411
 
412
    public List<Supplier> getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
413
    {
414
      send_getSuppliers();
415
      return recv_getSuppliers();
416
    }
417
 
418
    public void send_getSuppliers() throws org.apache.thrift.TException
419
    {
420
      getSuppliers_args args = new getSuppliers_args();
421
      sendBase("getSuppliers", args);
422
    }
423
 
424
    public List<Supplier> recv_getSuppliers() throws PurchaseServiceException, org.apache.thrift.TException
425
    {
426
      getSuppliers_result result = new getSuppliers_result();
427
      receiveBase(result, "getSuppliers");
428
      if (result.isSetSuccess()) {
429
        return result.success;
430
      }
431
      if (result.e != null) {
432
        throw result.e;
433
      }
434
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
435
    }
436
 
437
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
438
    {
439
      send_fulfillPO(purchaseOrderId, itemId, quantity);
440
      recv_fulfillPO();
441
    }
442
 
443
    public void send_fulfillPO(long purchaseOrderId, long itemId, long quantity) throws org.apache.thrift.TException
444
    {
445
      fulfillPO_args args = new fulfillPO_args();
446
      args.setPurchaseOrderId(purchaseOrderId);
447
      args.setItemId(itemId);
448
      args.setQuantity(quantity);
449
      sendBase("fulfillPO", args);
450
    }
451
 
452
    public void recv_fulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
453
    {
454
      fulfillPO_result result = new fulfillPO_result();
455
      receiveBase(result, "fulfillPO");
456
      if (result.e != null) {
457
        throw result.e;
458
      }
459
      return;
460
    }
461
 
462
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException
463
    {
464
      send_updatePurchaseOrder(purchaseOrder);
465
      recv_updatePurchaseOrder();
466
    }
467
 
468
    public void send_updatePurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException
469
    {
470
      updatePurchaseOrder_args args = new updatePurchaseOrder_args();
471
      args.setPurchaseOrder(purchaseOrder);
472
      sendBase("updatePurchaseOrder", args);
473
    }
474
 
475
    public void recv_updatePurchaseOrder() throws PurchaseServiceException, org.apache.thrift.TException
476
    {
477
      updatePurchaseOrder_result result = new updatePurchaseOrder_result();
478
      receiveBase(result, "updatePurchaseOrder");
479
      if (result.e != null) {
480
        throw result.e;
481
      }
482
      return;
483
    }
484
 
5185 mandeep.dh 485
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
486
    {
487
      send_unFulfillPO(purchaseId, itemId, quantity);
488
      recv_unFulfillPO();
489
    }
490
 
491
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
492
    {
493
      unFulfillPO_args args = new unFulfillPO_args();
494
      args.setPurchaseId(purchaseId);
495
      args.setItemId(itemId);
496
      args.setQuantity(quantity);
497
      sendBase("unFulfillPO", args);
498
    }
499
 
500
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
501
    {
502
      unFulfillPO_result result = new unFulfillPO_result();
503
      receiveBase(result, "unFulfillPO");
504
      if (result.e != null) {
505
        throw result.e;
506
      }
507
      return;
508
    }
509
 
4496 mandeep.dh 510
  }
511
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
512
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
513
      private org.apache.thrift.async.TAsyncClientManager clientManager;
514
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
515
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
516
        this.clientManager = clientManager;
517
        this.protocolFactory = protocolFactory;
518
      }
519
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
520
        return new AsyncClient(protocolFactory, clientManager, transport);
521
      }
522
    }
523
 
524
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
525
      super(protocolFactory, clientManager, transport);
526
    }
527
 
528
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
529
      checkReady();
530
      createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
531
      this.___currentMethod = method_call;
532
      ___manager.call(method_call);
533
    }
534
 
535
    public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
536
      private PurchaseOrder purchaseOrder;
537
      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 {
538
        super(client, protocolFactory, transport, resultHandler, false);
539
        this.purchaseOrder = purchaseOrder;
540
      }
541
 
542
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
543
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
544
        createPurchaseOrder_args args = new createPurchaseOrder_args();
545
        args.setPurchaseOrder(purchaseOrder);
546
        args.write(prot);
547
        prot.writeMessageEnd();
548
      }
549
 
550
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
551
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
552
          throw new IllegalStateException("Method call not finished!");
553
        }
554
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
555
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
556
        return (new Client(prot)).recv_createPurchaseOrder();
557
      }
558
    }
559
 
560
    public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
561
      checkReady();
562
      getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);
563
      this.___currentMethod = method_call;
564
      ___manager.call(method_call);
565
    }
566
 
567
    public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
568
      private long id;
569
      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 {
570
        super(client, protocolFactory, transport, resultHandler, false);
571
        this.id = id;
572
      }
573
 
574
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
575
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
576
        getPurchaseOrder_args args = new getPurchaseOrder_args();
577
        args.setId(id);
578
        args.write(prot);
579
        prot.writeMessageEnd();
580
      }
581
 
582
      public PurchaseOrder getResult() throws PurchaseServiceException, org.apache.thrift.TException {
583
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
584
          throw new IllegalStateException("Method call not finished!");
585
        }
586
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
587
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
588
        return (new Client(prot)).recv_getPurchaseOrder();
589
      }
590
    }
591
 
592
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
593
      checkReady();
594
      getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);
595
      this.___currentMethod = method_call;
596
      ___manager.call(method_call);
597
    }
598
 
599
    public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
600
      private POStatus status;
601
      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 {
602
        super(client, protocolFactory, transport, resultHandler, false);
603
        this.status = status;
604
      }
605
 
606
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
607
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
608
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
609
        args.setStatus(status);
610
        args.write(prot);
611
        prot.writeMessageEnd();
612
      }
613
 
614
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
615
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
616
          throw new IllegalStateException("Method call not finished!");
617
        }
618
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
619
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
620
        return (new Client(prot)).recv_getAllPurchaseOrders();
621
      }
622
    }
623
 
624
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {
625
      checkReady();
626
      getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);
627
      this.___currentMethod = method_call;
628
      ___manager.call(method_call);
629
    }
630
 
631
    public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {
632
      private long id;
633
      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 {
634
        super(client, protocolFactory, transport, resultHandler, false);
635
        this.id = id;
636
      }
637
 
638
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
639
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));
640
        getSupplier_args args = new getSupplier_args();
641
        args.setId(id);
642
        args.write(prot);
643
        prot.writeMessageEnd();
644
      }
645
 
646
      public Supplier getResult() throws PurchaseServiceException, org.apache.thrift.TException {
647
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
648
          throw new IllegalStateException("Method call not finished!");
649
        }
650
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
651
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
652
        return (new Client(prot)).recv_getSupplier();
653
      }
654
    }
655
 
656
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
657
      checkReady();
658
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
659
      this.___currentMethod = method_call;
660
      ___manager.call(method_call);
661
    }
662
 
663
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
664
      private long purchaseOrderId;
665
      private String invoiceNumber;
666
      private double freightCharges;
667
      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 {
668
        super(client, protocolFactory, transport, resultHandler, false);
669
        this.purchaseOrderId = purchaseOrderId;
670
        this.invoiceNumber = invoiceNumber;
671
        this.freightCharges = freightCharges;
672
      }
673
 
674
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
675
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
676
        startPurchase_args args = new startPurchase_args();
677
        args.setPurchaseOrderId(purchaseOrderId);
678
        args.setInvoiceNumber(invoiceNumber);
679
        args.setFreightCharges(freightCharges);
680
        args.write(prot);
681
        prot.writeMessageEnd();
682
      }
683
 
684
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
685
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
686
          throw new IllegalStateException("Method call not finished!");
687
        }
688
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
689
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
690
        return (new Client(prot)).recv_startPurchase();
691
      }
692
    }
693
 
694
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {
695
      checkReady();
696
      closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
697
      this.___currentMethod = method_call;
698
      ___manager.call(method_call);
699
    }
700
 
701
    public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
702
      private long purchaseId;
703
      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 {
704
        super(client, protocolFactory, transport, resultHandler, false);
705
        this.purchaseId = purchaseId;
706
      }
707
 
708
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
709
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
710
        closePurchase_args args = new closePurchase_args();
711
        args.setPurchaseId(purchaseId);
712
        args.write(prot);
713
        prot.writeMessageEnd();
714
      }
715
 
716
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
717
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
718
          throw new IllegalStateException("Method call not finished!");
719
        }
720
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
721
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
722
        return (new Client(prot)).recv_closePurchase();
723
      }
724
    }
725
 
726
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {
727
      checkReady();
728
      getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);
729
      this.___currentMethod = method_call;
730
      ___manager.call(method_call);
731
    }
732
 
733
    public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {
734
      private long purchaseOrderId;
735
      private boolean open;
736
      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 {
737
        super(client, protocolFactory, transport, resultHandler, false);
738
        this.purchaseOrderId = purchaseOrderId;
739
        this.open = open;
740
      }
741
 
742
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
743
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));
744
        getAllPurchases_args args = new getAllPurchases_args();
745
        args.setPurchaseOrderId(purchaseOrderId);
746
        args.setOpen(open);
747
        args.write(prot);
748
        prot.writeMessageEnd();
749
      }
750
 
751
      public List<Purchase> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
752
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
753
          throw new IllegalStateException("Method call not finished!");
754
        }
755
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
756
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
757
        return (new Client(prot)).recv_getAllPurchases();
758
      }
759
    }
760
 
4555 mandeep.dh 761
    public void getPurchaseOrderForPurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrderForPurchase_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 762
      checkReady();
4555 mandeep.dh 763
      getPurchaseOrderForPurchase_call method_call = new getPurchaseOrderForPurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 764
      this.___currentMethod = method_call;
765
      ___manager.call(method_call);
766
    }
767
 
4555 mandeep.dh 768
    public static class getPurchaseOrderForPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 769
      private long purchaseId;
4555 mandeep.dh 770
      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 771
        super(client, protocolFactory, transport, resultHandler, false);
772
        this.purchaseId = purchaseId;
773
      }
774
 
775
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4555 mandeep.dh 776
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrderForPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
777
        getPurchaseOrderForPurchase_args args = new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 778
        args.setPurchaseId(purchaseId);
779
        args.write(prot);
780
        prot.writeMessageEnd();
781
      }
782
 
4555 mandeep.dh 783
      public PurchaseOrder getResult() throws org.apache.thrift.TException {
4496 mandeep.dh 784
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
785
          throw new IllegalStateException("Method call not finished!");
786
        }
787
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
788
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4555 mandeep.dh 789
        return (new Client(prot)).recv_getPurchaseOrderForPurchase();
4496 mandeep.dh 790
      }
791
    }
792
 
4754 mandeep.dh 793
    public void getPendingPurchaseOrders(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getPendingPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {
794
      checkReady();
795
      getPendingPurchaseOrders_call method_call = new getPendingPurchaseOrders_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
796
      this.___currentMethod = method_call;
797
      ___manager.call(method_call);
798
    }
799
 
800
    public static class getPendingPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
801
      private long warehouseId;
802
      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 {
803
        super(client, protocolFactory, transport, resultHandler, false);
804
        this.warehouseId = warehouseId;
805
      }
806
 
807
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
808
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
809
        getPendingPurchaseOrders_args args = new getPendingPurchaseOrders_args();
810
        args.setWarehouseId(warehouseId);
811
        args.write(prot);
812
        prot.writeMessageEnd();
813
      }
814
 
815
      public List<PurchaseOrder> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
816
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
817
          throw new IllegalStateException("Method call not finished!");
818
        }
819
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
820
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
821
        return (new Client(prot)).recv_getPendingPurchaseOrders();
822
      }
823
    }
824
 
825
    public void getSuppliers(org.apache.thrift.async.AsyncMethodCallback<getSuppliers_call> resultHandler) throws org.apache.thrift.TException {
826
      checkReady();
827
      getSuppliers_call method_call = new getSuppliers_call(resultHandler, this, ___protocolFactory, ___transport);
828
      this.___currentMethod = method_call;
829
      ___manager.call(method_call);
830
    }
831
 
832
    public static class getSuppliers_call extends org.apache.thrift.async.TAsyncMethodCall {
833
      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 {
834
        super(client, protocolFactory, transport, resultHandler, false);
835
      }
836
 
837
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
838
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuppliers", org.apache.thrift.protocol.TMessageType.CALL, 0));
839
        getSuppliers_args args = new getSuppliers_args();
840
        args.write(prot);
841
        prot.writeMessageEnd();
842
      }
843
 
844
      public List<Supplier> getResult() throws PurchaseServiceException, org.apache.thrift.TException {
845
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
846
          throw new IllegalStateException("Method call not finished!");
847
        }
848
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
849
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
850
        return (new Client(prot)).recv_getSuppliers();
851
      }
852
    }
853
 
854
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<fulfillPO_call> resultHandler) throws org.apache.thrift.TException {
855
      checkReady();
856
      fulfillPO_call method_call = new fulfillPO_call(purchaseOrderId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
857
      this.___currentMethod = method_call;
858
      ___manager.call(method_call);
859
    }
860
 
861
    public static class fulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
862
      private long purchaseOrderId;
863
      private long itemId;
864
      private long quantity;
865
      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 {
866
        super(client, protocolFactory, transport, resultHandler, false);
867
        this.purchaseOrderId = purchaseOrderId;
868
        this.itemId = itemId;
869
        this.quantity = quantity;
870
      }
871
 
872
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
873
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
874
        fulfillPO_args args = new fulfillPO_args();
875
        args.setPurchaseOrderId(purchaseOrderId);
876
        args.setItemId(itemId);
877
        args.setQuantity(quantity);
878
        args.write(prot);
879
        prot.writeMessageEnd();
880
      }
881
 
882
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
883
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
884
          throw new IllegalStateException("Method call not finished!");
885
        }
886
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
887
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
888
        (new Client(prot)).recv_fulfillPO();
889
      }
890
    }
891
 
892
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {
893
      checkReady();
894
      updatePurchaseOrder_call method_call = new updatePurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);
895
      this.___currentMethod = method_call;
896
      ___manager.call(method_call);
897
    }
898
 
899
    public static class updatePurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
900
      private PurchaseOrder purchaseOrder;
901
      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 {
902
        super(client, protocolFactory, transport, resultHandler, false);
903
        this.purchaseOrder = purchaseOrder;
904
      }
905
 
906
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
907
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
908
        updatePurchaseOrder_args args = new updatePurchaseOrder_args();
909
        args.setPurchaseOrder(purchaseOrder);
910
        args.write(prot);
911
        prot.writeMessageEnd();
912
      }
913
 
914
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
915
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
916
          throw new IllegalStateException("Method call not finished!");
917
        }
918
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
919
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
920
        (new Client(prot)).recv_updatePurchaseOrder();
921
      }
922
    }
923
 
5185 mandeep.dh 924
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
925
      checkReady();
926
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
927
      this.___currentMethod = method_call;
928
      ___manager.call(method_call);
929
    }
930
 
931
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
932
      private long purchaseId;
933
      private long itemId;
934
      private long quantity;
935
      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 {
936
        super(client, protocolFactory, transport, resultHandler, false);
937
        this.purchaseId = purchaseId;
938
        this.itemId = itemId;
939
        this.quantity = quantity;
940
      }
941
 
942
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
943
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
944
        unFulfillPO_args args = new unFulfillPO_args();
945
        args.setPurchaseId(purchaseId);
946
        args.setItemId(itemId);
947
        args.setQuantity(quantity);
948
        args.write(prot);
949
        prot.writeMessageEnd();
950
      }
951
 
952
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
953
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
954
          throw new IllegalStateException("Method call not finished!");
955
        }
956
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
957
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
958
        (new Client(prot)).recv_unFulfillPO();
959
      }
960
    }
961
 
4496 mandeep.dh 962
  }
963
 
964
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
965
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
966
    public Processor(I iface) {
967
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
968
    }
969
 
970
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
971
      super(iface, getProcessMap(processMap));
972
    }
973
 
974
    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) {
975
      processMap.put("createPurchaseOrder", new createPurchaseOrder());
976
      processMap.put("getPurchaseOrder", new getPurchaseOrder());
977
      processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());
978
      processMap.put("getSupplier", new getSupplier());
979
      processMap.put("startPurchase", new startPurchase());
980
      processMap.put("closePurchase", new closePurchase());
981
      processMap.put("getAllPurchases", new getAllPurchases());
4555 mandeep.dh 982
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
4754 mandeep.dh 983
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
984
      processMap.put("getSuppliers", new getSuppliers());
985
      processMap.put("fulfillPO", new fulfillPO());
986
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
5185 mandeep.dh 987
      processMap.put("unFulfillPO", new unFulfillPO());
4496 mandeep.dh 988
      return processMap;
989
    }
990
 
991
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
992
      public createPurchaseOrder() {
993
        super("createPurchaseOrder");
994
      }
995
 
996
      protected createPurchaseOrder_args getEmptyArgsInstance() {
997
        return new createPurchaseOrder_args();
998
      }
999
 
1000
      protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {
1001
        createPurchaseOrder_result result = new createPurchaseOrder_result();
1002
        try {
1003
          result.success = iface.createPurchaseOrder(args.purchaseOrder);
1004
          result.setSuccessIsSet(true);
1005
        } catch (PurchaseServiceException e) {
1006
          result.e = e;
1007
        }
1008
        return result;
1009
      }
1010
    }
1011
 
1012
    private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {
1013
      public getPurchaseOrder() {
1014
        super("getPurchaseOrder");
1015
      }
1016
 
1017
      protected getPurchaseOrder_args getEmptyArgsInstance() {
1018
        return new getPurchaseOrder_args();
1019
      }
1020
 
1021
      protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {
1022
        getPurchaseOrder_result result = new getPurchaseOrder_result();
1023
        try {
1024
          result.success = iface.getPurchaseOrder(args.id);
1025
        } catch (PurchaseServiceException e) {
1026
          result.e = e;
1027
        }
1028
        return result;
1029
      }
1030
    }
1031
 
1032
    private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {
1033
      public getAllPurchaseOrders() {
1034
        super("getAllPurchaseOrders");
1035
      }
1036
 
1037
      protected getAllPurchaseOrders_args getEmptyArgsInstance() {
1038
        return new getAllPurchaseOrders_args();
1039
      }
1040
 
1041
      protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {
1042
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
1043
        try {
1044
          result.success = iface.getAllPurchaseOrders(args.status);
1045
        } catch (PurchaseServiceException e) {
1046
          result.e = e;
1047
        }
1048
        return result;
1049
      }
1050
    }
1051
 
1052
    private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {
1053
      public getSupplier() {
1054
        super("getSupplier");
1055
      }
1056
 
1057
      protected getSupplier_args getEmptyArgsInstance() {
1058
        return new getSupplier_args();
1059
      }
1060
 
1061
      protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {
1062
        getSupplier_result result = new getSupplier_result();
1063
        try {
1064
          result.success = iface.getSupplier(args.id);
1065
        } catch (PurchaseServiceException e) {
1066
          result.e = e;
1067
        }
1068
        return result;
1069
      }
1070
    }
1071
 
1072
    private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {
1073
      public startPurchase() {
1074
        super("startPurchase");
1075
      }
1076
 
1077
      protected startPurchase_args getEmptyArgsInstance() {
1078
        return new startPurchase_args();
1079
      }
1080
 
1081
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
1082
        startPurchase_result result = new startPurchase_result();
1083
        try {
1084
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
1085
          result.setSuccessIsSet(true);
1086
        } catch (PurchaseServiceException e) {
1087
          result.e = e;
1088
        }
1089
        return result;
1090
      }
1091
    }
1092
 
1093
    private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {
1094
      public closePurchase() {
1095
        super("closePurchase");
1096
      }
1097
 
1098
      protected closePurchase_args getEmptyArgsInstance() {
1099
        return new closePurchase_args();
1100
      }
1101
 
1102
      protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {
1103
        closePurchase_result result = new closePurchase_result();
1104
        try {
1105
          result.success = iface.closePurchase(args.purchaseId);
1106
          result.setSuccessIsSet(true);
1107
        } catch (PurchaseServiceException e) {
1108
          result.e = e;
1109
        }
1110
        return result;
1111
      }
1112
    }
1113
 
1114
    private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {
1115
      public getAllPurchases() {
1116
        super("getAllPurchases");
1117
      }
1118
 
1119
      protected getAllPurchases_args getEmptyArgsInstance() {
1120
        return new getAllPurchases_args();
1121
      }
1122
 
1123
      protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {
1124
        getAllPurchases_result result = new getAllPurchases_result();
1125
        try {
1126
          result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);
1127
        } catch (PurchaseServiceException e) {
1128
          result.e = e;
1129
        }
1130
        return result;
1131
      }
1132
    }
1133
 
4555 mandeep.dh 1134
    private static class getPurchaseOrderForPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrderForPurchase_args> {
1135
      public getPurchaseOrderForPurchase() {
1136
        super("getPurchaseOrderForPurchase");
4496 mandeep.dh 1137
      }
1138
 
4555 mandeep.dh 1139
      protected getPurchaseOrderForPurchase_args getEmptyArgsInstance() {
1140
        return new getPurchaseOrderForPurchase_args();
4496 mandeep.dh 1141
      }
1142
 
4555 mandeep.dh 1143
      protected getPurchaseOrderForPurchase_result getResult(I iface, getPurchaseOrderForPurchase_args args) throws org.apache.thrift.TException {
1144
        getPurchaseOrderForPurchase_result result = new getPurchaseOrderForPurchase_result();
1145
        result.success = iface.getPurchaseOrderForPurchase(args.purchaseId);
4496 mandeep.dh 1146
        return result;
1147
      }
1148
    }
1149
 
4754 mandeep.dh 1150
    private static class getPendingPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingPurchaseOrders_args> {
1151
      public getPendingPurchaseOrders() {
1152
        super("getPendingPurchaseOrders");
1153
      }
1154
 
1155
      protected getPendingPurchaseOrders_args getEmptyArgsInstance() {
1156
        return new getPendingPurchaseOrders_args();
1157
      }
1158
 
1159
      protected getPendingPurchaseOrders_result getResult(I iface, getPendingPurchaseOrders_args args) throws org.apache.thrift.TException {
1160
        getPendingPurchaseOrders_result result = new getPendingPurchaseOrders_result();
1161
        try {
1162
          result.success = iface.getPendingPurchaseOrders(args.warehouseId);
1163
        } catch (PurchaseServiceException e) {
1164
          result.e = e;
1165
        }
1166
        return result;
1167
      }
1168
    }
1169
 
1170
    private static class getSuppliers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuppliers_args> {
1171
      public getSuppliers() {
1172
        super("getSuppliers");
1173
      }
1174
 
1175
      protected getSuppliers_args getEmptyArgsInstance() {
1176
        return new getSuppliers_args();
1177
      }
1178
 
1179
      protected getSuppliers_result getResult(I iface, getSuppliers_args args) throws org.apache.thrift.TException {
1180
        getSuppliers_result result = new getSuppliers_result();
1181
        try {
1182
          result.success = iface.getSuppliers();
1183
        } catch (PurchaseServiceException e) {
1184
          result.e = e;
1185
        }
1186
        return result;
1187
      }
1188
    }
1189
 
1190
    private static class fulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fulfillPO_args> {
1191
      public fulfillPO() {
1192
        super("fulfillPO");
1193
      }
1194
 
1195
      protected fulfillPO_args getEmptyArgsInstance() {
1196
        return new fulfillPO_args();
1197
      }
1198
 
1199
      protected fulfillPO_result getResult(I iface, fulfillPO_args args) throws org.apache.thrift.TException {
1200
        fulfillPO_result result = new fulfillPO_result();
1201
        try {
1202
          iface.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity);
1203
        } catch (PurchaseServiceException e) {
1204
          result.e = e;
1205
        }
1206
        return result;
1207
      }
1208
    }
1209
 
1210
    private static class updatePurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePurchaseOrder_args> {
1211
      public updatePurchaseOrder() {
1212
        super("updatePurchaseOrder");
1213
      }
1214
 
1215
      protected updatePurchaseOrder_args getEmptyArgsInstance() {
1216
        return new updatePurchaseOrder_args();
1217
      }
1218
 
1219
      protected updatePurchaseOrder_result getResult(I iface, updatePurchaseOrder_args args) throws org.apache.thrift.TException {
1220
        updatePurchaseOrder_result result = new updatePurchaseOrder_result();
1221
        try {
1222
          iface.updatePurchaseOrder(args.purchaseOrder);
1223
        } catch (PurchaseServiceException e) {
1224
          result.e = e;
1225
        }
1226
        return result;
1227
      }
1228
    }
1229
 
5185 mandeep.dh 1230
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
1231
      public unFulfillPO() {
1232
        super("unFulfillPO");
1233
      }
1234
 
1235
      protected unFulfillPO_args getEmptyArgsInstance() {
1236
        return new unFulfillPO_args();
1237
      }
1238
 
1239
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
1240
        unFulfillPO_result result = new unFulfillPO_result();
1241
        try {
1242
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
1243
        } catch (PurchaseServiceException e) {
1244
          result.e = e;
1245
        }
1246
        return result;
1247
      }
1248
    }
1249
 
4496 mandeep.dh 1250
  }
1251
 
1252
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1253
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1254
 
1255
    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);
1256
 
1257
    private PurchaseOrder purchaseOrder; // required
1258
 
1259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1260
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1261
      PURCHASE_ORDER((short)1, "purchaseOrder");
1262
 
1263
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1264
 
1265
      static {
1266
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1267
          byName.put(field.getFieldName(), field);
1268
        }
1269
      }
1270
 
1271
      /**
1272
       * Find the _Fields constant that matches fieldId, or null if its not found.
1273
       */
1274
      public static _Fields findByThriftId(int fieldId) {
1275
        switch(fieldId) {
1276
          case 1: // PURCHASE_ORDER
1277
            return PURCHASE_ORDER;
1278
          default:
1279
            return null;
1280
        }
1281
      }
1282
 
1283
      /**
1284
       * Find the _Fields constant that matches fieldId, throwing an exception
1285
       * if it is not found.
1286
       */
1287
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1288
        _Fields fields = findByThriftId(fieldId);
1289
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1290
        return fields;
1291
      }
1292
 
1293
      /**
1294
       * Find the _Fields constant that matches name, or null if its not found.
1295
       */
1296
      public static _Fields findByName(String name) {
1297
        return byName.get(name);
1298
      }
1299
 
1300
      private final short _thriftId;
1301
      private final String _fieldName;
1302
 
1303
      _Fields(short thriftId, String fieldName) {
1304
        _thriftId = thriftId;
1305
        _fieldName = fieldName;
1306
      }
1307
 
1308
      public short getThriftFieldId() {
1309
        return _thriftId;
1310
      }
1311
 
1312
      public String getFieldName() {
1313
        return _fieldName;
1314
      }
1315
    }
1316
 
1317
    // isset id assignments
1318
 
1319
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1320
    static {
1321
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1322
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1323
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
1324
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1325
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
1326
    }
1327
 
1328
    public createPurchaseOrder_args() {
1329
    }
1330
 
1331
    public createPurchaseOrder_args(
1332
      PurchaseOrder purchaseOrder)
1333
    {
1334
      this();
1335
      this.purchaseOrder = purchaseOrder;
1336
    }
1337
 
1338
    /**
1339
     * Performs a deep copy on <i>other</i>.
1340
     */
1341
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
1342
      if (other.isSetPurchaseOrder()) {
1343
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
1344
      }
1345
    }
1346
 
1347
    public createPurchaseOrder_args deepCopy() {
1348
      return new createPurchaseOrder_args(this);
1349
    }
1350
 
1351
    @Override
1352
    public void clear() {
1353
      this.purchaseOrder = null;
1354
    }
1355
 
1356
    public PurchaseOrder getPurchaseOrder() {
1357
      return this.purchaseOrder;
1358
    }
1359
 
1360
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
1361
      this.purchaseOrder = purchaseOrder;
1362
    }
1363
 
1364
    public void unsetPurchaseOrder() {
1365
      this.purchaseOrder = null;
1366
    }
1367
 
1368
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
1369
    public boolean isSetPurchaseOrder() {
1370
      return this.purchaseOrder != null;
1371
    }
1372
 
1373
    public void setPurchaseOrderIsSet(boolean value) {
1374
      if (!value) {
1375
        this.purchaseOrder = null;
1376
      }
1377
    }
1378
 
1379
    public void setFieldValue(_Fields field, Object value) {
1380
      switch (field) {
1381
      case PURCHASE_ORDER:
1382
        if (value == null) {
1383
          unsetPurchaseOrder();
1384
        } else {
1385
          setPurchaseOrder((PurchaseOrder)value);
1386
        }
1387
        break;
1388
 
1389
      }
1390
    }
1391
 
1392
    public Object getFieldValue(_Fields field) {
1393
      switch (field) {
1394
      case PURCHASE_ORDER:
1395
        return getPurchaseOrder();
1396
 
1397
      }
1398
      throw new IllegalStateException();
1399
    }
1400
 
1401
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1402
    public boolean isSet(_Fields field) {
1403
      if (field == null) {
1404
        throw new IllegalArgumentException();
1405
      }
1406
 
1407
      switch (field) {
1408
      case PURCHASE_ORDER:
1409
        return isSetPurchaseOrder();
1410
      }
1411
      throw new IllegalStateException();
1412
    }
1413
 
1414
    @Override
1415
    public boolean equals(Object that) {
1416
      if (that == null)
1417
        return false;
1418
      if (that instanceof createPurchaseOrder_args)
1419
        return this.equals((createPurchaseOrder_args)that);
1420
      return false;
1421
    }
1422
 
1423
    public boolean equals(createPurchaseOrder_args that) {
1424
      if (that == null)
1425
        return false;
1426
 
1427
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
1428
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
1429
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
1430
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
1431
          return false;
1432
        if (!this.purchaseOrder.equals(that.purchaseOrder))
1433
          return false;
1434
      }
1435
 
1436
      return true;
1437
    }
1438
 
1439
    @Override
1440
    public int hashCode() {
1441
      return 0;
1442
    }
1443
 
1444
    public int compareTo(createPurchaseOrder_args other) {
1445
      if (!getClass().equals(other.getClass())) {
1446
        return getClass().getName().compareTo(other.getClass().getName());
1447
      }
1448
 
1449
      int lastComparison = 0;
1450
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
1451
 
1452
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
1453
      if (lastComparison != 0) {
1454
        return lastComparison;
1455
      }
1456
      if (isSetPurchaseOrder()) {
1457
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
1458
        if (lastComparison != 0) {
1459
          return lastComparison;
1460
        }
1461
      }
1462
      return 0;
1463
    }
1464
 
1465
    public _Fields fieldForId(int fieldId) {
1466
      return _Fields.findByThriftId(fieldId);
1467
    }
1468
 
1469
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1470
      org.apache.thrift.protocol.TField field;
1471
      iprot.readStructBegin();
1472
      while (true)
1473
      {
1474
        field = iprot.readFieldBegin();
1475
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1476
          break;
1477
        }
1478
        switch (field.id) {
1479
          case 1: // PURCHASE_ORDER
1480
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1481
              this.purchaseOrder = new PurchaseOrder();
1482
              this.purchaseOrder.read(iprot);
1483
            } else { 
1484
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1485
            }
1486
            break;
1487
          default:
1488
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1489
        }
1490
        iprot.readFieldEnd();
1491
      }
1492
      iprot.readStructEnd();
1493
      validate();
1494
    }
1495
 
1496
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1497
      validate();
1498
 
1499
      oprot.writeStructBegin(STRUCT_DESC);
1500
      if (this.purchaseOrder != null) {
1501
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
1502
        this.purchaseOrder.write(oprot);
1503
        oprot.writeFieldEnd();
1504
      }
1505
      oprot.writeFieldStop();
1506
      oprot.writeStructEnd();
1507
    }
1508
 
1509
    @Override
1510
    public String toString() {
1511
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
1512
      boolean first = true;
1513
 
1514
      sb.append("purchaseOrder:");
1515
      if (this.purchaseOrder == null) {
1516
        sb.append("null");
1517
      } else {
1518
        sb.append(this.purchaseOrder);
1519
      }
1520
      first = false;
1521
      sb.append(")");
1522
      return sb.toString();
1523
    }
1524
 
1525
    public void validate() throws org.apache.thrift.TException {
1526
      // check for required fields
1527
    }
1528
 
1529
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1530
      try {
1531
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1532
      } catch (org.apache.thrift.TException te) {
1533
        throw new java.io.IOException(te);
1534
      }
1535
    }
1536
 
1537
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1538
      try {
1539
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1540
      } catch (org.apache.thrift.TException te) {
1541
        throw new java.io.IOException(te);
1542
      }
1543
    }
1544
 
1545
  }
1546
 
1547
  public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
1548
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");
1549
 
1550
    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);
1551
    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);
1552
 
1553
    private long success; // required
1554
    private PurchaseServiceException e; // required
1555
 
1556
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1557
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1558
      SUCCESS((short)0, "success"),
1559
      E((short)1, "e");
1560
 
1561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1562
 
1563
      static {
1564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1565
          byName.put(field.getFieldName(), field);
1566
        }
1567
      }
1568
 
1569
      /**
1570
       * Find the _Fields constant that matches fieldId, or null if its not found.
1571
       */
1572
      public static _Fields findByThriftId(int fieldId) {
1573
        switch(fieldId) {
1574
          case 0: // SUCCESS
1575
            return SUCCESS;
1576
          case 1: // E
1577
            return E;
1578
          default:
1579
            return null;
1580
        }
1581
      }
1582
 
1583
      /**
1584
       * Find the _Fields constant that matches fieldId, throwing an exception
1585
       * if it is not found.
1586
       */
1587
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1588
        _Fields fields = findByThriftId(fieldId);
1589
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1590
        return fields;
1591
      }
1592
 
1593
      /**
1594
       * Find the _Fields constant that matches name, or null if its not found.
1595
       */
1596
      public static _Fields findByName(String name) {
1597
        return byName.get(name);
1598
      }
1599
 
1600
      private final short _thriftId;
1601
      private final String _fieldName;
1602
 
1603
      _Fields(short thriftId, String fieldName) {
1604
        _thriftId = thriftId;
1605
        _fieldName = fieldName;
1606
      }
1607
 
1608
      public short getThriftFieldId() {
1609
        return _thriftId;
1610
      }
1611
 
1612
      public String getFieldName() {
1613
        return _fieldName;
1614
      }
1615
    }
1616
 
1617
    // isset id assignments
1618
    private static final int __SUCCESS_ISSET_ID = 0;
1619
    private BitSet __isset_bit_vector = new BitSet(1);
1620
 
1621
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1622
    static {
1623
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1624
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1625
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
1626
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1627
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
1628
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1629
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
1630
    }
1631
 
1632
    public createPurchaseOrder_result() {
1633
    }
1634
 
1635
    public createPurchaseOrder_result(
1636
      long success,
1637
      PurchaseServiceException e)
1638
    {
1639
      this();
1640
      this.success = success;
1641
      setSuccessIsSet(true);
1642
      this.e = e;
1643
    }
1644
 
1645
    /**
1646
     * Performs a deep copy on <i>other</i>.
1647
     */
1648
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
1649
      __isset_bit_vector.clear();
1650
      __isset_bit_vector.or(other.__isset_bit_vector);
1651
      this.success = other.success;
1652
      if (other.isSetE()) {
1653
        this.e = new PurchaseServiceException(other.e);
1654
      }
1655
    }
1656
 
1657
    public createPurchaseOrder_result deepCopy() {
1658
      return new createPurchaseOrder_result(this);
1659
    }
1660
 
1661
    @Override
1662
    public void clear() {
1663
      setSuccessIsSet(false);
1664
      this.success = 0;
1665
      this.e = null;
1666
    }
1667
 
1668
    public long getSuccess() {
1669
      return this.success;
1670
    }
1671
 
1672
    public void setSuccess(long success) {
1673
      this.success = success;
1674
      setSuccessIsSet(true);
1675
    }
1676
 
1677
    public void unsetSuccess() {
1678
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
1679
    }
1680
 
1681
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
1682
    public boolean isSetSuccess() {
1683
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
1684
    }
1685
 
1686
    public void setSuccessIsSet(boolean value) {
1687
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
1688
    }
1689
 
1690
    public PurchaseServiceException getE() {
1691
      return this.e;
1692
    }
1693
 
1694
    public void setE(PurchaseServiceException e) {
1695
      this.e = e;
1696
    }
1697
 
1698
    public void unsetE() {
1699
      this.e = null;
1700
    }
1701
 
1702
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
1703
    public boolean isSetE() {
1704
      return this.e != null;
1705
    }
1706
 
1707
    public void setEIsSet(boolean value) {
1708
      if (!value) {
1709
        this.e = null;
1710
      }
1711
    }
1712
 
1713
    public void setFieldValue(_Fields field, Object value) {
1714
      switch (field) {
1715
      case SUCCESS:
1716
        if (value == null) {
1717
          unsetSuccess();
1718
        } else {
1719
          setSuccess((Long)value);
1720
        }
1721
        break;
1722
 
1723
      case E:
1724
        if (value == null) {
1725
          unsetE();
1726
        } else {
1727
          setE((PurchaseServiceException)value);
1728
        }
1729
        break;
1730
 
1731
      }
1732
    }
1733
 
1734
    public Object getFieldValue(_Fields field) {
1735
      switch (field) {
1736
      case SUCCESS:
1737
        return Long.valueOf(getSuccess());
1738
 
1739
      case E:
1740
        return getE();
1741
 
1742
      }
1743
      throw new IllegalStateException();
1744
    }
1745
 
1746
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1747
    public boolean isSet(_Fields field) {
1748
      if (field == null) {
1749
        throw new IllegalArgumentException();
1750
      }
1751
 
1752
      switch (field) {
1753
      case SUCCESS:
1754
        return isSetSuccess();
1755
      case E:
1756
        return isSetE();
1757
      }
1758
      throw new IllegalStateException();
1759
    }
1760
 
1761
    @Override
1762
    public boolean equals(Object that) {
1763
      if (that == null)
1764
        return false;
1765
      if (that instanceof createPurchaseOrder_result)
1766
        return this.equals((createPurchaseOrder_result)that);
1767
      return false;
1768
    }
1769
 
1770
    public boolean equals(createPurchaseOrder_result that) {
1771
      if (that == null)
1772
        return false;
1773
 
1774
      boolean this_present_success = true;
1775
      boolean that_present_success = true;
1776
      if (this_present_success || that_present_success) {
1777
        if (!(this_present_success && that_present_success))
1778
          return false;
1779
        if (this.success != that.success)
1780
          return false;
1781
      }
1782
 
1783
      boolean this_present_e = true && this.isSetE();
1784
      boolean that_present_e = true && that.isSetE();
1785
      if (this_present_e || that_present_e) {
1786
        if (!(this_present_e && that_present_e))
1787
          return false;
1788
        if (!this.e.equals(that.e))
1789
          return false;
1790
      }
1791
 
1792
      return true;
1793
    }
1794
 
1795
    @Override
1796
    public int hashCode() {
1797
      return 0;
1798
    }
1799
 
1800
    public int compareTo(createPurchaseOrder_result other) {
1801
      if (!getClass().equals(other.getClass())) {
1802
        return getClass().getName().compareTo(other.getClass().getName());
1803
      }
1804
 
1805
      int lastComparison = 0;
1806
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
1807
 
1808
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1809
      if (lastComparison != 0) {
1810
        return lastComparison;
1811
      }
1812
      if (isSetSuccess()) {
1813
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
1814
        if (lastComparison != 0) {
1815
          return lastComparison;
1816
        }
1817
      }
1818
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
1819
      if (lastComparison != 0) {
1820
        return lastComparison;
1821
      }
1822
      if (isSetE()) {
1823
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
1824
        if (lastComparison != 0) {
1825
          return lastComparison;
1826
        }
1827
      }
1828
      return 0;
1829
    }
1830
 
1831
    public _Fields fieldForId(int fieldId) {
1832
      return _Fields.findByThriftId(fieldId);
1833
    }
1834
 
1835
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1836
      org.apache.thrift.protocol.TField field;
1837
      iprot.readStructBegin();
1838
      while (true)
1839
      {
1840
        field = iprot.readFieldBegin();
1841
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1842
          break;
1843
        }
1844
        switch (field.id) {
1845
          case 0: // SUCCESS
1846
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1847
              this.success = iprot.readI64();
1848
              setSuccessIsSet(true);
1849
            } else { 
1850
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1851
            }
1852
            break;
1853
          case 1: // E
1854
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1855
              this.e = new PurchaseServiceException();
1856
              this.e.read(iprot);
1857
            } else { 
1858
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1859
            }
1860
            break;
1861
          default:
1862
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1863
        }
1864
        iprot.readFieldEnd();
1865
      }
1866
      iprot.readStructEnd();
1867
      validate();
1868
    }
1869
 
1870
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1871
      oprot.writeStructBegin(STRUCT_DESC);
1872
 
1873
      if (this.isSetSuccess()) {
1874
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1875
        oprot.writeI64(this.success);
1876
        oprot.writeFieldEnd();
1877
      } else if (this.isSetE()) {
1878
        oprot.writeFieldBegin(E_FIELD_DESC);
1879
        this.e.write(oprot);
1880
        oprot.writeFieldEnd();
1881
      }
1882
      oprot.writeFieldStop();
1883
      oprot.writeStructEnd();
1884
    }
1885
 
1886
    @Override
1887
    public String toString() {
1888
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
1889
      boolean first = true;
1890
 
1891
      sb.append("success:");
1892
      sb.append(this.success);
1893
      first = false;
1894
      if (!first) sb.append(", ");
1895
      sb.append("e:");
1896
      if (this.e == null) {
1897
        sb.append("null");
1898
      } else {
1899
        sb.append(this.e);
1900
      }
1901
      first = false;
1902
      sb.append(")");
1903
      return sb.toString();
1904
    }
1905
 
1906
    public void validate() throws org.apache.thrift.TException {
1907
      // check for required fields
1908
    }
1909
 
1910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1911
      try {
1912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1913
      } catch (org.apache.thrift.TException te) {
1914
        throw new java.io.IOException(te);
1915
      }
1916
    }
1917
 
1918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1919
      try {
1920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1921
      } catch (org.apache.thrift.TException te) {
1922
        throw new java.io.IOException(te);
1923
      }
1924
    }
1925
 
1926
  }
1927
 
1928
  public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");
1930
 
1931
    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);
1932
 
1933
    private long id; // required
1934
 
1935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1936
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1937
      ID((short)1, "id");
1938
 
1939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1940
 
1941
      static {
1942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1943
          byName.put(field.getFieldName(), field);
1944
        }
1945
      }
1946
 
1947
      /**
1948
       * Find the _Fields constant that matches fieldId, or null if its not found.
1949
       */
1950
      public static _Fields findByThriftId(int fieldId) {
1951
        switch(fieldId) {
1952
          case 1: // ID
1953
            return ID;
1954
          default:
1955
            return null;
1956
        }
1957
      }
1958
 
1959
      /**
1960
       * Find the _Fields constant that matches fieldId, throwing an exception
1961
       * if it is not found.
1962
       */
1963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1964
        _Fields fields = findByThriftId(fieldId);
1965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1966
        return fields;
1967
      }
1968
 
1969
      /**
1970
       * Find the _Fields constant that matches name, or null if its not found.
1971
       */
1972
      public static _Fields findByName(String name) {
1973
        return byName.get(name);
1974
      }
1975
 
1976
      private final short _thriftId;
1977
      private final String _fieldName;
1978
 
1979
      _Fields(short thriftId, String fieldName) {
1980
        _thriftId = thriftId;
1981
        _fieldName = fieldName;
1982
      }
1983
 
1984
      public short getThriftFieldId() {
1985
        return _thriftId;
1986
      }
1987
 
1988
      public String getFieldName() {
1989
        return _fieldName;
1990
      }
1991
    }
1992
 
1993
    // isset id assignments
1994
    private static final int __ID_ISSET_ID = 0;
1995
    private BitSet __isset_bit_vector = new BitSet(1);
1996
 
1997
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1998
    static {
1999
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2000
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2001
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2002
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2003
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
2004
    }
2005
 
2006
    public getPurchaseOrder_args() {
2007
    }
2008
 
2009
    public getPurchaseOrder_args(
2010
      long id)
2011
    {
2012
      this();
2013
      this.id = id;
2014
      setIdIsSet(true);
2015
    }
2016
 
2017
    /**
2018
     * Performs a deep copy on <i>other</i>.
2019
     */
2020
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
2021
      __isset_bit_vector.clear();
2022
      __isset_bit_vector.or(other.__isset_bit_vector);
2023
      this.id = other.id;
2024
    }
2025
 
2026
    public getPurchaseOrder_args deepCopy() {
2027
      return new getPurchaseOrder_args(this);
2028
    }
2029
 
2030
    @Override
2031
    public void clear() {
2032
      setIdIsSet(false);
2033
      this.id = 0;
2034
    }
2035
 
2036
    public long getId() {
2037
      return this.id;
2038
    }
2039
 
2040
    public void setId(long id) {
2041
      this.id = id;
2042
      setIdIsSet(true);
2043
    }
2044
 
2045
    public void unsetId() {
2046
      __isset_bit_vector.clear(__ID_ISSET_ID);
2047
    }
2048
 
2049
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
2050
    public boolean isSetId() {
2051
      return __isset_bit_vector.get(__ID_ISSET_ID);
2052
    }
2053
 
2054
    public void setIdIsSet(boolean value) {
2055
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2056
    }
2057
 
2058
    public void setFieldValue(_Fields field, Object value) {
2059
      switch (field) {
2060
      case ID:
2061
        if (value == null) {
2062
          unsetId();
2063
        } else {
2064
          setId((Long)value);
2065
        }
2066
        break;
2067
 
2068
      }
2069
    }
2070
 
2071
    public Object getFieldValue(_Fields field) {
2072
      switch (field) {
2073
      case ID:
2074
        return Long.valueOf(getId());
2075
 
2076
      }
2077
      throw new IllegalStateException();
2078
    }
2079
 
2080
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2081
    public boolean isSet(_Fields field) {
2082
      if (field == null) {
2083
        throw new IllegalArgumentException();
2084
      }
2085
 
2086
      switch (field) {
2087
      case ID:
2088
        return isSetId();
2089
      }
2090
      throw new IllegalStateException();
2091
    }
2092
 
2093
    @Override
2094
    public boolean equals(Object that) {
2095
      if (that == null)
2096
        return false;
2097
      if (that instanceof getPurchaseOrder_args)
2098
        return this.equals((getPurchaseOrder_args)that);
2099
      return false;
2100
    }
2101
 
2102
    public boolean equals(getPurchaseOrder_args that) {
2103
      if (that == null)
2104
        return false;
2105
 
2106
      boolean this_present_id = true;
2107
      boolean that_present_id = true;
2108
      if (this_present_id || that_present_id) {
2109
        if (!(this_present_id && that_present_id))
2110
          return false;
2111
        if (this.id != that.id)
2112
          return false;
2113
      }
2114
 
2115
      return true;
2116
    }
2117
 
2118
    @Override
2119
    public int hashCode() {
2120
      return 0;
2121
    }
2122
 
2123
    public int compareTo(getPurchaseOrder_args other) {
2124
      if (!getClass().equals(other.getClass())) {
2125
        return getClass().getName().compareTo(other.getClass().getName());
2126
      }
2127
 
2128
      int lastComparison = 0;
2129
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
2130
 
2131
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
2132
      if (lastComparison != 0) {
2133
        return lastComparison;
2134
      }
2135
      if (isSetId()) {
2136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
2137
        if (lastComparison != 0) {
2138
          return lastComparison;
2139
        }
2140
      }
2141
      return 0;
2142
    }
2143
 
2144
    public _Fields fieldForId(int fieldId) {
2145
      return _Fields.findByThriftId(fieldId);
2146
    }
2147
 
2148
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2149
      org.apache.thrift.protocol.TField field;
2150
      iprot.readStructBegin();
2151
      while (true)
2152
      {
2153
        field = iprot.readFieldBegin();
2154
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2155
          break;
2156
        }
2157
        switch (field.id) {
2158
          case 1: // ID
2159
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2160
              this.id = iprot.readI64();
2161
              setIdIsSet(true);
2162
            } else { 
2163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2164
            }
2165
            break;
2166
          default:
2167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2168
        }
2169
        iprot.readFieldEnd();
2170
      }
2171
      iprot.readStructEnd();
2172
      validate();
2173
    }
2174
 
2175
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2176
      validate();
2177
 
2178
      oprot.writeStructBegin(STRUCT_DESC);
2179
      oprot.writeFieldBegin(ID_FIELD_DESC);
2180
      oprot.writeI64(this.id);
2181
      oprot.writeFieldEnd();
2182
      oprot.writeFieldStop();
2183
      oprot.writeStructEnd();
2184
    }
2185
 
2186
    @Override
2187
    public String toString() {
2188
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
2189
      boolean first = true;
2190
 
2191
      sb.append("id:");
2192
      sb.append(this.id);
2193
      first = false;
2194
      sb.append(")");
2195
      return sb.toString();
2196
    }
2197
 
2198
    public void validate() throws org.apache.thrift.TException {
2199
      // check for required fields
2200
    }
2201
 
2202
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2203
      try {
2204
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2205
      } catch (org.apache.thrift.TException te) {
2206
        throw new java.io.IOException(te);
2207
      }
2208
    }
2209
 
2210
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2211
      try {
2212
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2213
      } catch (org.apache.thrift.TException te) {
2214
        throw new java.io.IOException(te);
2215
      }
2216
    }
2217
 
2218
  }
2219
 
2220
  public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
2221
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");
2222
 
2223
    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);
2224
    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);
2225
 
2226
    private PurchaseOrder success; // required
2227
    private PurchaseServiceException e; // required
2228
 
2229
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2230
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2231
      SUCCESS((short)0, "success"),
2232
      E((short)1, "e");
2233
 
2234
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2235
 
2236
      static {
2237
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2238
          byName.put(field.getFieldName(), field);
2239
        }
2240
      }
2241
 
2242
      /**
2243
       * Find the _Fields constant that matches fieldId, or null if its not found.
2244
       */
2245
      public static _Fields findByThriftId(int fieldId) {
2246
        switch(fieldId) {
2247
          case 0: // SUCCESS
2248
            return SUCCESS;
2249
          case 1: // E
2250
            return E;
2251
          default:
2252
            return null;
2253
        }
2254
      }
2255
 
2256
      /**
2257
       * Find the _Fields constant that matches fieldId, throwing an exception
2258
       * if it is not found.
2259
       */
2260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2261
        _Fields fields = findByThriftId(fieldId);
2262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2263
        return fields;
2264
      }
2265
 
2266
      /**
2267
       * Find the _Fields constant that matches name, or null if its not found.
2268
       */
2269
      public static _Fields findByName(String name) {
2270
        return byName.get(name);
2271
      }
2272
 
2273
      private final short _thriftId;
2274
      private final String _fieldName;
2275
 
2276
      _Fields(short thriftId, String fieldName) {
2277
        _thriftId = thriftId;
2278
        _fieldName = fieldName;
2279
      }
2280
 
2281
      public short getThriftFieldId() {
2282
        return _thriftId;
2283
      }
2284
 
2285
      public String getFieldName() {
2286
        return _fieldName;
2287
      }
2288
    }
2289
 
2290
    // isset id assignments
2291
 
2292
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2293
    static {
2294
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2295
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2296
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
2297
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2298
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2299
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2300
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
2301
    }
2302
 
2303
    public getPurchaseOrder_result() {
2304
    }
2305
 
2306
    public getPurchaseOrder_result(
2307
      PurchaseOrder success,
2308
      PurchaseServiceException e)
2309
    {
2310
      this();
2311
      this.success = success;
2312
      this.e = e;
2313
    }
2314
 
2315
    /**
2316
     * Performs a deep copy on <i>other</i>.
2317
     */
2318
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
2319
      if (other.isSetSuccess()) {
2320
        this.success = new PurchaseOrder(other.success);
2321
      }
2322
      if (other.isSetE()) {
2323
        this.e = new PurchaseServiceException(other.e);
2324
      }
2325
    }
2326
 
2327
    public getPurchaseOrder_result deepCopy() {
2328
      return new getPurchaseOrder_result(this);
2329
    }
2330
 
2331
    @Override
2332
    public void clear() {
2333
      this.success = null;
2334
      this.e = null;
2335
    }
2336
 
2337
    public PurchaseOrder getSuccess() {
2338
      return this.success;
2339
    }
2340
 
2341
    public void setSuccess(PurchaseOrder success) {
2342
      this.success = success;
2343
    }
2344
 
2345
    public void unsetSuccess() {
2346
      this.success = null;
2347
    }
2348
 
2349
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2350
    public boolean isSetSuccess() {
2351
      return this.success != null;
2352
    }
2353
 
2354
    public void setSuccessIsSet(boolean value) {
2355
      if (!value) {
2356
        this.success = null;
2357
      }
2358
    }
2359
 
2360
    public PurchaseServiceException getE() {
2361
      return this.e;
2362
    }
2363
 
2364
    public void setE(PurchaseServiceException e) {
2365
      this.e = e;
2366
    }
2367
 
2368
    public void unsetE() {
2369
      this.e = null;
2370
    }
2371
 
2372
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
2373
    public boolean isSetE() {
2374
      return this.e != null;
2375
    }
2376
 
2377
    public void setEIsSet(boolean value) {
2378
      if (!value) {
2379
        this.e = null;
2380
      }
2381
    }
2382
 
2383
    public void setFieldValue(_Fields field, Object value) {
2384
      switch (field) {
2385
      case SUCCESS:
2386
        if (value == null) {
2387
          unsetSuccess();
2388
        } else {
2389
          setSuccess((PurchaseOrder)value);
2390
        }
2391
        break;
2392
 
2393
      case E:
2394
        if (value == null) {
2395
          unsetE();
2396
        } else {
2397
          setE((PurchaseServiceException)value);
2398
        }
2399
        break;
2400
 
2401
      }
2402
    }
2403
 
2404
    public Object getFieldValue(_Fields field) {
2405
      switch (field) {
2406
      case SUCCESS:
2407
        return getSuccess();
2408
 
2409
      case E:
2410
        return getE();
2411
 
2412
      }
2413
      throw new IllegalStateException();
2414
    }
2415
 
2416
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2417
    public boolean isSet(_Fields field) {
2418
      if (field == null) {
2419
        throw new IllegalArgumentException();
2420
      }
2421
 
2422
      switch (field) {
2423
      case SUCCESS:
2424
        return isSetSuccess();
2425
      case E:
2426
        return isSetE();
2427
      }
2428
      throw new IllegalStateException();
2429
    }
2430
 
2431
    @Override
2432
    public boolean equals(Object that) {
2433
      if (that == null)
2434
        return false;
2435
      if (that instanceof getPurchaseOrder_result)
2436
        return this.equals((getPurchaseOrder_result)that);
2437
      return false;
2438
    }
2439
 
2440
    public boolean equals(getPurchaseOrder_result that) {
2441
      if (that == null)
2442
        return false;
2443
 
2444
      boolean this_present_success = true && this.isSetSuccess();
2445
      boolean that_present_success = true && that.isSetSuccess();
2446
      if (this_present_success || that_present_success) {
2447
        if (!(this_present_success && that_present_success))
2448
          return false;
2449
        if (!this.success.equals(that.success))
2450
          return false;
2451
      }
2452
 
2453
      boolean this_present_e = true && this.isSetE();
2454
      boolean that_present_e = true && that.isSetE();
2455
      if (this_present_e || that_present_e) {
2456
        if (!(this_present_e && that_present_e))
2457
          return false;
2458
        if (!this.e.equals(that.e))
2459
          return false;
2460
      }
2461
 
2462
      return true;
2463
    }
2464
 
2465
    @Override
2466
    public int hashCode() {
2467
      return 0;
2468
    }
2469
 
2470
    public int compareTo(getPurchaseOrder_result other) {
2471
      if (!getClass().equals(other.getClass())) {
2472
        return getClass().getName().compareTo(other.getClass().getName());
2473
      }
2474
 
2475
      int lastComparison = 0;
2476
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
2477
 
2478
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2479
      if (lastComparison != 0) {
2480
        return lastComparison;
2481
      }
2482
      if (isSetSuccess()) {
2483
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2484
        if (lastComparison != 0) {
2485
          return lastComparison;
2486
        }
2487
      }
2488
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
2489
      if (lastComparison != 0) {
2490
        return lastComparison;
2491
      }
2492
      if (isSetE()) {
2493
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
2494
        if (lastComparison != 0) {
2495
          return lastComparison;
2496
        }
2497
      }
2498
      return 0;
2499
    }
2500
 
2501
    public _Fields fieldForId(int fieldId) {
2502
      return _Fields.findByThriftId(fieldId);
2503
    }
2504
 
2505
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2506
      org.apache.thrift.protocol.TField field;
2507
      iprot.readStructBegin();
2508
      while (true)
2509
      {
2510
        field = iprot.readFieldBegin();
2511
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2512
          break;
2513
        }
2514
        switch (field.id) {
2515
          case 0: // SUCCESS
2516
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2517
              this.success = new PurchaseOrder();
2518
              this.success.read(iprot);
2519
            } else { 
2520
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2521
            }
2522
            break;
2523
          case 1: // E
2524
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2525
              this.e = new PurchaseServiceException();
2526
              this.e.read(iprot);
2527
            } else { 
2528
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2529
            }
2530
            break;
2531
          default:
2532
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2533
        }
2534
        iprot.readFieldEnd();
2535
      }
2536
      iprot.readStructEnd();
2537
      validate();
2538
    }
2539
 
2540
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2541
      oprot.writeStructBegin(STRUCT_DESC);
2542
 
2543
      if (this.isSetSuccess()) {
2544
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2545
        this.success.write(oprot);
2546
        oprot.writeFieldEnd();
2547
      } else if (this.isSetE()) {
2548
        oprot.writeFieldBegin(E_FIELD_DESC);
2549
        this.e.write(oprot);
2550
        oprot.writeFieldEnd();
2551
      }
2552
      oprot.writeFieldStop();
2553
      oprot.writeStructEnd();
2554
    }
2555
 
2556
    @Override
2557
    public String toString() {
2558
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
2559
      boolean first = true;
2560
 
2561
      sb.append("success:");
2562
      if (this.success == null) {
2563
        sb.append("null");
2564
      } else {
2565
        sb.append(this.success);
2566
      }
2567
      first = false;
2568
      if (!first) sb.append(", ");
2569
      sb.append("e:");
2570
      if (this.e == null) {
2571
        sb.append("null");
2572
      } else {
2573
        sb.append(this.e);
2574
      }
2575
      first = false;
2576
      sb.append(")");
2577
      return sb.toString();
2578
    }
2579
 
2580
    public void validate() throws org.apache.thrift.TException {
2581
      // check for required fields
2582
    }
2583
 
2584
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2585
      try {
2586
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2587
      } catch (org.apache.thrift.TException te) {
2588
        throw new java.io.IOException(te);
2589
      }
2590
    }
2591
 
2592
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2593
      try {
2594
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2595
      } catch (org.apache.thrift.TException te) {
2596
        throw new java.io.IOException(te);
2597
      }
2598
    }
2599
 
2600
  }
2601
 
2602
  public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
2603
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");
2604
 
2605
    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);
2606
 
2607
    private POStatus status; // required
2608
 
2609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2610
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2611
      /**
2612
       * 
2613
       * @see POStatus
2614
       */
2615
      STATUS((short)1, "status");
2616
 
2617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2618
 
2619
      static {
2620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2621
          byName.put(field.getFieldName(), field);
2622
        }
2623
      }
2624
 
2625
      /**
2626
       * Find the _Fields constant that matches fieldId, or null if its not found.
2627
       */
2628
      public static _Fields findByThriftId(int fieldId) {
2629
        switch(fieldId) {
2630
          case 1: // STATUS
2631
            return STATUS;
2632
          default:
2633
            return null;
2634
        }
2635
      }
2636
 
2637
      /**
2638
       * Find the _Fields constant that matches fieldId, throwing an exception
2639
       * if it is not found.
2640
       */
2641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2642
        _Fields fields = findByThriftId(fieldId);
2643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2644
        return fields;
2645
      }
2646
 
2647
      /**
2648
       * Find the _Fields constant that matches name, or null if its not found.
2649
       */
2650
      public static _Fields findByName(String name) {
2651
        return byName.get(name);
2652
      }
2653
 
2654
      private final short _thriftId;
2655
      private final String _fieldName;
2656
 
2657
      _Fields(short thriftId, String fieldName) {
2658
        _thriftId = thriftId;
2659
        _fieldName = fieldName;
2660
      }
2661
 
2662
      public short getThriftFieldId() {
2663
        return _thriftId;
2664
      }
2665
 
2666
      public String getFieldName() {
2667
        return _fieldName;
2668
      }
2669
    }
2670
 
2671
    // isset id assignments
2672
 
2673
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2674
    static {
2675
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2676
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2677
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));
2678
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2679
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
2680
    }
2681
 
2682
    public getAllPurchaseOrders_args() {
2683
    }
2684
 
2685
    public getAllPurchaseOrders_args(
2686
      POStatus status)
2687
    {
2688
      this();
2689
      this.status = status;
2690
    }
2691
 
2692
    /**
2693
     * Performs a deep copy on <i>other</i>.
2694
     */
2695
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
2696
      if (other.isSetStatus()) {
2697
        this.status = other.status;
2698
      }
2699
    }
2700
 
2701
    public getAllPurchaseOrders_args deepCopy() {
2702
      return new getAllPurchaseOrders_args(this);
2703
    }
2704
 
2705
    @Override
2706
    public void clear() {
2707
      this.status = null;
2708
    }
2709
 
2710
    /**
2711
     * 
2712
     * @see POStatus
2713
     */
2714
    public POStatus getStatus() {
2715
      return this.status;
2716
    }
2717
 
2718
    /**
2719
     * 
2720
     * @see POStatus
2721
     */
2722
    public void setStatus(POStatus status) {
2723
      this.status = status;
2724
    }
2725
 
2726
    public void unsetStatus() {
2727
      this.status = null;
2728
    }
2729
 
2730
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
2731
    public boolean isSetStatus() {
2732
      return this.status != null;
2733
    }
2734
 
2735
    public void setStatusIsSet(boolean value) {
2736
      if (!value) {
2737
        this.status = null;
2738
      }
2739
    }
2740
 
2741
    public void setFieldValue(_Fields field, Object value) {
2742
      switch (field) {
2743
      case STATUS:
2744
        if (value == null) {
2745
          unsetStatus();
2746
        } else {
2747
          setStatus((POStatus)value);
2748
        }
2749
        break;
2750
 
2751
      }
2752
    }
2753
 
2754
    public Object getFieldValue(_Fields field) {
2755
      switch (field) {
2756
      case STATUS:
2757
        return getStatus();
2758
 
2759
      }
2760
      throw new IllegalStateException();
2761
    }
2762
 
2763
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2764
    public boolean isSet(_Fields field) {
2765
      if (field == null) {
2766
        throw new IllegalArgumentException();
2767
      }
2768
 
2769
      switch (field) {
2770
      case STATUS:
2771
        return isSetStatus();
2772
      }
2773
      throw new IllegalStateException();
2774
    }
2775
 
2776
    @Override
2777
    public boolean equals(Object that) {
2778
      if (that == null)
2779
        return false;
2780
      if (that instanceof getAllPurchaseOrders_args)
2781
        return this.equals((getAllPurchaseOrders_args)that);
2782
      return false;
2783
    }
2784
 
2785
    public boolean equals(getAllPurchaseOrders_args that) {
2786
      if (that == null)
2787
        return false;
2788
 
2789
      boolean this_present_status = true && this.isSetStatus();
2790
      boolean that_present_status = true && that.isSetStatus();
2791
      if (this_present_status || that_present_status) {
2792
        if (!(this_present_status && that_present_status))
2793
          return false;
2794
        if (!this.status.equals(that.status))
2795
          return false;
2796
      }
2797
 
2798
      return true;
2799
    }
2800
 
2801
    @Override
2802
    public int hashCode() {
2803
      return 0;
2804
    }
2805
 
2806
    public int compareTo(getAllPurchaseOrders_args other) {
2807
      if (!getClass().equals(other.getClass())) {
2808
        return getClass().getName().compareTo(other.getClass().getName());
2809
      }
2810
 
2811
      int lastComparison = 0;
2812
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
2813
 
2814
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
2815
      if (lastComparison != 0) {
2816
        return lastComparison;
2817
      }
2818
      if (isSetStatus()) {
2819
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
2820
        if (lastComparison != 0) {
2821
          return lastComparison;
2822
        }
2823
      }
2824
      return 0;
2825
    }
2826
 
2827
    public _Fields fieldForId(int fieldId) {
2828
      return _Fields.findByThriftId(fieldId);
2829
    }
2830
 
2831
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2832
      org.apache.thrift.protocol.TField field;
2833
      iprot.readStructBegin();
2834
      while (true)
2835
      {
2836
        field = iprot.readFieldBegin();
2837
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2838
          break;
2839
        }
2840
        switch (field.id) {
2841
          case 1: // STATUS
2842
            if (field.type == org.apache.thrift.protocol.TType.I32) {
2843
              this.status = POStatus.findByValue(iprot.readI32());
2844
            } else { 
2845
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2846
            }
2847
            break;
2848
          default:
2849
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2850
        }
2851
        iprot.readFieldEnd();
2852
      }
2853
      iprot.readStructEnd();
2854
      validate();
2855
    }
2856
 
2857
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2858
      validate();
2859
 
2860
      oprot.writeStructBegin(STRUCT_DESC);
2861
      if (this.status != null) {
2862
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
2863
        oprot.writeI32(this.status.getValue());
2864
        oprot.writeFieldEnd();
2865
      }
2866
      oprot.writeFieldStop();
2867
      oprot.writeStructEnd();
2868
    }
2869
 
2870
    @Override
2871
    public String toString() {
2872
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
2873
      boolean first = true;
2874
 
2875
      sb.append("status:");
2876
      if (this.status == null) {
2877
        sb.append("null");
2878
      } else {
2879
        sb.append(this.status);
2880
      }
2881
      first = false;
2882
      sb.append(")");
2883
      return sb.toString();
2884
    }
2885
 
2886
    public void validate() throws org.apache.thrift.TException {
2887
      // check for required fields
2888
    }
2889
 
2890
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2891
      try {
2892
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2893
      } catch (org.apache.thrift.TException te) {
2894
        throw new java.io.IOException(te);
2895
      }
2896
    }
2897
 
2898
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2899
      try {
2900
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2901
      } catch (org.apache.thrift.TException te) {
2902
        throw new java.io.IOException(te);
2903
      }
2904
    }
2905
 
2906
  }
2907
 
2908
  public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
2909
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");
2910
 
2911
    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);
2912
    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);
2913
 
2914
    private List<PurchaseOrder> success; // required
2915
    private PurchaseServiceException e; // required
2916
 
2917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2918
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2919
      SUCCESS((short)0, "success"),
2920
      E((short)1, "e");
2921
 
2922
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2923
 
2924
      static {
2925
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2926
          byName.put(field.getFieldName(), field);
2927
        }
2928
      }
2929
 
2930
      /**
2931
       * Find the _Fields constant that matches fieldId, or null if its not found.
2932
       */
2933
      public static _Fields findByThriftId(int fieldId) {
2934
        switch(fieldId) {
2935
          case 0: // SUCCESS
2936
            return SUCCESS;
2937
          case 1: // E
2938
            return E;
2939
          default:
2940
            return null;
2941
        }
2942
      }
2943
 
2944
      /**
2945
       * Find the _Fields constant that matches fieldId, throwing an exception
2946
       * if it is not found.
2947
       */
2948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2949
        _Fields fields = findByThriftId(fieldId);
2950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2951
        return fields;
2952
      }
2953
 
2954
      /**
2955
       * Find the _Fields constant that matches name, or null if its not found.
2956
       */
2957
      public static _Fields findByName(String name) {
2958
        return byName.get(name);
2959
      }
2960
 
2961
      private final short _thriftId;
2962
      private final String _fieldName;
2963
 
2964
      _Fields(short thriftId, String fieldName) {
2965
        _thriftId = thriftId;
2966
        _fieldName = fieldName;
2967
      }
2968
 
2969
      public short getThriftFieldId() {
2970
        return _thriftId;
2971
      }
2972
 
2973
      public String getFieldName() {
2974
        return _fieldName;
2975
      }
2976
    }
2977
 
2978
    // isset id assignments
2979
 
2980
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2981
    static {
2982
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2983
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2984
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
2985
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
2986
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2987
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2988
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2989
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
2990
    }
2991
 
2992
    public getAllPurchaseOrders_result() {
2993
    }
2994
 
2995
    public getAllPurchaseOrders_result(
2996
      List<PurchaseOrder> success,
2997
      PurchaseServiceException e)
2998
    {
2999
      this();
3000
      this.success = success;
3001
      this.e = e;
3002
    }
3003
 
3004
    /**
3005
     * Performs a deep copy on <i>other</i>.
3006
     */
3007
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
3008
      if (other.isSetSuccess()) {
3009
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
3010
        for (PurchaseOrder other_element : other.success) {
3011
          __this__success.add(new PurchaseOrder(other_element));
3012
        }
3013
        this.success = __this__success;
3014
      }
3015
      if (other.isSetE()) {
3016
        this.e = new PurchaseServiceException(other.e);
3017
      }
3018
    }
3019
 
3020
    public getAllPurchaseOrders_result deepCopy() {
3021
      return new getAllPurchaseOrders_result(this);
3022
    }
3023
 
3024
    @Override
3025
    public void clear() {
3026
      this.success = null;
3027
      this.e = null;
3028
    }
3029
 
3030
    public int getSuccessSize() {
3031
      return (this.success == null) ? 0 : this.success.size();
3032
    }
3033
 
3034
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
3035
      return (this.success == null) ? null : this.success.iterator();
3036
    }
3037
 
3038
    public void addToSuccess(PurchaseOrder elem) {
3039
      if (this.success == null) {
3040
        this.success = new ArrayList<PurchaseOrder>();
3041
      }
3042
      this.success.add(elem);
3043
    }
3044
 
3045
    public List<PurchaseOrder> getSuccess() {
3046
      return this.success;
3047
    }
3048
 
3049
    public void setSuccess(List<PurchaseOrder> success) {
3050
      this.success = success;
3051
    }
3052
 
3053
    public void unsetSuccess() {
3054
      this.success = null;
3055
    }
3056
 
3057
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3058
    public boolean isSetSuccess() {
3059
      return this.success != null;
3060
    }
3061
 
3062
    public void setSuccessIsSet(boolean value) {
3063
      if (!value) {
3064
        this.success = null;
3065
      }
3066
    }
3067
 
3068
    public PurchaseServiceException getE() {
3069
      return this.e;
3070
    }
3071
 
3072
    public void setE(PurchaseServiceException e) {
3073
      this.e = e;
3074
    }
3075
 
3076
    public void unsetE() {
3077
      this.e = null;
3078
    }
3079
 
3080
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3081
    public boolean isSetE() {
3082
      return this.e != null;
3083
    }
3084
 
3085
    public void setEIsSet(boolean value) {
3086
      if (!value) {
3087
        this.e = null;
3088
      }
3089
    }
3090
 
3091
    public void setFieldValue(_Fields field, Object value) {
3092
      switch (field) {
3093
      case SUCCESS:
3094
        if (value == null) {
3095
          unsetSuccess();
3096
        } else {
3097
          setSuccess((List<PurchaseOrder>)value);
3098
        }
3099
        break;
3100
 
3101
      case E:
3102
        if (value == null) {
3103
          unsetE();
3104
        } else {
3105
          setE((PurchaseServiceException)value);
3106
        }
3107
        break;
3108
 
3109
      }
3110
    }
3111
 
3112
    public Object getFieldValue(_Fields field) {
3113
      switch (field) {
3114
      case SUCCESS:
3115
        return getSuccess();
3116
 
3117
      case E:
3118
        return getE();
3119
 
3120
      }
3121
      throw new IllegalStateException();
3122
    }
3123
 
3124
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3125
    public boolean isSet(_Fields field) {
3126
      if (field == null) {
3127
        throw new IllegalArgumentException();
3128
      }
3129
 
3130
      switch (field) {
3131
      case SUCCESS:
3132
        return isSetSuccess();
3133
      case E:
3134
        return isSetE();
3135
      }
3136
      throw new IllegalStateException();
3137
    }
3138
 
3139
    @Override
3140
    public boolean equals(Object that) {
3141
      if (that == null)
3142
        return false;
3143
      if (that instanceof getAllPurchaseOrders_result)
3144
        return this.equals((getAllPurchaseOrders_result)that);
3145
      return false;
3146
    }
3147
 
3148
    public boolean equals(getAllPurchaseOrders_result that) {
3149
      if (that == null)
3150
        return false;
3151
 
3152
      boolean this_present_success = true && this.isSetSuccess();
3153
      boolean that_present_success = true && that.isSetSuccess();
3154
      if (this_present_success || that_present_success) {
3155
        if (!(this_present_success && that_present_success))
3156
          return false;
3157
        if (!this.success.equals(that.success))
3158
          return false;
3159
      }
3160
 
3161
      boolean this_present_e = true && this.isSetE();
3162
      boolean that_present_e = true && that.isSetE();
3163
      if (this_present_e || that_present_e) {
3164
        if (!(this_present_e && that_present_e))
3165
          return false;
3166
        if (!this.e.equals(that.e))
3167
          return false;
3168
      }
3169
 
3170
      return true;
3171
    }
3172
 
3173
    @Override
3174
    public int hashCode() {
3175
      return 0;
3176
    }
3177
 
3178
    public int compareTo(getAllPurchaseOrders_result other) {
3179
      if (!getClass().equals(other.getClass())) {
3180
        return getClass().getName().compareTo(other.getClass().getName());
3181
      }
3182
 
3183
      int lastComparison = 0;
3184
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
3185
 
3186
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3187
      if (lastComparison != 0) {
3188
        return lastComparison;
3189
      }
3190
      if (isSetSuccess()) {
3191
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3192
        if (lastComparison != 0) {
3193
          return lastComparison;
3194
        }
3195
      }
3196
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3197
      if (lastComparison != 0) {
3198
        return lastComparison;
3199
      }
3200
      if (isSetE()) {
3201
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3202
        if (lastComparison != 0) {
3203
          return lastComparison;
3204
        }
3205
      }
3206
      return 0;
3207
    }
3208
 
3209
    public _Fields fieldForId(int fieldId) {
3210
      return _Fields.findByThriftId(fieldId);
3211
    }
3212
 
3213
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3214
      org.apache.thrift.protocol.TField field;
3215
      iprot.readStructBegin();
3216
      while (true)
3217
      {
3218
        field = iprot.readFieldBegin();
3219
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3220
          break;
3221
        }
3222
        switch (field.id) {
3223
          case 0: // SUCCESS
3224
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
3225
              {
3226
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
3227
                this.success = new ArrayList<PurchaseOrder>(_list4.size);
3228
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
3229
                {
3230
                  PurchaseOrder _elem6; // required
3231
                  _elem6 = new PurchaseOrder();
3232
                  _elem6.read(iprot);
3233
                  this.success.add(_elem6);
3234
                }
3235
                iprot.readListEnd();
3236
              }
3237
            } else { 
3238
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3239
            }
3240
            break;
3241
          case 1: // E
3242
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3243
              this.e = new PurchaseServiceException();
3244
              this.e.read(iprot);
3245
            } else { 
3246
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3247
            }
3248
            break;
3249
          default:
3250
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3251
        }
3252
        iprot.readFieldEnd();
3253
      }
3254
      iprot.readStructEnd();
3255
      validate();
3256
    }
3257
 
3258
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3259
      oprot.writeStructBegin(STRUCT_DESC);
3260
 
3261
      if (this.isSetSuccess()) {
3262
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3263
        {
3264
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
3265
          for (PurchaseOrder _iter7 : this.success)
3266
          {
3267
            _iter7.write(oprot);
3268
          }
3269
          oprot.writeListEnd();
3270
        }
3271
        oprot.writeFieldEnd();
3272
      } else if (this.isSetE()) {
3273
        oprot.writeFieldBegin(E_FIELD_DESC);
3274
        this.e.write(oprot);
3275
        oprot.writeFieldEnd();
3276
      }
3277
      oprot.writeFieldStop();
3278
      oprot.writeStructEnd();
3279
    }
3280
 
3281
    @Override
3282
    public String toString() {
3283
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
3284
      boolean first = true;
3285
 
3286
      sb.append("success:");
3287
      if (this.success == null) {
3288
        sb.append("null");
3289
      } else {
3290
        sb.append(this.success);
3291
      }
3292
      first = false;
3293
      if (!first) sb.append(", ");
3294
      sb.append("e:");
3295
      if (this.e == null) {
3296
        sb.append("null");
3297
      } else {
3298
        sb.append(this.e);
3299
      }
3300
      first = false;
3301
      sb.append(")");
3302
      return sb.toString();
3303
    }
3304
 
3305
    public void validate() throws org.apache.thrift.TException {
3306
      // check for required fields
3307
    }
3308
 
3309
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3310
      try {
3311
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3312
      } catch (org.apache.thrift.TException te) {
3313
        throw new java.io.IOException(te);
3314
      }
3315
    }
3316
 
3317
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3318
      try {
3319
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3320
      } catch (org.apache.thrift.TException te) {
3321
        throw new java.io.IOException(te);
3322
      }
3323
    }
3324
 
3325
  }
3326
 
3327
  public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable   {
3328
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");
3329
 
3330
    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);
3331
 
3332
    private long id; // required
3333
 
3334
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3335
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3336
      ID((short)1, "id");
3337
 
3338
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3339
 
3340
      static {
3341
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3342
          byName.put(field.getFieldName(), field);
3343
        }
3344
      }
3345
 
3346
      /**
3347
       * Find the _Fields constant that matches fieldId, or null if its not found.
3348
       */
3349
      public static _Fields findByThriftId(int fieldId) {
3350
        switch(fieldId) {
3351
          case 1: // ID
3352
            return ID;
3353
          default:
3354
            return null;
3355
        }
3356
      }
3357
 
3358
      /**
3359
       * Find the _Fields constant that matches fieldId, throwing an exception
3360
       * if it is not found.
3361
       */
3362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3363
        _Fields fields = findByThriftId(fieldId);
3364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3365
        return fields;
3366
      }
3367
 
3368
      /**
3369
       * Find the _Fields constant that matches name, or null if its not found.
3370
       */
3371
      public static _Fields findByName(String name) {
3372
        return byName.get(name);
3373
      }
3374
 
3375
      private final short _thriftId;
3376
      private final String _fieldName;
3377
 
3378
      _Fields(short thriftId, String fieldName) {
3379
        _thriftId = thriftId;
3380
        _fieldName = fieldName;
3381
      }
3382
 
3383
      public short getThriftFieldId() {
3384
        return _thriftId;
3385
      }
3386
 
3387
      public String getFieldName() {
3388
        return _fieldName;
3389
      }
3390
    }
3391
 
3392
    // isset id assignments
3393
    private static final int __ID_ISSET_ID = 0;
3394
    private BitSet __isset_bit_vector = new BitSet(1);
3395
 
3396
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3397
    static {
3398
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3399
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3400
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3401
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3402
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
3403
    }
3404
 
3405
    public getSupplier_args() {
3406
    }
3407
 
3408
    public getSupplier_args(
3409
      long id)
3410
    {
3411
      this();
3412
      this.id = id;
3413
      setIdIsSet(true);
3414
    }
3415
 
3416
    /**
3417
     * Performs a deep copy on <i>other</i>.
3418
     */
3419
    public getSupplier_args(getSupplier_args other) {
3420
      __isset_bit_vector.clear();
3421
      __isset_bit_vector.or(other.__isset_bit_vector);
3422
      this.id = other.id;
3423
    }
3424
 
3425
    public getSupplier_args deepCopy() {
3426
      return new getSupplier_args(this);
3427
    }
3428
 
3429
    @Override
3430
    public void clear() {
3431
      setIdIsSet(false);
3432
      this.id = 0;
3433
    }
3434
 
3435
    public long getId() {
3436
      return this.id;
3437
    }
3438
 
3439
    public void setId(long id) {
3440
      this.id = id;
3441
      setIdIsSet(true);
3442
    }
3443
 
3444
    public void unsetId() {
3445
      __isset_bit_vector.clear(__ID_ISSET_ID);
3446
    }
3447
 
3448
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
3449
    public boolean isSetId() {
3450
      return __isset_bit_vector.get(__ID_ISSET_ID);
3451
    }
3452
 
3453
    public void setIdIsSet(boolean value) {
3454
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3455
    }
3456
 
3457
    public void setFieldValue(_Fields field, Object value) {
3458
      switch (field) {
3459
      case ID:
3460
        if (value == null) {
3461
          unsetId();
3462
        } else {
3463
          setId((Long)value);
3464
        }
3465
        break;
3466
 
3467
      }
3468
    }
3469
 
3470
    public Object getFieldValue(_Fields field) {
3471
      switch (field) {
3472
      case ID:
3473
        return Long.valueOf(getId());
3474
 
3475
      }
3476
      throw new IllegalStateException();
3477
    }
3478
 
3479
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3480
    public boolean isSet(_Fields field) {
3481
      if (field == null) {
3482
        throw new IllegalArgumentException();
3483
      }
3484
 
3485
      switch (field) {
3486
      case ID:
3487
        return isSetId();
3488
      }
3489
      throw new IllegalStateException();
3490
    }
3491
 
3492
    @Override
3493
    public boolean equals(Object that) {
3494
      if (that == null)
3495
        return false;
3496
      if (that instanceof getSupplier_args)
3497
        return this.equals((getSupplier_args)that);
3498
      return false;
3499
    }
3500
 
3501
    public boolean equals(getSupplier_args that) {
3502
      if (that == null)
3503
        return false;
3504
 
3505
      boolean this_present_id = true;
3506
      boolean that_present_id = true;
3507
      if (this_present_id || that_present_id) {
3508
        if (!(this_present_id && that_present_id))
3509
          return false;
3510
        if (this.id != that.id)
3511
          return false;
3512
      }
3513
 
3514
      return true;
3515
    }
3516
 
3517
    @Override
3518
    public int hashCode() {
3519
      return 0;
3520
    }
3521
 
3522
    public int compareTo(getSupplier_args other) {
3523
      if (!getClass().equals(other.getClass())) {
3524
        return getClass().getName().compareTo(other.getClass().getName());
3525
      }
3526
 
3527
      int lastComparison = 0;
3528
      getSupplier_args typedOther = (getSupplier_args)other;
3529
 
3530
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3531
      if (lastComparison != 0) {
3532
        return lastComparison;
3533
      }
3534
      if (isSetId()) {
3535
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
3536
        if (lastComparison != 0) {
3537
          return lastComparison;
3538
        }
3539
      }
3540
      return 0;
3541
    }
3542
 
3543
    public _Fields fieldForId(int fieldId) {
3544
      return _Fields.findByThriftId(fieldId);
3545
    }
3546
 
3547
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3548
      org.apache.thrift.protocol.TField field;
3549
      iprot.readStructBegin();
3550
      while (true)
3551
      {
3552
        field = iprot.readFieldBegin();
3553
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3554
          break;
3555
        }
3556
        switch (field.id) {
3557
          case 1: // ID
3558
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3559
              this.id = iprot.readI64();
3560
              setIdIsSet(true);
3561
            } else { 
3562
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3563
            }
3564
            break;
3565
          default:
3566
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3567
        }
3568
        iprot.readFieldEnd();
3569
      }
3570
      iprot.readStructEnd();
3571
      validate();
3572
    }
3573
 
3574
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3575
      validate();
3576
 
3577
      oprot.writeStructBegin(STRUCT_DESC);
3578
      oprot.writeFieldBegin(ID_FIELD_DESC);
3579
      oprot.writeI64(this.id);
3580
      oprot.writeFieldEnd();
3581
      oprot.writeFieldStop();
3582
      oprot.writeStructEnd();
3583
    }
3584
 
3585
    @Override
3586
    public String toString() {
3587
      StringBuilder sb = new StringBuilder("getSupplier_args(");
3588
      boolean first = true;
3589
 
3590
      sb.append("id:");
3591
      sb.append(this.id);
3592
      first = false;
3593
      sb.append(")");
3594
      return sb.toString();
3595
    }
3596
 
3597
    public void validate() throws org.apache.thrift.TException {
3598
      // check for required fields
3599
    }
3600
 
3601
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3602
      try {
3603
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3604
      } catch (org.apache.thrift.TException te) {
3605
        throw new java.io.IOException(te);
3606
      }
3607
    }
3608
 
3609
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3610
      try {
3611
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3612
        __isset_bit_vector = new BitSet(1);
3613
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3614
      } catch (org.apache.thrift.TException te) {
3615
        throw new java.io.IOException(te);
3616
      }
3617
    }
3618
 
3619
  }
3620
 
3621
  public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable   {
3622
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");
3623
 
3624
    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);
3625
    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);
3626
 
3627
    private Supplier success; // required
3628
    private PurchaseServiceException e; // required
3629
 
3630
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3631
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3632
      SUCCESS((short)0, "success"),
3633
      E((short)1, "e");
3634
 
3635
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3636
 
3637
      static {
3638
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3639
          byName.put(field.getFieldName(), field);
3640
        }
3641
      }
3642
 
3643
      /**
3644
       * Find the _Fields constant that matches fieldId, or null if its not found.
3645
       */
3646
      public static _Fields findByThriftId(int fieldId) {
3647
        switch(fieldId) {
3648
          case 0: // SUCCESS
3649
            return SUCCESS;
3650
          case 1: // E
3651
            return E;
3652
          default:
3653
            return null;
3654
        }
3655
      }
3656
 
3657
      /**
3658
       * Find the _Fields constant that matches fieldId, throwing an exception
3659
       * if it is not found.
3660
       */
3661
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3662
        _Fields fields = findByThriftId(fieldId);
3663
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3664
        return fields;
3665
      }
3666
 
3667
      /**
3668
       * Find the _Fields constant that matches name, or null if its not found.
3669
       */
3670
      public static _Fields findByName(String name) {
3671
        return byName.get(name);
3672
      }
3673
 
3674
      private final short _thriftId;
3675
      private final String _fieldName;
3676
 
3677
      _Fields(short thriftId, String fieldName) {
3678
        _thriftId = thriftId;
3679
        _fieldName = fieldName;
3680
      }
3681
 
3682
      public short getThriftFieldId() {
3683
        return _thriftId;
3684
      }
3685
 
3686
      public String getFieldName() {
3687
        return _fieldName;
3688
      }
3689
    }
3690
 
3691
    // isset id assignments
3692
 
3693
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3694
    static {
3695
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3696
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3697
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));
3698
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3699
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3700
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3701
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
3702
    }
3703
 
3704
    public getSupplier_result() {
3705
    }
3706
 
3707
    public getSupplier_result(
3708
      Supplier success,
3709
      PurchaseServiceException e)
3710
    {
3711
      this();
3712
      this.success = success;
3713
      this.e = e;
3714
    }
3715
 
3716
    /**
3717
     * Performs a deep copy on <i>other</i>.
3718
     */
3719
    public getSupplier_result(getSupplier_result other) {
3720
      if (other.isSetSuccess()) {
3721
        this.success = new Supplier(other.success);
3722
      }
3723
      if (other.isSetE()) {
3724
        this.e = new PurchaseServiceException(other.e);
3725
      }
3726
    }
3727
 
3728
    public getSupplier_result deepCopy() {
3729
      return new getSupplier_result(this);
3730
    }
3731
 
3732
    @Override
3733
    public void clear() {
3734
      this.success = null;
3735
      this.e = null;
3736
    }
3737
 
3738
    public Supplier getSuccess() {
3739
      return this.success;
3740
    }
3741
 
3742
    public void setSuccess(Supplier success) {
3743
      this.success = success;
3744
    }
3745
 
3746
    public void unsetSuccess() {
3747
      this.success = null;
3748
    }
3749
 
3750
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3751
    public boolean isSetSuccess() {
3752
      return this.success != null;
3753
    }
3754
 
3755
    public void setSuccessIsSet(boolean value) {
3756
      if (!value) {
3757
        this.success = null;
3758
      }
3759
    }
3760
 
3761
    public PurchaseServiceException getE() {
3762
      return this.e;
3763
    }
3764
 
3765
    public void setE(PurchaseServiceException e) {
3766
      this.e = e;
3767
    }
3768
 
3769
    public void unsetE() {
3770
      this.e = null;
3771
    }
3772
 
3773
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
3774
    public boolean isSetE() {
3775
      return this.e != null;
3776
    }
3777
 
3778
    public void setEIsSet(boolean value) {
3779
      if (!value) {
3780
        this.e = null;
3781
      }
3782
    }
3783
 
3784
    public void setFieldValue(_Fields field, Object value) {
3785
      switch (field) {
3786
      case SUCCESS:
3787
        if (value == null) {
3788
          unsetSuccess();
3789
        } else {
3790
          setSuccess((Supplier)value);
3791
        }
3792
        break;
3793
 
3794
      case E:
3795
        if (value == null) {
3796
          unsetE();
3797
        } else {
3798
          setE((PurchaseServiceException)value);
3799
        }
3800
        break;
3801
 
3802
      }
3803
    }
3804
 
3805
    public Object getFieldValue(_Fields field) {
3806
      switch (field) {
3807
      case SUCCESS:
3808
        return getSuccess();
3809
 
3810
      case E:
3811
        return getE();
3812
 
3813
      }
3814
      throw new IllegalStateException();
3815
    }
3816
 
3817
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3818
    public boolean isSet(_Fields field) {
3819
      if (field == null) {
3820
        throw new IllegalArgumentException();
3821
      }
3822
 
3823
      switch (field) {
3824
      case SUCCESS:
3825
        return isSetSuccess();
3826
      case E:
3827
        return isSetE();
3828
      }
3829
      throw new IllegalStateException();
3830
    }
3831
 
3832
    @Override
3833
    public boolean equals(Object that) {
3834
      if (that == null)
3835
        return false;
3836
      if (that instanceof getSupplier_result)
3837
        return this.equals((getSupplier_result)that);
3838
      return false;
3839
    }
3840
 
3841
    public boolean equals(getSupplier_result that) {
3842
      if (that == null)
3843
        return false;
3844
 
3845
      boolean this_present_success = true && this.isSetSuccess();
3846
      boolean that_present_success = true && that.isSetSuccess();
3847
      if (this_present_success || that_present_success) {
3848
        if (!(this_present_success && that_present_success))
3849
          return false;
3850
        if (!this.success.equals(that.success))
3851
          return false;
3852
      }
3853
 
3854
      boolean this_present_e = true && this.isSetE();
3855
      boolean that_present_e = true && that.isSetE();
3856
      if (this_present_e || that_present_e) {
3857
        if (!(this_present_e && that_present_e))
3858
          return false;
3859
        if (!this.e.equals(that.e))
3860
          return false;
3861
      }
3862
 
3863
      return true;
3864
    }
3865
 
3866
    @Override
3867
    public int hashCode() {
3868
      return 0;
3869
    }
3870
 
3871
    public int compareTo(getSupplier_result other) {
3872
      if (!getClass().equals(other.getClass())) {
3873
        return getClass().getName().compareTo(other.getClass().getName());
3874
      }
3875
 
3876
      int lastComparison = 0;
3877
      getSupplier_result typedOther = (getSupplier_result)other;
3878
 
3879
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3880
      if (lastComparison != 0) {
3881
        return lastComparison;
3882
      }
3883
      if (isSetSuccess()) {
3884
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3885
        if (lastComparison != 0) {
3886
          return lastComparison;
3887
        }
3888
      }
3889
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
3890
      if (lastComparison != 0) {
3891
        return lastComparison;
3892
      }
3893
      if (isSetE()) {
3894
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
3895
        if (lastComparison != 0) {
3896
          return lastComparison;
3897
        }
3898
      }
3899
      return 0;
3900
    }
3901
 
3902
    public _Fields fieldForId(int fieldId) {
3903
      return _Fields.findByThriftId(fieldId);
3904
    }
3905
 
3906
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3907
      org.apache.thrift.protocol.TField field;
3908
      iprot.readStructBegin();
3909
      while (true)
3910
      {
3911
        field = iprot.readFieldBegin();
3912
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3913
          break;
3914
        }
3915
        switch (field.id) {
3916
          case 0: // SUCCESS
3917
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3918
              this.success = new Supplier();
3919
              this.success.read(iprot);
3920
            } else { 
3921
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3922
            }
3923
            break;
3924
          case 1: // E
3925
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3926
              this.e = new PurchaseServiceException();
3927
              this.e.read(iprot);
3928
            } else { 
3929
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3930
            }
3931
            break;
3932
          default:
3933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3934
        }
3935
        iprot.readFieldEnd();
3936
      }
3937
      iprot.readStructEnd();
3938
      validate();
3939
    }
3940
 
3941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3942
      oprot.writeStructBegin(STRUCT_DESC);
3943
 
3944
      if (this.isSetSuccess()) {
3945
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3946
        this.success.write(oprot);
3947
        oprot.writeFieldEnd();
3948
      } else if (this.isSetE()) {
3949
        oprot.writeFieldBegin(E_FIELD_DESC);
3950
        this.e.write(oprot);
3951
        oprot.writeFieldEnd();
3952
      }
3953
      oprot.writeFieldStop();
3954
      oprot.writeStructEnd();
3955
    }
3956
 
3957
    @Override
3958
    public String toString() {
3959
      StringBuilder sb = new StringBuilder("getSupplier_result(");
3960
      boolean first = true;
3961
 
3962
      sb.append("success:");
3963
      if (this.success == null) {
3964
        sb.append("null");
3965
      } else {
3966
        sb.append(this.success);
3967
      }
3968
      first = false;
3969
      if (!first) sb.append(", ");
3970
      sb.append("e:");
3971
      if (this.e == null) {
3972
        sb.append("null");
3973
      } else {
3974
        sb.append(this.e);
3975
      }
3976
      first = false;
3977
      sb.append(")");
3978
      return sb.toString();
3979
    }
3980
 
3981
    public void validate() throws org.apache.thrift.TException {
3982
      // check for required fields
3983
    }
3984
 
3985
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3986
      try {
3987
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3988
      } catch (org.apache.thrift.TException te) {
3989
        throw new java.io.IOException(te);
3990
      }
3991
    }
3992
 
3993
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3994
      try {
3995
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3996
      } catch (org.apache.thrift.TException te) {
3997
        throw new java.io.IOException(te);
3998
      }
3999
    }
4000
 
4001
  }
4002
 
4003
  public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable   {
4004
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
4005
 
4006
    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);
4007
    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);
4008
    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);
4009
 
4010
    private long purchaseOrderId; // required
4011
    private String invoiceNumber; // required
4012
    private double freightCharges; // required
4013
 
4014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4015
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4016
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
4017
      INVOICE_NUMBER((short)2, "invoiceNumber"),
4018
      FREIGHT_CHARGES((short)3, "freightCharges");
4019
 
4020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4021
 
4022
      static {
4023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4024
          byName.put(field.getFieldName(), field);
4025
        }
4026
      }
4027
 
4028
      /**
4029
       * Find the _Fields constant that matches fieldId, or null if its not found.
4030
       */
4031
      public static _Fields findByThriftId(int fieldId) {
4032
        switch(fieldId) {
4033
          case 1: // PURCHASE_ORDER_ID
4034
            return PURCHASE_ORDER_ID;
4035
          case 2: // INVOICE_NUMBER
4036
            return INVOICE_NUMBER;
4037
          case 3: // FREIGHT_CHARGES
4038
            return FREIGHT_CHARGES;
4039
          default:
4040
            return null;
4041
        }
4042
      }
4043
 
4044
      /**
4045
       * Find the _Fields constant that matches fieldId, throwing an exception
4046
       * if it is not found.
4047
       */
4048
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4049
        _Fields fields = findByThriftId(fieldId);
4050
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4051
        return fields;
4052
      }
4053
 
4054
      /**
4055
       * Find the _Fields constant that matches name, or null if its not found.
4056
       */
4057
      public static _Fields findByName(String name) {
4058
        return byName.get(name);
4059
      }
4060
 
4061
      private final short _thriftId;
4062
      private final String _fieldName;
4063
 
4064
      _Fields(short thriftId, String fieldName) {
4065
        _thriftId = thriftId;
4066
        _fieldName = fieldName;
4067
      }
4068
 
4069
      public short getThriftFieldId() {
4070
        return _thriftId;
4071
      }
4072
 
4073
      public String getFieldName() {
4074
        return _fieldName;
4075
      }
4076
    }
4077
 
4078
    // isset id assignments
4079
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
4080
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
4081
    private BitSet __isset_bit_vector = new BitSet(2);
4082
 
4083
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4084
    static {
4085
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4086
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4087
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4088
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4089
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4090
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4091
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4092
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4093
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
4094
    }
4095
 
4096
    public startPurchase_args() {
4097
    }
4098
 
4099
    public startPurchase_args(
4100
      long purchaseOrderId,
4101
      String invoiceNumber,
4102
      double freightCharges)
4103
    {
4104
      this();
4105
      this.purchaseOrderId = purchaseOrderId;
4106
      setPurchaseOrderIdIsSet(true);
4107
      this.invoiceNumber = invoiceNumber;
4108
      this.freightCharges = freightCharges;
4109
      setFreightChargesIsSet(true);
4110
    }
4111
 
4112
    /**
4113
     * Performs a deep copy on <i>other</i>.
4114
     */
4115
    public startPurchase_args(startPurchase_args other) {
4116
      __isset_bit_vector.clear();
4117
      __isset_bit_vector.or(other.__isset_bit_vector);
4118
      this.purchaseOrderId = other.purchaseOrderId;
4119
      if (other.isSetInvoiceNumber()) {
4120
        this.invoiceNumber = other.invoiceNumber;
4121
      }
4122
      this.freightCharges = other.freightCharges;
4123
    }
4124
 
4125
    public startPurchase_args deepCopy() {
4126
      return new startPurchase_args(this);
4127
    }
4128
 
4129
    @Override
4130
    public void clear() {
4131
      setPurchaseOrderIdIsSet(false);
4132
      this.purchaseOrderId = 0;
4133
      this.invoiceNumber = null;
4134
      setFreightChargesIsSet(false);
4135
      this.freightCharges = 0.0;
4136
    }
4137
 
4138
    public long getPurchaseOrderId() {
4139
      return this.purchaseOrderId;
4140
    }
4141
 
4142
    public void setPurchaseOrderId(long purchaseOrderId) {
4143
      this.purchaseOrderId = purchaseOrderId;
4144
      setPurchaseOrderIdIsSet(true);
4145
    }
4146
 
4147
    public void unsetPurchaseOrderId() {
4148
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
4149
    }
4150
 
4151
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
4152
    public boolean isSetPurchaseOrderId() {
4153
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
4154
    }
4155
 
4156
    public void setPurchaseOrderIdIsSet(boolean value) {
4157
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
4158
    }
4159
 
4160
    public String getInvoiceNumber() {
4161
      return this.invoiceNumber;
4162
    }
4163
 
4164
    public void setInvoiceNumber(String invoiceNumber) {
4165
      this.invoiceNumber = invoiceNumber;
4166
    }
4167
 
4168
    public void unsetInvoiceNumber() {
4169
      this.invoiceNumber = null;
4170
    }
4171
 
4172
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
4173
    public boolean isSetInvoiceNumber() {
4174
      return this.invoiceNumber != null;
4175
    }
4176
 
4177
    public void setInvoiceNumberIsSet(boolean value) {
4178
      if (!value) {
4179
        this.invoiceNumber = null;
4180
      }
4181
    }
4182
 
4183
    public double getFreightCharges() {
4184
      return this.freightCharges;
4185
    }
4186
 
4187
    public void setFreightCharges(double freightCharges) {
4188
      this.freightCharges = freightCharges;
4189
      setFreightChargesIsSet(true);
4190
    }
4191
 
4192
    public void unsetFreightCharges() {
4193
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
4194
    }
4195
 
4196
    /** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */
4197
    public boolean isSetFreightCharges() {
4198
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
4199
    }
4200
 
4201
    public void setFreightChargesIsSet(boolean value) {
4202
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
4203
    }
4204
 
4205
    public void setFieldValue(_Fields field, Object value) {
4206
      switch (field) {
4207
      case PURCHASE_ORDER_ID:
4208
        if (value == null) {
4209
          unsetPurchaseOrderId();
4210
        } else {
4211
          setPurchaseOrderId((Long)value);
4212
        }
4213
        break;
4214
 
4215
      case INVOICE_NUMBER:
4216
        if (value == null) {
4217
          unsetInvoiceNumber();
4218
        } else {
4219
          setInvoiceNumber((String)value);
4220
        }
4221
        break;
4222
 
4223
      case FREIGHT_CHARGES:
4224
        if (value == null) {
4225
          unsetFreightCharges();
4226
        } else {
4227
          setFreightCharges((Double)value);
4228
        }
4229
        break;
4230
 
4231
      }
4232
    }
4233
 
4234
    public Object getFieldValue(_Fields field) {
4235
      switch (field) {
4236
      case PURCHASE_ORDER_ID:
4237
        return Long.valueOf(getPurchaseOrderId());
4238
 
4239
      case INVOICE_NUMBER:
4240
        return getInvoiceNumber();
4241
 
4242
      case FREIGHT_CHARGES:
4243
        return Double.valueOf(getFreightCharges());
4244
 
4245
      }
4246
      throw new IllegalStateException();
4247
    }
4248
 
4249
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4250
    public boolean isSet(_Fields field) {
4251
      if (field == null) {
4252
        throw new IllegalArgumentException();
4253
      }
4254
 
4255
      switch (field) {
4256
      case PURCHASE_ORDER_ID:
4257
        return isSetPurchaseOrderId();
4258
      case INVOICE_NUMBER:
4259
        return isSetInvoiceNumber();
4260
      case FREIGHT_CHARGES:
4261
        return isSetFreightCharges();
4262
      }
4263
      throw new IllegalStateException();
4264
    }
4265
 
4266
    @Override
4267
    public boolean equals(Object that) {
4268
      if (that == null)
4269
        return false;
4270
      if (that instanceof startPurchase_args)
4271
        return this.equals((startPurchase_args)that);
4272
      return false;
4273
    }
4274
 
4275
    public boolean equals(startPurchase_args that) {
4276
      if (that == null)
4277
        return false;
4278
 
4279
      boolean this_present_purchaseOrderId = true;
4280
      boolean that_present_purchaseOrderId = true;
4281
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
4282
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
4283
          return false;
4284
        if (this.purchaseOrderId != that.purchaseOrderId)
4285
          return false;
4286
      }
4287
 
4288
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
4289
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
4290
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
4291
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
4292
          return false;
4293
        if (!this.invoiceNumber.equals(that.invoiceNumber))
4294
          return false;
4295
      }
4296
 
4297
      boolean this_present_freightCharges = true;
4298
      boolean that_present_freightCharges = true;
4299
      if (this_present_freightCharges || that_present_freightCharges) {
4300
        if (!(this_present_freightCharges && that_present_freightCharges))
4301
          return false;
4302
        if (this.freightCharges != that.freightCharges)
4303
          return false;
4304
      }
4305
 
4306
      return true;
4307
    }
4308
 
4309
    @Override
4310
    public int hashCode() {
4311
      return 0;
4312
    }
4313
 
4314
    public int compareTo(startPurchase_args other) {
4315
      if (!getClass().equals(other.getClass())) {
4316
        return getClass().getName().compareTo(other.getClass().getName());
4317
      }
4318
 
4319
      int lastComparison = 0;
4320
      startPurchase_args typedOther = (startPurchase_args)other;
4321
 
4322
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
4323
      if (lastComparison != 0) {
4324
        return lastComparison;
4325
      }
4326
      if (isSetPurchaseOrderId()) {
4327
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
4328
        if (lastComparison != 0) {
4329
          return lastComparison;
4330
        }
4331
      }
4332
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
4333
      if (lastComparison != 0) {
4334
        return lastComparison;
4335
      }
4336
      if (isSetInvoiceNumber()) {
4337
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
4338
        if (lastComparison != 0) {
4339
          return lastComparison;
4340
        }
4341
      }
4342
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());
4343
      if (lastComparison != 0) {
4344
        return lastComparison;
4345
      }
4346
      if (isSetFreightCharges()) {
4347
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
4348
        if (lastComparison != 0) {
4349
          return lastComparison;
4350
        }
4351
      }
4352
      return 0;
4353
    }
4354
 
4355
    public _Fields fieldForId(int fieldId) {
4356
      return _Fields.findByThriftId(fieldId);
4357
    }
4358
 
4359
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4360
      org.apache.thrift.protocol.TField field;
4361
      iprot.readStructBegin();
4362
      while (true)
4363
      {
4364
        field = iprot.readFieldBegin();
4365
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4366
          break;
4367
        }
4368
        switch (field.id) {
4369
          case 1: // PURCHASE_ORDER_ID
4370
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4371
              this.purchaseOrderId = iprot.readI64();
4372
              setPurchaseOrderIdIsSet(true);
4373
            } else { 
4374
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4375
            }
4376
            break;
4377
          case 2: // INVOICE_NUMBER
4378
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4379
              this.invoiceNumber = iprot.readString();
4380
            } else { 
4381
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4382
            }
4383
            break;
4384
          case 3: // FREIGHT_CHARGES
4385
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
4386
              this.freightCharges = iprot.readDouble();
4387
              setFreightChargesIsSet(true);
4388
            } else { 
4389
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4390
            }
4391
            break;
4392
          default:
4393
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4394
        }
4395
        iprot.readFieldEnd();
4396
      }
4397
      iprot.readStructEnd();
4398
      validate();
4399
    }
4400
 
4401
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4402
      validate();
4403
 
4404
      oprot.writeStructBegin(STRUCT_DESC);
4405
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
4406
      oprot.writeI64(this.purchaseOrderId);
4407
      oprot.writeFieldEnd();
4408
      if (this.invoiceNumber != null) {
4409
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
4410
        oprot.writeString(this.invoiceNumber);
4411
        oprot.writeFieldEnd();
4412
      }
4413
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
4414
      oprot.writeDouble(this.freightCharges);
4415
      oprot.writeFieldEnd();
4416
      oprot.writeFieldStop();
4417
      oprot.writeStructEnd();
4418
    }
4419
 
4420
    @Override
4421
    public String toString() {
4422
      StringBuilder sb = new StringBuilder("startPurchase_args(");
4423
      boolean first = true;
4424
 
4425
      sb.append("purchaseOrderId:");
4426
      sb.append(this.purchaseOrderId);
4427
      first = false;
4428
      if (!first) sb.append(", ");
4429
      sb.append("invoiceNumber:");
4430
      if (this.invoiceNumber == null) {
4431
        sb.append("null");
4432
      } else {
4433
        sb.append(this.invoiceNumber);
4434
      }
4435
      first = false;
4436
      if (!first) sb.append(", ");
4437
      sb.append("freightCharges:");
4438
      sb.append(this.freightCharges);
4439
      first = false;
4440
      sb.append(")");
4441
      return sb.toString();
4442
    }
4443
 
4444
    public void validate() throws org.apache.thrift.TException {
4445
      // check for required fields
4446
    }
4447
 
4448
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4449
      try {
4450
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4451
      } catch (org.apache.thrift.TException te) {
4452
        throw new java.io.IOException(te);
4453
      }
4454
    }
4455
 
4456
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4457
      try {
4458
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4459
      } catch (org.apache.thrift.TException te) {
4460
        throw new java.io.IOException(te);
4461
      }
4462
    }
4463
 
4464
  }
4465
 
4466
  public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable   {
4467
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");
4468
 
4469
    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);
4470
    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);
4471
 
4472
    private long success; // required
4473
    private PurchaseServiceException e; // required
4474
 
4475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4476
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4477
      SUCCESS((short)0, "success"),
4478
      E((short)1, "e");
4479
 
4480
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4481
 
4482
      static {
4483
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4484
          byName.put(field.getFieldName(), field);
4485
        }
4486
      }
4487
 
4488
      /**
4489
       * Find the _Fields constant that matches fieldId, or null if its not found.
4490
       */
4491
      public static _Fields findByThriftId(int fieldId) {
4492
        switch(fieldId) {
4493
          case 0: // SUCCESS
4494
            return SUCCESS;
4495
          case 1: // E
4496
            return E;
4497
          default:
4498
            return null;
4499
        }
4500
      }
4501
 
4502
      /**
4503
       * Find the _Fields constant that matches fieldId, throwing an exception
4504
       * if it is not found.
4505
       */
4506
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4507
        _Fields fields = findByThriftId(fieldId);
4508
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4509
        return fields;
4510
      }
4511
 
4512
      /**
4513
       * Find the _Fields constant that matches name, or null if its not found.
4514
       */
4515
      public static _Fields findByName(String name) {
4516
        return byName.get(name);
4517
      }
4518
 
4519
      private final short _thriftId;
4520
      private final String _fieldName;
4521
 
4522
      _Fields(short thriftId, String fieldName) {
4523
        _thriftId = thriftId;
4524
        _fieldName = fieldName;
4525
      }
4526
 
4527
      public short getThriftFieldId() {
4528
        return _thriftId;
4529
      }
4530
 
4531
      public String getFieldName() {
4532
        return _fieldName;
4533
      }
4534
    }
4535
 
4536
    // isset id assignments
4537
    private static final int __SUCCESS_ISSET_ID = 0;
4538
    private BitSet __isset_bit_vector = new BitSet(1);
4539
 
4540
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4541
    static {
4542
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4543
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4544
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4545
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4546
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4547
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4548
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
4549
    }
4550
 
4551
    public startPurchase_result() {
4552
    }
4553
 
4554
    public startPurchase_result(
4555
      long success,
4556
      PurchaseServiceException e)
4557
    {
4558
      this();
4559
      this.success = success;
4560
      setSuccessIsSet(true);
4561
      this.e = e;
4562
    }
4563
 
4564
    /**
4565
     * Performs a deep copy on <i>other</i>.
4566
     */
4567
    public startPurchase_result(startPurchase_result other) {
4568
      __isset_bit_vector.clear();
4569
      __isset_bit_vector.or(other.__isset_bit_vector);
4570
      this.success = other.success;
4571
      if (other.isSetE()) {
4572
        this.e = new PurchaseServiceException(other.e);
4573
      }
4574
    }
4575
 
4576
    public startPurchase_result deepCopy() {
4577
      return new startPurchase_result(this);
4578
    }
4579
 
4580
    @Override
4581
    public void clear() {
4582
      setSuccessIsSet(false);
4583
      this.success = 0;
4584
      this.e = null;
4585
    }
4586
 
4587
    public long getSuccess() {
4588
      return this.success;
4589
    }
4590
 
4591
    public void setSuccess(long success) {
4592
      this.success = success;
4593
      setSuccessIsSet(true);
4594
    }
4595
 
4596
    public void unsetSuccess() {
4597
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
4598
    }
4599
 
4600
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4601
    public boolean isSetSuccess() {
4602
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
4603
    }
4604
 
4605
    public void setSuccessIsSet(boolean value) {
4606
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
4607
    }
4608
 
4609
    public PurchaseServiceException getE() {
4610
      return this.e;
4611
    }
4612
 
4613
    public void setE(PurchaseServiceException e) {
4614
      this.e = e;
4615
    }
4616
 
4617
    public void unsetE() {
4618
      this.e = null;
4619
    }
4620
 
4621
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
4622
    public boolean isSetE() {
4623
      return this.e != null;
4624
    }
4625
 
4626
    public void setEIsSet(boolean value) {
4627
      if (!value) {
4628
        this.e = null;
4629
      }
4630
    }
4631
 
4632
    public void setFieldValue(_Fields field, Object value) {
4633
      switch (field) {
4634
      case SUCCESS:
4635
        if (value == null) {
4636
          unsetSuccess();
4637
        } else {
4638
          setSuccess((Long)value);
4639
        }
4640
        break;
4641
 
4642
      case E:
4643
        if (value == null) {
4644
          unsetE();
4645
        } else {
4646
          setE((PurchaseServiceException)value);
4647
        }
4648
        break;
4649
 
4650
      }
4651
    }
4652
 
4653
    public Object getFieldValue(_Fields field) {
4654
      switch (field) {
4655
      case SUCCESS:
4656
        return Long.valueOf(getSuccess());
4657
 
4658
      case E:
4659
        return getE();
4660
 
4661
      }
4662
      throw new IllegalStateException();
4663
    }
4664
 
4665
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4666
    public boolean isSet(_Fields field) {
4667
      if (field == null) {
4668
        throw new IllegalArgumentException();
4669
      }
4670
 
4671
      switch (field) {
4672
      case SUCCESS:
4673
        return isSetSuccess();
4674
      case E:
4675
        return isSetE();
4676
      }
4677
      throw new IllegalStateException();
4678
    }
4679
 
4680
    @Override
4681
    public boolean equals(Object that) {
4682
      if (that == null)
4683
        return false;
4684
      if (that instanceof startPurchase_result)
4685
        return this.equals((startPurchase_result)that);
4686
      return false;
4687
    }
4688
 
4689
    public boolean equals(startPurchase_result that) {
4690
      if (that == null)
4691
        return false;
4692
 
4693
      boolean this_present_success = true;
4694
      boolean that_present_success = true;
4695
      if (this_present_success || that_present_success) {
4696
        if (!(this_present_success && that_present_success))
4697
          return false;
4698
        if (this.success != that.success)
4699
          return false;
4700
      }
4701
 
4702
      boolean this_present_e = true && this.isSetE();
4703
      boolean that_present_e = true && that.isSetE();
4704
      if (this_present_e || that_present_e) {
4705
        if (!(this_present_e && that_present_e))
4706
          return false;
4707
        if (!this.e.equals(that.e))
4708
          return false;
4709
      }
4710
 
4711
      return true;
4712
    }
4713
 
4714
    @Override
4715
    public int hashCode() {
4716
      return 0;
4717
    }
4718
 
4719
    public int compareTo(startPurchase_result other) {
4720
      if (!getClass().equals(other.getClass())) {
4721
        return getClass().getName().compareTo(other.getClass().getName());
4722
      }
4723
 
4724
      int lastComparison = 0;
4725
      startPurchase_result typedOther = (startPurchase_result)other;
4726
 
4727
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4728
      if (lastComparison != 0) {
4729
        return lastComparison;
4730
      }
4731
      if (isSetSuccess()) {
4732
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4733
        if (lastComparison != 0) {
4734
          return lastComparison;
4735
        }
4736
      }
4737
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
4738
      if (lastComparison != 0) {
4739
        return lastComparison;
4740
      }
4741
      if (isSetE()) {
4742
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
4743
        if (lastComparison != 0) {
4744
          return lastComparison;
4745
        }
4746
      }
4747
      return 0;
4748
    }
4749
 
4750
    public _Fields fieldForId(int fieldId) {
4751
      return _Fields.findByThriftId(fieldId);
4752
    }
4753
 
4754
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4755
      org.apache.thrift.protocol.TField field;
4756
      iprot.readStructBegin();
4757
      while (true)
4758
      {
4759
        field = iprot.readFieldBegin();
4760
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4761
          break;
4762
        }
4763
        switch (field.id) {
4764
          case 0: // SUCCESS
4765
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4766
              this.success = iprot.readI64();
4767
              setSuccessIsSet(true);
4768
            } else { 
4769
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4770
            }
4771
            break;
4772
          case 1: // E
4773
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4774
              this.e = new PurchaseServiceException();
4775
              this.e.read(iprot);
4776
            } else { 
4777
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4778
            }
4779
            break;
4780
          default:
4781
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4782
        }
4783
        iprot.readFieldEnd();
4784
      }
4785
      iprot.readStructEnd();
4786
      validate();
4787
    }
4788
 
4789
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4790
      oprot.writeStructBegin(STRUCT_DESC);
4791
 
4792
      if (this.isSetSuccess()) {
4793
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4794
        oprot.writeI64(this.success);
4795
        oprot.writeFieldEnd();
4796
      } else if (this.isSetE()) {
4797
        oprot.writeFieldBegin(E_FIELD_DESC);
4798
        this.e.write(oprot);
4799
        oprot.writeFieldEnd();
4800
      }
4801
      oprot.writeFieldStop();
4802
      oprot.writeStructEnd();
4803
    }
4804
 
4805
    @Override
4806
    public String toString() {
4807
      StringBuilder sb = new StringBuilder("startPurchase_result(");
4808
      boolean first = true;
4809
 
4810
      sb.append("success:");
4811
      sb.append(this.success);
4812
      first = false;
4813
      if (!first) sb.append(", ");
4814
      sb.append("e:");
4815
      if (this.e == null) {
4816
        sb.append("null");
4817
      } else {
4818
        sb.append(this.e);
4819
      }
4820
      first = false;
4821
      sb.append(")");
4822
      return sb.toString();
4823
    }
4824
 
4825
    public void validate() throws org.apache.thrift.TException {
4826
      // check for required fields
4827
    }
4828
 
4829
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4830
      try {
4831
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4832
      } catch (org.apache.thrift.TException te) {
4833
        throw new java.io.IOException(te);
4834
      }
4835
    }
4836
 
4837
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4838
      try {
4839
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4840
      } catch (org.apache.thrift.TException te) {
4841
        throw new java.io.IOException(te);
4842
      }
4843
    }
4844
 
4845
  }
4846
 
4847
  public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable   {
4848
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");
4849
 
4850
    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);
4851
 
4852
    private long purchaseId; // required
4853
 
4854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4855
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4856
      PURCHASE_ID((short)1, "purchaseId");
4857
 
4858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4859
 
4860
      static {
4861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4862
          byName.put(field.getFieldName(), field);
4863
        }
4864
      }
4865
 
4866
      /**
4867
       * Find the _Fields constant that matches fieldId, or null if its not found.
4868
       */
4869
      public static _Fields findByThriftId(int fieldId) {
4870
        switch(fieldId) {
4871
          case 1: // PURCHASE_ID
4872
            return PURCHASE_ID;
4873
          default:
4874
            return null;
4875
        }
4876
      }
4877
 
4878
      /**
4879
       * Find the _Fields constant that matches fieldId, throwing an exception
4880
       * if it is not found.
4881
       */
4882
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4883
        _Fields fields = findByThriftId(fieldId);
4884
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4885
        return fields;
4886
      }
4887
 
4888
      /**
4889
       * Find the _Fields constant that matches name, or null if its not found.
4890
       */
4891
      public static _Fields findByName(String name) {
4892
        return byName.get(name);
4893
      }
4894
 
4895
      private final short _thriftId;
4896
      private final String _fieldName;
4897
 
4898
      _Fields(short thriftId, String fieldName) {
4899
        _thriftId = thriftId;
4900
        _fieldName = fieldName;
4901
      }
4902
 
4903
      public short getThriftFieldId() {
4904
        return _thriftId;
4905
      }
4906
 
4907
      public String getFieldName() {
4908
        return _fieldName;
4909
      }
4910
    }
4911
 
4912
    // isset id assignments
4913
    private static final int __PURCHASEID_ISSET_ID = 0;
4914
    private BitSet __isset_bit_vector = new BitSet(1);
4915
 
4916
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4917
    static {
4918
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4919
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4920
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4921
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4922
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
4923
    }
4924
 
4925
    public closePurchase_args() {
4926
    }
4927
 
4928
    public closePurchase_args(
4929
      long purchaseId)
4930
    {
4931
      this();
4932
      this.purchaseId = purchaseId;
4933
      setPurchaseIdIsSet(true);
4934
    }
4935
 
4936
    /**
4937
     * Performs a deep copy on <i>other</i>.
4938
     */
4939
    public closePurchase_args(closePurchase_args other) {
4940
      __isset_bit_vector.clear();
4941
      __isset_bit_vector.or(other.__isset_bit_vector);
4942
      this.purchaseId = other.purchaseId;
4943
    }
4944
 
4945
    public closePurchase_args deepCopy() {
4946
      return new closePurchase_args(this);
4947
    }
4948
 
4949
    @Override
4950
    public void clear() {
4951
      setPurchaseIdIsSet(false);
4952
      this.purchaseId = 0;
4953
    }
4954
 
4955
    public long getPurchaseId() {
4956
      return this.purchaseId;
4957
    }
4958
 
4959
    public void setPurchaseId(long purchaseId) {
4960
      this.purchaseId = purchaseId;
4961
      setPurchaseIdIsSet(true);
4962
    }
4963
 
4964
    public void unsetPurchaseId() {
4965
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
4966
    }
4967
 
4968
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
4969
    public boolean isSetPurchaseId() {
4970
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
4971
    }
4972
 
4973
    public void setPurchaseIdIsSet(boolean value) {
4974
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
4975
    }
4976
 
4977
    public void setFieldValue(_Fields field, Object value) {
4978
      switch (field) {
4979
      case PURCHASE_ID:
4980
        if (value == null) {
4981
          unsetPurchaseId();
4982
        } else {
4983
          setPurchaseId((Long)value);
4984
        }
4985
        break;
4986
 
4987
      }
4988
    }
4989
 
4990
    public Object getFieldValue(_Fields field) {
4991
      switch (field) {
4992
      case PURCHASE_ID:
4993
        return Long.valueOf(getPurchaseId());
4994
 
4995
      }
4996
      throw new IllegalStateException();
4997
    }
4998
 
4999
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5000
    public boolean isSet(_Fields field) {
5001
      if (field == null) {
5002
        throw new IllegalArgumentException();
5003
      }
5004
 
5005
      switch (field) {
5006
      case PURCHASE_ID:
5007
        return isSetPurchaseId();
5008
      }
5009
      throw new IllegalStateException();
5010
    }
5011
 
5012
    @Override
5013
    public boolean equals(Object that) {
5014
      if (that == null)
5015
        return false;
5016
      if (that instanceof closePurchase_args)
5017
        return this.equals((closePurchase_args)that);
5018
      return false;
5019
    }
5020
 
5021
    public boolean equals(closePurchase_args that) {
5022
      if (that == null)
5023
        return false;
5024
 
5025
      boolean this_present_purchaseId = true;
5026
      boolean that_present_purchaseId = true;
5027
      if (this_present_purchaseId || that_present_purchaseId) {
5028
        if (!(this_present_purchaseId && that_present_purchaseId))
5029
          return false;
5030
        if (this.purchaseId != that.purchaseId)
5031
          return false;
5032
      }
5033
 
5034
      return true;
5035
    }
5036
 
5037
    @Override
5038
    public int hashCode() {
5039
      return 0;
5040
    }
5041
 
5042
    public int compareTo(closePurchase_args other) {
5043
      if (!getClass().equals(other.getClass())) {
5044
        return getClass().getName().compareTo(other.getClass().getName());
5045
      }
5046
 
5047
      int lastComparison = 0;
5048
      closePurchase_args typedOther = (closePurchase_args)other;
5049
 
5050
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
5051
      if (lastComparison != 0) {
5052
        return lastComparison;
5053
      }
5054
      if (isSetPurchaseId()) {
5055
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
5056
        if (lastComparison != 0) {
5057
          return lastComparison;
5058
        }
5059
      }
5060
      return 0;
5061
    }
5062
 
5063
    public _Fields fieldForId(int fieldId) {
5064
      return _Fields.findByThriftId(fieldId);
5065
    }
5066
 
5067
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5068
      org.apache.thrift.protocol.TField field;
5069
      iprot.readStructBegin();
5070
      while (true)
5071
      {
5072
        field = iprot.readFieldBegin();
5073
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5074
          break;
5075
        }
5076
        switch (field.id) {
5077
          case 1: // PURCHASE_ID
5078
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5079
              this.purchaseId = iprot.readI64();
5080
              setPurchaseIdIsSet(true);
5081
            } else { 
5082
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5083
            }
5084
            break;
5085
          default:
5086
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5087
        }
5088
        iprot.readFieldEnd();
5089
      }
5090
      iprot.readStructEnd();
5091
      validate();
5092
    }
5093
 
5094
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5095
      validate();
5096
 
5097
      oprot.writeStructBegin(STRUCT_DESC);
5098
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
5099
      oprot.writeI64(this.purchaseId);
5100
      oprot.writeFieldEnd();
5101
      oprot.writeFieldStop();
5102
      oprot.writeStructEnd();
5103
    }
5104
 
5105
    @Override
5106
    public String toString() {
5107
      StringBuilder sb = new StringBuilder("closePurchase_args(");
5108
      boolean first = true;
5109
 
5110
      sb.append("purchaseId:");
5111
      sb.append(this.purchaseId);
5112
      first = false;
5113
      sb.append(")");
5114
      return sb.toString();
5115
    }
5116
 
5117
    public void validate() throws org.apache.thrift.TException {
5118
      // check for required fields
5119
    }
5120
 
5121
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5122
      try {
5123
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5124
      } catch (org.apache.thrift.TException te) {
5125
        throw new java.io.IOException(te);
5126
      }
5127
    }
5128
 
5129
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5130
      try {
5131
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5132
      } catch (org.apache.thrift.TException te) {
5133
        throw new java.io.IOException(te);
5134
      }
5135
    }
5136
 
5137
  }
5138
 
5139
  public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable   {
5140
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");
5141
 
5142
    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);
5143
    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);
5144
 
5145
    private long success; // required
5146
    private PurchaseServiceException e; // required
5147
 
5148
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5149
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5150
      SUCCESS((short)0, "success"),
5151
      E((short)1, "e");
5152
 
5153
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5154
 
5155
      static {
5156
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5157
          byName.put(field.getFieldName(), field);
5158
        }
5159
      }
5160
 
5161
      /**
5162
       * Find the _Fields constant that matches fieldId, or null if its not found.
5163
       */
5164
      public static _Fields findByThriftId(int fieldId) {
5165
        switch(fieldId) {
5166
          case 0: // SUCCESS
5167
            return SUCCESS;
5168
          case 1: // E
5169
            return E;
5170
          default:
5171
            return null;
5172
        }
5173
      }
5174
 
5175
      /**
5176
       * Find the _Fields constant that matches fieldId, throwing an exception
5177
       * if it is not found.
5178
       */
5179
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5180
        _Fields fields = findByThriftId(fieldId);
5181
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5182
        return fields;
5183
      }
5184
 
5185
      /**
5186
       * Find the _Fields constant that matches name, or null if its not found.
5187
       */
5188
      public static _Fields findByName(String name) {
5189
        return byName.get(name);
5190
      }
5191
 
5192
      private final short _thriftId;
5193
      private final String _fieldName;
5194
 
5195
      _Fields(short thriftId, String fieldName) {
5196
        _thriftId = thriftId;
5197
        _fieldName = fieldName;
5198
      }
5199
 
5200
      public short getThriftFieldId() {
5201
        return _thriftId;
5202
      }
5203
 
5204
      public String getFieldName() {
5205
        return _fieldName;
5206
      }
5207
    }
5208
 
5209
    // isset id assignments
5210
    private static final int __SUCCESS_ISSET_ID = 0;
5211
    private BitSet __isset_bit_vector = new BitSet(1);
5212
 
5213
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5214
    static {
5215
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5216
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5217
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5218
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5219
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5220
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5221
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
5222
    }
5223
 
5224
    public closePurchase_result() {
5225
    }
5226
 
5227
    public closePurchase_result(
5228
      long success,
5229
      PurchaseServiceException e)
5230
    {
5231
      this();
5232
      this.success = success;
5233
      setSuccessIsSet(true);
5234
      this.e = e;
5235
    }
5236
 
5237
    /**
5238
     * Performs a deep copy on <i>other</i>.
5239
     */
5240
    public closePurchase_result(closePurchase_result other) {
5241
      __isset_bit_vector.clear();
5242
      __isset_bit_vector.or(other.__isset_bit_vector);
5243
      this.success = other.success;
5244
      if (other.isSetE()) {
5245
        this.e = new PurchaseServiceException(other.e);
5246
      }
5247
    }
5248
 
5249
    public closePurchase_result deepCopy() {
5250
      return new closePurchase_result(this);
5251
    }
5252
 
5253
    @Override
5254
    public void clear() {
5255
      setSuccessIsSet(false);
5256
      this.success = 0;
5257
      this.e = null;
5258
    }
5259
 
5260
    public long getSuccess() {
5261
      return this.success;
5262
    }
5263
 
5264
    public void setSuccess(long success) {
5265
      this.success = success;
5266
      setSuccessIsSet(true);
5267
    }
5268
 
5269
    public void unsetSuccess() {
5270
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5271
    }
5272
 
5273
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5274
    public boolean isSetSuccess() {
5275
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5276
    }
5277
 
5278
    public void setSuccessIsSet(boolean value) {
5279
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5280
    }
5281
 
5282
    public PurchaseServiceException getE() {
5283
      return this.e;
5284
    }
5285
 
5286
    public void setE(PurchaseServiceException e) {
5287
      this.e = e;
5288
    }
5289
 
5290
    public void unsetE() {
5291
      this.e = null;
5292
    }
5293
 
5294
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
5295
    public boolean isSetE() {
5296
      return this.e != null;
5297
    }
5298
 
5299
    public void setEIsSet(boolean value) {
5300
      if (!value) {
5301
        this.e = null;
5302
      }
5303
    }
5304
 
5305
    public void setFieldValue(_Fields field, Object value) {
5306
      switch (field) {
5307
      case SUCCESS:
5308
        if (value == null) {
5309
          unsetSuccess();
5310
        } else {
5311
          setSuccess((Long)value);
5312
        }
5313
        break;
5314
 
5315
      case E:
5316
        if (value == null) {
5317
          unsetE();
5318
        } else {
5319
          setE((PurchaseServiceException)value);
5320
        }
5321
        break;
5322
 
5323
      }
5324
    }
5325
 
5326
    public Object getFieldValue(_Fields field) {
5327
      switch (field) {
5328
      case SUCCESS:
5329
        return Long.valueOf(getSuccess());
5330
 
5331
      case E:
5332
        return getE();
5333
 
5334
      }
5335
      throw new IllegalStateException();
5336
    }
5337
 
5338
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5339
    public boolean isSet(_Fields field) {
5340
      if (field == null) {
5341
        throw new IllegalArgumentException();
5342
      }
5343
 
5344
      switch (field) {
5345
      case SUCCESS:
5346
        return isSetSuccess();
5347
      case E:
5348
        return isSetE();
5349
      }
5350
      throw new IllegalStateException();
5351
    }
5352
 
5353
    @Override
5354
    public boolean equals(Object that) {
5355
      if (that == null)
5356
        return false;
5357
      if (that instanceof closePurchase_result)
5358
        return this.equals((closePurchase_result)that);
5359
      return false;
5360
    }
5361
 
5362
    public boolean equals(closePurchase_result that) {
5363
      if (that == null)
5364
        return false;
5365
 
5366
      boolean this_present_success = true;
5367
      boolean that_present_success = true;
5368
      if (this_present_success || that_present_success) {
5369
        if (!(this_present_success && that_present_success))
5370
          return false;
5371
        if (this.success != that.success)
5372
          return false;
5373
      }
5374
 
5375
      boolean this_present_e = true && this.isSetE();
5376
      boolean that_present_e = true && that.isSetE();
5377
      if (this_present_e || that_present_e) {
5378
        if (!(this_present_e && that_present_e))
5379
          return false;
5380
        if (!this.e.equals(that.e))
5381
          return false;
5382
      }
5383
 
5384
      return true;
5385
    }
5386
 
5387
    @Override
5388
    public int hashCode() {
5389
      return 0;
5390
    }
5391
 
5392
    public int compareTo(closePurchase_result other) {
5393
      if (!getClass().equals(other.getClass())) {
5394
        return getClass().getName().compareTo(other.getClass().getName());
5395
      }
5396
 
5397
      int lastComparison = 0;
5398
      closePurchase_result typedOther = (closePurchase_result)other;
5399
 
5400
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5401
      if (lastComparison != 0) {
5402
        return lastComparison;
5403
      }
5404
      if (isSetSuccess()) {
5405
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5406
        if (lastComparison != 0) {
5407
          return lastComparison;
5408
        }
5409
      }
5410
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
5411
      if (lastComparison != 0) {
5412
        return lastComparison;
5413
      }
5414
      if (isSetE()) {
5415
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
5416
        if (lastComparison != 0) {
5417
          return lastComparison;
5418
        }
5419
      }
5420
      return 0;
5421
    }
5422
 
5423
    public _Fields fieldForId(int fieldId) {
5424
      return _Fields.findByThriftId(fieldId);
5425
    }
5426
 
5427
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5428
      org.apache.thrift.protocol.TField field;
5429
      iprot.readStructBegin();
5430
      while (true)
5431
      {
5432
        field = iprot.readFieldBegin();
5433
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5434
          break;
5435
        }
5436
        switch (field.id) {
5437
          case 0: // SUCCESS
5438
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5439
              this.success = iprot.readI64();
5440
              setSuccessIsSet(true);
5441
            } else { 
5442
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5443
            }
5444
            break;
5445
          case 1: // E
5446
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5447
              this.e = new PurchaseServiceException();
5448
              this.e.read(iprot);
5449
            } else { 
5450
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5451
            }
5452
            break;
5453
          default:
5454
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5455
        }
5456
        iprot.readFieldEnd();
5457
      }
5458
      iprot.readStructEnd();
5459
      validate();
5460
    }
5461
 
5462
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5463
      oprot.writeStructBegin(STRUCT_DESC);
5464
 
5465
      if (this.isSetSuccess()) {
5466
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5467
        oprot.writeI64(this.success);
5468
        oprot.writeFieldEnd();
5469
      } else if (this.isSetE()) {
5470
        oprot.writeFieldBegin(E_FIELD_DESC);
5471
        this.e.write(oprot);
5472
        oprot.writeFieldEnd();
5473
      }
5474
      oprot.writeFieldStop();
5475
      oprot.writeStructEnd();
5476
    }
5477
 
5478
    @Override
5479
    public String toString() {
5480
      StringBuilder sb = new StringBuilder("closePurchase_result(");
5481
      boolean first = true;
5482
 
5483
      sb.append("success:");
5484
      sb.append(this.success);
5485
      first = false;
5486
      if (!first) sb.append(", ");
5487
      sb.append("e:");
5488
      if (this.e == null) {
5489
        sb.append("null");
5490
      } else {
5491
        sb.append(this.e);
5492
      }
5493
      first = false;
5494
      sb.append(")");
5495
      return sb.toString();
5496
    }
5497
 
5498
    public void validate() throws org.apache.thrift.TException {
5499
      // check for required fields
5500
    }
5501
 
5502
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5503
      try {
5504
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5505
      } catch (org.apache.thrift.TException te) {
5506
        throw new java.io.IOException(te);
5507
      }
5508
    }
5509
 
5510
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5511
      try {
5512
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5513
      } catch (org.apache.thrift.TException te) {
5514
        throw new java.io.IOException(te);
5515
      }
5516
    }
5517
 
5518
  }
5519
 
5520
  public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable   {
5521
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");
5522
 
5523
    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);
5524
    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);
5525
 
5526
    private long purchaseOrderId; // required
5527
    private boolean open; // required
5528
 
5529
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5530
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5531
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5532
      OPEN((short)2, "open");
5533
 
5534
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5535
 
5536
      static {
5537
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5538
          byName.put(field.getFieldName(), field);
5539
        }
5540
      }
5541
 
5542
      /**
5543
       * Find the _Fields constant that matches fieldId, or null if its not found.
5544
       */
5545
      public static _Fields findByThriftId(int fieldId) {
5546
        switch(fieldId) {
5547
          case 1: // PURCHASE_ORDER_ID
5548
            return PURCHASE_ORDER_ID;
5549
          case 2: // OPEN
5550
            return OPEN;
5551
          default:
5552
            return null;
5553
        }
5554
      }
5555
 
5556
      /**
5557
       * Find the _Fields constant that matches fieldId, throwing an exception
5558
       * if it is not found.
5559
       */
5560
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5561
        _Fields fields = findByThriftId(fieldId);
5562
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5563
        return fields;
5564
      }
5565
 
5566
      /**
5567
       * Find the _Fields constant that matches name, or null if its not found.
5568
       */
5569
      public static _Fields findByName(String name) {
5570
        return byName.get(name);
5571
      }
5572
 
5573
      private final short _thriftId;
5574
      private final String _fieldName;
5575
 
5576
      _Fields(short thriftId, String fieldName) {
5577
        _thriftId = thriftId;
5578
        _fieldName = fieldName;
5579
      }
5580
 
5581
      public short getThriftFieldId() {
5582
        return _thriftId;
5583
      }
5584
 
5585
      public String getFieldName() {
5586
        return _fieldName;
5587
      }
5588
    }
5589
 
5590
    // isset id assignments
5591
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
5592
    private static final int __OPEN_ISSET_ID = 1;
5593
    private BitSet __isset_bit_vector = new BitSet(2);
5594
 
5595
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5596
    static {
5597
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5598
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5599
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5600
      tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5601
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
5602
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5603
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
5604
    }
5605
 
5606
    public getAllPurchases_args() {
5607
    }
5608
 
5609
    public getAllPurchases_args(
5610
      long purchaseOrderId,
5611
      boolean open)
5612
    {
5613
      this();
5614
      this.purchaseOrderId = purchaseOrderId;
5615
      setPurchaseOrderIdIsSet(true);
5616
      this.open = open;
5617
      setOpenIsSet(true);
5618
    }
5619
 
5620
    /**
5621
     * Performs a deep copy on <i>other</i>.
5622
     */
5623
    public getAllPurchases_args(getAllPurchases_args other) {
5624
      __isset_bit_vector.clear();
5625
      __isset_bit_vector.or(other.__isset_bit_vector);
5626
      this.purchaseOrderId = other.purchaseOrderId;
5627
      this.open = other.open;
5628
    }
5629
 
5630
    public getAllPurchases_args deepCopy() {
5631
      return new getAllPurchases_args(this);
5632
    }
5633
 
5634
    @Override
5635
    public void clear() {
5636
      setPurchaseOrderIdIsSet(false);
5637
      this.purchaseOrderId = 0;
5638
      setOpenIsSet(false);
5639
      this.open = false;
5640
    }
5641
 
5642
    public long getPurchaseOrderId() {
5643
      return this.purchaseOrderId;
5644
    }
5645
 
5646
    public void setPurchaseOrderId(long purchaseOrderId) {
5647
      this.purchaseOrderId = purchaseOrderId;
5648
      setPurchaseOrderIdIsSet(true);
5649
    }
5650
 
5651
    public void unsetPurchaseOrderId() {
5652
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
5653
    }
5654
 
5655
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
5656
    public boolean isSetPurchaseOrderId() {
5657
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
5658
    }
5659
 
5660
    public void setPurchaseOrderIdIsSet(boolean value) {
5661
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
5662
    }
5663
 
5664
    public boolean isOpen() {
5665
      return this.open;
5666
    }
5667
 
5668
    public void setOpen(boolean open) {
5669
      this.open = open;
5670
      setOpenIsSet(true);
5671
    }
5672
 
5673
    public void unsetOpen() {
5674
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
5675
    }
5676
 
5677
    /** Returns true if field open is set (has been assigned a value) and false otherwise */
5678
    public boolean isSetOpen() {
5679
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
5680
    }
5681
 
5682
    public void setOpenIsSet(boolean value) {
5683
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
5684
    }
5685
 
5686
    public void setFieldValue(_Fields field, Object value) {
5687
      switch (field) {
5688
      case PURCHASE_ORDER_ID:
5689
        if (value == null) {
5690
          unsetPurchaseOrderId();
5691
        } else {
5692
          setPurchaseOrderId((Long)value);
5693
        }
5694
        break;
5695
 
5696
      case OPEN:
5697
        if (value == null) {
5698
          unsetOpen();
5699
        } else {
5700
          setOpen((Boolean)value);
5701
        }
5702
        break;
5703
 
5704
      }
5705
    }
5706
 
5707
    public Object getFieldValue(_Fields field) {
5708
      switch (field) {
5709
      case PURCHASE_ORDER_ID:
5710
        return Long.valueOf(getPurchaseOrderId());
5711
 
5712
      case OPEN:
5713
        return Boolean.valueOf(isOpen());
5714
 
5715
      }
5716
      throw new IllegalStateException();
5717
    }
5718
 
5719
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5720
    public boolean isSet(_Fields field) {
5721
      if (field == null) {
5722
        throw new IllegalArgumentException();
5723
      }
5724
 
5725
      switch (field) {
5726
      case PURCHASE_ORDER_ID:
5727
        return isSetPurchaseOrderId();
5728
      case OPEN:
5729
        return isSetOpen();
5730
      }
5731
      throw new IllegalStateException();
5732
    }
5733
 
5734
    @Override
5735
    public boolean equals(Object that) {
5736
      if (that == null)
5737
        return false;
5738
      if (that instanceof getAllPurchases_args)
5739
        return this.equals((getAllPurchases_args)that);
5740
      return false;
5741
    }
5742
 
5743
    public boolean equals(getAllPurchases_args that) {
5744
      if (that == null)
5745
        return false;
5746
 
5747
      boolean this_present_purchaseOrderId = true;
5748
      boolean that_present_purchaseOrderId = true;
5749
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
5750
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
5751
          return false;
5752
        if (this.purchaseOrderId != that.purchaseOrderId)
5753
          return false;
5754
      }
5755
 
5756
      boolean this_present_open = true;
5757
      boolean that_present_open = true;
5758
      if (this_present_open || that_present_open) {
5759
        if (!(this_present_open && that_present_open))
5760
          return false;
5761
        if (this.open != that.open)
5762
          return false;
5763
      }
5764
 
5765
      return true;
5766
    }
5767
 
5768
    @Override
5769
    public int hashCode() {
5770
      return 0;
5771
    }
5772
 
5773
    public int compareTo(getAllPurchases_args other) {
5774
      if (!getClass().equals(other.getClass())) {
5775
        return getClass().getName().compareTo(other.getClass().getName());
5776
      }
5777
 
5778
      int lastComparison = 0;
5779
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
5780
 
5781
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
5782
      if (lastComparison != 0) {
5783
        return lastComparison;
5784
      }
5785
      if (isSetPurchaseOrderId()) {
5786
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
5787
        if (lastComparison != 0) {
5788
          return lastComparison;
5789
        }
5790
      }
5791
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());
5792
      if (lastComparison != 0) {
5793
        return lastComparison;
5794
      }
5795
      if (isSetOpen()) {
5796
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);
5797
        if (lastComparison != 0) {
5798
          return lastComparison;
5799
        }
5800
      }
5801
      return 0;
5802
    }
5803
 
5804
    public _Fields fieldForId(int fieldId) {
5805
      return _Fields.findByThriftId(fieldId);
5806
    }
5807
 
5808
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5809
      org.apache.thrift.protocol.TField field;
5810
      iprot.readStructBegin();
5811
      while (true)
5812
      {
5813
        field = iprot.readFieldBegin();
5814
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5815
          break;
5816
        }
5817
        switch (field.id) {
5818
          case 1: // PURCHASE_ORDER_ID
5819
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5820
              this.purchaseOrderId = iprot.readI64();
5821
              setPurchaseOrderIdIsSet(true);
5822
            } else { 
5823
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5824
            }
5825
            break;
5826
          case 2: // OPEN
5827
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
5828
              this.open = iprot.readBool();
5829
              setOpenIsSet(true);
5830
            } else { 
5831
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5832
            }
5833
            break;
5834
          default:
5835
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5836
        }
5837
        iprot.readFieldEnd();
5838
      }
5839
      iprot.readStructEnd();
5840
      validate();
5841
    }
5842
 
5843
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5844
      validate();
5845
 
5846
      oprot.writeStructBegin(STRUCT_DESC);
5847
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
5848
      oprot.writeI64(this.purchaseOrderId);
5849
      oprot.writeFieldEnd();
5850
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
5851
      oprot.writeBool(this.open);
5852
      oprot.writeFieldEnd();
5853
      oprot.writeFieldStop();
5854
      oprot.writeStructEnd();
5855
    }
5856
 
5857
    @Override
5858
    public String toString() {
5859
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
5860
      boolean first = true;
5861
 
5862
      sb.append("purchaseOrderId:");
5863
      sb.append(this.purchaseOrderId);
5864
      first = false;
5865
      if (!first) sb.append(", ");
5866
      sb.append("open:");
5867
      sb.append(this.open);
5868
      first = false;
5869
      sb.append(")");
5870
      return sb.toString();
5871
    }
5872
 
5873
    public void validate() throws org.apache.thrift.TException {
5874
      // check for required fields
5875
    }
5876
 
5877
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5878
      try {
5879
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5880
      } catch (org.apache.thrift.TException te) {
5881
        throw new java.io.IOException(te);
5882
      }
5883
    }
5884
 
5885
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5886
      try {
5887
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5888
      } catch (org.apache.thrift.TException te) {
5889
        throw new java.io.IOException(te);
5890
      }
5891
    }
5892
 
5893
  }
5894
 
5895
  public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable   {
5896
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");
5897
 
5898
    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);
5899
    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);
5900
 
5901
    private List<Purchase> success; // required
5902
    private PurchaseServiceException e; // required
5903
 
5904
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5905
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5906
      SUCCESS((short)0, "success"),
5907
      E((short)1, "e");
5908
 
5909
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5910
 
5911
      static {
5912
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5913
          byName.put(field.getFieldName(), field);
5914
        }
5915
      }
5916
 
5917
      /**
5918
       * Find the _Fields constant that matches fieldId, or null if its not found.
5919
       */
5920
      public static _Fields findByThriftId(int fieldId) {
5921
        switch(fieldId) {
5922
          case 0: // SUCCESS
5923
            return SUCCESS;
5924
          case 1: // E
5925
            return E;
5926
          default:
5927
            return null;
5928
        }
5929
      }
5930
 
5931
      /**
5932
       * Find the _Fields constant that matches fieldId, throwing an exception
5933
       * if it is not found.
5934
       */
5935
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5936
        _Fields fields = findByThriftId(fieldId);
5937
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5938
        return fields;
5939
      }
5940
 
5941
      /**
5942
       * Find the _Fields constant that matches name, or null if its not found.
5943
       */
5944
      public static _Fields findByName(String name) {
5945
        return byName.get(name);
5946
      }
5947
 
5948
      private final short _thriftId;
5949
      private final String _fieldName;
5950
 
5951
      _Fields(short thriftId, String fieldName) {
5952
        _thriftId = thriftId;
5953
        _fieldName = fieldName;
5954
      }
5955
 
5956
      public short getThriftFieldId() {
5957
        return _thriftId;
5958
      }
5959
 
5960
      public String getFieldName() {
5961
        return _fieldName;
5962
      }
5963
    }
5964
 
5965
    // isset id assignments
5966
 
5967
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5968
    static {
5969
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5970
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5971
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5972
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));
5973
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5974
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5975
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5976
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
5977
    }
5978
 
5979
    public getAllPurchases_result() {
5980
    }
5981
 
5982
    public getAllPurchases_result(
5983
      List<Purchase> success,
5984
      PurchaseServiceException e)
5985
    {
5986
      this();
5987
      this.success = success;
5988
      this.e = e;
5989
    }
5990
 
5991
    /**
5992
     * Performs a deep copy on <i>other</i>.
5993
     */
5994
    public getAllPurchases_result(getAllPurchases_result other) {
5995
      if (other.isSetSuccess()) {
5996
        List<Purchase> __this__success = new ArrayList<Purchase>();
5997
        for (Purchase other_element : other.success) {
5998
          __this__success.add(new Purchase(other_element));
5999
        }
6000
        this.success = __this__success;
6001
      }
6002
      if (other.isSetE()) {
6003
        this.e = new PurchaseServiceException(other.e);
6004
      }
6005
    }
6006
 
6007
    public getAllPurchases_result deepCopy() {
6008
      return new getAllPurchases_result(this);
6009
    }
6010
 
6011
    @Override
6012
    public void clear() {
6013
      this.success = null;
6014
      this.e = null;
6015
    }
6016
 
6017
    public int getSuccessSize() {
6018
      return (this.success == null) ? 0 : this.success.size();
6019
    }
6020
 
6021
    public java.util.Iterator<Purchase> getSuccessIterator() {
6022
      return (this.success == null) ? null : this.success.iterator();
6023
    }
6024
 
6025
    public void addToSuccess(Purchase elem) {
6026
      if (this.success == null) {
6027
        this.success = new ArrayList<Purchase>();
6028
      }
6029
      this.success.add(elem);
6030
    }
6031
 
6032
    public List<Purchase> getSuccess() {
6033
      return this.success;
6034
    }
6035
 
6036
    public void setSuccess(List<Purchase> success) {
6037
      this.success = success;
6038
    }
6039
 
6040
    public void unsetSuccess() {
6041
      this.success = null;
6042
    }
6043
 
6044
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6045
    public boolean isSetSuccess() {
6046
      return this.success != null;
6047
    }
6048
 
6049
    public void setSuccessIsSet(boolean value) {
6050
      if (!value) {
6051
        this.success = null;
6052
      }
6053
    }
6054
 
6055
    public PurchaseServiceException getE() {
6056
      return this.e;
6057
    }
6058
 
6059
    public void setE(PurchaseServiceException e) {
6060
      this.e = e;
6061
    }
6062
 
6063
    public void unsetE() {
6064
      this.e = null;
6065
    }
6066
 
6067
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
6068
    public boolean isSetE() {
6069
      return this.e != null;
6070
    }
6071
 
6072
    public void setEIsSet(boolean value) {
6073
      if (!value) {
6074
        this.e = null;
6075
      }
6076
    }
6077
 
6078
    public void setFieldValue(_Fields field, Object value) {
6079
      switch (field) {
6080
      case SUCCESS:
6081
        if (value == null) {
6082
          unsetSuccess();
6083
        } else {
6084
          setSuccess((List<Purchase>)value);
6085
        }
6086
        break;
6087
 
6088
      case E:
6089
        if (value == null) {
6090
          unsetE();
6091
        } else {
6092
          setE((PurchaseServiceException)value);
6093
        }
6094
        break;
6095
 
6096
      }
6097
    }
6098
 
6099
    public Object getFieldValue(_Fields field) {
6100
      switch (field) {
6101
      case SUCCESS:
6102
        return getSuccess();
6103
 
6104
      case E:
6105
        return getE();
6106
 
6107
      }
6108
      throw new IllegalStateException();
6109
    }
6110
 
6111
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6112
    public boolean isSet(_Fields field) {
6113
      if (field == null) {
6114
        throw new IllegalArgumentException();
6115
      }
6116
 
6117
      switch (field) {
6118
      case SUCCESS:
6119
        return isSetSuccess();
6120
      case E:
6121
        return isSetE();
6122
      }
6123
      throw new IllegalStateException();
6124
    }
6125
 
6126
    @Override
6127
    public boolean equals(Object that) {
6128
      if (that == null)
6129
        return false;
6130
      if (that instanceof getAllPurchases_result)
6131
        return this.equals((getAllPurchases_result)that);
6132
      return false;
6133
    }
6134
 
6135
    public boolean equals(getAllPurchases_result that) {
6136
      if (that == null)
6137
        return false;
6138
 
6139
      boolean this_present_success = true && this.isSetSuccess();
6140
      boolean that_present_success = true && that.isSetSuccess();
6141
      if (this_present_success || that_present_success) {
6142
        if (!(this_present_success && that_present_success))
6143
          return false;
6144
        if (!this.success.equals(that.success))
6145
          return false;
6146
      }
6147
 
6148
      boolean this_present_e = true && this.isSetE();
6149
      boolean that_present_e = true && that.isSetE();
6150
      if (this_present_e || that_present_e) {
6151
        if (!(this_present_e && that_present_e))
6152
          return false;
6153
        if (!this.e.equals(that.e))
6154
          return false;
6155
      }
6156
 
6157
      return true;
6158
    }
6159
 
6160
    @Override
6161
    public int hashCode() {
6162
      return 0;
6163
    }
6164
 
6165
    public int compareTo(getAllPurchases_result other) {
6166
      if (!getClass().equals(other.getClass())) {
6167
        return getClass().getName().compareTo(other.getClass().getName());
6168
      }
6169
 
6170
      int lastComparison = 0;
6171
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
6172
 
6173
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6174
      if (lastComparison != 0) {
6175
        return lastComparison;
6176
      }
6177
      if (isSetSuccess()) {
6178
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6179
        if (lastComparison != 0) {
6180
          return lastComparison;
6181
        }
6182
      }
6183
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
6184
      if (lastComparison != 0) {
6185
        return lastComparison;
6186
      }
6187
      if (isSetE()) {
6188
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
6189
        if (lastComparison != 0) {
6190
          return lastComparison;
6191
        }
6192
      }
6193
      return 0;
6194
    }
6195
 
6196
    public _Fields fieldForId(int fieldId) {
6197
      return _Fields.findByThriftId(fieldId);
6198
    }
6199
 
6200
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6201
      org.apache.thrift.protocol.TField field;
6202
      iprot.readStructBegin();
6203
      while (true)
6204
      {
6205
        field = iprot.readFieldBegin();
6206
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6207
          break;
6208
        }
6209
        switch (field.id) {
6210
          case 0: // SUCCESS
6211
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6212
              {
6213
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
6214
                this.success = new ArrayList<Purchase>(_list8.size);
6215
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
6216
                {
6217
                  Purchase _elem10; // required
6218
                  _elem10 = new Purchase();
6219
                  _elem10.read(iprot);
6220
                  this.success.add(_elem10);
6221
                }
6222
                iprot.readListEnd();
6223
              }
6224
            } else { 
6225
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6226
            }
6227
            break;
6228
          case 1: // E
6229
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6230
              this.e = new PurchaseServiceException();
6231
              this.e.read(iprot);
6232
            } else { 
6233
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6234
            }
6235
            break;
6236
          default:
6237
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6238
        }
6239
        iprot.readFieldEnd();
6240
      }
6241
      iprot.readStructEnd();
6242
      validate();
6243
    }
6244
 
6245
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6246
      oprot.writeStructBegin(STRUCT_DESC);
6247
 
6248
      if (this.isSetSuccess()) {
6249
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6250
        {
6251
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6252
          for (Purchase _iter11 : this.success)
6253
          {
6254
            _iter11.write(oprot);
6255
          }
6256
          oprot.writeListEnd();
6257
        }
6258
        oprot.writeFieldEnd();
6259
      } else if (this.isSetE()) {
6260
        oprot.writeFieldBegin(E_FIELD_DESC);
6261
        this.e.write(oprot);
6262
        oprot.writeFieldEnd();
6263
      }
6264
      oprot.writeFieldStop();
6265
      oprot.writeStructEnd();
6266
    }
6267
 
6268
    @Override
6269
    public String toString() {
6270
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
6271
      boolean first = true;
6272
 
6273
      sb.append("success:");
6274
      if (this.success == null) {
6275
        sb.append("null");
6276
      } else {
6277
        sb.append(this.success);
6278
      }
6279
      first = false;
6280
      if (!first) sb.append(", ");
6281
      sb.append("e:");
6282
      if (this.e == null) {
6283
        sb.append("null");
6284
      } else {
6285
        sb.append(this.e);
6286
      }
6287
      first = false;
6288
      sb.append(")");
6289
      return sb.toString();
6290
    }
6291
 
6292
    public void validate() throws org.apache.thrift.TException {
6293
      // check for required fields
6294
    }
6295
 
6296
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6297
      try {
6298
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6299
      } catch (org.apache.thrift.TException te) {
6300
        throw new java.io.IOException(te);
6301
      }
6302
    }
6303
 
6304
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6305
      try {
6306
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6307
      } catch (org.apache.thrift.TException te) {
6308
        throw new java.io.IOException(te);
6309
      }
6310
    }
6311
 
6312
  }
6313
 
4555 mandeep.dh 6314
  public static class getPurchaseOrderForPurchase_args implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_args, getPurchaseOrderForPurchase_args._Fields>, java.io.Serializable, Cloneable   {
6315
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_args");
4496 mandeep.dh 6316
 
6317
    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);
6318
 
6319
    private long purchaseId; // required
6320
 
6321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6322
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 6323
      PURCHASE_ID((short)1, "purchaseId");
4496 mandeep.dh 6324
 
6325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6326
 
6327
      static {
6328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6329
          byName.put(field.getFieldName(), field);
6330
        }
6331
      }
6332
 
6333
      /**
6334
       * Find the _Fields constant that matches fieldId, or null if its not found.
6335
       */
6336
      public static _Fields findByThriftId(int fieldId) {
6337
        switch(fieldId) {
6338
          case 1: // PURCHASE_ID
6339
            return PURCHASE_ID;
6340
          default:
6341
            return null;
6342
        }
6343
      }
6344
 
6345
      /**
6346
       * Find the _Fields constant that matches fieldId, throwing an exception
6347
       * if it is not found.
6348
       */
6349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6350
        _Fields fields = findByThriftId(fieldId);
6351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6352
        return fields;
6353
      }
6354
 
6355
      /**
6356
       * Find the _Fields constant that matches name, or null if its not found.
6357
       */
6358
      public static _Fields findByName(String name) {
6359
        return byName.get(name);
6360
      }
6361
 
6362
      private final short _thriftId;
6363
      private final String _fieldName;
6364
 
6365
      _Fields(short thriftId, String fieldName) {
6366
        _thriftId = thriftId;
6367
        _fieldName = fieldName;
6368
      }
6369
 
6370
      public short getThriftFieldId() {
6371
        return _thriftId;
6372
      }
6373
 
6374
      public String getFieldName() {
6375
        return _fieldName;
6376
      }
6377
    }
6378
 
6379
    // isset id assignments
6380
    private static final int __PURCHASEID_ISSET_ID = 0;
4555 mandeep.dh 6381
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 6382
 
6383
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6384
    static {
6385
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6386
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6387
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6388
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 6389
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_args.class, metaDataMap);
4496 mandeep.dh 6390
    }
6391
 
4555 mandeep.dh 6392
    public getPurchaseOrderForPurchase_args() {
4496 mandeep.dh 6393
    }
6394
 
4555 mandeep.dh 6395
    public getPurchaseOrderForPurchase_args(
6396
      long purchaseId)
4496 mandeep.dh 6397
    {
6398
      this();
6399
      this.purchaseId = purchaseId;
6400
      setPurchaseIdIsSet(true);
6401
    }
6402
 
6403
    /**
6404
     * Performs a deep copy on <i>other</i>.
6405
     */
4555 mandeep.dh 6406
    public getPurchaseOrderForPurchase_args(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 6407
      __isset_bit_vector.clear();
6408
      __isset_bit_vector.or(other.__isset_bit_vector);
6409
      this.purchaseId = other.purchaseId;
6410
    }
6411
 
4555 mandeep.dh 6412
    public getPurchaseOrderForPurchase_args deepCopy() {
6413
      return new getPurchaseOrderForPurchase_args(this);
4496 mandeep.dh 6414
    }
6415
 
6416
    @Override
6417
    public void clear() {
6418
      setPurchaseIdIsSet(false);
6419
      this.purchaseId = 0;
6420
    }
6421
 
6422
    public long getPurchaseId() {
6423
      return this.purchaseId;
6424
    }
6425
 
6426
    public void setPurchaseId(long purchaseId) {
6427
      this.purchaseId = purchaseId;
6428
      setPurchaseIdIsSet(true);
6429
    }
6430
 
6431
    public void unsetPurchaseId() {
6432
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
6433
    }
6434
 
6435
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
6436
    public boolean isSetPurchaseId() {
6437
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
6438
    }
6439
 
6440
    public void setPurchaseIdIsSet(boolean value) {
6441
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
6442
    }
6443
 
6444
    public void setFieldValue(_Fields field, Object value) {
6445
      switch (field) {
6446
      case PURCHASE_ID:
6447
        if (value == null) {
6448
          unsetPurchaseId();
6449
        } else {
6450
          setPurchaseId((Long)value);
6451
        }
6452
        break;
6453
 
6454
      }
6455
    }
6456
 
6457
    public Object getFieldValue(_Fields field) {
6458
      switch (field) {
6459
      case PURCHASE_ID:
6460
        return Long.valueOf(getPurchaseId());
6461
 
6462
      }
6463
      throw new IllegalStateException();
6464
    }
6465
 
6466
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6467
    public boolean isSet(_Fields field) {
6468
      if (field == null) {
6469
        throw new IllegalArgumentException();
6470
      }
6471
 
6472
      switch (field) {
6473
      case PURCHASE_ID:
6474
        return isSetPurchaseId();
6475
      }
6476
      throw new IllegalStateException();
6477
    }
6478
 
6479
    @Override
6480
    public boolean equals(Object that) {
6481
      if (that == null)
6482
        return false;
4555 mandeep.dh 6483
      if (that instanceof getPurchaseOrderForPurchase_args)
6484
        return this.equals((getPurchaseOrderForPurchase_args)that);
4496 mandeep.dh 6485
      return false;
6486
    }
6487
 
4555 mandeep.dh 6488
    public boolean equals(getPurchaseOrderForPurchase_args that) {
4496 mandeep.dh 6489
      if (that == null)
6490
        return false;
6491
 
6492
      boolean this_present_purchaseId = true;
6493
      boolean that_present_purchaseId = true;
6494
      if (this_present_purchaseId || that_present_purchaseId) {
6495
        if (!(this_present_purchaseId && that_present_purchaseId))
6496
          return false;
6497
        if (this.purchaseId != that.purchaseId)
6498
          return false;
6499
      }
6500
 
6501
      return true;
6502
    }
6503
 
6504
    @Override
6505
    public int hashCode() {
6506
      return 0;
6507
    }
6508
 
4555 mandeep.dh 6509
    public int compareTo(getPurchaseOrderForPurchase_args other) {
4496 mandeep.dh 6510
      if (!getClass().equals(other.getClass())) {
6511
        return getClass().getName().compareTo(other.getClass().getName());
6512
      }
6513
 
6514
      int lastComparison = 0;
4555 mandeep.dh 6515
      getPurchaseOrderForPurchase_args typedOther = (getPurchaseOrderForPurchase_args)other;
4496 mandeep.dh 6516
 
6517
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
6518
      if (lastComparison != 0) {
6519
        return lastComparison;
6520
      }
6521
      if (isSetPurchaseId()) {
6522
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
6523
        if (lastComparison != 0) {
6524
          return lastComparison;
6525
        }
6526
      }
6527
      return 0;
6528
    }
6529
 
6530
    public _Fields fieldForId(int fieldId) {
6531
      return _Fields.findByThriftId(fieldId);
6532
    }
6533
 
6534
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6535
      org.apache.thrift.protocol.TField field;
6536
      iprot.readStructBegin();
6537
      while (true)
6538
      {
6539
        field = iprot.readFieldBegin();
6540
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6541
          break;
6542
        }
6543
        switch (field.id) {
6544
          case 1: // PURCHASE_ID
6545
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6546
              this.purchaseId = iprot.readI64();
6547
              setPurchaseIdIsSet(true);
6548
            } else { 
6549
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6550
            }
6551
            break;
6552
          default:
6553
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6554
        }
6555
        iprot.readFieldEnd();
6556
      }
6557
      iprot.readStructEnd();
6558
      validate();
6559
    }
6560
 
6561
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6562
      validate();
6563
 
6564
      oprot.writeStructBegin(STRUCT_DESC);
6565
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6566
      oprot.writeI64(this.purchaseId);
6567
      oprot.writeFieldEnd();
6568
      oprot.writeFieldStop();
6569
      oprot.writeStructEnd();
6570
    }
6571
 
6572
    @Override
6573
    public String toString() {
4555 mandeep.dh 6574
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_args(");
4496 mandeep.dh 6575
      boolean first = true;
6576
 
6577
      sb.append("purchaseId:");
6578
      sb.append(this.purchaseId);
6579
      first = false;
6580
      sb.append(")");
6581
      return sb.toString();
6582
    }
6583
 
6584
    public void validate() throws org.apache.thrift.TException {
6585
      // check for required fields
6586
    }
6587
 
6588
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6589
      try {
6590
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6591
      } catch (org.apache.thrift.TException te) {
6592
        throw new java.io.IOException(te);
6593
      }
6594
    }
6595
 
6596
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6597
      try {
4555 mandeep.dh 6598
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6599
        __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 6600
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6601
      } catch (org.apache.thrift.TException te) {
6602
        throw new java.io.IOException(te);
6603
      }
6604
    }
6605
 
6606
  }
6607
 
4555 mandeep.dh 6608
  public static class getPurchaseOrderForPurchase_result implements org.apache.thrift.TBase<getPurchaseOrderForPurchase_result, getPurchaseOrderForPurchase_result._Fields>, java.io.Serializable, Cloneable   {
6609
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrderForPurchase_result");
4496 mandeep.dh 6610
 
4555 mandeep.dh 6611
    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 6612
 
4555 mandeep.dh 6613
    private PurchaseOrder success; // required
4496 mandeep.dh 6614
 
6615
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6616
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6617
      SUCCESS((short)0, "success");
6618
 
6619
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6620
 
6621
      static {
6622
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6623
          byName.put(field.getFieldName(), field);
6624
        }
6625
      }
6626
 
6627
      /**
6628
       * Find the _Fields constant that matches fieldId, or null if its not found.
6629
       */
6630
      public static _Fields findByThriftId(int fieldId) {
6631
        switch(fieldId) {
6632
          case 0: // SUCCESS
6633
            return SUCCESS;
6634
          default:
6635
            return null;
6636
        }
6637
      }
6638
 
6639
      /**
6640
       * Find the _Fields constant that matches fieldId, throwing an exception
6641
       * if it is not found.
6642
       */
6643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6644
        _Fields fields = findByThriftId(fieldId);
6645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6646
        return fields;
6647
      }
6648
 
6649
      /**
6650
       * Find the _Fields constant that matches name, or null if its not found.
6651
       */
6652
      public static _Fields findByName(String name) {
6653
        return byName.get(name);
6654
      }
6655
 
6656
      private final short _thriftId;
6657
      private final String _fieldName;
6658
 
6659
      _Fields(short thriftId, String fieldName) {
6660
        _thriftId = thriftId;
6661
        _fieldName = fieldName;
6662
      }
6663
 
6664
      public short getThriftFieldId() {
6665
        return _thriftId;
6666
      }
6667
 
6668
      public String getFieldName() {
6669
        return _fieldName;
6670
      }
6671
    }
6672
 
6673
    // isset id assignments
6674
 
6675
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6676
    static {
6677
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6678
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 6679
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
4496 mandeep.dh 6680
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4555 mandeep.dh 6681
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrderForPurchase_result.class, metaDataMap);
4496 mandeep.dh 6682
    }
6683
 
4555 mandeep.dh 6684
    public getPurchaseOrderForPurchase_result() {
4496 mandeep.dh 6685
    }
6686
 
4555 mandeep.dh 6687
    public getPurchaseOrderForPurchase_result(
6688
      PurchaseOrder success)
4496 mandeep.dh 6689
    {
6690
      this();
6691
      this.success = success;
6692
    }
6693
 
6694
    /**
6695
     * Performs a deep copy on <i>other</i>.
6696
     */
4555 mandeep.dh 6697
    public getPurchaseOrderForPurchase_result(getPurchaseOrderForPurchase_result other) {
6698
      if (other.isSetSuccess()) {
6699
        this.success = new PurchaseOrder(other.success);
6700
      }
4496 mandeep.dh 6701
    }
6702
 
4555 mandeep.dh 6703
    public getPurchaseOrderForPurchase_result deepCopy() {
6704
      return new getPurchaseOrderForPurchase_result(this);
4496 mandeep.dh 6705
    }
6706
 
6707
    @Override
6708
    public void clear() {
4555 mandeep.dh 6709
      this.success = null;
4496 mandeep.dh 6710
    }
6711
 
4555 mandeep.dh 6712
    public PurchaseOrder getSuccess() {
4496 mandeep.dh 6713
      return this.success;
6714
    }
6715
 
4555 mandeep.dh 6716
    public void setSuccess(PurchaseOrder success) {
4496 mandeep.dh 6717
      this.success = success;
6718
    }
6719
 
6720
    public void unsetSuccess() {
4555 mandeep.dh 6721
      this.success = null;
4496 mandeep.dh 6722
    }
6723
 
6724
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6725
    public boolean isSetSuccess() {
4555 mandeep.dh 6726
      return this.success != null;
4496 mandeep.dh 6727
    }
6728
 
6729
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 6730
      if (!value) {
6731
        this.success = null;
6732
      }
4496 mandeep.dh 6733
    }
6734
 
6735
    public void setFieldValue(_Fields field, Object value) {
6736
      switch (field) {
6737
      case SUCCESS:
6738
        if (value == null) {
6739
          unsetSuccess();
6740
        } else {
4555 mandeep.dh 6741
          setSuccess((PurchaseOrder)value);
4496 mandeep.dh 6742
        }
6743
        break;
6744
 
6745
      }
6746
    }
6747
 
6748
    public Object getFieldValue(_Fields field) {
6749
      switch (field) {
6750
      case SUCCESS:
4555 mandeep.dh 6751
        return getSuccess();
4496 mandeep.dh 6752
 
6753
      }
6754
      throw new IllegalStateException();
6755
    }
6756
 
6757
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6758
    public boolean isSet(_Fields field) {
6759
      if (field == null) {
6760
        throw new IllegalArgumentException();
6761
      }
6762
 
6763
      switch (field) {
6764
      case SUCCESS:
6765
        return isSetSuccess();
6766
      }
6767
      throw new IllegalStateException();
6768
    }
6769
 
6770
    @Override
6771
    public boolean equals(Object that) {
6772
      if (that == null)
6773
        return false;
4555 mandeep.dh 6774
      if (that instanceof getPurchaseOrderForPurchase_result)
6775
        return this.equals((getPurchaseOrderForPurchase_result)that);
4496 mandeep.dh 6776
      return false;
6777
    }
6778
 
4555 mandeep.dh 6779
    public boolean equals(getPurchaseOrderForPurchase_result that) {
4496 mandeep.dh 6780
      if (that == null)
6781
        return false;
6782
 
4555 mandeep.dh 6783
      boolean this_present_success = true && this.isSetSuccess();
6784
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 6785
      if (this_present_success || that_present_success) {
6786
        if (!(this_present_success && that_present_success))
6787
          return false;
4555 mandeep.dh 6788
        if (!this.success.equals(that.success))
4496 mandeep.dh 6789
          return false;
6790
      }
6791
 
6792
      return true;
6793
    }
6794
 
6795
    @Override
6796
    public int hashCode() {
6797
      return 0;
6798
    }
6799
 
4555 mandeep.dh 6800
    public int compareTo(getPurchaseOrderForPurchase_result other) {
4496 mandeep.dh 6801
      if (!getClass().equals(other.getClass())) {
6802
        return getClass().getName().compareTo(other.getClass().getName());
6803
      }
6804
 
6805
      int lastComparison = 0;
4555 mandeep.dh 6806
      getPurchaseOrderForPurchase_result typedOther = (getPurchaseOrderForPurchase_result)other;
4496 mandeep.dh 6807
 
6808
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6809
      if (lastComparison != 0) {
6810
        return lastComparison;
6811
      }
6812
      if (isSetSuccess()) {
6813
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6814
        if (lastComparison != 0) {
6815
          return lastComparison;
6816
        }
6817
      }
6818
      return 0;
6819
    }
6820
 
6821
    public _Fields fieldForId(int fieldId) {
6822
      return _Fields.findByThriftId(fieldId);
6823
    }
6824
 
6825
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6826
      org.apache.thrift.protocol.TField field;
6827
      iprot.readStructBegin();
6828
      while (true)
6829
      {
6830
        field = iprot.readFieldBegin();
6831
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6832
          break;
6833
        }
6834
        switch (field.id) {
6835
          case 0: // SUCCESS
4555 mandeep.dh 6836
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6837
              this.success = new PurchaseOrder();
6838
              this.success.read(iprot);
4496 mandeep.dh 6839
            } else { 
6840
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6841
            }
6842
            break;
6843
          default:
6844
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6845
        }
6846
        iprot.readFieldEnd();
6847
      }
6848
      iprot.readStructEnd();
6849
      validate();
6850
    }
6851
 
6852
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6853
      oprot.writeStructBegin(STRUCT_DESC);
6854
 
6855
      if (this.isSetSuccess()) {
6856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 6857
        this.success.write(oprot);
4496 mandeep.dh 6858
        oprot.writeFieldEnd();
6859
      }
6860
      oprot.writeFieldStop();
6861
      oprot.writeStructEnd();
6862
    }
6863
 
6864
    @Override
6865
    public String toString() {
4555 mandeep.dh 6866
      StringBuilder sb = new StringBuilder("getPurchaseOrderForPurchase_result(");
4496 mandeep.dh 6867
      boolean first = true;
6868
 
6869
      sb.append("success:");
4555 mandeep.dh 6870
      if (this.success == null) {
6871
        sb.append("null");
6872
      } else {
6873
        sb.append(this.success);
6874
      }
4496 mandeep.dh 6875
      first = false;
6876
      sb.append(")");
6877
      return sb.toString();
6878
    }
6879
 
6880
    public void validate() throws org.apache.thrift.TException {
6881
      // check for required fields
6882
    }
6883
 
6884
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6885
      try {
6886
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6887
      } catch (org.apache.thrift.TException te) {
6888
        throw new java.io.IOException(te);
6889
      }
6890
    }
6891
 
6892
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6893
      try {
6894
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6895
      } catch (org.apache.thrift.TException te) {
6896
        throw new java.io.IOException(te);
6897
      }
6898
    }
6899
 
6900
  }
6901
 
4754 mandeep.dh 6902
  public static class getPendingPurchaseOrders_args implements org.apache.thrift.TBase<getPendingPurchaseOrders_args, getPendingPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable   {
6903
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_args");
6904
 
6905
    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);
6906
 
6907
    private long warehouseId; // required
6908
 
6909
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6910
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6911
      WAREHOUSE_ID((short)1, "warehouseId");
6912
 
6913
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6914
 
6915
      static {
6916
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6917
          byName.put(field.getFieldName(), field);
6918
        }
6919
      }
6920
 
6921
      /**
6922
       * Find the _Fields constant that matches fieldId, or null if its not found.
6923
       */
6924
      public static _Fields findByThriftId(int fieldId) {
6925
        switch(fieldId) {
6926
          case 1: // WAREHOUSE_ID
6927
            return WAREHOUSE_ID;
6928
          default:
6929
            return null;
6930
        }
6931
      }
6932
 
6933
      /**
6934
       * Find the _Fields constant that matches fieldId, throwing an exception
6935
       * if it is not found.
6936
       */
6937
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6938
        _Fields fields = findByThriftId(fieldId);
6939
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6940
        return fields;
6941
      }
6942
 
6943
      /**
6944
       * Find the _Fields constant that matches name, or null if its not found.
6945
       */
6946
      public static _Fields findByName(String name) {
6947
        return byName.get(name);
6948
      }
6949
 
6950
      private final short _thriftId;
6951
      private final String _fieldName;
6952
 
6953
      _Fields(short thriftId, String fieldName) {
6954
        _thriftId = thriftId;
6955
        _fieldName = fieldName;
6956
      }
6957
 
6958
      public short getThriftFieldId() {
6959
        return _thriftId;
6960
      }
6961
 
6962
      public String getFieldName() {
6963
        return _fieldName;
6964
      }
6965
    }
6966
 
6967
    // isset id assignments
6968
    private static final int __WAREHOUSEID_ISSET_ID = 0;
6969
    private BitSet __isset_bit_vector = new BitSet(1);
6970
 
6971
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6972
    static {
6973
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6974
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6975
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6976
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6977
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_args.class, metaDataMap);
6978
    }
6979
 
6980
    public getPendingPurchaseOrders_args() {
6981
    }
6982
 
6983
    public getPendingPurchaseOrders_args(
6984
      long warehouseId)
6985
    {
6986
      this();
6987
      this.warehouseId = warehouseId;
6988
      setWarehouseIdIsSet(true);
6989
    }
6990
 
6991
    /**
6992
     * Performs a deep copy on <i>other</i>.
6993
     */
6994
    public getPendingPurchaseOrders_args(getPendingPurchaseOrders_args other) {
6995
      __isset_bit_vector.clear();
6996
      __isset_bit_vector.or(other.__isset_bit_vector);
6997
      this.warehouseId = other.warehouseId;
6998
    }
6999
 
7000
    public getPendingPurchaseOrders_args deepCopy() {
7001
      return new getPendingPurchaseOrders_args(this);
7002
    }
7003
 
7004
    @Override
7005
    public void clear() {
7006
      setWarehouseIdIsSet(false);
7007
      this.warehouseId = 0;
7008
    }
7009
 
7010
    public long getWarehouseId() {
7011
      return this.warehouseId;
7012
    }
7013
 
7014
    public void setWarehouseId(long warehouseId) {
7015
      this.warehouseId = warehouseId;
7016
      setWarehouseIdIsSet(true);
7017
    }
7018
 
7019
    public void unsetWarehouseId() {
7020
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
7021
    }
7022
 
7023
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
7024
    public boolean isSetWarehouseId() {
7025
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
7026
    }
7027
 
7028
    public void setWarehouseIdIsSet(boolean value) {
7029
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
7030
    }
7031
 
7032
    public void setFieldValue(_Fields field, Object value) {
7033
      switch (field) {
7034
      case WAREHOUSE_ID:
7035
        if (value == null) {
7036
          unsetWarehouseId();
7037
        } else {
7038
          setWarehouseId((Long)value);
7039
        }
7040
        break;
7041
 
7042
      }
7043
    }
7044
 
7045
    public Object getFieldValue(_Fields field) {
7046
      switch (field) {
7047
      case WAREHOUSE_ID:
7048
        return Long.valueOf(getWarehouseId());
7049
 
7050
      }
7051
      throw new IllegalStateException();
7052
    }
7053
 
7054
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7055
    public boolean isSet(_Fields field) {
7056
      if (field == null) {
7057
        throw new IllegalArgumentException();
7058
      }
7059
 
7060
      switch (field) {
7061
      case WAREHOUSE_ID:
7062
        return isSetWarehouseId();
7063
      }
7064
      throw new IllegalStateException();
7065
    }
7066
 
7067
    @Override
7068
    public boolean equals(Object that) {
7069
      if (that == null)
7070
        return false;
7071
      if (that instanceof getPendingPurchaseOrders_args)
7072
        return this.equals((getPendingPurchaseOrders_args)that);
7073
      return false;
7074
    }
7075
 
7076
    public boolean equals(getPendingPurchaseOrders_args that) {
7077
      if (that == null)
7078
        return false;
7079
 
7080
      boolean this_present_warehouseId = true;
7081
      boolean that_present_warehouseId = true;
7082
      if (this_present_warehouseId || that_present_warehouseId) {
7083
        if (!(this_present_warehouseId && that_present_warehouseId))
7084
          return false;
7085
        if (this.warehouseId != that.warehouseId)
7086
          return false;
7087
      }
7088
 
7089
      return true;
7090
    }
7091
 
7092
    @Override
7093
    public int hashCode() {
7094
      return 0;
7095
    }
7096
 
7097
    public int compareTo(getPendingPurchaseOrders_args other) {
7098
      if (!getClass().equals(other.getClass())) {
7099
        return getClass().getName().compareTo(other.getClass().getName());
7100
      }
7101
 
7102
      int lastComparison = 0;
7103
      getPendingPurchaseOrders_args typedOther = (getPendingPurchaseOrders_args)other;
7104
 
7105
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
7106
      if (lastComparison != 0) {
7107
        return lastComparison;
7108
      }
7109
      if (isSetWarehouseId()) {
7110
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
7111
        if (lastComparison != 0) {
7112
          return lastComparison;
7113
        }
7114
      }
7115
      return 0;
7116
    }
7117
 
7118
    public _Fields fieldForId(int fieldId) {
7119
      return _Fields.findByThriftId(fieldId);
7120
    }
7121
 
7122
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7123
      org.apache.thrift.protocol.TField field;
7124
      iprot.readStructBegin();
7125
      while (true)
7126
      {
7127
        field = iprot.readFieldBegin();
7128
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7129
          break;
7130
        }
7131
        switch (field.id) {
7132
          case 1: // WAREHOUSE_ID
7133
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7134
              this.warehouseId = iprot.readI64();
7135
              setWarehouseIdIsSet(true);
7136
            } else { 
7137
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7138
            }
7139
            break;
7140
          default:
7141
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7142
        }
7143
        iprot.readFieldEnd();
7144
      }
7145
      iprot.readStructEnd();
7146
      validate();
7147
    }
7148
 
7149
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7150
      validate();
7151
 
7152
      oprot.writeStructBegin(STRUCT_DESC);
7153
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7154
      oprot.writeI64(this.warehouseId);
7155
      oprot.writeFieldEnd();
7156
      oprot.writeFieldStop();
7157
      oprot.writeStructEnd();
7158
    }
7159
 
7160
    @Override
7161
    public String toString() {
7162
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_args(");
7163
      boolean first = true;
7164
 
7165
      sb.append("warehouseId:");
7166
      sb.append(this.warehouseId);
7167
      first = false;
7168
      sb.append(")");
7169
      return sb.toString();
7170
    }
7171
 
7172
    public void validate() throws org.apache.thrift.TException {
7173
      // check for required fields
7174
    }
7175
 
7176
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7177
      try {
7178
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7179
      } catch (org.apache.thrift.TException te) {
7180
        throw new java.io.IOException(te);
7181
      }
7182
    }
7183
 
7184
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7185
      try {
7186
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7187
        __isset_bit_vector = new BitSet(1);
7188
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7189
      } catch (org.apache.thrift.TException te) {
7190
        throw new java.io.IOException(te);
7191
      }
7192
    }
7193
 
7194
  }
7195
 
7196
  public static class getPendingPurchaseOrders_result implements org.apache.thrift.TBase<getPendingPurchaseOrders_result, getPendingPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable   {
7197
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingPurchaseOrders_result");
7198
 
7199
    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);
7200
    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);
7201
 
7202
    private List<PurchaseOrder> success; // required
7203
    private PurchaseServiceException e; // required
7204
 
7205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7206
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7207
      SUCCESS((short)0, "success"),
7208
      E((short)1, "e");
7209
 
7210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7211
 
7212
      static {
7213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7214
          byName.put(field.getFieldName(), field);
7215
        }
7216
      }
7217
 
7218
      /**
7219
       * Find the _Fields constant that matches fieldId, or null if its not found.
7220
       */
7221
      public static _Fields findByThriftId(int fieldId) {
7222
        switch(fieldId) {
7223
          case 0: // SUCCESS
7224
            return SUCCESS;
7225
          case 1: // E
7226
            return E;
7227
          default:
7228
            return null;
7229
        }
7230
      }
7231
 
7232
      /**
7233
       * Find the _Fields constant that matches fieldId, throwing an exception
7234
       * if it is not found.
7235
       */
7236
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7237
        _Fields fields = findByThriftId(fieldId);
7238
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7239
        return fields;
7240
      }
7241
 
7242
      /**
7243
       * Find the _Fields constant that matches name, or null if its not found.
7244
       */
7245
      public static _Fields findByName(String name) {
7246
        return byName.get(name);
7247
      }
7248
 
7249
      private final short _thriftId;
7250
      private final String _fieldName;
7251
 
7252
      _Fields(short thriftId, String fieldName) {
7253
        _thriftId = thriftId;
7254
        _fieldName = fieldName;
7255
      }
7256
 
7257
      public short getThriftFieldId() {
7258
        return _thriftId;
7259
      }
7260
 
7261
      public String getFieldName() {
7262
        return _fieldName;
7263
      }
7264
    }
7265
 
7266
    // isset id assignments
7267
 
7268
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7269
    static {
7270
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7271
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7272
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7273
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));
7274
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7275
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7276
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7277
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingPurchaseOrders_result.class, metaDataMap);
7278
    }
7279
 
7280
    public getPendingPurchaseOrders_result() {
7281
    }
7282
 
7283
    public getPendingPurchaseOrders_result(
7284
      List<PurchaseOrder> success,
7285
      PurchaseServiceException e)
7286
    {
7287
      this();
7288
      this.success = success;
7289
      this.e = e;
7290
    }
7291
 
7292
    /**
7293
     * Performs a deep copy on <i>other</i>.
7294
     */
7295
    public getPendingPurchaseOrders_result(getPendingPurchaseOrders_result other) {
7296
      if (other.isSetSuccess()) {
7297
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
7298
        for (PurchaseOrder other_element : other.success) {
7299
          __this__success.add(new PurchaseOrder(other_element));
7300
        }
7301
        this.success = __this__success;
7302
      }
7303
      if (other.isSetE()) {
7304
        this.e = new PurchaseServiceException(other.e);
7305
      }
7306
    }
7307
 
7308
    public getPendingPurchaseOrders_result deepCopy() {
7309
      return new getPendingPurchaseOrders_result(this);
7310
    }
7311
 
7312
    @Override
7313
    public void clear() {
7314
      this.success = null;
7315
      this.e = null;
7316
    }
7317
 
7318
    public int getSuccessSize() {
7319
      return (this.success == null) ? 0 : this.success.size();
7320
    }
7321
 
7322
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
7323
      return (this.success == null) ? null : this.success.iterator();
7324
    }
7325
 
7326
    public void addToSuccess(PurchaseOrder elem) {
7327
      if (this.success == null) {
7328
        this.success = new ArrayList<PurchaseOrder>();
7329
      }
7330
      this.success.add(elem);
7331
    }
7332
 
7333
    public List<PurchaseOrder> getSuccess() {
7334
      return this.success;
7335
    }
7336
 
7337
    public void setSuccess(List<PurchaseOrder> success) {
7338
      this.success = success;
7339
    }
7340
 
7341
    public void unsetSuccess() {
7342
      this.success = null;
7343
    }
7344
 
7345
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7346
    public boolean isSetSuccess() {
7347
      return this.success != null;
7348
    }
7349
 
7350
    public void setSuccessIsSet(boolean value) {
7351
      if (!value) {
7352
        this.success = null;
7353
      }
7354
    }
7355
 
7356
    public PurchaseServiceException getE() {
7357
      return this.e;
7358
    }
7359
 
7360
    public void setE(PurchaseServiceException e) {
7361
      this.e = e;
7362
    }
7363
 
7364
    public void unsetE() {
7365
      this.e = null;
7366
    }
7367
 
7368
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7369
    public boolean isSetE() {
7370
      return this.e != null;
7371
    }
7372
 
7373
    public void setEIsSet(boolean value) {
7374
      if (!value) {
7375
        this.e = null;
7376
      }
7377
    }
7378
 
7379
    public void setFieldValue(_Fields field, Object value) {
7380
      switch (field) {
7381
      case SUCCESS:
7382
        if (value == null) {
7383
          unsetSuccess();
7384
        } else {
7385
          setSuccess((List<PurchaseOrder>)value);
7386
        }
7387
        break;
7388
 
7389
      case E:
7390
        if (value == null) {
7391
          unsetE();
7392
        } else {
7393
          setE((PurchaseServiceException)value);
7394
        }
7395
        break;
7396
 
7397
      }
7398
    }
7399
 
7400
    public Object getFieldValue(_Fields field) {
7401
      switch (field) {
7402
      case SUCCESS:
7403
        return getSuccess();
7404
 
7405
      case E:
7406
        return getE();
7407
 
7408
      }
7409
      throw new IllegalStateException();
7410
    }
7411
 
7412
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7413
    public boolean isSet(_Fields field) {
7414
      if (field == null) {
7415
        throw new IllegalArgumentException();
7416
      }
7417
 
7418
      switch (field) {
7419
      case SUCCESS:
7420
        return isSetSuccess();
7421
      case E:
7422
        return isSetE();
7423
      }
7424
      throw new IllegalStateException();
7425
    }
7426
 
7427
    @Override
7428
    public boolean equals(Object that) {
7429
      if (that == null)
7430
        return false;
7431
      if (that instanceof getPendingPurchaseOrders_result)
7432
        return this.equals((getPendingPurchaseOrders_result)that);
7433
      return false;
7434
    }
7435
 
7436
    public boolean equals(getPendingPurchaseOrders_result that) {
7437
      if (that == null)
7438
        return false;
7439
 
7440
      boolean this_present_success = true && this.isSetSuccess();
7441
      boolean that_present_success = true && that.isSetSuccess();
7442
      if (this_present_success || that_present_success) {
7443
        if (!(this_present_success && that_present_success))
7444
          return false;
7445
        if (!this.success.equals(that.success))
7446
          return false;
7447
      }
7448
 
7449
      boolean this_present_e = true && this.isSetE();
7450
      boolean that_present_e = true && that.isSetE();
7451
      if (this_present_e || that_present_e) {
7452
        if (!(this_present_e && that_present_e))
7453
          return false;
7454
        if (!this.e.equals(that.e))
7455
          return false;
7456
      }
7457
 
7458
      return true;
7459
    }
7460
 
7461
    @Override
7462
    public int hashCode() {
7463
      return 0;
7464
    }
7465
 
7466
    public int compareTo(getPendingPurchaseOrders_result other) {
7467
      if (!getClass().equals(other.getClass())) {
7468
        return getClass().getName().compareTo(other.getClass().getName());
7469
      }
7470
 
7471
      int lastComparison = 0;
7472
      getPendingPurchaseOrders_result typedOther = (getPendingPurchaseOrders_result)other;
7473
 
7474
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7475
      if (lastComparison != 0) {
7476
        return lastComparison;
7477
      }
7478
      if (isSetSuccess()) {
7479
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7480
        if (lastComparison != 0) {
7481
          return lastComparison;
7482
        }
7483
      }
7484
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
7485
      if (lastComparison != 0) {
7486
        return lastComparison;
7487
      }
7488
      if (isSetE()) {
7489
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
7490
        if (lastComparison != 0) {
7491
          return lastComparison;
7492
        }
7493
      }
7494
      return 0;
7495
    }
7496
 
7497
    public _Fields fieldForId(int fieldId) {
7498
      return _Fields.findByThriftId(fieldId);
7499
    }
7500
 
7501
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7502
      org.apache.thrift.protocol.TField field;
7503
      iprot.readStructBegin();
7504
      while (true)
7505
      {
7506
        field = iprot.readFieldBegin();
7507
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7508
          break;
7509
        }
7510
        switch (field.id) {
7511
          case 0: // SUCCESS
7512
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7513
              {
7514
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
7515
                this.success = new ArrayList<PurchaseOrder>(_list12.size);
7516
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
7517
                {
7518
                  PurchaseOrder _elem14; // required
7519
                  _elem14 = new PurchaseOrder();
7520
                  _elem14.read(iprot);
7521
                  this.success.add(_elem14);
7522
                }
7523
                iprot.readListEnd();
7524
              }
7525
            } else { 
7526
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7527
            }
7528
            break;
7529
          case 1: // E
7530
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7531
              this.e = new PurchaseServiceException();
7532
              this.e.read(iprot);
7533
            } else { 
7534
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7535
            }
7536
            break;
7537
          default:
7538
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7539
        }
7540
        iprot.readFieldEnd();
7541
      }
7542
      iprot.readStructEnd();
7543
      validate();
7544
    }
7545
 
7546
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7547
      oprot.writeStructBegin(STRUCT_DESC);
7548
 
7549
      if (this.isSetSuccess()) {
7550
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7551
        {
7552
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7553
          for (PurchaseOrder _iter15 : this.success)
7554
          {
7555
            _iter15.write(oprot);
7556
          }
7557
          oprot.writeListEnd();
7558
        }
7559
        oprot.writeFieldEnd();
7560
      } else if (this.isSetE()) {
7561
        oprot.writeFieldBegin(E_FIELD_DESC);
7562
        this.e.write(oprot);
7563
        oprot.writeFieldEnd();
7564
      }
7565
      oprot.writeFieldStop();
7566
      oprot.writeStructEnd();
7567
    }
7568
 
7569
    @Override
7570
    public String toString() {
7571
      StringBuilder sb = new StringBuilder("getPendingPurchaseOrders_result(");
7572
      boolean first = true;
7573
 
7574
      sb.append("success:");
7575
      if (this.success == null) {
7576
        sb.append("null");
7577
      } else {
7578
        sb.append(this.success);
7579
      }
7580
      first = false;
7581
      if (!first) sb.append(", ");
7582
      sb.append("e:");
7583
      if (this.e == null) {
7584
        sb.append("null");
7585
      } else {
7586
        sb.append(this.e);
7587
      }
7588
      first = false;
7589
      sb.append(")");
7590
      return sb.toString();
7591
    }
7592
 
7593
    public void validate() throws org.apache.thrift.TException {
7594
      // check for required fields
7595
    }
7596
 
7597
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7598
      try {
7599
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7600
      } catch (org.apache.thrift.TException te) {
7601
        throw new java.io.IOException(te);
7602
      }
7603
    }
7604
 
7605
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7606
      try {
7607
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7608
      } catch (org.apache.thrift.TException te) {
7609
        throw new java.io.IOException(te);
7610
      }
7611
    }
7612
 
7613
  }
7614
 
7615
  public static class getSuppliers_args implements org.apache.thrift.TBase<getSuppliers_args, getSuppliers_args._Fields>, java.io.Serializable, Cloneable   {
7616
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_args");
7617
 
7618
 
7619
 
7620
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7621
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7622
;
7623
 
7624
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7625
 
7626
      static {
7627
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7628
          byName.put(field.getFieldName(), field);
7629
        }
7630
      }
7631
 
7632
      /**
7633
       * Find the _Fields constant that matches fieldId, or null if its not found.
7634
       */
7635
      public static _Fields findByThriftId(int fieldId) {
7636
        switch(fieldId) {
7637
          default:
7638
            return null;
7639
        }
7640
      }
7641
 
7642
      /**
7643
       * Find the _Fields constant that matches fieldId, throwing an exception
7644
       * if it is not found.
7645
       */
7646
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7647
        _Fields fields = findByThriftId(fieldId);
7648
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7649
        return fields;
7650
      }
7651
 
7652
      /**
7653
       * Find the _Fields constant that matches name, or null if its not found.
7654
       */
7655
      public static _Fields findByName(String name) {
7656
        return byName.get(name);
7657
      }
7658
 
7659
      private final short _thriftId;
7660
      private final String _fieldName;
7661
 
7662
      _Fields(short thriftId, String fieldName) {
7663
        _thriftId = thriftId;
7664
        _fieldName = fieldName;
7665
      }
7666
 
7667
      public short getThriftFieldId() {
7668
        return _thriftId;
7669
      }
7670
 
7671
      public String getFieldName() {
7672
        return _fieldName;
7673
      }
7674
    }
7675
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7676
    static {
7677
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7678
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7679
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_args.class, metaDataMap);
7680
    }
7681
 
7682
    public getSuppliers_args() {
7683
    }
7684
 
7685
    /**
7686
     * Performs a deep copy on <i>other</i>.
7687
     */
7688
    public getSuppliers_args(getSuppliers_args other) {
7689
    }
7690
 
7691
    public getSuppliers_args deepCopy() {
7692
      return new getSuppliers_args(this);
7693
    }
7694
 
7695
    @Override
7696
    public void clear() {
7697
    }
7698
 
7699
    public void setFieldValue(_Fields field, Object value) {
7700
      switch (field) {
7701
      }
7702
    }
7703
 
7704
    public Object getFieldValue(_Fields field) {
7705
      switch (field) {
7706
      }
7707
      throw new IllegalStateException();
7708
    }
7709
 
7710
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7711
    public boolean isSet(_Fields field) {
7712
      if (field == null) {
7713
        throw new IllegalArgumentException();
7714
      }
7715
 
7716
      switch (field) {
7717
      }
7718
      throw new IllegalStateException();
7719
    }
7720
 
7721
    @Override
7722
    public boolean equals(Object that) {
7723
      if (that == null)
7724
        return false;
7725
      if (that instanceof getSuppliers_args)
7726
        return this.equals((getSuppliers_args)that);
7727
      return false;
7728
    }
7729
 
7730
    public boolean equals(getSuppliers_args that) {
7731
      if (that == null)
7732
        return false;
7733
 
7734
      return true;
7735
    }
7736
 
7737
    @Override
7738
    public int hashCode() {
7739
      return 0;
7740
    }
7741
 
7742
    public int compareTo(getSuppliers_args other) {
7743
      if (!getClass().equals(other.getClass())) {
7744
        return getClass().getName().compareTo(other.getClass().getName());
7745
      }
7746
 
7747
      int lastComparison = 0;
7748
      getSuppliers_args typedOther = (getSuppliers_args)other;
7749
 
7750
      return 0;
7751
    }
7752
 
7753
    public _Fields fieldForId(int fieldId) {
7754
      return _Fields.findByThriftId(fieldId);
7755
    }
7756
 
7757
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7758
      org.apache.thrift.protocol.TField field;
7759
      iprot.readStructBegin();
7760
      while (true)
7761
      {
7762
        field = iprot.readFieldBegin();
7763
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7764
          break;
7765
        }
7766
        switch (field.id) {
7767
          default:
7768
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7769
        }
7770
        iprot.readFieldEnd();
7771
      }
7772
      iprot.readStructEnd();
7773
      validate();
7774
    }
7775
 
7776
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7777
      validate();
7778
 
7779
      oprot.writeStructBegin(STRUCT_DESC);
7780
      oprot.writeFieldStop();
7781
      oprot.writeStructEnd();
7782
    }
7783
 
7784
    @Override
7785
    public String toString() {
7786
      StringBuilder sb = new StringBuilder("getSuppliers_args(");
7787
      boolean first = true;
7788
 
7789
      sb.append(")");
7790
      return sb.toString();
7791
    }
7792
 
7793
    public void validate() throws org.apache.thrift.TException {
7794
      // check for required fields
7795
    }
7796
 
7797
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7798
      try {
7799
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7800
      } catch (org.apache.thrift.TException te) {
7801
        throw new java.io.IOException(te);
7802
      }
7803
    }
7804
 
7805
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7806
      try {
7807
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7808
      } catch (org.apache.thrift.TException te) {
7809
        throw new java.io.IOException(te);
7810
      }
7811
    }
7812
 
7813
  }
7814
 
7815
  public static class getSuppliers_result implements org.apache.thrift.TBase<getSuppliers_result, getSuppliers_result._Fields>, java.io.Serializable, Cloneable   {
7816
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuppliers_result");
7817
 
7818
    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);
7819
    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);
7820
 
7821
    private List<Supplier> success; // required
7822
    private PurchaseServiceException e; // required
7823
 
7824
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7825
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7826
      SUCCESS((short)0, "success"),
7827
      E((short)1, "e");
7828
 
7829
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7830
 
7831
      static {
7832
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7833
          byName.put(field.getFieldName(), field);
7834
        }
7835
      }
7836
 
7837
      /**
7838
       * Find the _Fields constant that matches fieldId, or null if its not found.
7839
       */
7840
      public static _Fields findByThriftId(int fieldId) {
7841
        switch(fieldId) {
7842
          case 0: // SUCCESS
7843
            return SUCCESS;
7844
          case 1: // E
7845
            return E;
7846
          default:
7847
            return null;
7848
        }
7849
      }
7850
 
7851
      /**
7852
       * Find the _Fields constant that matches fieldId, throwing an exception
7853
       * if it is not found.
7854
       */
7855
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7856
        _Fields fields = findByThriftId(fieldId);
7857
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7858
        return fields;
7859
      }
7860
 
7861
      /**
7862
       * Find the _Fields constant that matches name, or null if its not found.
7863
       */
7864
      public static _Fields findByName(String name) {
7865
        return byName.get(name);
7866
      }
7867
 
7868
      private final short _thriftId;
7869
      private final String _fieldName;
7870
 
7871
      _Fields(short thriftId, String fieldName) {
7872
        _thriftId = thriftId;
7873
        _fieldName = fieldName;
7874
      }
7875
 
7876
      public short getThriftFieldId() {
7877
        return _thriftId;
7878
      }
7879
 
7880
      public String getFieldName() {
7881
        return _fieldName;
7882
      }
7883
    }
7884
 
7885
    // isset id assignments
7886
 
7887
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7888
    static {
7889
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7890
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7891
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7892
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class))));
7893
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7894
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7895
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7896
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuppliers_result.class, metaDataMap);
7897
    }
7898
 
7899
    public getSuppliers_result() {
7900
    }
7901
 
7902
    public getSuppliers_result(
7903
      List<Supplier> success,
7904
      PurchaseServiceException e)
7905
    {
7906
      this();
7907
      this.success = success;
7908
      this.e = e;
7909
    }
7910
 
7911
    /**
7912
     * Performs a deep copy on <i>other</i>.
7913
     */
7914
    public getSuppliers_result(getSuppliers_result other) {
7915
      if (other.isSetSuccess()) {
7916
        List<Supplier> __this__success = new ArrayList<Supplier>();
7917
        for (Supplier other_element : other.success) {
7918
          __this__success.add(new Supplier(other_element));
7919
        }
7920
        this.success = __this__success;
7921
      }
7922
      if (other.isSetE()) {
7923
        this.e = new PurchaseServiceException(other.e);
7924
      }
7925
    }
7926
 
7927
    public getSuppliers_result deepCopy() {
7928
      return new getSuppliers_result(this);
7929
    }
7930
 
7931
    @Override
7932
    public void clear() {
7933
      this.success = null;
7934
      this.e = null;
7935
    }
7936
 
7937
    public int getSuccessSize() {
7938
      return (this.success == null) ? 0 : this.success.size();
7939
    }
7940
 
7941
    public java.util.Iterator<Supplier> getSuccessIterator() {
7942
      return (this.success == null) ? null : this.success.iterator();
7943
    }
7944
 
7945
    public void addToSuccess(Supplier elem) {
7946
      if (this.success == null) {
7947
        this.success = new ArrayList<Supplier>();
7948
      }
7949
      this.success.add(elem);
7950
    }
7951
 
7952
    public List<Supplier> getSuccess() {
7953
      return this.success;
7954
    }
7955
 
7956
    public void setSuccess(List<Supplier> success) {
7957
      this.success = success;
7958
    }
7959
 
7960
    public void unsetSuccess() {
7961
      this.success = null;
7962
    }
7963
 
7964
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7965
    public boolean isSetSuccess() {
7966
      return this.success != null;
7967
    }
7968
 
7969
    public void setSuccessIsSet(boolean value) {
7970
      if (!value) {
7971
        this.success = null;
7972
      }
7973
    }
7974
 
7975
    public PurchaseServiceException getE() {
7976
      return this.e;
7977
    }
7978
 
7979
    public void setE(PurchaseServiceException e) {
7980
      this.e = e;
7981
    }
7982
 
7983
    public void unsetE() {
7984
      this.e = null;
7985
    }
7986
 
7987
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
7988
    public boolean isSetE() {
7989
      return this.e != null;
7990
    }
7991
 
7992
    public void setEIsSet(boolean value) {
7993
      if (!value) {
7994
        this.e = null;
7995
      }
7996
    }
7997
 
7998
    public void setFieldValue(_Fields field, Object value) {
7999
      switch (field) {
8000
      case SUCCESS:
8001
        if (value == null) {
8002
          unsetSuccess();
8003
        } else {
8004
          setSuccess((List<Supplier>)value);
8005
        }
8006
        break;
8007
 
8008
      case E:
8009
        if (value == null) {
8010
          unsetE();
8011
        } else {
8012
          setE((PurchaseServiceException)value);
8013
        }
8014
        break;
8015
 
8016
      }
8017
    }
8018
 
8019
    public Object getFieldValue(_Fields field) {
8020
      switch (field) {
8021
      case SUCCESS:
8022
        return getSuccess();
8023
 
8024
      case E:
8025
        return getE();
8026
 
8027
      }
8028
      throw new IllegalStateException();
8029
    }
8030
 
8031
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8032
    public boolean isSet(_Fields field) {
8033
      if (field == null) {
8034
        throw new IllegalArgumentException();
8035
      }
8036
 
8037
      switch (field) {
8038
      case SUCCESS:
8039
        return isSetSuccess();
8040
      case E:
8041
        return isSetE();
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_result)
8051
        return this.equals((getSuppliers_result)that);
8052
      return false;
8053
    }
8054
 
8055
    public boolean equals(getSuppliers_result that) {
8056
      if (that == null)
8057
        return false;
8058
 
8059
      boolean this_present_success = true && this.isSetSuccess();
8060
      boolean that_present_success = true && that.isSetSuccess();
8061
      if (this_present_success || that_present_success) {
8062
        if (!(this_present_success && that_present_success))
8063
          return false;
8064
        if (!this.success.equals(that.success))
8065
          return false;
8066
      }
8067
 
8068
      boolean this_present_e = true && this.isSetE();
8069
      boolean that_present_e = true && that.isSetE();
8070
      if (this_present_e || that_present_e) {
8071
        if (!(this_present_e && that_present_e))
8072
          return false;
8073
        if (!this.e.equals(that.e))
8074
          return false;
8075
      }
8076
 
8077
      return true;
8078
    }
8079
 
8080
    @Override
8081
    public int hashCode() {
8082
      return 0;
8083
    }
8084
 
8085
    public int compareTo(getSuppliers_result other) {
8086
      if (!getClass().equals(other.getClass())) {
8087
        return getClass().getName().compareTo(other.getClass().getName());
8088
      }
8089
 
8090
      int lastComparison = 0;
8091
      getSuppliers_result typedOther = (getSuppliers_result)other;
8092
 
8093
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8094
      if (lastComparison != 0) {
8095
        return lastComparison;
8096
      }
8097
      if (isSetSuccess()) {
8098
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8099
        if (lastComparison != 0) {
8100
          return lastComparison;
8101
        }
8102
      }
8103
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8104
      if (lastComparison != 0) {
8105
        return lastComparison;
8106
      }
8107
      if (isSetE()) {
8108
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8109
        if (lastComparison != 0) {
8110
          return lastComparison;
8111
        }
8112
      }
8113
      return 0;
8114
    }
8115
 
8116
    public _Fields fieldForId(int fieldId) {
8117
      return _Fields.findByThriftId(fieldId);
8118
    }
8119
 
8120
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8121
      org.apache.thrift.protocol.TField field;
8122
      iprot.readStructBegin();
8123
      while (true)
8124
      {
8125
        field = iprot.readFieldBegin();
8126
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8127
          break;
8128
        }
8129
        switch (field.id) {
8130
          case 0: // SUCCESS
8131
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8132
              {
8133
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
8134
                this.success = new ArrayList<Supplier>(_list16.size);
8135
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
8136
                {
8137
                  Supplier _elem18; // required
8138
                  _elem18 = new Supplier();
8139
                  _elem18.read(iprot);
8140
                  this.success.add(_elem18);
8141
                }
8142
                iprot.readListEnd();
8143
              }
8144
            } else { 
8145
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8146
            }
8147
            break;
8148
          case 1: // E
8149
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8150
              this.e = new PurchaseServiceException();
8151
              this.e.read(iprot);
8152
            } else { 
8153
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8154
            }
8155
            break;
8156
          default:
8157
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8158
        }
8159
        iprot.readFieldEnd();
8160
      }
8161
      iprot.readStructEnd();
8162
      validate();
8163
    }
8164
 
8165
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8166
      oprot.writeStructBegin(STRUCT_DESC);
8167
 
8168
      if (this.isSetSuccess()) {
8169
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8170
        {
8171
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
8172
          for (Supplier _iter19 : this.success)
8173
          {
8174
            _iter19.write(oprot);
8175
          }
8176
          oprot.writeListEnd();
8177
        }
8178
        oprot.writeFieldEnd();
8179
      } else if (this.isSetE()) {
8180
        oprot.writeFieldBegin(E_FIELD_DESC);
8181
        this.e.write(oprot);
8182
        oprot.writeFieldEnd();
8183
      }
8184
      oprot.writeFieldStop();
8185
      oprot.writeStructEnd();
8186
    }
8187
 
8188
    @Override
8189
    public String toString() {
8190
      StringBuilder sb = new StringBuilder("getSuppliers_result(");
8191
      boolean first = true;
8192
 
8193
      sb.append("success:");
8194
      if (this.success == null) {
8195
        sb.append("null");
8196
      } else {
8197
        sb.append(this.success);
8198
      }
8199
      first = false;
8200
      if (!first) sb.append(", ");
8201
      sb.append("e:");
8202
      if (this.e == null) {
8203
        sb.append("null");
8204
      } else {
8205
        sb.append(this.e);
8206
      }
8207
      first = false;
8208
      sb.append(")");
8209
      return sb.toString();
8210
    }
8211
 
8212
    public void validate() throws org.apache.thrift.TException {
8213
      // check for required fields
8214
    }
8215
 
8216
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8217
      try {
8218
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8219
      } catch (org.apache.thrift.TException te) {
8220
        throw new java.io.IOException(te);
8221
      }
8222
    }
8223
 
8224
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8225
      try {
8226
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8227
      } catch (org.apache.thrift.TException te) {
8228
        throw new java.io.IOException(te);
8229
      }
8230
    }
8231
 
8232
  }
8233
 
8234
  public static class fulfillPO_args implements org.apache.thrift.TBase<fulfillPO_args, fulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
8235
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_args");
8236
 
8237
    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);
8238
    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);
8239
    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);
8240
 
8241
    private long purchaseOrderId; // required
8242
    private long itemId; // required
8243
    private long quantity; // required
8244
 
8245
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8246
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8247
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
8248
      ITEM_ID((short)2, "itemId"),
8249
      QUANTITY((short)3, "quantity");
8250
 
8251
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8252
 
8253
      static {
8254
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8255
          byName.put(field.getFieldName(), field);
8256
        }
8257
      }
8258
 
8259
      /**
8260
       * Find the _Fields constant that matches fieldId, or null if its not found.
8261
       */
8262
      public static _Fields findByThriftId(int fieldId) {
8263
        switch(fieldId) {
8264
          case 1: // PURCHASE_ORDER_ID
8265
            return PURCHASE_ORDER_ID;
8266
          case 2: // ITEM_ID
8267
            return ITEM_ID;
8268
          case 3: // QUANTITY
8269
            return QUANTITY;
8270
          default:
8271
            return null;
8272
        }
8273
      }
8274
 
8275
      /**
8276
       * Find the _Fields constant that matches fieldId, throwing an exception
8277
       * if it is not found.
8278
       */
8279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8280
        _Fields fields = findByThriftId(fieldId);
8281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8282
        return fields;
8283
      }
8284
 
8285
      /**
8286
       * Find the _Fields constant that matches name, or null if its not found.
8287
       */
8288
      public static _Fields findByName(String name) {
8289
        return byName.get(name);
8290
      }
8291
 
8292
      private final short _thriftId;
8293
      private final String _fieldName;
8294
 
8295
      _Fields(short thriftId, String fieldName) {
8296
        _thriftId = thriftId;
8297
        _fieldName = fieldName;
8298
      }
8299
 
8300
      public short getThriftFieldId() {
8301
        return _thriftId;
8302
      }
8303
 
8304
      public String getFieldName() {
8305
        return _fieldName;
8306
      }
8307
    }
8308
 
8309
    // isset id assignments
8310
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
8311
    private static final int __ITEMID_ISSET_ID = 1;
8312
    private static final int __QUANTITY_ISSET_ID = 2;
8313
    private BitSet __isset_bit_vector = new BitSet(3);
8314
 
8315
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8316
    static {
8317
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8318
      tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8319
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8320
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8321
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8322
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8323
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8324
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8325
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_args.class, metaDataMap);
8326
    }
8327
 
8328
    public fulfillPO_args() {
8329
    }
8330
 
8331
    public fulfillPO_args(
8332
      long purchaseOrderId,
8333
      long itemId,
8334
      long quantity)
8335
    {
8336
      this();
8337
      this.purchaseOrderId = purchaseOrderId;
8338
      setPurchaseOrderIdIsSet(true);
8339
      this.itemId = itemId;
8340
      setItemIdIsSet(true);
8341
      this.quantity = quantity;
8342
      setQuantityIsSet(true);
8343
    }
8344
 
8345
    /**
8346
     * Performs a deep copy on <i>other</i>.
8347
     */
8348
    public fulfillPO_args(fulfillPO_args other) {
8349
      __isset_bit_vector.clear();
8350
      __isset_bit_vector.or(other.__isset_bit_vector);
8351
      this.purchaseOrderId = other.purchaseOrderId;
8352
      this.itemId = other.itemId;
8353
      this.quantity = other.quantity;
8354
    }
8355
 
8356
    public fulfillPO_args deepCopy() {
8357
      return new fulfillPO_args(this);
8358
    }
8359
 
8360
    @Override
8361
    public void clear() {
8362
      setPurchaseOrderIdIsSet(false);
8363
      this.purchaseOrderId = 0;
8364
      setItemIdIsSet(false);
8365
      this.itemId = 0;
8366
      setQuantityIsSet(false);
8367
      this.quantity = 0;
8368
    }
8369
 
8370
    public long getPurchaseOrderId() {
8371
      return this.purchaseOrderId;
8372
    }
8373
 
8374
    public void setPurchaseOrderId(long purchaseOrderId) {
8375
      this.purchaseOrderId = purchaseOrderId;
8376
      setPurchaseOrderIdIsSet(true);
8377
    }
8378
 
8379
    public void unsetPurchaseOrderId() {
8380
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
8381
    }
8382
 
8383
    /** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */
8384
    public boolean isSetPurchaseOrderId() {
8385
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
8386
    }
8387
 
8388
    public void setPurchaseOrderIdIsSet(boolean value) {
8389
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
8390
    }
8391
 
8392
    public long getItemId() {
8393
      return this.itemId;
8394
    }
8395
 
8396
    public void setItemId(long itemId) {
8397
      this.itemId = itemId;
8398
      setItemIdIsSet(true);
8399
    }
8400
 
8401
    public void unsetItemId() {
8402
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
8403
    }
8404
 
8405
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
8406
    public boolean isSetItemId() {
8407
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
8408
    }
8409
 
8410
    public void setItemIdIsSet(boolean value) {
8411
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
8412
    }
8413
 
8414
    public long getQuantity() {
8415
      return this.quantity;
8416
    }
8417
 
8418
    public void setQuantity(long quantity) {
8419
      this.quantity = quantity;
8420
      setQuantityIsSet(true);
8421
    }
8422
 
8423
    public void unsetQuantity() {
8424
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
8425
    }
8426
 
8427
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
8428
    public boolean isSetQuantity() {
8429
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
8430
    }
8431
 
8432
    public void setQuantityIsSet(boolean value) {
8433
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
8434
    }
8435
 
8436
    public void setFieldValue(_Fields field, Object value) {
8437
      switch (field) {
8438
      case PURCHASE_ORDER_ID:
8439
        if (value == null) {
8440
          unsetPurchaseOrderId();
8441
        } else {
8442
          setPurchaseOrderId((Long)value);
8443
        }
8444
        break;
8445
 
8446
      case ITEM_ID:
8447
        if (value == null) {
8448
          unsetItemId();
8449
        } else {
8450
          setItemId((Long)value);
8451
        }
8452
        break;
8453
 
8454
      case QUANTITY:
8455
        if (value == null) {
8456
          unsetQuantity();
8457
        } else {
8458
          setQuantity((Long)value);
8459
        }
8460
        break;
8461
 
8462
      }
8463
    }
8464
 
8465
    public Object getFieldValue(_Fields field) {
8466
      switch (field) {
8467
      case PURCHASE_ORDER_ID:
8468
        return Long.valueOf(getPurchaseOrderId());
8469
 
8470
      case ITEM_ID:
8471
        return Long.valueOf(getItemId());
8472
 
8473
      case QUANTITY:
8474
        return Long.valueOf(getQuantity());
8475
 
8476
      }
8477
      throw new IllegalStateException();
8478
    }
8479
 
8480
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8481
    public boolean isSet(_Fields field) {
8482
      if (field == null) {
8483
        throw new IllegalArgumentException();
8484
      }
8485
 
8486
      switch (field) {
8487
      case PURCHASE_ORDER_ID:
8488
        return isSetPurchaseOrderId();
8489
      case ITEM_ID:
8490
        return isSetItemId();
8491
      case QUANTITY:
8492
        return isSetQuantity();
8493
      }
8494
      throw new IllegalStateException();
8495
    }
8496
 
8497
    @Override
8498
    public boolean equals(Object that) {
8499
      if (that == null)
8500
        return false;
8501
      if (that instanceof fulfillPO_args)
8502
        return this.equals((fulfillPO_args)that);
8503
      return false;
8504
    }
8505
 
8506
    public boolean equals(fulfillPO_args that) {
8507
      if (that == null)
8508
        return false;
8509
 
8510
      boolean this_present_purchaseOrderId = true;
8511
      boolean that_present_purchaseOrderId = true;
8512
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
8513
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
8514
          return false;
8515
        if (this.purchaseOrderId != that.purchaseOrderId)
8516
          return false;
8517
      }
8518
 
8519
      boolean this_present_itemId = true;
8520
      boolean that_present_itemId = true;
8521
      if (this_present_itemId || that_present_itemId) {
8522
        if (!(this_present_itemId && that_present_itemId))
8523
          return false;
8524
        if (this.itemId != that.itemId)
8525
          return false;
8526
      }
8527
 
8528
      boolean this_present_quantity = true;
8529
      boolean that_present_quantity = true;
8530
      if (this_present_quantity || that_present_quantity) {
8531
        if (!(this_present_quantity && that_present_quantity))
8532
          return false;
8533
        if (this.quantity != that.quantity)
8534
          return false;
8535
      }
8536
 
8537
      return true;
8538
    }
8539
 
8540
    @Override
8541
    public int hashCode() {
8542
      return 0;
8543
    }
8544
 
8545
    public int compareTo(fulfillPO_args other) {
8546
      if (!getClass().equals(other.getClass())) {
8547
        return getClass().getName().compareTo(other.getClass().getName());
8548
      }
8549
 
8550
      int lastComparison = 0;
8551
      fulfillPO_args typedOther = (fulfillPO_args)other;
8552
 
8553
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());
8554
      if (lastComparison != 0) {
8555
        return lastComparison;
8556
      }
8557
      if (isSetPurchaseOrderId()) {
8558
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);
8559
        if (lastComparison != 0) {
8560
          return lastComparison;
8561
        }
8562
      }
8563
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
8564
      if (lastComparison != 0) {
8565
        return lastComparison;
8566
      }
8567
      if (isSetItemId()) {
8568
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
8569
        if (lastComparison != 0) {
8570
          return lastComparison;
8571
        }
8572
      }
8573
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
8574
      if (lastComparison != 0) {
8575
        return lastComparison;
8576
      }
8577
      if (isSetQuantity()) {
8578
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
8579
        if (lastComparison != 0) {
8580
          return lastComparison;
8581
        }
8582
      }
8583
      return 0;
8584
    }
8585
 
8586
    public _Fields fieldForId(int fieldId) {
8587
      return _Fields.findByThriftId(fieldId);
8588
    }
8589
 
8590
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8591
      org.apache.thrift.protocol.TField field;
8592
      iprot.readStructBegin();
8593
      while (true)
8594
      {
8595
        field = iprot.readFieldBegin();
8596
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8597
          break;
8598
        }
8599
        switch (field.id) {
8600
          case 1: // PURCHASE_ORDER_ID
8601
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8602
              this.purchaseOrderId = iprot.readI64();
8603
              setPurchaseOrderIdIsSet(true);
8604
            } else { 
8605
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8606
            }
8607
            break;
8608
          case 2: // ITEM_ID
8609
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8610
              this.itemId = iprot.readI64();
8611
              setItemIdIsSet(true);
8612
            } else { 
8613
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8614
            }
8615
            break;
8616
          case 3: // QUANTITY
8617
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8618
              this.quantity = iprot.readI64();
8619
              setQuantityIsSet(true);
8620
            } else { 
8621
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8622
            }
8623
            break;
8624
          default:
8625
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8626
        }
8627
        iprot.readFieldEnd();
8628
      }
8629
      iprot.readStructEnd();
8630
      validate();
8631
    }
8632
 
8633
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8634
      validate();
8635
 
8636
      oprot.writeStructBegin(STRUCT_DESC);
8637
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
8638
      oprot.writeI64(this.purchaseOrderId);
8639
      oprot.writeFieldEnd();
8640
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
8641
      oprot.writeI64(this.itemId);
8642
      oprot.writeFieldEnd();
8643
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
8644
      oprot.writeI64(this.quantity);
8645
      oprot.writeFieldEnd();
8646
      oprot.writeFieldStop();
8647
      oprot.writeStructEnd();
8648
    }
8649
 
8650
    @Override
8651
    public String toString() {
8652
      StringBuilder sb = new StringBuilder("fulfillPO_args(");
8653
      boolean first = true;
8654
 
8655
      sb.append("purchaseOrderId:");
8656
      sb.append(this.purchaseOrderId);
8657
      first = false;
8658
      if (!first) sb.append(", ");
8659
      sb.append("itemId:");
8660
      sb.append(this.itemId);
8661
      first = false;
8662
      if (!first) sb.append(", ");
8663
      sb.append("quantity:");
8664
      sb.append(this.quantity);
8665
      first = false;
8666
      sb.append(")");
8667
      return sb.toString();
8668
    }
8669
 
8670
    public void validate() throws org.apache.thrift.TException {
8671
      // check for required fields
8672
    }
8673
 
8674
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8675
      try {
8676
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8677
      } catch (org.apache.thrift.TException te) {
8678
        throw new java.io.IOException(te);
8679
      }
8680
    }
8681
 
8682
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8683
      try {
8684
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8685
        __isset_bit_vector = new BitSet(1);
8686
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8687
      } catch (org.apache.thrift.TException te) {
8688
        throw new java.io.IOException(te);
8689
      }
8690
    }
8691
 
8692
  }
8693
 
8694
  public static class fulfillPO_result implements org.apache.thrift.TBase<fulfillPO_result, fulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
8695
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fulfillPO_result");
8696
 
8697
    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);
8698
 
8699
    private PurchaseServiceException e; // required
8700
 
8701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8702
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8703
      E((short)1, "e");
8704
 
8705
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8706
 
8707
      static {
8708
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8709
          byName.put(field.getFieldName(), field);
8710
        }
8711
      }
8712
 
8713
      /**
8714
       * Find the _Fields constant that matches fieldId, or null if its not found.
8715
       */
8716
      public static _Fields findByThriftId(int fieldId) {
8717
        switch(fieldId) {
8718
          case 1: // E
8719
            return E;
8720
          default:
8721
            return null;
8722
        }
8723
      }
8724
 
8725
      /**
8726
       * Find the _Fields constant that matches fieldId, throwing an exception
8727
       * if it is not found.
8728
       */
8729
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8730
        _Fields fields = findByThriftId(fieldId);
8731
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8732
        return fields;
8733
      }
8734
 
8735
      /**
8736
       * Find the _Fields constant that matches name, or null if its not found.
8737
       */
8738
      public static _Fields findByName(String name) {
8739
        return byName.get(name);
8740
      }
8741
 
8742
      private final short _thriftId;
8743
      private final String _fieldName;
8744
 
8745
      _Fields(short thriftId, String fieldName) {
8746
        _thriftId = thriftId;
8747
        _fieldName = fieldName;
8748
      }
8749
 
8750
      public short getThriftFieldId() {
8751
        return _thriftId;
8752
      }
8753
 
8754
      public String getFieldName() {
8755
        return _fieldName;
8756
      }
8757
    }
8758
 
8759
    // isset id assignments
8760
 
8761
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8762
    static {
8763
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8764
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8766
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8767
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fulfillPO_result.class, metaDataMap);
8768
    }
8769
 
8770
    public fulfillPO_result() {
8771
    }
8772
 
8773
    public fulfillPO_result(
8774
      PurchaseServiceException e)
8775
    {
8776
      this();
8777
      this.e = e;
8778
    }
8779
 
8780
    /**
8781
     * Performs a deep copy on <i>other</i>.
8782
     */
8783
    public fulfillPO_result(fulfillPO_result other) {
8784
      if (other.isSetE()) {
8785
        this.e = new PurchaseServiceException(other.e);
8786
      }
8787
    }
8788
 
8789
    public fulfillPO_result deepCopy() {
8790
      return new fulfillPO_result(this);
8791
    }
8792
 
8793
    @Override
8794
    public void clear() {
8795
      this.e = null;
8796
    }
8797
 
8798
    public PurchaseServiceException getE() {
8799
      return this.e;
8800
    }
8801
 
8802
    public void setE(PurchaseServiceException e) {
8803
      this.e = e;
8804
    }
8805
 
8806
    public void unsetE() {
8807
      this.e = null;
8808
    }
8809
 
8810
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
8811
    public boolean isSetE() {
8812
      return this.e != null;
8813
    }
8814
 
8815
    public void setEIsSet(boolean value) {
8816
      if (!value) {
8817
        this.e = null;
8818
      }
8819
    }
8820
 
8821
    public void setFieldValue(_Fields field, Object value) {
8822
      switch (field) {
8823
      case E:
8824
        if (value == null) {
8825
          unsetE();
8826
        } else {
8827
          setE((PurchaseServiceException)value);
8828
        }
8829
        break;
8830
 
8831
      }
8832
    }
8833
 
8834
    public Object getFieldValue(_Fields field) {
8835
      switch (field) {
8836
      case E:
8837
        return getE();
8838
 
8839
      }
8840
      throw new IllegalStateException();
8841
    }
8842
 
8843
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8844
    public boolean isSet(_Fields field) {
8845
      if (field == null) {
8846
        throw new IllegalArgumentException();
8847
      }
8848
 
8849
      switch (field) {
8850
      case E:
8851
        return isSetE();
8852
      }
8853
      throw new IllegalStateException();
8854
    }
8855
 
8856
    @Override
8857
    public boolean equals(Object that) {
8858
      if (that == null)
8859
        return false;
8860
      if (that instanceof fulfillPO_result)
8861
        return this.equals((fulfillPO_result)that);
8862
      return false;
8863
    }
8864
 
8865
    public boolean equals(fulfillPO_result that) {
8866
      if (that == null)
8867
        return false;
8868
 
8869
      boolean this_present_e = true && this.isSetE();
8870
      boolean that_present_e = true && that.isSetE();
8871
      if (this_present_e || that_present_e) {
8872
        if (!(this_present_e && that_present_e))
8873
          return false;
8874
        if (!this.e.equals(that.e))
8875
          return false;
8876
      }
8877
 
8878
      return true;
8879
    }
8880
 
8881
    @Override
8882
    public int hashCode() {
8883
      return 0;
8884
    }
8885
 
8886
    public int compareTo(fulfillPO_result other) {
8887
      if (!getClass().equals(other.getClass())) {
8888
        return getClass().getName().compareTo(other.getClass().getName());
8889
      }
8890
 
8891
      int lastComparison = 0;
8892
      fulfillPO_result typedOther = (fulfillPO_result)other;
8893
 
8894
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
8895
      if (lastComparison != 0) {
8896
        return lastComparison;
8897
      }
8898
      if (isSetE()) {
8899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
8900
        if (lastComparison != 0) {
8901
          return lastComparison;
8902
        }
8903
      }
8904
      return 0;
8905
    }
8906
 
8907
    public _Fields fieldForId(int fieldId) {
8908
      return _Fields.findByThriftId(fieldId);
8909
    }
8910
 
8911
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8912
      org.apache.thrift.protocol.TField field;
8913
      iprot.readStructBegin();
8914
      while (true)
8915
      {
8916
        field = iprot.readFieldBegin();
8917
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8918
          break;
8919
        }
8920
        switch (field.id) {
8921
          case 1: // E
8922
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8923
              this.e = new PurchaseServiceException();
8924
              this.e.read(iprot);
8925
            } else { 
8926
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8927
            }
8928
            break;
8929
          default:
8930
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8931
        }
8932
        iprot.readFieldEnd();
8933
      }
8934
      iprot.readStructEnd();
8935
      validate();
8936
    }
8937
 
8938
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8939
      oprot.writeStructBegin(STRUCT_DESC);
8940
 
8941
      if (this.isSetE()) {
8942
        oprot.writeFieldBegin(E_FIELD_DESC);
8943
        this.e.write(oprot);
8944
        oprot.writeFieldEnd();
8945
      }
8946
      oprot.writeFieldStop();
8947
      oprot.writeStructEnd();
8948
    }
8949
 
8950
    @Override
8951
    public String toString() {
8952
      StringBuilder sb = new StringBuilder("fulfillPO_result(");
8953
      boolean first = true;
8954
 
8955
      sb.append("e:");
8956
      if (this.e == null) {
8957
        sb.append("null");
8958
      } else {
8959
        sb.append(this.e);
8960
      }
8961
      first = false;
8962
      sb.append(")");
8963
      return sb.toString();
8964
    }
8965
 
8966
    public void validate() throws org.apache.thrift.TException {
8967
      // check for required fields
8968
    }
8969
 
8970
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8971
      try {
8972
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8973
      } catch (org.apache.thrift.TException te) {
8974
        throw new java.io.IOException(te);
8975
      }
8976
    }
8977
 
8978
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8979
      try {
8980
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8981
      } catch (org.apache.thrift.TException te) {
8982
        throw new java.io.IOException(te);
8983
      }
8984
    }
8985
 
8986
  }
8987
 
8988
  public static class updatePurchaseOrder_args implements org.apache.thrift.TBase<updatePurchaseOrder_args, updatePurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
8989
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_args");
8990
 
8991
    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);
8992
 
8993
    private PurchaseOrder purchaseOrder; // required
8994
 
8995
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8996
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8997
      PURCHASE_ORDER((short)1, "purchaseOrder");
8998
 
8999
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9000
 
9001
      static {
9002
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9003
          byName.put(field.getFieldName(), field);
9004
        }
9005
      }
9006
 
9007
      /**
9008
       * Find the _Fields constant that matches fieldId, or null if its not found.
9009
       */
9010
      public static _Fields findByThriftId(int fieldId) {
9011
        switch(fieldId) {
9012
          case 1: // PURCHASE_ORDER
9013
            return PURCHASE_ORDER;
9014
          default:
9015
            return null;
9016
        }
9017
      }
9018
 
9019
      /**
9020
       * Find the _Fields constant that matches fieldId, throwing an exception
9021
       * if it is not found.
9022
       */
9023
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9024
        _Fields fields = findByThriftId(fieldId);
9025
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9026
        return fields;
9027
      }
9028
 
9029
      /**
9030
       * Find the _Fields constant that matches name, or null if its not found.
9031
       */
9032
      public static _Fields findByName(String name) {
9033
        return byName.get(name);
9034
      }
9035
 
9036
      private final short _thriftId;
9037
      private final String _fieldName;
9038
 
9039
      _Fields(short thriftId, String fieldName) {
9040
        _thriftId = thriftId;
9041
        _fieldName = fieldName;
9042
      }
9043
 
9044
      public short getThriftFieldId() {
9045
        return _thriftId;
9046
      }
9047
 
9048
      public String getFieldName() {
9049
        return _fieldName;
9050
      }
9051
    }
9052
 
9053
    // isset id assignments
9054
 
9055
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9056
    static {
9057
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9058
      tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9059
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));
9060
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9061
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_args.class, metaDataMap);
9062
    }
9063
 
9064
    public updatePurchaseOrder_args() {
9065
    }
9066
 
9067
    public updatePurchaseOrder_args(
9068
      PurchaseOrder purchaseOrder)
9069
    {
9070
      this();
9071
      this.purchaseOrder = purchaseOrder;
9072
    }
9073
 
9074
    /**
9075
     * Performs a deep copy on <i>other</i>.
9076
     */
9077
    public updatePurchaseOrder_args(updatePurchaseOrder_args other) {
9078
      if (other.isSetPurchaseOrder()) {
9079
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
9080
      }
9081
    }
9082
 
9083
    public updatePurchaseOrder_args deepCopy() {
9084
      return new updatePurchaseOrder_args(this);
9085
    }
9086
 
9087
    @Override
9088
    public void clear() {
9089
      this.purchaseOrder = null;
9090
    }
9091
 
9092
    public PurchaseOrder getPurchaseOrder() {
9093
      return this.purchaseOrder;
9094
    }
9095
 
9096
    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
9097
      this.purchaseOrder = purchaseOrder;
9098
    }
9099
 
9100
    public void unsetPurchaseOrder() {
9101
      this.purchaseOrder = null;
9102
    }
9103
 
9104
    /** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */
9105
    public boolean isSetPurchaseOrder() {
9106
      return this.purchaseOrder != null;
9107
    }
9108
 
9109
    public void setPurchaseOrderIsSet(boolean value) {
9110
      if (!value) {
9111
        this.purchaseOrder = null;
9112
      }
9113
    }
9114
 
9115
    public void setFieldValue(_Fields field, Object value) {
9116
      switch (field) {
9117
      case PURCHASE_ORDER:
9118
        if (value == null) {
9119
          unsetPurchaseOrder();
9120
        } else {
9121
          setPurchaseOrder((PurchaseOrder)value);
9122
        }
9123
        break;
9124
 
9125
      }
9126
    }
9127
 
9128
    public Object getFieldValue(_Fields field) {
9129
      switch (field) {
9130
      case PURCHASE_ORDER:
9131
        return getPurchaseOrder();
9132
 
9133
      }
9134
      throw new IllegalStateException();
9135
    }
9136
 
9137
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9138
    public boolean isSet(_Fields field) {
9139
      if (field == null) {
9140
        throw new IllegalArgumentException();
9141
      }
9142
 
9143
      switch (field) {
9144
      case PURCHASE_ORDER:
9145
        return isSetPurchaseOrder();
9146
      }
9147
      throw new IllegalStateException();
9148
    }
9149
 
9150
    @Override
9151
    public boolean equals(Object that) {
9152
      if (that == null)
9153
        return false;
9154
      if (that instanceof updatePurchaseOrder_args)
9155
        return this.equals((updatePurchaseOrder_args)that);
9156
      return false;
9157
    }
9158
 
9159
    public boolean equals(updatePurchaseOrder_args that) {
9160
      if (that == null)
9161
        return false;
9162
 
9163
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
9164
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
9165
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
9166
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
9167
          return false;
9168
        if (!this.purchaseOrder.equals(that.purchaseOrder))
9169
          return false;
9170
      }
9171
 
9172
      return true;
9173
    }
9174
 
9175
    @Override
9176
    public int hashCode() {
9177
      return 0;
9178
    }
9179
 
9180
    public int compareTo(updatePurchaseOrder_args other) {
9181
      if (!getClass().equals(other.getClass())) {
9182
        return getClass().getName().compareTo(other.getClass().getName());
9183
      }
9184
 
9185
      int lastComparison = 0;
9186
      updatePurchaseOrder_args typedOther = (updatePurchaseOrder_args)other;
9187
 
9188
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());
9189
      if (lastComparison != 0) {
9190
        return lastComparison;
9191
      }
9192
      if (isSetPurchaseOrder()) {
9193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);
9194
        if (lastComparison != 0) {
9195
          return lastComparison;
9196
        }
9197
      }
9198
      return 0;
9199
    }
9200
 
9201
    public _Fields fieldForId(int fieldId) {
9202
      return _Fields.findByThriftId(fieldId);
9203
    }
9204
 
9205
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9206
      org.apache.thrift.protocol.TField field;
9207
      iprot.readStructBegin();
9208
      while (true)
9209
      {
9210
        field = iprot.readFieldBegin();
9211
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9212
          break;
9213
        }
9214
        switch (field.id) {
9215
          case 1: // PURCHASE_ORDER
9216
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9217
              this.purchaseOrder = new PurchaseOrder();
9218
              this.purchaseOrder.read(iprot);
9219
            } else { 
9220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9221
            }
9222
            break;
9223
          default:
9224
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9225
        }
9226
        iprot.readFieldEnd();
9227
      }
9228
      iprot.readStructEnd();
9229
      validate();
9230
    }
9231
 
9232
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9233
      validate();
9234
 
9235
      oprot.writeStructBegin(STRUCT_DESC);
9236
      if (this.purchaseOrder != null) {
9237
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
9238
        this.purchaseOrder.write(oprot);
9239
        oprot.writeFieldEnd();
9240
      }
9241
      oprot.writeFieldStop();
9242
      oprot.writeStructEnd();
9243
    }
9244
 
9245
    @Override
9246
    public String toString() {
9247
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_args(");
9248
      boolean first = true;
9249
 
9250
      sb.append("purchaseOrder:");
9251
      if (this.purchaseOrder == null) {
9252
        sb.append("null");
9253
      } else {
9254
        sb.append(this.purchaseOrder);
9255
      }
9256
      first = false;
9257
      sb.append(")");
9258
      return sb.toString();
9259
    }
9260
 
9261
    public void validate() throws org.apache.thrift.TException {
9262
      // check for required fields
9263
    }
9264
 
9265
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9266
      try {
9267
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9268
      } catch (org.apache.thrift.TException te) {
9269
        throw new java.io.IOException(te);
9270
      }
9271
    }
9272
 
9273
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9274
      try {
9275
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9276
      } catch (org.apache.thrift.TException te) {
9277
        throw new java.io.IOException(te);
9278
      }
9279
    }
9280
 
9281
  }
9282
 
9283
  public static class updatePurchaseOrder_result implements org.apache.thrift.TBase<updatePurchaseOrder_result, updatePurchaseOrder_result._Fields>, java.io.Serializable, Cloneable   {
9284
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePurchaseOrder_result");
9285
 
9286
    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);
9287
 
9288
    private PurchaseServiceException e; // required
9289
 
9290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9291
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9292
      E((short)1, "e");
9293
 
9294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9295
 
9296
      static {
9297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9298
          byName.put(field.getFieldName(), field);
9299
        }
9300
      }
9301
 
9302
      /**
9303
       * Find the _Fields constant that matches fieldId, or null if its not found.
9304
       */
9305
      public static _Fields findByThriftId(int fieldId) {
9306
        switch(fieldId) {
9307
          case 1: // E
9308
            return E;
9309
          default:
9310
            return null;
9311
        }
9312
      }
9313
 
9314
      /**
9315
       * Find the _Fields constant that matches fieldId, throwing an exception
9316
       * if it is not found.
9317
       */
9318
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9319
        _Fields fields = findByThriftId(fieldId);
9320
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9321
        return fields;
9322
      }
9323
 
9324
      /**
9325
       * Find the _Fields constant that matches name, or null if its not found.
9326
       */
9327
      public static _Fields findByName(String name) {
9328
        return byName.get(name);
9329
      }
9330
 
9331
      private final short _thriftId;
9332
      private final String _fieldName;
9333
 
9334
      _Fields(short thriftId, String fieldName) {
9335
        _thriftId = thriftId;
9336
        _fieldName = fieldName;
9337
      }
9338
 
9339
      public short getThriftFieldId() {
9340
        return _thriftId;
9341
      }
9342
 
9343
      public String getFieldName() {
9344
        return _fieldName;
9345
      }
9346
    }
9347
 
9348
    // isset id assignments
9349
 
9350
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9351
    static {
9352
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9353
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9354
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9355
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9356
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePurchaseOrder_result.class, metaDataMap);
9357
    }
9358
 
9359
    public updatePurchaseOrder_result() {
9360
    }
9361
 
9362
    public updatePurchaseOrder_result(
9363
      PurchaseServiceException e)
9364
    {
9365
      this();
9366
      this.e = e;
9367
    }
9368
 
9369
    /**
9370
     * Performs a deep copy on <i>other</i>.
9371
     */
9372
    public updatePurchaseOrder_result(updatePurchaseOrder_result other) {
9373
      if (other.isSetE()) {
9374
        this.e = new PurchaseServiceException(other.e);
9375
      }
9376
    }
9377
 
9378
    public updatePurchaseOrder_result deepCopy() {
9379
      return new updatePurchaseOrder_result(this);
9380
    }
9381
 
9382
    @Override
9383
    public void clear() {
9384
      this.e = null;
9385
    }
9386
 
9387
    public PurchaseServiceException getE() {
9388
      return this.e;
9389
    }
9390
 
9391
    public void setE(PurchaseServiceException e) {
9392
      this.e = e;
9393
    }
9394
 
9395
    public void unsetE() {
9396
      this.e = null;
9397
    }
9398
 
9399
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
9400
    public boolean isSetE() {
9401
      return this.e != null;
9402
    }
9403
 
9404
    public void setEIsSet(boolean value) {
9405
      if (!value) {
9406
        this.e = null;
9407
      }
9408
    }
9409
 
9410
    public void setFieldValue(_Fields field, Object value) {
9411
      switch (field) {
9412
      case E:
9413
        if (value == null) {
9414
          unsetE();
9415
        } else {
9416
          setE((PurchaseServiceException)value);
9417
        }
9418
        break;
9419
 
9420
      }
9421
    }
9422
 
9423
    public Object getFieldValue(_Fields field) {
9424
      switch (field) {
9425
      case E:
9426
        return getE();
9427
 
9428
      }
9429
      throw new IllegalStateException();
9430
    }
9431
 
9432
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9433
    public boolean isSet(_Fields field) {
9434
      if (field == null) {
9435
        throw new IllegalArgumentException();
9436
      }
9437
 
9438
      switch (field) {
9439
      case E:
9440
        return isSetE();
9441
      }
9442
      throw new IllegalStateException();
9443
    }
9444
 
9445
    @Override
9446
    public boolean equals(Object that) {
9447
      if (that == null)
9448
        return false;
9449
      if (that instanceof updatePurchaseOrder_result)
9450
        return this.equals((updatePurchaseOrder_result)that);
9451
      return false;
9452
    }
9453
 
9454
    public boolean equals(updatePurchaseOrder_result that) {
9455
      if (that == null)
9456
        return false;
9457
 
9458
      boolean this_present_e = true && this.isSetE();
9459
      boolean that_present_e = true && that.isSetE();
9460
      if (this_present_e || that_present_e) {
9461
        if (!(this_present_e && that_present_e))
9462
          return false;
9463
        if (!this.e.equals(that.e))
9464
          return false;
9465
      }
9466
 
9467
      return true;
9468
    }
9469
 
9470
    @Override
9471
    public int hashCode() {
9472
      return 0;
9473
    }
9474
 
9475
    public int compareTo(updatePurchaseOrder_result other) {
9476
      if (!getClass().equals(other.getClass())) {
9477
        return getClass().getName().compareTo(other.getClass().getName());
9478
      }
9479
 
9480
      int lastComparison = 0;
9481
      updatePurchaseOrder_result typedOther = (updatePurchaseOrder_result)other;
9482
 
9483
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
9484
      if (lastComparison != 0) {
9485
        return lastComparison;
9486
      }
9487
      if (isSetE()) {
9488
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
9489
        if (lastComparison != 0) {
9490
          return lastComparison;
9491
        }
9492
      }
9493
      return 0;
9494
    }
9495
 
9496
    public _Fields fieldForId(int fieldId) {
9497
      return _Fields.findByThriftId(fieldId);
9498
    }
9499
 
9500
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9501
      org.apache.thrift.protocol.TField field;
9502
      iprot.readStructBegin();
9503
      while (true)
9504
      {
9505
        field = iprot.readFieldBegin();
9506
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9507
          break;
9508
        }
9509
        switch (field.id) {
9510
          case 1: // E
9511
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9512
              this.e = new PurchaseServiceException();
9513
              this.e.read(iprot);
9514
            } else { 
9515
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9516
            }
9517
            break;
9518
          default:
9519
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9520
        }
9521
        iprot.readFieldEnd();
9522
      }
9523
      iprot.readStructEnd();
9524
      validate();
9525
    }
9526
 
9527
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9528
      oprot.writeStructBegin(STRUCT_DESC);
9529
 
9530
      if (this.isSetE()) {
9531
        oprot.writeFieldBegin(E_FIELD_DESC);
9532
        this.e.write(oprot);
9533
        oprot.writeFieldEnd();
9534
      }
9535
      oprot.writeFieldStop();
9536
      oprot.writeStructEnd();
9537
    }
9538
 
9539
    @Override
9540
    public String toString() {
9541
      StringBuilder sb = new StringBuilder("updatePurchaseOrder_result(");
9542
      boolean first = true;
9543
 
9544
      sb.append("e:");
9545
      if (this.e == null) {
9546
        sb.append("null");
9547
      } else {
9548
        sb.append(this.e);
9549
      }
9550
      first = false;
9551
      sb.append(")");
9552
      return sb.toString();
9553
    }
9554
 
9555
    public void validate() throws org.apache.thrift.TException {
9556
      // check for required fields
9557
    }
9558
 
9559
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9560
      try {
9561
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9562
      } catch (org.apache.thrift.TException te) {
9563
        throw new java.io.IOException(te);
9564
      }
9565
    }
9566
 
9567
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9568
      try {
9569
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9570
      } catch (org.apache.thrift.TException te) {
9571
        throw new java.io.IOException(te);
9572
      }
9573
    }
9574
 
9575
  }
9576
 
5185 mandeep.dh 9577
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
9578
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
9579
 
9580
    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);
9581
    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);
9582
    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);
9583
 
9584
    private long purchaseId; // required
9585
    private long itemId; // required
9586
    private long quantity; // required
9587
 
9588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9589
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9590
      PURCHASE_ID((short)1, "purchaseId"),
9591
      ITEM_ID((short)2, "itemId"),
9592
      QUANTITY((short)3, "quantity");
9593
 
9594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9595
 
9596
      static {
9597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9598
          byName.put(field.getFieldName(), field);
9599
        }
9600
      }
9601
 
9602
      /**
9603
       * Find the _Fields constant that matches fieldId, or null if its not found.
9604
       */
9605
      public static _Fields findByThriftId(int fieldId) {
9606
        switch(fieldId) {
9607
          case 1: // PURCHASE_ID
9608
            return PURCHASE_ID;
9609
          case 2: // ITEM_ID
9610
            return ITEM_ID;
9611
          case 3: // QUANTITY
9612
            return QUANTITY;
9613
          default:
9614
            return null;
9615
        }
9616
      }
9617
 
9618
      /**
9619
       * Find the _Fields constant that matches fieldId, throwing an exception
9620
       * if it is not found.
9621
       */
9622
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9623
        _Fields fields = findByThriftId(fieldId);
9624
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9625
        return fields;
9626
      }
9627
 
9628
      /**
9629
       * Find the _Fields constant that matches name, or null if its not found.
9630
       */
9631
      public static _Fields findByName(String name) {
9632
        return byName.get(name);
9633
      }
9634
 
9635
      private final short _thriftId;
9636
      private final String _fieldName;
9637
 
9638
      _Fields(short thriftId, String fieldName) {
9639
        _thriftId = thriftId;
9640
        _fieldName = fieldName;
9641
      }
9642
 
9643
      public short getThriftFieldId() {
9644
        return _thriftId;
9645
      }
9646
 
9647
      public String getFieldName() {
9648
        return _fieldName;
9649
      }
9650
    }
9651
 
9652
    // isset id assignments
9653
    private static final int __PURCHASEID_ISSET_ID = 0;
9654
    private static final int __ITEMID_ISSET_ID = 1;
9655
    private static final int __QUANTITY_ISSET_ID = 2;
9656
    private BitSet __isset_bit_vector = new BitSet(3);
9657
 
9658
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9659
    static {
9660
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9661
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9662
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9663
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9664
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9665
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9666
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9667
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9668
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
9669
    }
9670
 
9671
    public unFulfillPO_args() {
9672
    }
9673
 
9674
    public unFulfillPO_args(
9675
      long purchaseId,
9676
      long itemId,
9677
      long quantity)
9678
    {
9679
      this();
9680
      this.purchaseId = purchaseId;
9681
      setPurchaseIdIsSet(true);
9682
      this.itemId = itemId;
9683
      setItemIdIsSet(true);
9684
      this.quantity = quantity;
9685
      setQuantityIsSet(true);
9686
    }
9687
 
9688
    /**
9689
     * Performs a deep copy on <i>other</i>.
9690
     */
9691
    public unFulfillPO_args(unFulfillPO_args other) {
9692
      __isset_bit_vector.clear();
9693
      __isset_bit_vector.or(other.__isset_bit_vector);
9694
      this.purchaseId = other.purchaseId;
9695
      this.itemId = other.itemId;
9696
      this.quantity = other.quantity;
9697
    }
9698
 
9699
    public unFulfillPO_args deepCopy() {
9700
      return new unFulfillPO_args(this);
9701
    }
9702
 
9703
    @Override
9704
    public void clear() {
9705
      setPurchaseIdIsSet(false);
9706
      this.purchaseId = 0;
9707
      setItemIdIsSet(false);
9708
      this.itemId = 0;
9709
      setQuantityIsSet(false);
9710
      this.quantity = 0;
9711
    }
9712
 
9713
    public long getPurchaseId() {
9714
      return this.purchaseId;
9715
    }
9716
 
9717
    public void setPurchaseId(long purchaseId) {
9718
      this.purchaseId = purchaseId;
9719
      setPurchaseIdIsSet(true);
9720
    }
9721
 
9722
    public void unsetPurchaseId() {
9723
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
9724
    }
9725
 
9726
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
9727
    public boolean isSetPurchaseId() {
9728
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
9729
    }
9730
 
9731
    public void setPurchaseIdIsSet(boolean value) {
9732
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
9733
    }
9734
 
9735
    public long getItemId() {
9736
      return this.itemId;
9737
    }
9738
 
9739
    public void setItemId(long itemId) {
9740
      this.itemId = itemId;
9741
      setItemIdIsSet(true);
9742
    }
9743
 
9744
    public void unsetItemId() {
9745
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
9746
    }
9747
 
9748
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
9749
    public boolean isSetItemId() {
9750
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
9751
    }
9752
 
9753
    public void setItemIdIsSet(boolean value) {
9754
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
9755
    }
9756
 
9757
    public long getQuantity() {
9758
      return this.quantity;
9759
    }
9760
 
9761
    public void setQuantity(long quantity) {
9762
      this.quantity = quantity;
9763
      setQuantityIsSet(true);
9764
    }
9765
 
9766
    public void unsetQuantity() {
9767
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
9768
    }
9769
 
9770
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
9771
    public boolean isSetQuantity() {
9772
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
9773
    }
9774
 
9775
    public void setQuantityIsSet(boolean value) {
9776
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
9777
    }
9778
 
9779
    public void setFieldValue(_Fields field, Object value) {
9780
      switch (field) {
9781
      case PURCHASE_ID:
9782
        if (value == null) {
9783
          unsetPurchaseId();
9784
        } else {
9785
          setPurchaseId((Long)value);
9786
        }
9787
        break;
9788
 
9789
      case ITEM_ID:
9790
        if (value == null) {
9791
          unsetItemId();
9792
        } else {
9793
          setItemId((Long)value);
9794
        }
9795
        break;
9796
 
9797
      case QUANTITY:
9798
        if (value == null) {
9799
          unsetQuantity();
9800
        } else {
9801
          setQuantity((Long)value);
9802
        }
9803
        break;
9804
 
9805
      }
9806
    }
9807
 
9808
    public Object getFieldValue(_Fields field) {
9809
      switch (field) {
9810
      case PURCHASE_ID:
9811
        return Long.valueOf(getPurchaseId());
9812
 
9813
      case ITEM_ID:
9814
        return Long.valueOf(getItemId());
9815
 
9816
      case QUANTITY:
9817
        return Long.valueOf(getQuantity());
9818
 
9819
      }
9820
      throw new IllegalStateException();
9821
    }
9822
 
9823
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9824
    public boolean isSet(_Fields field) {
9825
      if (field == null) {
9826
        throw new IllegalArgumentException();
9827
      }
9828
 
9829
      switch (field) {
9830
      case PURCHASE_ID:
9831
        return isSetPurchaseId();
9832
      case ITEM_ID:
9833
        return isSetItemId();
9834
      case QUANTITY:
9835
        return isSetQuantity();
9836
      }
9837
      throw new IllegalStateException();
9838
    }
9839
 
9840
    @Override
9841
    public boolean equals(Object that) {
9842
      if (that == null)
9843
        return false;
9844
      if (that instanceof unFulfillPO_args)
9845
        return this.equals((unFulfillPO_args)that);
9846
      return false;
9847
    }
9848
 
9849
    public boolean equals(unFulfillPO_args that) {
9850
      if (that == null)
9851
        return false;
9852
 
9853
      boolean this_present_purchaseId = true;
9854
      boolean that_present_purchaseId = true;
9855
      if (this_present_purchaseId || that_present_purchaseId) {
9856
        if (!(this_present_purchaseId && that_present_purchaseId))
9857
          return false;
9858
        if (this.purchaseId != that.purchaseId)
9859
          return false;
9860
      }
9861
 
9862
      boolean this_present_itemId = true;
9863
      boolean that_present_itemId = true;
9864
      if (this_present_itemId || that_present_itemId) {
9865
        if (!(this_present_itemId && that_present_itemId))
9866
          return false;
9867
        if (this.itemId != that.itemId)
9868
          return false;
9869
      }
9870
 
9871
      boolean this_present_quantity = true;
9872
      boolean that_present_quantity = true;
9873
      if (this_present_quantity || that_present_quantity) {
9874
        if (!(this_present_quantity && that_present_quantity))
9875
          return false;
9876
        if (this.quantity != that.quantity)
9877
          return false;
9878
      }
9879
 
9880
      return true;
9881
    }
9882
 
9883
    @Override
9884
    public int hashCode() {
9885
      return 0;
9886
    }
9887
 
9888
    public int compareTo(unFulfillPO_args other) {
9889
      if (!getClass().equals(other.getClass())) {
9890
        return getClass().getName().compareTo(other.getClass().getName());
9891
      }
9892
 
9893
      int lastComparison = 0;
9894
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
9895
 
9896
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
9897
      if (lastComparison != 0) {
9898
        return lastComparison;
9899
      }
9900
      if (isSetPurchaseId()) {
9901
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
9902
        if (lastComparison != 0) {
9903
          return lastComparison;
9904
        }
9905
      }
9906
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
9907
      if (lastComparison != 0) {
9908
        return lastComparison;
9909
      }
9910
      if (isSetItemId()) {
9911
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
9912
        if (lastComparison != 0) {
9913
          return lastComparison;
9914
        }
9915
      }
9916
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
9917
      if (lastComparison != 0) {
9918
        return lastComparison;
9919
      }
9920
      if (isSetQuantity()) {
9921
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
9922
        if (lastComparison != 0) {
9923
          return lastComparison;
9924
        }
9925
      }
9926
      return 0;
9927
    }
9928
 
9929
    public _Fields fieldForId(int fieldId) {
9930
      return _Fields.findByThriftId(fieldId);
9931
    }
9932
 
9933
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9934
      org.apache.thrift.protocol.TField field;
9935
      iprot.readStructBegin();
9936
      while (true)
9937
      {
9938
        field = iprot.readFieldBegin();
9939
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9940
          break;
9941
        }
9942
        switch (field.id) {
9943
          case 1: // PURCHASE_ID
9944
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9945
              this.purchaseId = iprot.readI64();
9946
              setPurchaseIdIsSet(true);
9947
            } else { 
9948
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9949
            }
9950
            break;
9951
          case 2: // ITEM_ID
9952
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9953
              this.itemId = iprot.readI64();
9954
              setItemIdIsSet(true);
9955
            } else { 
9956
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9957
            }
9958
            break;
9959
          case 3: // QUANTITY
9960
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9961
              this.quantity = iprot.readI64();
9962
              setQuantityIsSet(true);
9963
            } else { 
9964
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9965
            }
9966
            break;
9967
          default:
9968
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9969
        }
9970
        iprot.readFieldEnd();
9971
      }
9972
      iprot.readStructEnd();
9973
      validate();
9974
    }
9975
 
9976
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9977
      validate();
9978
 
9979
      oprot.writeStructBegin(STRUCT_DESC);
9980
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
9981
      oprot.writeI64(this.purchaseId);
9982
      oprot.writeFieldEnd();
9983
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
9984
      oprot.writeI64(this.itemId);
9985
      oprot.writeFieldEnd();
9986
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
9987
      oprot.writeI64(this.quantity);
9988
      oprot.writeFieldEnd();
9989
      oprot.writeFieldStop();
9990
      oprot.writeStructEnd();
9991
    }
9992
 
9993
    @Override
9994
    public String toString() {
9995
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
9996
      boolean first = true;
9997
 
9998
      sb.append("purchaseId:");
9999
      sb.append(this.purchaseId);
10000
      first = false;
10001
      if (!first) sb.append(", ");
10002
      sb.append("itemId:");
10003
      sb.append(this.itemId);
10004
      first = false;
10005
      if (!first) sb.append(", ");
10006
      sb.append("quantity:");
10007
      sb.append(this.quantity);
10008
      first = false;
10009
      sb.append(")");
10010
      return sb.toString();
10011
    }
10012
 
10013
    public void validate() throws org.apache.thrift.TException {
10014
      // check for required fields
10015
    }
10016
 
10017
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10018
      try {
10019
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10020
      } catch (org.apache.thrift.TException te) {
10021
        throw new java.io.IOException(te);
10022
      }
10023
    }
10024
 
10025
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10026
      try {
10027
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10028
        __isset_bit_vector = new BitSet(1);
10029
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10030
      } catch (org.apache.thrift.TException te) {
10031
        throw new java.io.IOException(te);
10032
      }
10033
    }
10034
 
10035
  }
10036
 
10037
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
10038
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
10039
 
10040
    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);
10041
 
10042
    private PurchaseServiceException e; // required
10043
 
10044
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10045
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10046
      E((short)1, "e");
10047
 
10048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10049
 
10050
      static {
10051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10052
          byName.put(field.getFieldName(), field);
10053
        }
10054
      }
10055
 
10056
      /**
10057
       * Find the _Fields constant that matches fieldId, or null if its not found.
10058
       */
10059
      public static _Fields findByThriftId(int fieldId) {
10060
        switch(fieldId) {
10061
          case 1: // E
10062
            return E;
10063
          default:
10064
            return null;
10065
        }
10066
      }
10067
 
10068
      /**
10069
       * Find the _Fields constant that matches fieldId, throwing an exception
10070
       * if it is not found.
10071
       */
10072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10073
        _Fields fields = findByThriftId(fieldId);
10074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10075
        return fields;
10076
      }
10077
 
10078
      /**
10079
       * Find the _Fields constant that matches name, or null if its not found.
10080
       */
10081
      public static _Fields findByName(String name) {
10082
        return byName.get(name);
10083
      }
10084
 
10085
      private final short _thriftId;
10086
      private final String _fieldName;
10087
 
10088
      _Fields(short thriftId, String fieldName) {
10089
        _thriftId = thriftId;
10090
        _fieldName = fieldName;
10091
      }
10092
 
10093
      public short getThriftFieldId() {
10094
        return _thriftId;
10095
      }
10096
 
10097
      public String getFieldName() {
10098
        return _fieldName;
10099
      }
10100
    }
10101
 
10102
    // isset id assignments
10103
 
10104
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10105
    static {
10106
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10107
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10109
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10110
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
10111
    }
10112
 
10113
    public unFulfillPO_result() {
10114
    }
10115
 
10116
    public unFulfillPO_result(
10117
      PurchaseServiceException e)
10118
    {
10119
      this();
10120
      this.e = e;
10121
    }
10122
 
10123
    /**
10124
     * Performs a deep copy on <i>other</i>.
10125
     */
10126
    public unFulfillPO_result(unFulfillPO_result other) {
10127
      if (other.isSetE()) {
10128
        this.e = new PurchaseServiceException(other.e);
10129
      }
10130
    }
10131
 
10132
    public unFulfillPO_result deepCopy() {
10133
      return new unFulfillPO_result(this);
10134
    }
10135
 
10136
    @Override
10137
    public void clear() {
10138
      this.e = null;
10139
    }
10140
 
10141
    public PurchaseServiceException getE() {
10142
      return this.e;
10143
    }
10144
 
10145
    public void setE(PurchaseServiceException e) {
10146
      this.e = e;
10147
    }
10148
 
10149
    public void unsetE() {
10150
      this.e = null;
10151
    }
10152
 
10153
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
10154
    public boolean isSetE() {
10155
      return this.e != null;
10156
    }
10157
 
10158
    public void setEIsSet(boolean value) {
10159
      if (!value) {
10160
        this.e = null;
10161
      }
10162
    }
10163
 
10164
    public void setFieldValue(_Fields field, Object value) {
10165
      switch (field) {
10166
      case E:
10167
        if (value == null) {
10168
          unsetE();
10169
        } else {
10170
          setE((PurchaseServiceException)value);
10171
        }
10172
        break;
10173
 
10174
      }
10175
    }
10176
 
10177
    public Object getFieldValue(_Fields field) {
10178
      switch (field) {
10179
      case E:
10180
        return getE();
10181
 
10182
      }
10183
      throw new IllegalStateException();
10184
    }
10185
 
10186
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10187
    public boolean isSet(_Fields field) {
10188
      if (field == null) {
10189
        throw new IllegalArgumentException();
10190
      }
10191
 
10192
      switch (field) {
10193
      case E:
10194
        return isSetE();
10195
      }
10196
      throw new IllegalStateException();
10197
    }
10198
 
10199
    @Override
10200
    public boolean equals(Object that) {
10201
      if (that == null)
10202
        return false;
10203
      if (that instanceof unFulfillPO_result)
10204
        return this.equals((unFulfillPO_result)that);
10205
      return false;
10206
    }
10207
 
10208
    public boolean equals(unFulfillPO_result that) {
10209
      if (that == null)
10210
        return false;
10211
 
10212
      boolean this_present_e = true && this.isSetE();
10213
      boolean that_present_e = true && that.isSetE();
10214
      if (this_present_e || that_present_e) {
10215
        if (!(this_present_e && that_present_e))
10216
          return false;
10217
        if (!this.e.equals(that.e))
10218
          return false;
10219
      }
10220
 
10221
      return true;
10222
    }
10223
 
10224
    @Override
10225
    public int hashCode() {
10226
      return 0;
10227
    }
10228
 
10229
    public int compareTo(unFulfillPO_result other) {
10230
      if (!getClass().equals(other.getClass())) {
10231
        return getClass().getName().compareTo(other.getClass().getName());
10232
      }
10233
 
10234
      int lastComparison = 0;
10235
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
10236
 
10237
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
10238
      if (lastComparison != 0) {
10239
        return lastComparison;
10240
      }
10241
      if (isSetE()) {
10242
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
10243
        if (lastComparison != 0) {
10244
          return lastComparison;
10245
        }
10246
      }
10247
      return 0;
10248
    }
10249
 
10250
    public _Fields fieldForId(int fieldId) {
10251
      return _Fields.findByThriftId(fieldId);
10252
    }
10253
 
10254
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10255
      org.apache.thrift.protocol.TField field;
10256
      iprot.readStructBegin();
10257
      while (true)
10258
      {
10259
        field = iprot.readFieldBegin();
10260
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10261
          break;
10262
        }
10263
        switch (field.id) {
10264
          case 1: // E
10265
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10266
              this.e = new PurchaseServiceException();
10267
              this.e.read(iprot);
10268
            } else { 
10269
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10270
            }
10271
            break;
10272
          default:
10273
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10274
        }
10275
        iprot.readFieldEnd();
10276
      }
10277
      iprot.readStructEnd();
10278
      validate();
10279
    }
10280
 
10281
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10282
      oprot.writeStructBegin(STRUCT_DESC);
10283
 
10284
      if (this.isSetE()) {
10285
        oprot.writeFieldBegin(E_FIELD_DESC);
10286
        this.e.write(oprot);
10287
        oprot.writeFieldEnd();
10288
      }
10289
      oprot.writeFieldStop();
10290
      oprot.writeStructEnd();
10291
    }
10292
 
10293
    @Override
10294
    public String toString() {
10295
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
10296
      boolean first = true;
10297
 
10298
      sb.append("e:");
10299
      if (this.e == null) {
10300
        sb.append("null");
10301
      } else {
10302
        sb.append(this.e);
10303
      }
10304
      first = false;
10305
      sb.append(")");
10306
      return sb.toString();
10307
    }
10308
 
10309
    public void validate() throws org.apache.thrift.TException {
10310
      // check for required fields
10311
    }
10312
 
10313
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10314
      try {
10315
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10316
      } catch (org.apache.thrift.TException te) {
10317
        throw new java.io.IOException(te);
10318
      }
10319
    }
10320
 
10321
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10322
      try {
10323
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10324
      } catch (org.apache.thrift.TException te) {
10325
        throw new java.io.IOException(te);
10326
      }
10327
    }
10328
 
10329
  }
10330
 
4496 mandeep.dh 10331
}