Subversion Repositories SmartDukaan

Rev

Rev 5591 | Rev 6467 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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