Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
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.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
483 rajveer 47
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 48
 
483 rajveer 49
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 50
 
640 chandransh 51
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 52
 
923 rajveer 53
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
54
 
55
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
56
 
483 rajveer 57
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 58
 
483 rajveer 59
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 60
 
483 rajveer 61
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 62
 
483 rajveer 63
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 64
 
483 rajveer 65
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 66
 
758 chandransh 67
    /**
68
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
69
     * 
70
     * @param warehouseId
71
     * @param providerId
72
     */
73
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
74
 
483 rajveer 75
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 76
 
483 rajveer 77
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 78
 
79
  }
80
 
81
  public static class Client implements Iface {
82
    public Client(TProtocol prot)
83
    {
84
      this(prot, prot);
85
    }
86
 
87
    public Client(TProtocol iprot, TProtocol oprot)
88
    {
89
      iprot_ = iprot;
90
      oprot_ = oprot;
91
    }
92
 
93
    protected TProtocol iprot_;
94
    protected TProtocol oprot_;
95
 
96
    protected int seqid_;
97
 
98
    public TProtocol getInputProtocol()
99
    {
100
      return this.iprot_;
101
    }
102
 
103
    public TProtocol getOutputProtocol()
104
    {
105
      return this.oprot_;
106
    }
107
 
764 rajveer 108
    public void closeSession() throws TException
109
    {
110
      send_closeSession();
111
      recv_closeSession();
112
    }
113
 
114
    public void send_closeSession() throws TException
115
    {
116
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
117
      closeSession_args args = new closeSession_args();
118
      args.write(oprot_);
119
      oprot_.writeMessageEnd();
120
      oprot_.getTransport().flush();
121
    }
122
 
123
    public void recv_closeSession() throws TException
124
    {
125
      TMessage msg = iprot_.readMessageBegin();
126
      if (msg.type == TMessageType.EXCEPTION) {
127
        TApplicationException x = TApplicationException.read(iprot_);
128
        iprot_.readMessageEnd();
129
        throw x;
130
      }
131
      closeSession_result result = new closeSession_result();
132
      result.read(iprot_);
133
      iprot_.readMessageEnd();
134
      return;
135
    }
136
 
132 ashish 137
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 138
    {
139
      send_createTransaction(transaction);
132 ashish 140
      return recv_createTransaction();
68 ashish 141
    }
142
 
143
    public void send_createTransaction(Transaction transaction) throws TException
144
    {
145
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
146
      createTransaction_args args = new createTransaction_args();
147
      args.transaction = transaction;
148
      args.write(oprot_);
149
      oprot_.writeMessageEnd();
150
      oprot_.getTransport().flush();
151
    }
152
 
132 ashish 153
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 154
    {
155
      TMessage msg = iprot_.readMessageBegin();
156
      if (msg.type == TMessageType.EXCEPTION) {
157
        TApplicationException x = TApplicationException.read(iprot_);
158
        iprot_.readMessageEnd();
159
        throw x;
160
      }
161
      createTransaction_result result = new createTransaction_result();
162
      result.read(iprot_);
163
      iprot_.readMessageEnd();
132 ashish 164
      if (result.isSetSuccess()) {
165
        return result.success;
166
      }
68 ashish 167
      if (result.ex != null) {
168
        throw result.ex;
169
      }
132 ashish 170
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 171
    }
172
 
173
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
174
    {
175
      send_getTransaction(id);
176
      return recv_getTransaction();
177
    }
178
 
179
    public void send_getTransaction(long id) throws TException
180
    {
181
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
182
      getTransaction_args args = new getTransaction_args();
183
      args.id = id;
184
      args.write(oprot_);
185
      oprot_.writeMessageEnd();
186
      oprot_.getTransport().flush();
187
    }
188
 
189
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
190
    {
191
      TMessage msg = iprot_.readMessageBegin();
192
      if (msg.type == TMessageType.EXCEPTION) {
193
        TApplicationException x = TApplicationException.read(iprot_);
194
        iprot_.readMessageEnd();
195
        throw x;
196
      }
197
      getTransaction_result result = new getTransaction_result();
198
      result.read(iprot_);
199
      iprot_.readMessageEnd();
200
      if (result.isSetSuccess()) {
201
        return result.success;
202
      }
203
      if (result.ex != null) {
204
        throw result.ex;
205
      }
206
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
207
    }
208
 
132 ashish 209
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 210
    {
132 ashish 211
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 212
      return recv_getTransactionsForCustomer();
213
    }
214
 
132 ashish 215
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 216
    {
217
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
218
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
219
      args.customerId = customerId;
132 ashish 220
      args.from_date = from_date;
221
      args.to_date = to_date;
68 ashish 222
      args.status = status;
223
      args.write(oprot_);
224
      oprot_.writeMessageEnd();
225
      oprot_.getTransport().flush();
226
    }
227
 
228
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
229
    {
230
      TMessage msg = iprot_.readMessageBegin();
231
      if (msg.type == TMessageType.EXCEPTION) {
232
        TApplicationException x = TApplicationException.read(iprot_);
233
        iprot_.readMessageEnd();
234
        throw x;
235
      }
236
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
237
      result.read(iprot_);
238
      iprot_.readMessageEnd();
239
      if (result.isSetSuccess()) {
240
        return result.success;
241
      }
242
      if (result.ex != null) {
243
        throw result.ex;
244
      }
245
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
246
    }
247
 
132 ashish 248
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
249
    {
250
      send_getTransactionsForShoppingCartId(shoppingCartId);
251
      return recv_getTransactionsForShoppingCartId();
252
    }
253
 
254
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
255
    {
256
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
257
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
258
      args.shoppingCartId = shoppingCartId;
259
      args.write(oprot_);
260
      oprot_.writeMessageEnd();
261
      oprot_.getTransport().flush();
262
    }
263
 
264
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
265
    {
266
      TMessage msg = iprot_.readMessageBegin();
267
      if (msg.type == TMessageType.EXCEPTION) {
268
        TApplicationException x = TApplicationException.read(iprot_);
269
        iprot_.readMessageEnd();
270
        throw x;
271
      }
272
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
273
      result.read(iprot_);
274
      iprot_.readMessageEnd();
275
      if (result.isSetSuccess()) {
276
        return result.success;
277
      }
278
      if (result.ex != null) {
279
        throw result.ex;
280
      }
281
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
282
    }
283
 
68 ashish 284
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
285
    {
286
      send_getTransactionStatus(transactionId);
287
      return recv_getTransactionStatus();
288
    }
289
 
290
    public void send_getTransactionStatus(long transactionId) throws TException
291
    {
292
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
293
      getTransactionStatus_args args = new getTransactionStatus_args();
294
      args.transactionId = transactionId;
295
      args.write(oprot_);
296
      oprot_.writeMessageEnd();
297
      oprot_.getTransport().flush();
298
    }
299
 
300
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
301
    {
302
      TMessage msg = iprot_.readMessageBegin();
303
      if (msg.type == TMessageType.EXCEPTION) {
304
        TApplicationException x = TApplicationException.read(iprot_);
305
        iprot_.readMessageEnd();
306
        throw x;
307
      }
308
      getTransactionStatus_result result = new getTransactionStatus_result();
309
      result.read(iprot_);
310
      iprot_.readMessageEnd();
311
      if (result.isSetSuccess()) {
312
        return result.success;
313
      }
314
      if (result.ex != null) {
315
        throw result.ex;
316
      }
317
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
318
    }
319
 
320
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
321
    {
322
      send_changeTransactionStatus(transactionId, status, description);
323
      return recv_changeTransactionStatus();
324
    }
325
 
326
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
327
    {
328
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
329
      changeTransactionStatus_args args = new changeTransactionStatus_args();
330
      args.transactionId = transactionId;
331
      args.status = status;
332
      args.description = description;
333
      args.write(oprot_);
334
      oprot_.writeMessageEnd();
335
      oprot_.getTransport().flush();
336
    }
337
 
338
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
339
    {
340
      TMessage msg = iprot_.readMessageBegin();
341
      if (msg.type == TMessageType.EXCEPTION) {
342
        TApplicationException x = TApplicationException.read(iprot_);
343
        iprot_.readMessageEnd();
344
        throw x;
345
      }
346
      changeTransactionStatus_result result = new changeTransactionStatus_result();
347
      result.read(iprot_);
348
      iprot_.readMessageEnd();
349
      if (result.isSetSuccess()) {
350
        return result.success;
351
      }
352
      if (result.ex != null) {
353
        throw result.ex;
354
      }
355
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
356
    }
357
 
483 rajveer 358
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 359
    {
483 rajveer 360
      send_getAllOrders(status, from_date, to_date, warehouse_id);
361
      return recv_getAllOrders();
68 ashish 362
    }
363
 
483 rajveer 364
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 365
    {
483 rajveer 366
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
367
      getAllOrders_args args = new getAllOrders_args();
368
      args.status = status;
369
      args.from_date = from_date;
370
      args.to_date = to_date;
371
      args.warehouse_id = warehouse_id;
68 ashish 372
      args.write(oprot_);
373
      oprot_.writeMessageEnd();
374
      oprot_.getTransport().flush();
375
    }
376
 
483 rajveer 377
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 378
    {
379
      TMessage msg = iprot_.readMessageBegin();
380
      if (msg.type == TMessageType.EXCEPTION) {
381
        TApplicationException x = TApplicationException.read(iprot_);
382
        iprot_.readMessageEnd();
383
        throw x;
384
      }
483 rajveer 385
      getAllOrders_result result = new getAllOrders_result();
68 ashish 386
      result.read(iprot_);
387
      iprot_.readMessageEnd();
388
      if (result.isSetSuccess()) {
389
        return result.success;
390
      }
391
      if (result.ex != null) {
392
        throw result.ex;
393
      }
483 rajveer 394
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 395
    }
396
 
483 rajveer 397
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 398
    {
483 rajveer 399
      send_changeOrderStatus(orderId, status, description);
400
      return recv_changeOrderStatus();
68 ashish 401
    }
402
 
483 rajveer 403
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 404
    {
483 rajveer 405
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
406
      changeOrderStatus_args args = new changeOrderStatus_args();
407
      args.orderId = orderId;
408
      args.status = status;
409
      args.description = description;
68 ashish 410
      args.write(oprot_);
411
      oprot_.writeMessageEnd();
412
      oprot_.getTransport().flush();
413
    }
414
 
483 rajveer 415
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 416
    {
417
      TMessage msg = iprot_.readMessageBegin();
418
      if (msg.type == TMessageType.EXCEPTION) {
419
        TApplicationException x = TApplicationException.read(iprot_);
420
        iprot_.readMessageEnd();
421
        throw x;
422
      }
483 rajveer 423
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 424
      result.read(iprot_);
425
      iprot_.readMessageEnd();
426
      if (result.isSetSuccess()) {
427
        return result.success;
428
      }
429
      if (result.ex != null) {
430
        throw result.ex;
431
      }
483 rajveer 432
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 433
    }
434
 
640 chandransh 435
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 436
    {
640 chandransh 437
      send_addBillingDetails(orderId, invoice_number, jacket_number, billed_by);
495 rajveer 438
      return recv_addBillingDetails();
439
    }
440
 
640 chandransh 441
    public void send_addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TException
495 rajveer 442
    {
443
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
444
      addBillingDetails_args args = new addBillingDetails_args();
445
      args.orderId = orderId;
446
      args.invoice_number = invoice_number;
640 chandransh 447
      args.jacket_number = jacket_number;
495 rajveer 448
      args.billed_by = billed_by;
449
      args.write(oprot_);
450
      oprot_.writeMessageEnd();
451
      oprot_.getTransport().flush();
452
    }
453
 
454
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
455
    {
456
      TMessage msg = iprot_.readMessageBegin();
457
      if (msg.type == TMessageType.EXCEPTION) {
458
        TApplicationException x = TApplicationException.read(iprot_);
459
        iprot_.readMessageEnd();
460
        throw x;
461
      }
462
      addBillingDetails_result result = new addBillingDetails_result();
463
      result.read(iprot_);
464
      iprot_.readMessageEnd();
465
      if (result.isSetSuccess()) {
466
        return result.success;
467
      }
468
      if (result.ex != null) {
469
        throw result.ex;
470
      }
471
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
472
    }
473
 
923 rajveer 474
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
475
    {
476
      send_acceptOrder(orderId);
477
      return recv_acceptOrder();
478
    }
479
 
480
    public void send_acceptOrder(long orderId) throws TException
481
    {
482
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
483
      acceptOrder_args args = new acceptOrder_args();
484
      args.orderId = orderId;
485
      args.write(oprot_);
486
      oprot_.writeMessageEnd();
487
      oprot_.getTransport().flush();
488
    }
489
 
490
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
491
    {
492
      TMessage msg = iprot_.readMessageBegin();
493
      if (msg.type == TMessageType.EXCEPTION) {
494
        TApplicationException x = TApplicationException.read(iprot_);
495
        iprot_.readMessageEnd();
496
        throw x;
497
      }
498
      acceptOrder_result result = new acceptOrder_result();
499
      result.read(iprot_);
500
      iprot_.readMessageEnd();
501
      if (result.isSetSuccess()) {
502
        return result.success;
503
      }
504
      if (result.ex != null) {
505
        throw result.ex;
506
      }
507
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
508
    }
509
 
510
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
511
    {
512
      send_billOrder(orderId);
513
      return recv_billOrder();
514
    }
515
 
516
    public void send_billOrder(long orderId) throws TException
517
    {
518
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
519
      billOrder_args args = new billOrder_args();
520
      args.orderId = orderId;
521
      args.write(oprot_);
522
      oprot_.writeMessageEnd();
523
      oprot_.getTransport().flush();
524
    }
525
 
526
    public boolean recv_billOrder() throws TransactionServiceException, TException
527
    {
528
      TMessage msg = iprot_.readMessageBegin();
529
      if (msg.type == TMessageType.EXCEPTION) {
530
        TApplicationException x = TApplicationException.read(iprot_);
531
        iprot_.readMessageEnd();
532
        throw x;
533
      }
534
      billOrder_result result = new billOrder_result();
535
      result.read(iprot_);
536
      iprot_.readMessageEnd();
537
      if (result.isSetSuccess()) {
538
        return result.success;
539
      }
540
      if (result.ex != null) {
541
        throw result.ex;
542
      }
543
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
544
    }
545
 
483 rajveer 546
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 547
    {
483 rajveer 548
      send_getOrdersForTransaction(transactionId);
549
      return recv_getOrdersForTransaction();
68 ashish 550
    }
551
 
483 rajveer 552
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 553
    {
483 rajveer 554
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
555
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 556
      args.transactionId = transactionId;
557
      args.write(oprot_);
558
      oprot_.writeMessageEnd();
559
      oprot_.getTransport().flush();
560
    }
561
 
483 rajveer 562
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 563
    {
564
      TMessage msg = iprot_.readMessageBegin();
565
      if (msg.type == TMessageType.EXCEPTION) {
566
        TApplicationException x = TApplicationException.read(iprot_);
567
        iprot_.readMessageEnd();
568
        throw x;
569
      }
483 rajveer 570
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 571
      result.read(iprot_);
572
      iprot_.readMessageEnd();
573
      if (result.isSetSuccess()) {
574
        return result.success;
575
      }
576
      if (result.ex != null) {
577
        throw result.ex;
578
      }
483 rajveer 579
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 580
    }
581
 
483 rajveer 582
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 583
    {
483 rajveer 584
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
585
      return recv_getOrdersForCustomer();
68 ashish 586
    }
587
 
483 rajveer 588
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 589
    {
483 rajveer 590
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
591
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
592
      args.customerId = customerId;
593
      args.from_date = from_date;
594
      args.to_date = to_date;
595
      args.status = status;
68 ashish 596
      args.write(oprot_);
597
      oprot_.writeMessageEnd();
598
      oprot_.getTransport().flush();
599
    }
600
 
483 rajveer 601
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 602
    {
603
      TMessage msg = iprot_.readMessageBegin();
604
      if (msg.type == TMessageType.EXCEPTION) {
605
        TApplicationException x = TApplicationException.read(iprot_);
606
        iprot_.readMessageEnd();
607
        throw x;
608
      }
483 rajveer 609
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 610
      result.read(iprot_);
611
      iprot_.readMessageEnd();
612
      if (result.isSetSuccess()) {
613
        return result.success;
614
      }
615
      if (result.ex != null) {
616
        throw result.ex;
617
      }
483 rajveer 618
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 619
    }
620
 
483 rajveer 621
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 622
    {
483 rajveer 623
      send_createOrder(order);
624
      return recv_createOrder();
68 ashish 625
    }
626
 
483 rajveer 627
    public void send_createOrder(Order order) throws TException
68 ashish 628
    {
483 rajveer 629
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
630
      createOrder_args args = new createOrder_args();
631
      args.order = order;
68 ashish 632
      args.write(oprot_);
633
      oprot_.writeMessageEnd();
634
      oprot_.getTransport().flush();
635
    }
636
 
483 rajveer 637
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 638
    {
639
      TMessage msg = iprot_.readMessageBegin();
640
      if (msg.type == TMessageType.EXCEPTION) {
641
        TApplicationException x = TApplicationException.read(iprot_);
642
        iprot_.readMessageEnd();
643
        throw x;
644
      }
483 rajveer 645
      createOrder_result result = new createOrder_result();
68 ashish 646
      result.read(iprot_);
647
      iprot_.readMessageEnd();
648
      if (result.isSetSuccess()) {
649
        return result.success;
650
      }
651
      if (result.ex != null) {
652
        throw result.ex;
653
      }
483 rajveer 654
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 655
    }
656
 
483 rajveer 657
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 658
    {
483 rajveer 659
      send_getOrder(id);
660
      return recv_getOrder();
68 ashish 661
    }
662
 
483 rajveer 663
    public void send_getOrder(long id) throws TException
68 ashish 664
    {
483 rajveer 665
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
666
      getOrder_args args = new getOrder_args();
667
      args.id = id;
68 ashish 668
      args.write(oprot_);
669
      oprot_.writeMessageEnd();
670
      oprot_.getTransport().flush();
671
    }
672
 
483 rajveer 673
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 674
    {
675
      TMessage msg = iprot_.readMessageBegin();
676
      if (msg.type == TMessageType.EXCEPTION) {
677
        TApplicationException x = TApplicationException.read(iprot_);
678
        iprot_.readMessageEnd();
679
        throw x;
680
      }
483 rajveer 681
      getOrder_result result = new getOrder_result();
68 ashish 682
      result.read(iprot_);
683
      iprot_.readMessageEnd();
684
      if (result.isSetSuccess()) {
685
        return result.success;
686
      }
687
      if (result.ex != null) {
688
        throw result.ex;
689
      }
483 rajveer 690
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 691
    }
692
 
483 rajveer 693
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 694
    {
483 rajveer 695
      send_getLineItemsForOrder(orderId);
696
      return recv_getLineItemsForOrder();
68 ashish 697
    }
698
 
483 rajveer 699
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 700
    {
483 rajveer 701
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
702
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
703
      args.orderId = orderId;
68 ashish 704
      args.write(oprot_);
705
      oprot_.writeMessageEnd();
706
      oprot_.getTransport().flush();
707
    }
708
 
483 rajveer 709
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 710
    {
711
      TMessage msg = iprot_.readMessageBegin();
712
      if (msg.type == TMessageType.EXCEPTION) {
713
        TApplicationException x = TApplicationException.read(iprot_);
714
        iprot_.readMessageEnd();
715
        throw x;
716
      }
483 rajveer 717
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 718
      result.read(iprot_);
719
      iprot_.readMessageEnd();
720
      if (result.isSetSuccess()) {
721
        return result.success;
722
      }
723
      if (result.ex != null) {
724
        throw result.ex;
725
      }
483 rajveer 726
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 727
    }
728
 
758 chandransh 729
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
730
    {
731
      send_markOrdersAsManifested(warehouseId, providerId);
732
      return recv_markOrdersAsManifested();
733
    }
734
 
735
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
736
    {
737
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
738
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
739
      args.warehouseId = warehouseId;
740
      args.providerId = providerId;
741
      args.write(oprot_);
742
      oprot_.writeMessageEnd();
743
      oprot_.getTransport().flush();
744
    }
745
 
746
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
747
    {
748
      TMessage msg = iprot_.readMessageBegin();
749
      if (msg.type == TMessageType.EXCEPTION) {
750
        TApplicationException x = TApplicationException.read(iprot_);
751
        iprot_.readMessageEnd();
752
        throw x;
753
      }
754
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
755
      result.read(iprot_);
756
      iprot_.readMessageEnd();
757
      if (result.isSetSuccess()) {
758
        return result.success;
759
      }
760
      if (result.ex != null) {
761
        throw result.ex;
762
      }
763
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
764
    }
765
 
483 rajveer 766
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 767
    {
483 rajveer 768
      send_getAlerts(orderId, valid);
305 ashish 769
      return recv_getAlerts();
770
    }
771
 
483 rajveer 772
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 773
    {
774
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
775
      getAlerts_args args = new getAlerts_args();
483 rajveer 776
      args.orderId = orderId;
305 ashish 777
      args.valid = valid;
778
      args.write(oprot_);
779
      oprot_.writeMessageEnd();
780
      oprot_.getTransport().flush();
781
    }
782
 
783
    public List<Alert> recv_getAlerts() throws TException
784
    {
785
      TMessage msg = iprot_.readMessageBegin();
786
      if (msg.type == TMessageType.EXCEPTION) {
787
        TApplicationException x = TApplicationException.read(iprot_);
788
        iprot_.readMessageEnd();
789
        throw x;
790
      }
791
      getAlerts_result result = new getAlerts_result();
792
      result.read(iprot_);
793
      iprot_.readMessageEnd();
794
      if (result.isSetSuccess()) {
795
        return result.success;
796
      }
797
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
798
    }
799
 
483 rajveer 800
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 801
    {
483 rajveer 802
      send_setAlert(orderId, unset, type, comment);
305 ashish 803
      recv_setAlert();
804
    }
805
 
483 rajveer 806
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 807
    {
808
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
809
      setAlert_args args = new setAlert_args();
483 rajveer 810
      args.orderId = orderId;
305 ashish 811
      args.unset = unset;
812
      args.type = type;
813
      args.comment = comment;
814
      args.write(oprot_);
815
      oprot_.writeMessageEnd();
816
      oprot_.getTransport().flush();
817
    }
818
 
819
    public void recv_setAlert() throws TException
820
    {
821
      TMessage msg = iprot_.readMessageBegin();
822
      if (msg.type == TMessageType.EXCEPTION) {
823
        TApplicationException x = TApplicationException.read(iprot_);
824
        iprot_.readMessageEnd();
825
        throw x;
826
      }
827
      setAlert_result result = new setAlert_result();
828
      result.read(iprot_);
829
      iprot_.readMessageEnd();
830
      return;
831
    }
832
 
68 ashish 833
  }
834
  public static class Processor implements TProcessor {
835
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
836
    public Processor(Iface iface)
837
    {
838
      iface_ = iface;
764 rajveer 839
      processMap_.put("closeSession", new closeSession());
68 ashish 840
      processMap_.put("createTransaction", new createTransaction());
841
      processMap_.put("getTransaction", new getTransaction());
842
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 843
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 844
      processMap_.put("getTransactionStatus", new getTransactionStatus());
845
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 846
      processMap_.put("getAllOrders", new getAllOrders());
847
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 848
      processMap_.put("addBillingDetails", new addBillingDetails());
923 rajveer 849
      processMap_.put("acceptOrder", new acceptOrder());
850
      processMap_.put("billOrder", new billOrder());
483 rajveer 851
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
852
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
853
      processMap_.put("createOrder", new createOrder());
854
      processMap_.put("getOrder", new getOrder());
855
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
758 chandransh 856
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
305 ashish 857
      processMap_.put("getAlerts", new getAlerts());
858
      processMap_.put("setAlert", new setAlert());
68 ashish 859
    }
860
 
861
    protected static interface ProcessFunction {
862
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
863
    }
864
 
865
    private Iface iface_;
866
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
867
 
868
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
869
    {
870
      TMessage msg = iprot.readMessageBegin();
871
      ProcessFunction fn = processMap_.get(msg.name);
872
      if (fn == null) {
873
        TProtocolUtil.skip(iprot, TType.STRUCT);
874
        iprot.readMessageEnd();
875
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
876
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
877
        x.write(oprot);
878
        oprot.writeMessageEnd();
879
        oprot.getTransport().flush();
880
        return true;
881
      }
882
      fn.process(msg.seqid, iprot, oprot);
883
      return true;
884
    }
885
 
764 rajveer 886
    private class closeSession implements ProcessFunction {
887
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
888
      {
889
        closeSession_args args = new closeSession_args();
890
        args.read(iprot);
891
        iprot.readMessageEnd();
892
        closeSession_result result = new closeSession_result();
893
        iface_.closeSession();
894
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
895
        result.write(oprot);
896
        oprot.writeMessageEnd();
897
        oprot.getTransport().flush();
898
      }
899
 
900
    }
901
 
68 ashish 902
    private class createTransaction implements ProcessFunction {
903
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
904
      {
905
        createTransaction_args args = new createTransaction_args();
906
        args.read(iprot);
907
        iprot.readMessageEnd();
908
        createTransaction_result result = new createTransaction_result();
909
        try {
132 ashish 910
          result.success = iface_.createTransaction(args.transaction);
911
          result.setSuccessIsSet(true);
68 ashish 912
        } catch (TransactionServiceException ex) {
913
          result.ex = ex;
914
        } catch (Throwable th) {
915
          LOGGER.error("Internal error processing createTransaction", th);
916
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
917
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
918
          x.write(oprot);
919
          oprot.writeMessageEnd();
920
          oprot.getTransport().flush();
921
          return;
922
        }
923
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
924
        result.write(oprot);
925
        oprot.writeMessageEnd();
926
        oprot.getTransport().flush();
927
      }
928
 
929
    }
930
 
931
    private class getTransaction implements ProcessFunction {
932
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
933
      {
934
        getTransaction_args args = new getTransaction_args();
935
        args.read(iprot);
936
        iprot.readMessageEnd();
937
        getTransaction_result result = new getTransaction_result();
938
        try {
939
          result.success = iface_.getTransaction(args.id);
940
        } catch (TransactionServiceException ex) {
941
          result.ex = ex;
942
        } catch (Throwable th) {
943
          LOGGER.error("Internal error processing getTransaction", th);
944
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
945
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
946
          x.write(oprot);
947
          oprot.writeMessageEnd();
948
          oprot.getTransport().flush();
949
          return;
950
        }
951
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
952
        result.write(oprot);
953
        oprot.writeMessageEnd();
954
        oprot.getTransport().flush();
955
      }
956
 
957
    }
958
 
959
    private class getTransactionsForCustomer implements ProcessFunction {
960
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
961
      {
962
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
963
        args.read(iprot);
964
        iprot.readMessageEnd();
965
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
966
        try {
132 ashish 967
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 968
        } catch (TransactionServiceException ex) {
969
          result.ex = ex;
970
        } catch (Throwable th) {
971
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
972
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
973
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
974
          x.write(oprot);
975
          oprot.writeMessageEnd();
976
          oprot.getTransport().flush();
977
          return;
978
        }
979
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
980
        result.write(oprot);
981
        oprot.writeMessageEnd();
982
        oprot.getTransport().flush();
983
      }
984
 
985
    }
986
 
132 ashish 987
    private class getTransactionsForShoppingCartId implements ProcessFunction {
988
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
989
      {
990
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
991
        args.read(iprot);
992
        iprot.readMessageEnd();
993
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
994
        try {
995
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
996
        } catch (TransactionServiceException ex) {
997
          result.ex = ex;
998
        } catch (Throwable th) {
999
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1000
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1001
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1002
          x.write(oprot);
1003
          oprot.writeMessageEnd();
1004
          oprot.getTransport().flush();
1005
          return;
1006
        }
1007
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1008
        result.write(oprot);
1009
        oprot.writeMessageEnd();
1010
        oprot.getTransport().flush();
1011
      }
1012
 
1013
    }
1014
 
68 ashish 1015
    private class getTransactionStatus implements ProcessFunction {
1016
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1017
      {
1018
        getTransactionStatus_args args = new getTransactionStatus_args();
1019
        args.read(iprot);
1020
        iprot.readMessageEnd();
1021
        getTransactionStatus_result result = new getTransactionStatus_result();
1022
        try {
1023
          result.success = iface_.getTransactionStatus(args.transactionId);
1024
        } catch (TransactionServiceException ex) {
1025
          result.ex = ex;
1026
        } catch (Throwable th) {
1027
          LOGGER.error("Internal error processing getTransactionStatus", th);
1028
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1029
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1030
          x.write(oprot);
1031
          oprot.writeMessageEnd();
1032
          oprot.getTransport().flush();
1033
          return;
1034
        }
1035
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1036
        result.write(oprot);
1037
        oprot.writeMessageEnd();
1038
        oprot.getTransport().flush();
1039
      }
1040
 
1041
    }
1042
 
1043
    private class changeTransactionStatus implements ProcessFunction {
1044
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1045
      {
1046
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1047
        args.read(iprot);
1048
        iprot.readMessageEnd();
1049
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1050
        try {
1051
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1052
          result.setSuccessIsSet(true);
1053
        } catch (TransactionServiceException ex) {
1054
          result.ex = ex;
1055
        } catch (Throwable th) {
1056
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1057
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1058
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1059
          x.write(oprot);
1060
          oprot.writeMessageEnd();
1061
          oprot.getTransport().flush();
1062
          return;
1063
        }
1064
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1065
        result.write(oprot);
1066
        oprot.writeMessageEnd();
1067
        oprot.getTransport().flush();
1068
      }
1069
 
1070
    }
1071
 
483 rajveer 1072
    private class getAllOrders implements ProcessFunction {
68 ashish 1073
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1074
      {
483 rajveer 1075
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1076
        args.read(iprot);
1077
        iprot.readMessageEnd();
483 rajveer 1078
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1079
        try {
483 rajveer 1080
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1081
        } catch (TransactionServiceException ex) {
1082
          result.ex = ex;
1083
        } catch (Throwable th) {
483 rajveer 1084
          LOGGER.error("Internal error processing getAllOrders", th);
1085
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1086
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1087
          x.write(oprot);
1088
          oprot.writeMessageEnd();
1089
          oprot.getTransport().flush();
1090
          return;
1091
        }
483 rajveer 1092
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1093
        result.write(oprot);
1094
        oprot.writeMessageEnd();
1095
        oprot.getTransport().flush();
1096
      }
1097
 
1098
    }
1099
 
483 rajveer 1100
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1101
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1102
      {
483 rajveer 1103
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1104
        args.read(iprot);
1105
        iprot.readMessageEnd();
483 rajveer 1106
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1107
        try {
483 rajveer 1108
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1109
          result.setSuccessIsSet(true);
1110
        } catch (TransactionServiceException ex) {
1111
          result.ex = ex;
1112
        } catch (Throwable th) {
483 rajveer 1113
          LOGGER.error("Internal error processing changeOrderStatus", th);
1114
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1115
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1116
          x.write(oprot);
1117
          oprot.writeMessageEnd();
1118
          oprot.getTransport().flush();
1119
          return;
1120
        }
483 rajveer 1121
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1122
        result.write(oprot);
1123
        oprot.writeMessageEnd();
1124
        oprot.getTransport().flush();
1125
      }
1126
 
1127
    }
1128
 
495 rajveer 1129
    private class addBillingDetails implements ProcessFunction {
1130
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1131
      {
1132
        addBillingDetails_args args = new addBillingDetails_args();
1133
        args.read(iprot);
1134
        iprot.readMessageEnd();
1135
        addBillingDetails_result result = new addBillingDetails_result();
1136
        try {
640 chandransh 1137
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.jacket_number, args.billed_by);
495 rajveer 1138
          result.setSuccessIsSet(true);
1139
        } catch (TransactionServiceException ex) {
1140
          result.ex = ex;
1141
        } catch (Throwable th) {
1142
          LOGGER.error("Internal error processing addBillingDetails", th);
1143
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1144
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1145
          x.write(oprot);
1146
          oprot.writeMessageEnd();
1147
          oprot.getTransport().flush();
1148
          return;
1149
        }
1150
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1151
        result.write(oprot);
1152
        oprot.writeMessageEnd();
1153
        oprot.getTransport().flush();
1154
      }
1155
 
1156
    }
1157
 
923 rajveer 1158
    private class acceptOrder implements ProcessFunction {
1159
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1160
      {
1161
        acceptOrder_args args = new acceptOrder_args();
1162
        args.read(iprot);
1163
        iprot.readMessageEnd();
1164
        acceptOrder_result result = new acceptOrder_result();
1165
        try {
1166
          result.success = iface_.acceptOrder(args.orderId);
1167
          result.setSuccessIsSet(true);
1168
        } catch (TransactionServiceException ex) {
1169
          result.ex = ex;
1170
        } catch (Throwable th) {
1171
          LOGGER.error("Internal error processing acceptOrder", th);
1172
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1173
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1174
          x.write(oprot);
1175
          oprot.writeMessageEnd();
1176
          oprot.getTransport().flush();
1177
          return;
1178
        }
1179
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1180
        result.write(oprot);
1181
        oprot.writeMessageEnd();
1182
        oprot.getTransport().flush();
1183
      }
1184
 
1185
    }
1186
 
1187
    private class billOrder implements ProcessFunction {
1188
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1189
      {
1190
        billOrder_args args = new billOrder_args();
1191
        args.read(iprot);
1192
        iprot.readMessageEnd();
1193
        billOrder_result result = new billOrder_result();
1194
        try {
1195
          result.success = iface_.billOrder(args.orderId);
1196
          result.setSuccessIsSet(true);
1197
        } catch (TransactionServiceException ex) {
1198
          result.ex = ex;
1199
        } catch (Throwable th) {
1200
          LOGGER.error("Internal error processing billOrder", th);
1201
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1202
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1203
          x.write(oprot);
1204
          oprot.writeMessageEnd();
1205
          oprot.getTransport().flush();
1206
          return;
1207
        }
1208
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1209
        result.write(oprot);
1210
        oprot.writeMessageEnd();
1211
        oprot.getTransport().flush();
1212
      }
1213
 
1214
    }
1215
 
483 rajveer 1216
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1217
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1218
      {
483 rajveer 1219
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1220
        args.read(iprot);
1221
        iprot.readMessageEnd();
483 rajveer 1222
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1223
        try {
483 rajveer 1224
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1225
        } catch (TransactionServiceException ex) {
1226
          result.ex = ex;
1227
        } catch (Throwable th) {
483 rajveer 1228
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1229
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1230
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1231
          x.write(oprot);
1232
          oprot.writeMessageEnd();
1233
          oprot.getTransport().flush();
1234
          return;
1235
        }
483 rajveer 1236
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1237
        result.write(oprot);
1238
        oprot.writeMessageEnd();
1239
        oprot.getTransport().flush();
1240
      }
1241
 
1242
    }
1243
 
483 rajveer 1244
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1245
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1246
      {
483 rajveer 1247
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1248
        args.read(iprot);
1249
        iprot.readMessageEnd();
483 rajveer 1250
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1251
        try {
483 rajveer 1252
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1253
        } catch (TransactionServiceException ex) {
1254
          result.ex = ex;
1255
        } catch (Throwable th) {
483 rajveer 1256
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1257
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1258
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1259
          x.write(oprot);
1260
          oprot.writeMessageEnd();
1261
          oprot.getTransport().flush();
1262
          return;
1263
        }
483 rajveer 1264
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1265
        result.write(oprot);
1266
        oprot.writeMessageEnd();
1267
        oprot.getTransport().flush();
1268
      }
1269
 
1270
    }
1271
 
483 rajveer 1272
    private class createOrder implements ProcessFunction {
68 ashish 1273
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1274
      {
483 rajveer 1275
        createOrder_args args = new createOrder_args();
68 ashish 1276
        args.read(iprot);
1277
        iprot.readMessageEnd();
483 rajveer 1278
        createOrder_result result = new createOrder_result();
68 ashish 1279
        try {
483 rajveer 1280
          result.success = iface_.createOrder(args.order);
68 ashish 1281
          result.setSuccessIsSet(true);
1282
        } catch (TransactionServiceException ex) {
1283
          result.ex = ex;
1284
        } catch (Throwable th) {
483 rajveer 1285
          LOGGER.error("Internal error processing createOrder", th);
1286
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1287
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1288
          x.write(oprot);
1289
          oprot.writeMessageEnd();
1290
          oprot.getTransport().flush();
1291
          return;
1292
        }
483 rajveer 1293
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1294
        result.write(oprot);
1295
        oprot.writeMessageEnd();
1296
        oprot.getTransport().flush();
1297
      }
1298
 
1299
    }
1300
 
483 rajveer 1301
    private class getOrder implements ProcessFunction {
68 ashish 1302
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1303
      {
483 rajveer 1304
        getOrder_args args = new getOrder_args();
68 ashish 1305
        args.read(iprot);
1306
        iprot.readMessageEnd();
483 rajveer 1307
        getOrder_result result = new getOrder_result();
68 ashish 1308
        try {
483 rajveer 1309
          result.success = iface_.getOrder(args.id);
68 ashish 1310
        } catch (TransactionServiceException ex) {
1311
          result.ex = ex;
1312
        } catch (Throwable th) {
483 rajveer 1313
          LOGGER.error("Internal error processing getOrder", th);
1314
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1315
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1316
          x.write(oprot);
1317
          oprot.writeMessageEnd();
1318
          oprot.getTransport().flush();
1319
          return;
1320
        }
483 rajveer 1321
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1322
        result.write(oprot);
1323
        oprot.writeMessageEnd();
1324
        oprot.getTransport().flush();
1325
      }
1326
 
1327
    }
1328
 
483 rajveer 1329
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1330
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1331
      {
483 rajveer 1332
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1333
        args.read(iprot);
1334
        iprot.readMessageEnd();
483 rajveer 1335
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1336
        try {
483 rajveer 1337
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1338
        } catch (TransactionServiceException ex) {
1339
          result.ex = ex;
1340
        } catch (Throwable th) {
483 rajveer 1341
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1342
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1343
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1344
          x.write(oprot);
1345
          oprot.writeMessageEnd();
1346
          oprot.getTransport().flush();
1347
          return;
1348
        }
483 rajveer 1349
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1350
        result.write(oprot);
1351
        oprot.writeMessageEnd();
1352
        oprot.getTransport().flush();
1353
      }
1354
 
1355
    }
1356
 
758 chandransh 1357
    private class markOrdersAsManifested implements ProcessFunction {
1358
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1359
      {
1360
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1361
        args.read(iprot);
1362
        iprot.readMessageEnd();
1363
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1364
        try {
1365
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1366
          result.setSuccessIsSet(true);
1367
        } catch (TransactionServiceException ex) {
1368
          result.ex = ex;
1369
        } catch (Throwable th) {
1370
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1371
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1372
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1373
          x.write(oprot);
1374
          oprot.writeMessageEnd();
1375
          oprot.getTransport().flush();
1376
          return;
1377
        }
1378
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1379
        result.write(oprot);
1380
        oprot.writeMessageEnd();
1381
        oprot.getTransport().flush();
1382
      }
1383
 
1384
    }
1385
 
305 ashish 1386
    private class getAlerts implements ProcessFunction {
1387
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1388
      {
1389
        getAlerts_args args = new getAlerts_args();
1390
        args.read(iprot);
1391
        iprot.readMessageEnd();
1392
        getAlerts_result result = new getAlerts_result();
483 rajveer 1393
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1394
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1395
        result.write(oprot);
1396
        oprot.writeMessageEnd();
1397
        oprot.getTransport().flush();
1398
      }
1399
 
1400
    }
1401
 
1402
    private class setAlert implements ProcessFunction {
1403
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1404
      {
1405
        setAlert_args args = new setAlert_args();
1406
        args.read(iprot);
1407
        iprot.readMessageEnd();
1408
        setAlert_result result = new setAlert_result();
483 rajveer 1409
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1410
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1411
        result.write(oprot);
1412
        oprot.writeMessageEnd();
1413
        oprot.getTransport().flush();
1414
      }
1415
 
1416
    }
1417
 
68 ashish 1418
  }
1419
 
764 rajveer 1420
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1421
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1422
 
1423
 
1424
 
1425
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1426
    public enum _Fields implements TFieldIdEnum {
1427
;
1428
 
1429
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1431
 
1432
      static {
1433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1434
          byId.put((int)field._thriftId, field);
1435
          byName.put(field.getFieldName(), field);
1436
        }
1437
      }
1438
 
1439
      /**
1440
       * Find the _Fields constant that matches fieldId, or null if its not found.
1441
       */
1442
      public static _Fields findByThriftId(int fieldId) {
1443
        return byId.get(fieldId);
1444
      }
1445
 
1446
      /**
1447
       * Find the _Fields constant that matches fieldId, throwing an exception
1448
       * if it is not found.
1449
       */
1450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1451
        _Fields fields = findByThriftId(fieldId);
1452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1453
        return fields;
1454
      }
1455
 
1456
      /**
1457
       * Find the _Fields constant that matches name, or null if its not found.
1458
       */
1459
      public static _Fields findByName(String name) {
1460
        return byName.get(name);
1461
      }
1462
 
1463
      private final short _thriftId;
1464
      private final String _fieldName;
1465
 
1466
      _Fields(short thriftId, String fieldName) {
1467
        _thriftId = thriftId;
1468
        _fieldName = fieldName;
1469
      }
1470
 
1471
      public short getThriftFieldId() {
1472
        return _thriftId;
1473
      }
1474
 
1475
      public String getFieldName() {
1476
        return _fieldName;
1477
      }
1478
    }
1479
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1480
    }});
1481
 
1482
    static {
1483
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1484
    }
1485
 
1486
    public closeSession_args() {
1487
    }
1488
 
1489
    /**
1490
     * Performs a deep copy on <i>other</i>.
1491
     */
1492
    public closeSession_args(closeSession_args other) {
1493
    }
1494
 
1495
    public closeSession_args deepCopy() {
1496
      return new closeSession_args(this);
1497
    }
1498
 
1499
    @Deprecated
1500
    public closeSession_args clone() {
1501
      return new closeSession_args(this);
1502
    }
1503
 
1504
    public void setFieldValue(_Fields field, Object value) {
1505
      switch (field) {
1506
      }
1507
    }
1508
 
1509
    public void setFieldValue(int fieldID, Object value) {
1510
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1511
    }
1512
 
1513
    public Object getFieldValue(_Fields field) {
1514
      switch (field) {
1515
      }
1516
      throw new IllegalStateException();
1517
    }
1518
 
1519
    public Object getFieldValue(int fieldId) {
1520
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1521
    }
1522
 
1523
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1524
    public boolean isSet(_Fields field) {
1525
      switch (field) {
1526
      }
1527
      throw new IllegalStateException();
1528
    }
1529
 
1530
    public boolean isSet(int fieldID) {
1531
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1532
    }
1533
 
1534
    @Override
1535
    public boolean equals(Object that) {
1536
      if (that == null)
1537
        return false;
1538
      if (that instanceof closeSession_args)
1539
        return this.equals((closeSession_args)that);
1540
      return false;
1541
    }
1542
 
1543
    public boolean equals(closeSession_args that) {
1544
      if (that == null)
1545
        return false;
1546
 
1547
      return true;
1548
    }
1549
 
1550
    @Override
1551
    public int hashCode() {
1552
      return 0;
1553
    }
1554
 
1555
    public int compareTo(closeSession_args other) {
1556
      if (!getClass().equals(other.getClass())) {
1557
        return getClass().getName().compareTo(other.getClass().getName());
1558
      }
1559
 
1560
      int lastComparison = 0;
1561
      closeSession_args typedOther = (closeSession_args)other;
1562
 
1563
      return 0;
1564
    }
1565
 
1566
    public void read(TProtocol iprot) throws TException {
1567
      TField field;
1568
      iprot.readStructBegin();
1569
      while (true)
1570
      {
1571
        field = iprot.readFieldBegin();
1572
        if (field.type == TType.STOP) { 
1573
          break;
1574
        }
1575
        _Fields fieldId = _Fields.findByThriftId(field.id);
1576
        if (fieldId == null) {
1577
          TProtocolUtil.skip(iprot, field.type);
1578
        } else {
1579
          switch (fieldId) {
1580
          }
1581
          iprot.readFieldEnd();
1582
        }
1583
      }
1584
      iprot.readStructEnd();
1585
      validate();
1586
    }
1587
 
1588
    public void write(TProtocol oprot) throws TException {
1589
      validate();
1590
 
1591
      oprot.writeStructBegin(STRUCT_DESC);
1592
      oprot.writeFieldStop();
1593
      oprot.writeStructEnd();
1594
    }
1595
 
1596
    @Override
1597
    public String toString() {
1598
      StringBuilder sb = new StringBuilder("closeSession_args(");
1599
      boolean first = true;
1600
 
1601
      sb.append(")");
1602
      return sb.toString();
1603
    }
1604
 
1605
    public void validate() throws TException {
1606
      // check for required fields
1607
    }
1608
 
1609
  }
1610
 
1611
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1612
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1613
 
1614
 
1615
 
1616
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1617
    public enum _Fields implements TFieldIdEnum {
1618
;
1619
 
1620
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1621
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1622
 
1623
      static {
1624
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1625
          byId.put((int)field._thriftId, field);
1626
          byName.put(field.getFieldName(), field);
1627
        }
1628
      }
1629
 
1630
      /**
1631
       * Find the _Fields constant that matches fieldId, or null if its not found.
1632
       */
1633
      public static _Fields findByThriftId(int fieldId) {
1634
        return byId.get(fieldId);
1635
      }
1636
 
1637
      /**
1638
       * Find the _Fields constant that matches fieldId, throwing an exception
1639
       * if it is not found.
1640
       */
1641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1642
        _Fields fields = findByThriftId(fieldId);
1643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1644
        return fields;
1645
      }
1646
 
1647
      /**
1648
       * Find the _Fields constant that matches name, or null if its not found.
1649
       */
1650
      public static _Fields findByName(String name) {
1651
        return byName.get(name);
1652
      }
1653
 
1654
      private final short _thriftId;
1655
      private final String _fieldName;
1656
 
1657
      _Fields(short thriftId, String fieldName) {
1658
        _thriftId = thriftId;
1659
        _fieldName = fieldName;
1660
      }
1661
 
1662
      public short getThriftFieldId() {
1663
        return _thriftId;
1664
      }
1665
 
1666
      public String getFieldName() {
1667
        return _fieldName;
1668
      }
1669
    }
1670
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1671
    }});
1672
 
1673
    static {
1674
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1675
    }
1676
 
1677
    public closeSession_result() {
1678
    }
1679
 
1680
    /**
1681
     * Performs a deep copy on <i>other</i>.
1682
     */
1683
    public closeSession_result(closeSession_result other) {
1684
    }
1685
 
1686
    public closeSession_result deepCopy() {
1687
      return new closeSession_result(this);
1688
    }
1689
 
1690
    @Deprecated
1691
    public closeSession_result clone() {
1692
      return new closeSession_result(this);
1693
    }
1694
 
1695
    public void setFieldValue(_Fields field, Object value) {
1696
      switch (field) {
1697
      }
1698
    }
1699
 
1700
    public void setFieldValue(int fieldID, Object value) {
1701
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1702
    }
1703
 
1704
    public Object getFieldValue(_Fields field) {
1705
      switch (field) {
1706
      }
1707
      throw new IllegalStateException();
1708
    }
1709
 
1710
    public Object getFieldValue(int fieldId) {
1711
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1712
    }
1713
 
1714
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1715
    public boolean isSet(_Fields field) {
1716
      switch (field) {
1717
      }
1718
      throw new IllegalStateException();
1719
    }
1720
 
1721
    public boolean isSet(int fieldID) {
1722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1723
    }
1724
 
1725
    @Override
1726
    public boolean equals(Object that) {
1727
      if (that == null)
1728
        return false;
1729
      if (that instanceof closeSession_result)
1730
        return this.equals((closeSession_result)that);
1731
      return false;
1732
    }
1733
 
1734
    public boolean equals(closeSession_result that) {
1735
      if (that == null)
1736
        return false;
1737
 
1738
      return true;
1739
    }
1740
 
1741
    @Override
1742
    public int hashCode() {
1743
      return 0;
1744
    }
1745
 
1746
    public int compareTo(closeSession_result other) {
1747
      if (!getClass().equals(other.getClass())) {
1748
        return getClass().getName().compareTo(other.getClass().getName());
1749
      }
1750
 
1751
      int lastComparison = 0;
1752
      closeSession_result typedOther = (closeSession_result)other;
1753
 
1754
      return 0;
1755
    }
1756
 
1757
    public void read(TProtocol iprot) throws TException {
1758
      TField field;
1759
      iprot.readStructBegin();
1760
      while (true)
1761
      {
1762
        field = iprot.readFieldBegin();
1763
        if (field.type == TType.STOP) { 
1764
          break;
1765
        }
1766
        _Fields fieldId = _Fields.findByThriftId(field.id);
1767
        if (fieldId == null) {
1768
          TProtocolUtil.skip(iprot, field.type);
1769
        } else {
1770
          switch (fieldId) {
1771
          }
1772
          iprot.readFieldEnd();
1773
        }
1774
      }
1775
      iprot.readStructEnd();
1776
      validate();
1777
    }
1778
 
1779
    public void write(TProtocol oprot) throws TException {
1780
      oprot.writeStructBegin(STRUCT_DESC);
1781
 
1782
      oprot.writeFieldStop();
1783
      oprot.writeStructEnd();
1784
    }
1785
 
1786
    @Override
1787
    public String toString() {
1788
      StringBuilder sb = new StringBuilder("closeSession_result(");
1789
      boolean first = true;
1790
 
1791
      sb.append(")");
1792
      return sb.toString();
1793
    }
1794
 
1795
    public void validate() throws TException {
1796
      // check for required fields
1797
    }
1798
 
1799
  }
1800
 
684 chandransh 1801
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 1802
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
1803
 
1804
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
1805
 
1806
    private Transaction transaction;
1807
 
1808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1809
    public enum _Fields implements TFieldIdEnum {
1810
      TRANSACTION((short)1, "transaction");
1811
 
1812
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1813
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1814
 
1815
      static {
1816
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1817
          byId.put((int)field._thriftId, field);
1818
          byName.put(field.getFieldName(), field);
1819
        }
1820
      }
1821
 
1822
      /**
1823
       * Find the _Fields constant that matches fieldId, or null if its not found.
1824
       */
1825
      public static _Fields findByThriftId(int fieldId) {
1826
        return byId.get(fieldId);
1827
      }
1828
 
1829
      /**
1830
       * Find the _Fields constant that matches fieldId, throwing an exception
1831
       * if it is not found.
1832
       */
1833
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1834
        _Fields fields = findByThriftId(fieldId);
1835
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1836
        return fields;
1837
      }
1838
 
1839
      /**
1840
       * Find the _Fields constant that matches name, or null if its not found.
1841
       */
1842
      public static _Fields findByName(String name) {
1843
        return byName.get(name);
1844
      }
1845
 
1846
      private final short _thriftId;
1847
      private final String _fieldName;
1848
 
1849
      _Fields(short thriftId, String fieldName) {
1850
        _thriftId = thriftId;
1851
        _fieldName = fieldName;
1852
      }
1853
 
1854
      public short getThriftFieldId() {
1855
        return _thriftId;
1856
      }
1857
 
1858
      public String getFieldName() {
1859
        return _fieldName;
1860
      }
1861
    }
1862
 
1863
    // isset id assignments
1864
 
1865
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1866
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
1867
          new StructMetaData(TType.STRUCT, Transaction.class)));
1868
    }});
1869
 
1870
    static {
1871
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
1872
    }
1873
 
1874
    public createTransaction_args() {
1875
    }
1876
 
1877
    public createTransaction_args(
1878
      Transaction transaction)
1879
    {
1880
      this();
1881
      this.transaction = transaction;
1882
    }
1883
 
1884
    /**
1885
     * Performs a deep copy on <i>other</i>.
1886
     */
1887
    public createTransaction_args(createTransaction_args other) {
1888
      if (other.isSetTransaction()) {
1889
        this.transaction = new Transaction(other.transaction);
1890
      }
1891
    }
1892
 
1893
    public createTransaction_args deepCopy() {
1894
      return new createTransaction_args(this);
1895
    }
1896
 
1897
    @Deprecated
1898
    public createTransaction_args clone() {
1899
      return new createTransaction_args(this);
1900
    }
1901
 
1902
    public Transaction getTransaction() {
1903
      return this.transaction;
1904
    }
1905
 
1906
    public createTransaction_args setTransaction(Transaction transaction) {
1907
      this.transaction = transaction;
1908
      return this;
1909
    }
1910
 
1911
    public void unsetTransaction() {
1912
      this.transaction = null;
1913
    }
1914
 
1915
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
1916
    public boolean isSetTransaction() {
1917
      return this.transaction != null;
1918
    }
1919
 
1920
    public void setTransactionIsSet(boolean value) {
1921
      if (!value) {
1922
        this.transaction = null;
1923
      }
1924
    }
1925
 
1926
    public void setFieldValue(_Fields field, Object value) {
1927
      switch (field) {
1928
      case TRANSACTION:
1929
        if (value == null) {
1930
          unsetTransaction();
1931
        } else {
1932
          setTransaction((Transaction)value);
1933
        }
1934
        break;
1935
 
1936
      }
1937
    }
1938
 
1939
    public void setFieldValue(int fieldID, Object value) {
1940
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1941
    }
1942
 
1943
    public Object getFieldValue(_Fields field) {
1944
      switch (field) {
1945
      case TRANSACTION:
1946
        return getTransaction();
1947
 
1948
      }
1949
      throw new IllegalStateException();
1950
    }
1951
 
1952
    public Object getFieldValue(int fieldId) {
1953
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1954
    }
1955
 
1956
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1957
    public boolean isSet(_Fields field) {
1958
      switch (field) {
1959
      case TRANSACTION:
1960
        return isSetTransaction();
1961
      }
1962
      throw new IllegalStateException();
1963
    }
1964
 
1965
    public boolean isSet(int fieldID) {
1966
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1967
    }
1968
 
1969
    @Override
1970
    public boolean equals(Object that) {
1971
      if (that == null)
1972
        return false;
1973
      if (that instanceof createTransaction_args)
1974
        return this.equals((createTransaction_args)that);
1975
      return false;
1976
    }
1977
 
1978
    public boolean equals(createTransaction_args that) {
1979
      if (that == null)
1980
        return false;
1981
 
1982
      boolean this_present_transaction = true && this.isSetTransaction();
1983
      boolean that_present_transaction = true && that.isSetTransaction();
1984
      if (this_present_transaction || that_present_transaction) {
1985
        if (!(this_present_transaction && that_present_transaction))
1986
          return false;
1987
        if (!this.transaction.equals(that.transaction))
1988
          return false;
1989
      }
1990
 
1991
      return true;
1992
    }
1993
 
1994
    @Override
1995
    public int hashCode() {
1996
      return 0;
1997
    }
1998
 
684 chandransh 1999
    public int compareTo(createTransaction_args other) {
2000
      if (!getClass().equals(other.getClass())) {
2001
        return getClass().getName().compareTo(other.getClass().getName());
2002
      }
2003
 
2004
      int lastComparison = 0;
2005
      createTransaction_args typedOther = (createTransaction_args)other;
2006
 
2007
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2008
      if (lastComparison != 0) {
2009
        return lastComparison;
2010
      }
2011
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2012
      if (lastComparison != 0) {
2013
        return lastComparison;
2014
      }
2015
      return 0;
2016
    }
2017
 
68 ashish 2018
    public void read(TProtocol iprot) throws TException {
2019
      TField field;
2020
      iprot.readStructBegin();
2021
      while (true)
2022
      {
2023
        field = iprot.readFieldBegin();
2024
        if (field.type == TType.STOP) { 
2025
          break;
2026
        }
2027
        _Fields fieldId = _Fields.findByThriftId(field.id);
2028
        if (fieldId == null) {
2029
          TProtocolUtil.skip(iprot, field.type);
2030
        } else {
2031
          switch (fieldId) {
2032
            case TRANSACTION:
2033
              if (field.type == TType.STRUCT) {
2034
                this.transaction = new Transaction();
2035
                this.transaction.read(iprot);
2036
              } else { 
2037
                TProtocolUtil.skip(iprot, field.type);
2038
              }
2039
              break;
2040
          }
2041
          iprot.readFieldEnd();
2042
        }
2043
      }
2044
      iprot.readStructEnd();
2045
      validate();
2046
    }
2047
 
2048
    public void write(TProtocol oprot) throws TException {
2049
      validate();
2050
 
2051
      oprot.writeStructBegin(STRUCT_DESC);
2052
      if (this.transaction != null) {
2053
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2054
        this.transaction.write(oprot);
2055
        oprot.writeFieldEnd();
2056
      }
2057
      oprot.writeFieldStop();
2058
      oprot.writeStructEnd();
2059
    }
2060
 
2061
    @Override
2062
    public String toString() {
2063
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2064
      boolean first = true;
2065
 
2066
      sb.append("transaction:");
2067
      if (this.transaction == null) {
2068
        sb.append("null");
2069
      } else {
2070
        sb.append(this.transaction);
2071
      }
2072
      first = false;
2073
      sb.append(")");
2074
      return sb.toString();
2075
    }
2076
 
2077
    public void validate() throws TException {
2078
      // check for required fields
2079
    }
2080
 
2081
  }
2082
 
2083
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2084
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2085
 
132 ashish 2086
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2087
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2088
 
132 ashish 2089
    private long success;
68 ashish 2090
    private TransactionServiceException ex;
2091
 
2092
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2093
    public enum _Fields implements TFieldIdEnum {
132 ashish 2094
      SUCCESS((short)0, "success"),
68 ashish 2095
      EX((short)1, "ex");
2096
 
2097
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2098
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2099
 
2100
      static {
2101
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2102
          byId.put((int)field._thriftId, field);
2103
          byName.put(field.getFieldName(), field);
2104
        }
2105
      }
2106
 
2107
      /**
2108
       * Find the _Fields constant that matches fieldId, or null if its not found.
2109
       */
2110
      public static _Fields findByThriftId(int fieldId) {
2111
        return byId.get(fieldId);
2112
      }
2113
 
2114
      /**
2115
       * Find the _Fields constant that matches fieldId, throwing an exception
2116
       * if it is not found.
2117
       */
2118
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2119
        _Fields fields = findByThriftId(fieldId);
2120
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2121
        return fields;
2122
      }
2123
 
2124
      /**
2125
       * Find the _Fields constant that matches name, or null if its not found.
2126
       */
2127
      public static _Fields findByName(String name) {
2128
        return byName.get(name);
2129
      }
2130
 
2131
      private final short _thriftId;
2132
      private final String _fieldName;
2133
 
2134
      _Fields(short thriftId, String fieldName) {
2135
        _thriftId = thriftId;
2136
        _fieldName = fieldName;
2137
      }
2138
 
2139
      public short getThriftFieldId() {
2140
        return _thriftId;
2141
      }
2142
 
2143
      public String getFieldName() {
2144
        return _fieldName;
2145
      }
2146
    }
2147
 
2148
    // isset id assignments
132 ashish 2149
    private static final int __SUCCESS_ISSET_ID = 0;
2150
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2151
 
2152
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2153
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2154
          new FieldValueMetaData(TType.I64)));
68 ashish 2155
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2156
          new FieldValueMetaData(TType.STRUCT)));
2157
    }});
2158
 
2159
    static {
2160
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2161
    }
2162
 
2163
    public createTransaction_result() {
2164
    }
2165
 
2166
    public createTransaction_result(
132 ashish 2167
      long success,
68 ashish 2168
      TransactionServiceException ex)
2169
    {
2170
      this();
132 ashish 2171
      this.success = success;
2172
      setSuccessIsSet(true);
68 ashish 2173
      this.ex = ex;
2174
    }
2175
 
2176
    /**
2177
     * Performs a deep copy on <i>other</i>.
2178
     */
2179
    public createTransaction_result(createTransaction_result other) {
132 ashish 2180
      __isset_bit_vector.clear();
2181
      __isset_bit_vector.or(other.__isset_bit_vector);
2182
      this.success = other.success;
68 ashish 2183
      if (other.isSetEx()) {
2184
        this.ex = new TransactionServiceException(other.ex);
2185
      }
2186
    }
2187
 
2188
    public createTransaction_result deepCopy() {
2189
      return new createTransaction_result(this);
2190
    }
2191
 
2192
    @Deprecated
2193
    public createTransaction_result clone() {
2194
      return new createTransaction_result(this);
2195
    }
2196
 
132 ashish 2197
    public long getSuccess() {
2198
      return this.success;
2199
    }
2200
 
2201
    public createTransaction_result setSuccess(long success) {
2202
      this.success = success;
2203
      setSuccessIsSet(true);
2204
      return this;
2205
    }
2206
 
2207
    public void unsetSuccess() {
2208
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2209
    }
2210
 
2211
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2212
    public boolean isSetSuccess() {
2213
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2214
    }
2215
 
2216
    public void setSuccessIsSet(boolean value) {
2217
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2218
    }
2219
 
68 ashish 2220
    public TransactionServiceException getEx() {
2221
      return this.ex;
2222
    }
2223
 
2224
    public createTransaction_result setEx(TransactionServiceException ex) {
2225
      this.ex = ex;
2226
      return this;
2227
    }
2228
 
2229
    public void unsetEx() {
2230
      this.ex = null;
2231
    }
2232
 
2233
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2234
    public boolean isSetEx() {
2235
      return this.ex != null;
2236
    }
2237
 
2238
    public void setExIsSet(boolean value) {
2239
      if (!value) {
2240
        this.ex = null;
2241
      }
2242
    }
2243
 
2244
    public void setFieldValue(_Fields field, Object value) {
2245
      switch (field) {
132 ashish 2246
      case SUCCESS:
2247
        if (value == null) {
2248
          unsetSuccess();
2249
        } else {
2250
          setSuccess((Long)value);
2251
        }
2252
        break;
2253
 
68 ashish 2254
      case EX:
2255
        if (value == null) {
2256
          unsetEx();
2257
        } else {
2258
          setEx((TransactionServiceException)value);
2259
        }
2260
        break;
2261
 
2262
      }
2263
    }
2264
 
2265
    public void setFieldValue(int fieldID, Object value) {
2266
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2267
    }
2268
 
2269
    public Object getFieldValue(_Fields field) {
2270
      switch (field) {
132 ashish 2271
      case SUCCESS:
2272
        return new Long(getSuccess());
2273
 
68 ashish 2274
      case EX:
2275
        return getEx();
2276
 
2277
      }
2278
      throw new IllegalStateException();
2279
    }
2280
 
2281
    public Object getFieldValue(int fieldId) {
2282
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2283
    }
2284
 
2285
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2286
    public boolean isSet(_Fields field) {
2287
      switch (field) {
132 ashish 2288
      case SUCCESS:
2289
        return isSetSuccess();
68 ashish 2290
      case EX:
2291
        return isSetEx();
2292
      }
2293
      throw new IllegalStateException();
2294
    }
2295
 
2296
    public boolean isSet(int fieldID) {
2297
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2298
    }
2299
 
2300
    @Override
2301
    public boolean equals(Object that) {
2302
      if (that == null)
2303
        return false;
2304
      if (that instanceof createTransaction_result)
2305
        return this.equals((createTransaction_result)that);
2306
      return false;
2307
    }
2308
 
2309
    public boolean equals(createTransaction_result that) {
2310
      if (that == null)
2311
        return false;
2312
 
132 ashish 2313
      boolean this_present_success = true;
2314
      boolean that_present_success = true;
2315
      if (this_present_success || that_present_success) {
2316
        if (!(this_present_success && that_present_success))
2317
          return false;
2318
        if (this.success != that.success)
2319
          return false;
2320
      }
2321
 
68 ashish 2322
      boolean this_present_ex = true && this.isSetEx();
2323
      boolean that_present_ex = true && that.isSetEx();
2324
      if (this_present_ex || that_present_ex) {
2325
        if (!(this_present_ex && that_present_ex))
2326
          return false;
2327
        if (!this.ex.equals(that.ex))
2328
          return false;
2329
      }
2330
 
2331
      return true;
2332
    }
2333
 
2334
    @Override
2335
    public int hashCode() {
2336
      return 0;
2337
    }
2338
 
2339
    public int compareTo(createTransaction_result other) {
2340
      if (!getClass().equals(other.getClass())) {
2341
        return getClass().getName().compareTo(other.getClass().getName());
2342
      }
2343
 
2344
      int lastComparison = 0;
2345
      createTransaction_result typedOther = (createTransaction_result)other;
2346
 
132 ashish 2347
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2348
      if (lastComparison != 0) {
2349
        return lastComparison;
2350
      }
2351
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2352
      if (lastComparison != 0) {
2353
        return lastComparison;
2354
      }
68 ashish 2355
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2356
      if (lastComparison != 0) {
2357
        return lastComparison;
2358
      }
2359
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2360
      if (lastComparison != 0) {
2361
        return lastComparison;
2362
      }
2363
      return 0;
2364
    }
2365
 
2366
    public void read(TProtocol iprot) throws TException {
2367
      TField field;
2368
      iprot.readStructBegin();
2369
      while (true)
2370
      {
2371
        field = iprot.readFieldBegin();
2372
        if (field.type == TType.STOP) { 
2373
          break;
2374
        }
2375
        _Fields fieldId = _Fields.findByThriftId(field.id);
2376
        if (fieldId == null) {
2377
          TProtocolUtil.skip(iprot, field.type);
2378
        } else {
2379
          switch (fieldId) {
132 ashish 2380
            case SUCCESS:
2381
              if (field.type == TType.I64) {
2382
                this.success = iprot.readI64();
2383
                setSuccessIsSet(true);
2384
              } else { 
2385
                TProtocolUtil.skip(iprot, field.type);
2386
              }
2387
              break;
68 ashish 2388
            case EX:
2389
              if (field.type == TType.STRUCT) {
2390
                this.ex = new TransactionServiceException();
2391
                this.ex.read(iprot);
2392
              } else { 
2393
                TProtocolUtil.skip(iprot, field.type);
2394
              }
2395
              break;
2396
          }
2397
          iprot.readFieldEnd();
2398
        }
2399
      }
2400
      iprot.readStructEnd();
2401
      validate();
2402
    }
2403
 
2404
    public void write(TProtocol oprot) throws TException {
2405
      oprot.writeStructBegin(STRUCT_DESC);
2406
 
132 ashish 2407
      if (this.isSetSuccess()) {
2408
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2409
        oprot.writeI64(this.success);
2410
        oprot.writeFieldEnd();
2411
      } else if (this.isSetEx()) {
68 ashish 2412
        oprot.writeFieldBegin(EX_FIELD_DESC);
2413
        this.ex.write(oprot);
2414
        oprot.writeFieldEnd();
2415
      }
2416
      oprot.writeFieldStop();
2417
      oprot.writeStructEnd();
2418
    }
2419
 
2420
    @Override
2421
    public String toString() {
2422
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2423
      boolean first = true;
2424
 
132 ashish 2425
      sb.append("success:");
2426
      sb.append(this.success);
2427
      first = false;
2428
      if (!first) sb.append(", ");
68 ashish 2429
      sb.append("ex:");
2430
      if (this.ex == null) {
2431
        sb.append("null");
2432
      } else {
2433
        sb.append(this.ex);
2434
      }
2435
      first = false;
2436
      sb.append(")");
2437
      return sb.toString();
2438
    }
2439
 
2440
    public void validate() throws TException {
2441
      // check for required fields
2442
    }
2443
 
2444
  }
2445
 
2446
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2447
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2448
 
2449
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2450
 
2451
    private long id;
2452
 
2453
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2454
    public enum _Fields implements TFieldIdEnum {
2455
      ID((short)1, "id");
2456
 
2457
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2458
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2459
 
2460
      static {
2461
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2462
          byId.put((int)field._thriftId, field);
2463
          byName.put(field.getFieldName(), field);
2464
        }
2465
      }
2466
 
2467
      /**
2468
       * Find the _Fields constant that matches fieldId, or null if its not found.
2469
       */
2470
      public static _Fields findByThriftId(int fieldId) {
2471
        return byId.get(fieldId);
2472
      }
2473
 
2474
      /**
2475
       * Find the _Fields constant that matches fieldId, throwing an exception
2476
       * if it is not found.
2477
       */
2478
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2479
        _Fields fields = findByThriftId(fieldId);
2480
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2481
        return fields;
2482
      }
2483
 
2484
      /**
2485
       * Find the _Fields constant that matches name, or null if its not found.
2486
       */
2487
      public static _Fields findByName(String name) {
2488
        return byName.get(name);
2489
      }
2490
 
2491
      private final short _thriftId;
2492
      private final String _fieldName;
2493
 
2494
      _Fields(short thriftId, String fieldName) {
2495
        _thriftId = thriftId;
2496
        _fieldName = fieldName;
2497
      }
2498
 
2499
      public short getThriftFieldId() {
2500
        return _thriftId;
2501
      }
2502
 
2503
      public String getFieldName() {
2504
        return _fieldName;
2505
      }
2506
    }
2507
 
2508
    // isset id assignments
2509
    private static final int __ID_ISSET_ID = 0;
2510
    private BitSet __isset_bit_vector = new BitSet(1);
2511
 
2512
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2513
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2514
          new FieldValueMetaData(TType.I64)));
2515
    }});
2516
 
2517
    static {
2518
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2519
    }
2520
 
2521
    public getTransaction_args() {
2522
    }
2523
 
2524
    public getTransaction_args(
2525
      long id)
2526
    {
2527
      this();
2528
      this.id = id;
2529
      setIdIsSet(true);
2530
    }
2531
 
2532
    /**
2533
     * Performs a deep copy on <i>other</i>.
2534
     */
2535
    public getTransaction_args(getTransaction_args other) {
2536
      __isset_bit_vector.clear();
2537
      __isset_bit_vector.or(other.__isset_bit_vector);
2538
      this.id = other.id;
2539
    }
2540
 
2541
    public getTransaction_args deepCopy() {
2542
      return new getTransaction_args(this);
2543
    }
2544
 
2545
    @Deprecated
2546
    public getTransaction_args clone() {
2547
      return new getTransaction_args(this);
2548
    }
2549
 
2550
    public long getId() {
2551
      return this.id;
2552
    }
2553
 
2554
    public getTransaction_args setId(long id) {
2555
      this.id = id;
2556
      setIdIsSet(true);
2557
      return this;
2558
    }
2559
 
2560
    public void unsetId() {
2561
      __isset_bit_vector.clear(__ID_ISSET_ID);
2562
    }
2563
 
2564
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2565
    public boolean isSetId() {
2566
      return __isset_bit_vector.get(__ID_ISSET_ID);
2567
    }
2568
 
2569
    public void setIdIsSet(boolean value) {
2570
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2571
    }
2572
 
2573
    public void setFieldValue(_Fields field, Object value) {
2574
      switch (field) {
2575
      case ID:
2576
        if (value == null) {
2577
          unsetId();
2578
        } else {
2579
          setId((Long)value);
2580
        }
2581
        break;
2582
 
2583
      }
2584
    }
2585
 
2586
    public void setFieldValue(int fieldID, Object value) {
2587
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2588
    }
2589
 
2590
    public Object getFieldValue(_Fields field) {
2591
      switch (field) {
2592
      case ID:
2593
        return new Long(getId());
2594
 
2595
      }
2596
      throw new IllegalStateException();
2597
    }
2598
 
2599
    public Object getFieldValue(int fieldId) {
2600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2601
    }
2602
 
2603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2604
    public boolean isSet(_Fields field) {
2605
      switch (field) {
2606
      case ID:
2607
        return isSetId();
2608
      }
2609
      throw new IllegalStateException();
2610
    }
2611
 
2612
    public boolean isSet(int fieldID) {
2613
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2614
    }
2615
 
2616
    @Override
2617
    public boolean equals(Object that) {
2618
      if (that == null)
2619
        return false;
2620
      if (that instanceof getTransaction_args)
2621
        return this.equals((getTransaction_args)that);
2622
      return false;
2623
    }
2624
 
2625
    public boolean equals(getTransaction_args that) {
2626
      if (that == null)
2627
        return false;
2628
 
2629
      boolean this_present_id = true;
2630
      boolean that_present_id = true;
2631
      if (this_present_id || that_present_id) {
2632
        if (!(this_present_id && that_present_id))
2633
          return false;
2634
        if (this.id != that.id)
2635
          return false;
2636
      }
2637
 
2638
      return true;
2639
    }
2640
 
2641
    @Override
2642
    public int hashCode() {
2643
      return 0;
2644
    }
2645
 
2646
    public int compareTo(getTransaction_args other) {
2647
      if (!getClass().equals(other.getClass())) {
2648
        return getClass().getName().compareTo(other.getClass().getName());
2649
      }
2650
 
2651
      int lastComparison = 0;
2652
      getTransaction_args typedOther = (getTransaction_args)other;
2653
 
2654
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2655
      if (lastComparison != 0) {
2656
        return lastComparison;
2657
      }
2658
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2659
      if (lastComparison != 0) {
2660
        return lastComparison;
2661
      }
2662
      return 0;
2663
    }
2664
 
2665
    public void read(TProtocol iprot) throws TException {
2666
      TField field;
2667
      iprot.readStructBegin();
2668
      while (true)
2669
      {
2670
        field = iprot.readFieldBegin();
2671
        if (field.type == TType.STOP) { 
2672
          break;
2673
        }
2674
        _Fields fieldId = _Fields.findByThriftId(field.id);
2675
        if (fieldId == null) {
2676
          TProtocolUtil.skip(iprot, field.type);
2677
        } else {
2678
          switch (fieldId) {
2679
            case ID:
2680
              if (field.type == TType.I64) {
2681
                this.id = iprot.readI64();
2682
                setIdIsSet(true);
2683
              } else { 
2684
                TProtocolUtil.skip(iprot, field.type);
2685
              }
2686
              break;
2687
          }
2688
          iprot.readFieldEnd();
2689
        }
2690
      }
2691
      iprot.readStructEnd();
2692
      validate();
2693
    }
2694
 
2695
    public void write(TProtocol oprot) throws TException {
2696
      validate();
2697
 
2698
      oprot.writeStructBegin(STRUCT_DESC);
2699
      oprot.writeFieldBegin(ID_FIELD_DESC);
2700
      oprot.writeI64(this.id);
2701
      oprot.writeFieldEnd();
2702
      oprot.writeFieldStop();
2703
      oprot.writeStructEnd();
2704
    }
2705
 
2706
    @Override
2707
    public String toString() {
2708
      StringBuilder sb = new StringBuilder("getTransaction_args(");
2709
      boolean first = true;
2710
 
2711
      sb.append("id:");
2712
      sb.append(this.id);
2713
      first = false;
2714
      sb.append(")");
2715
      return sb.toString();
2716
    }
2717
 
2718
    public void validate() throws TException {
2719
      // check for required fields
2720
    }
2721
 
2722
  }
2723
 
684 chandransh 2724
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 2725
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
2726
 
2727
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2728
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2729
 
2730
    private Transaction success;
2731
    private TransactionServiceException ex;
2732
 
2733
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2734
    public enum _Fields implements TFieldIdEnum {
2735
      SUCCESS((short)0, "success"),
2736
      EX((short)1, "ex");
2737
 
2738
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2739
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2740
 
2741
      static {
2742
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2743
          byId.put((int)field._thriftId, field);
2744
          byName.put(field.getFieldName(), field);
2745
        }
2746
      }
2747
 
2748
      /**
2749
       * Find the _Fields constant that matches fieldId, or null if its not found.
2750
       */
2751
      public static _Fields findByThriftId(int fieldId) {
2752
        return byId.get(fieldId);
2753
      }
2754
 
2755
      /**
2756
       * Find the _Fields constant that matches fieldId, throwing an exception
2757
       * if it is not found.
2758
       */
2759
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2760
        _Fields fields = findByThriftId(fieldId);
2761
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2762
        return fields;
2763
      }
2764
 
2765
      /**
2766
       * Find the _Fields constant that matches name, or null if its not found.
2767
       */
2768
      public static _Fields findByName(String name) {
2769
        return byName.get(name);
2770
      }
2771
 
2772
      private final short _thriftId;
2773
      private final String _fieldName;
2774
 
2775
      _Fields(short thriftId, String fieldName) {
2776
        _thriftId = thriftId;
2777
        _fieldName = fieldName;
2778
      }
2779
 
2780
      public short getThriftFieldId() {
2781
        return _thriftId;
2782
      }
2783
 
2784
      public String getFieldName() {
2785
        return _fieldName;
2786
      }
2787
    }
2788
 
2789
    // isset id assignments
2790
 
2791
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2792
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2793
          new StructMetaData(TType.STRUCT, Transaction.class)));
2794
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2795
          new FieldValueMetaData(TType.STRUCT)));
2796
    }});
2797
 
2798
    static {
2799
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
2800
    }
2801
 
2802
    public getTransaction_result() {
2803
    }
2804
 
2805
    public getTransaction_result(
2806
      Transaction success,
2807
      TransactionServiceException ex)
2808
    {
2809
      this();
2810
      this.success = success;
2811
      this.ex = ex;
2812
    }
2813
 
2814
    /**
2815
     * Performs a deep copy on <i>other</i>.
2816
     */
2817
    public getTransaction_result(getTransaction_result other) {
2818
      if (other.isSetSuccess()) {
2819
        this.success = new Transaction(other.success);
2820
      }
2821
      if (other.isSetEx()) {
2822
        this.ex = new TransactionServiceException(other.ex);
2823
      }
2824
    }
2825
 
2826
    public getTransaction_result deepCopy() {
2827
      return new getTransaction_result(this);
2828
    }
2829
 
2830
    @Deprecated
2831
    public getTransaction_result clone() {
2832
      return new getTransaction_result(this);
2833
    }
2834
 
2835
    public Transaction getSuccess() {
2836
      return this.success;
2837
    }
2838
 
2839
    public getTransaction_result setSuccess(Transaction success) {
2840
      this.success = success;
2841
      return this;
2842
    }
2843
 
2844
    public void unsetSuccess() {
2845
      this.success = null;
2846
    }
2847
 
2848
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2849
    public boolean isSetSuccess() {
2850
      return this.success != null;
2851
    }
2852
 
2853
    public void setSuccessIsSet(boolean value) {
2854
      if (!value) {
2855
        this.success = null;
2856
      }
2857
    }
2858
 
2859
    public TransactionServiceException getEx() {
2860
      return this.ex;
2861
    }
2862
 
2863
    public getTransaction_result setEx(TransactionServiceException ex) {
2864
      this.ex = ex;
2865
      return this;
2866
    }
2867
 
2868
    public void unsetEx() {
2869
      this.ex = null;
2870
    }
2871
 
2872
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2873
    public boolean isSetEx() {
2874
      return this.ex != null;
2875
    }
2876
 
2877
    public void setExIsSet(boolean value) {
2878
      if (!value) {
2879
        this.ex = null;
2880
      }
2881
    }
2882
 
2883
    public void setFieldValue(_Fields field, Object value) {
2884
      switch (field) {
2885
      case SUCCESS:
2886
        if (value == null) {
2887
          unsetSuccess();
2888
        } else {
2889
          setSuccess((Transaction)value);
2890
        }
2891
        break;
2892
 
2893
      case EX:
2894
        if (value == null) {
2895
          unsetEx();
2896
        } else {
2897
          setEx((TransactionServiceException)value);
2898
        }
2899
        break;
2900
 
2901
      }
2902
    }
2903
 
2904
    public void setFieldValue(int fieldID, Object value) {
2905
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2906
    }
2907
 
2908
    public Object getFieldValue(_Fields field) {
2909
      switch (field) {
2910
      case SUCCESS:
2911
        return getSuccess();
2912
 
2913
      case EX:
2914
        return getEx();
2915
 
2916
      }
2917
      throw new IllegalStateException();
2918
    }
2919
 
2920
    public Object getFieldValue(int fieldId) {
2921
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2922
    }
2923
 
2924
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2925
    public boolean isSet(_Fields field) {
2926
      switch (field) {
2927
      case SUCCESS:
2928
        return isSetSuccess();
2929
      case EX:
2930
        return isSetEx();
2931
      }
2932
      throw new IllegalStateException();
2933
    }
2934
 
2935
    public boolean isSet(int fieldID) {
2936
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2937
    }
2938
 
2939
    @Override
2940
    public boolean equals(Object that) {
2941
      if (that == null)
2942
        return false;
2943
      if (that instanceof getTransaction_result)
2944
        return this.equals((getTransaction_result)that);
2945
      return false;
2946
    }
2947
 
2948
    public boolean equals(getTransaction_result that) {
2949
      if (that == null)
2950
        return false;
2951
 
2952
      boolean this_present_success = true && this.isSetSuccess();
2953
      boolean that_present_success = true && that.isSetSuccess();
2954
      if (this_present_success || that_present_success) {
2955
        if (!(this_present_success && that_present_success))
2956
          return false;
2957
        if (!this.success.equals(that.success))
2958
          return false;
2959
      }
2960
 
2961
      boolean this_present_ex = true && this.isSetEx();
2962
      boolean that_present_ex = true && that.isSetEx();
2963
      if (this_present_ex || that_present_ex) {
2964
        if (!(this_present_ex && that_present_ex))
2965
          return false;
2966
        if (!this.ex.equals(that.ex))
2967
          return false;
2968
      }
2969
 
2970
      return true;
2971
    }
2972
 
2973
    @Override
2974
    public int hashCode() {
2975
      return 0;
2976
    }
2977
 
684 chandransh 2978
    public int compareTo(getTransaction_result other) {
2979
      if (!getClass().equals(other.getClass())) {
2980
        return getClass().getName().compareTo(other.getClass().getName());
2981
      }
2982
 
2983
      int lastComparison = 0;
2984
      getTransaction_result typedOther = (getTransaction_result)other;
2985
 
2986
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2987
      if (lastComparison != 0) {
2988
        return lastComparison;
2989
      }
2990
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2991
      if (lastComparison != 0) {
2992
        return lastComparison;
2993
      }
2994
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2995
      if (lastComparison != 0) {
2996
        return lastComparison;
2997
      }
2998
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2999
      if (lastComparison != 0) {
3000
        return lastComparison;
3001
      }
3002
      return 0;
3003
    }
3004
 
68 ashish 3005
    public void read(TProtocol iprot) throws TException {
3006
      TField field;
3007
      iprot.readStructBegin();
3008
      while (true)
3009
      {
3010
        field = iprot.readFieldBegin();
3011
        if (field.type == TType.STOP) { 
3012
          break;
3013
        }
3014
        _Fields fieldId = _Fields.findByThriftId(field.id);
3015
        if (fieldId == null) {
3016
          TProtocolUtil.skip(iprot, field.type);
3017
        } else {
3018
          switch (fieldId) {
3019
            case SUCCESS:
3020
              if (field.type == TType.STRUCT) {
3021
                this.success = new Transaction();
3022
                this.success.read(iprot);
3023
              } else { 
3024
                TProtocolUtil.skip(iprot, field.type);
3025
              }
3026
              break;
3027
            case EX:
3028
              if (field.type == TType.STRUCT) {
3029
                this.ex = new TransactionServiceException();
3030
                this.ex.read(iprot);
3031
              } else { 
3032
                TProtocolUtil.skip(iprot, field.type);
3033
              }
3034
              break;
3035
          }
3036
          iprot.readFieldEnd();
3037
        }
3038
      }
3039
      iprot.readStructEnd();
3040
      validate();
3041
    }
3042
 
3043
    public void write(TProtocol oprot) throws TException {
3044
      oprot.writeStructBegin(STRUCT_DESC);
3045
 
3046
      if (this.isSetSuccess()) {
3047
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3048
        this.success.write(oprot);
3049
        oprot.writeFieldEnd();
3050
      } else if (this.isSetEx()) {
3051
        oprot.writeFieldBegin(EX_FIELD_DESC);
3052
        this.ex.write(oprot);
3053
        oprot.writeFieldEnd();
3054
      }
3055
      oprot.writeFieldStop();
3056
      oprot.writeStructEnd();
3057
    }
3058
 
3059
    @Override
3060
    public String toString() {
3061
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3062
      boolean first = true;
3063
 
3064
      sb.append("success:");
3065
      if (this.success == null) {
3066
        sb.append("null");
3067
      } else {
3068
        sb.append(this.success);
3069
      }
3070
      first = false;
3071
      if (!first) sb.append(", ");
3072
      sb.append("ex:");
3073
      if (this.ex == null) {
3074
        sb.append("null");
3075
      } else {
3076
        sb.append(this.ex);
3077
      }
3078
      first = false;
3079
      sb.append(")");
3080
      return sb.toString();
3081
    }
3082
 
3083
    public void validate() throws TException {
3084
      // check for required fields
3085
    }
3086
 
3087
  }
3088
 
3089
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3090
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3091
 
3092
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3093
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3094
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3095
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3096
 
3097
    private long customerId;
132 ashish 3098
    private long from_date;
3099
    private long to_date;
68 ashish 3100
    private TransactionStatus status;
3101
 
3102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3103
    public enum _Fields implements TFieldIdEnum {
3104
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3105
      FROM_DATE((short)2, "from_date"),
3106
      TO_DATE((short)3, "to_date"),
68 ashish 3107
      /**
3108
       * 
3109
       * @see TransactionStatus
3110
       */
3111
      STATUS((short)4, "status");
3112
 
3113
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3114
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3115
 
3116
      static {
3117
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3118
          byId.put((int)field._thriftId, field);
3119
          byName.put(field.getFieldName(), field);
3120
        }
3121
      }
3122
 
3123
      /**
3124
       * Find the _Fields constant that matches fieldId, or null if its not found.
3125
       */
3126
      public static _Fields findByThriftId(int fieldId) {
3127
        return byId.get(fieldId);
3128
      }
3129
 
3130
      /**
3131
       * Find the _Fields constant that matches fieldId, throwing an exception
3132
       * if it is not found.
3133
       */
3134
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3135
        _Fields fields = findByThriftId(fieldId);
3136
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3137
        return fields;
3138
      }
3139
 
3140
      /**
3141
       * Find the _Fields constant that matches name, or null if its not found.
3142
       */
3143
      public static _Fields findByName(String name) {
3144
        return byName.get(name);
3145
      }
3146
 
3147
      private final short _thriftId;
3148
      private final String _fieldName;
3149
 
3150
      _Fields(short thriftId, String fieldName) {
3151
        _thriftId = thriftId;
3152
        _fieldName = fieldName;
3153
      }
3154
 
3155
      public short getThriftFieldId() {
3156
        return _thriftId;
3157
      }
3158
 
3159
      public String getFieldName() {
3160
        return _fieldName;
3161
      }
3162
    }
3163
 
3164
    // isset id assignments
3165
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3166
    private static final int __FROM_DATE_ISSET_ID = 1;
3167
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3168
    private BitSet __isset_bit_vector = new BitSet(3);
3169
 
3170
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3171
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3172
          new FieldValueMetaData(TType.I64)));
132 ashish 3173
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3174
          new FieldValueMetaData(TType.I64)));
132 ashish 3175
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3176
          new FieldValueMetaData(TType.I64)));
3177
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3178
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3179
    }});
3180
 
3181
    static {
3182
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3183
    }
3184
 
3185
    public getTransactionsForCustomer_args() {
3186
    }
3187
 
3188
    public getTransactionsForCustomer_args(
3189
      long customerId,
132 ashish 3190
      long from_date,
3191
      long to_date,
68 ashish 3192
      TransactionStatus status)
3193
    {
3194
      this();
3195
      this.customerId = customerId;
3196
      setCustomerIdIsSet(true);
132 ashish 3197
      this.from_date = from_date;
3198
      setFrom_dateIsSet(true);
3199
      this.to_date = to_date;
3200
      setTo_dateIsSet(true);
68 ashish 3201
      this.status = status;
3202
    }
3203
 
3204
    /**
3205
     * Performs a deep copy on <i>other</i>.
3206
     */
3207
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3208
      __isset_bit_vector.clear();
3209
      __isset_bit_vector.or(other.__isset_bit_vector);
3210
      this.customerId = other.customerId;
132 ashish 3211
      this.from_date = other.from_date;
3212
      this.to_date = other.to_date;
68 ashish 3213
      if (other.isSetStatus()) {
3214
        this.status = other.status;
3215
      }
3216
    }
3217
 
3218
    public getTransactionsForCustomer_args deepCopy() {
3219
      return new getTransactionsForCustomer_args(this);
3220
    }
3221
 
3222
    @Deprecated
3223
    public getTransactionsForCustomer_args clone() {
3224
      return new getTransactionsForCustomer_args(this);
3225
    }
3226
 
3227
    public long getCustomerId() {
3228
      return this.customerId;
3229
    }
3230
 
3231
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3232
      this.customerId = customerId;
3233
      setCustomerIdIsSet(true);
3234
      return this;
3235
    }
3236
 
3237
    public void unsetCustomerId() {
3238
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3239
    }
3240
 
3241
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3242
    public boolean isSetCustomerId() {
3243
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3244
    }
3245
 
3246
    public void setCustomerIdIsSet(boolean value) {
3247
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3248
    }
3249
 
132 ashish 3250
    public long getFrom_date() {
3251
      return this.from_date;
68 ashish 3252
    }
3253
 
132 ashish 3254
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3255
      this.from_date = from_date;
3256
      setFrom_dateIsSet(true);
68 ashish 3257
      return this;
3258
    }
3259
 
132 ashish 3260
    public void unsetFrom_date() {
3261
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3262
    }
3263
 
132 ashish 3264
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3265
    public boolean isSetFrom_date() {
3266
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3267
    }
3268
 
132 ashish 3269
    public void setFrom_dateIsSet(boolean value) {
3270
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3271
    }
3272
 
132 ashish 3273
    public long getTo_date() {
3274
      return this.to_date;
68 ashish 3275
    }
3276
 
132 ashish 3277
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3278
      this.to_date = to_date;
3279
      setTo_dateIsSet(true);
68 ashish 3280
      return this;
3281
    }
3282
 
132 ashish 3283
    public void unsetTo_date() {
3284
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3285
    }
3286
 
132 ashish 3287
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3288
    public boolean isSetTo_date() {
3289
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3290
    }
3291
 
132 ashish 3292
    public void setTo_dateIsSet(boolean value) {
3293
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3294
    }
3295
 
3296
    /**
3297
     * 
3298
     * @see TransactionStatus
3299
     */
3300
    public TransactionStatus getStatus() {
3301
      return this.status;
3302
    }
3303
 
3304
    /**
3305
     * 
3306
     * @see TransactionStatus
3307
     */
3308
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3309
      this.status = status;
3310
      return this;
3311
    }
3312
 
3313
    public void unsetStatus() {
3314
      this.status = null;
3315
    }
3316
 
3317
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3318
    public boolean isSetStatus() {
3319
      return this.status != null;
3320
    }
3321
 
3322
    public void setStatusIsSet(boolean value) {
3323
      if (!value) {
3324
        this.status = null;
3325
      }
3326
    }
3327
 
3328
    public void setFieldValue(_Fields field, Object value) {
3329
      switch (field) {
3330
      case CUSTOMER_ID:
3331
        if (value == null) {
3332
          unsetCustomerId();
3333
        } else {
3334
          setCustomerId((Long)value);
3335
        }
3336
        break;
3337
 
132 ashish 3338
      case FROM_DATE:
68 ashish 3339
        if (value == null) {
132 ashish 3340
          unsetFrom_date();
68 ashish 3341
        } else {
132 ashish 3342
          setFrom_date((Long)value);
68 ashish 3343
        }
3344
        break;
3345
 
132 ashish 3346
      case TO_DATE:
68 ashish 3347
        if (value == null) {
132 ashish 3348
          unsetTo_date();
68 ashish 3349
        } else {
132 ashish 3350
          setTo_date((Long)value);
68 ashish 3351
        }
3352
        break;
3353
 
3354
      case STATUS:
3355
        if (value == null) {
3356
          unsetStatus();
3357
        } else {
3358
          setStatus((TransactionStatus)value);
3359
        }
3360
        break;
3361
 
3362
      }
3363
    }
3364
 
3365
    public void setFieldValue(int fieldID, Object value) {
3366
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3367
    }
3368
 
3369
    public Object getFieldValue(_Fields field) {
3370
      switch (field) {
3371
      case CUSTOMER_ID:
3372
        return new Long(getCustomerId());
3373
 
132 ashish 3374
      case FROM_DATE:
3375
        return new Long(getFrom_date());
68 ashish 3376
 
132 ashish 3377
      case TO_DATE:
3378
        return new Long(getTo_date());
68 ashish 3379
 
3380
      case STATUS:
3381
        return getStatus();
3382
 
3383
      }
3384
      throw new IllegalStateException();
3385
    }
3386
 
3387
    public Object getFieldValue(int fieldId) {
3388
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3389
    }
3390
 
3391
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3392
    public boolean isSet(_Fields field) {
3393
      switch (field) {
3394
      case CUSTOMER_ID:
3395
        return isSetCustomerId();
132 ashish 3396
      case FROM_DATE:
3397
        return isSetFrom_date();
3398
      case TO_DATE:
3399
        return isSetTo_date();
68 ashish 3400
      case STATUS:
3401
        return isSetStatus();
3402
      }
3403
      throw new IllegalStateException();
3404
    }
3405
 
3406
    public boolean isSet(int fieldID) {
3407
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3408
    }
3409
 
3410
    @Override
3411
    public boolean equals(Object that) {
3412
      if (that == null)
3413
        return false;
3414
      if (that instanceof getTransactionsForCustomer_args)
3415
        return this.equals((getTransactionsForCustomer_args)that);
3416
      return false;
3417
    }
3418
 
3419
    public boolean equals(getTransactionsForCustomer_args that) {
3420
      if (that == null)
3421
        return false;
3422
 
3423
      boolean this_present_customerId = true;
3424
      boolean that_present_customerId = true;
3425
      if (this_present_customerId || that_present_customerId) {
3426
        if (!(this_present_customerId && that_present_customerId))
3427
          return false;
3428
        if (this.customerId != that.customerId)
3429
          return false;
3430
      }
3431
 
132 ashish 3432
      boolean this_present_from_date = true;
3433
      boolean that_present_from_date = true;
3434
      if (this_present_from_date || that_present_from_date) {
3435
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3436
          return false;
132 ashish 3437
        if (this.from_date != that.from_date)
68 ashish 3438
          return false;
3439
      }
3440
 
132 ashish 3441
      boolean this_present_to_date = true;
3442
      boolean that_present_to_date = true;
3443
      if (this_present_to_date || that_present_to_date) {
3444
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3445
          return false;
132 ashish 3446
        if (this.to_date != that.to_date)
68 ashish 3447
          return false;
3448
      }
3449
 
3450
      boolean this_present_status = true && this.isSetStatus();
3451
      boolean that_present_status = true && that.isSetStatus();
3452
      if (this_present_status || that_present_status) {
3453
        if (!(this_present_status && that_present_status))
3454
          return false;
3455
        if (!this.status.equals(that.status))
3456
          return false;
3457
      }
3458
 
3459
      return true;
3460
    }
3461
 
3462
    @Override
3463
    public int hashCode() {
3464
      return 0;
3465
    }
3466
 
3467
    public int compareTo(getTransactionsForCustomer_args other) {
3468
      if (!getClass().equals(other.getClass())) {
3469
        return getClass().getName().compareTo(other.getClass().getName());
3470
      }
3471
 
3472
      int lastComparison = 0;
3473
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
3474
 
3475
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
3476
      if (lastComparison != 0) {
3477
        return lastComparison;
3478
      }
3479
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
3480
      if (lastComparison != 0) {
3481
        return lastComparison;
3482
      }
132 ashish 3483
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3484
      if (lastComparison != 0) {
3485
        return lastComparison;
3486
      }
132 ashish 3487
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3488
      if (lastComparison != 0) {
3489
        return lastComparison;
3490
      }
132 ashish 3491
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3492
      if (lastComparison != 0) {
3493
        return lastComparison;
3494
      }
132 ashish 3495
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3496
      if (lastComparison != 0) {
3497
        return lastComparison;
3498
      }
3499
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3500
      if (lastComparison != 0) {
3501
        return lastComparison;
3502
      }
3503
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3504
      if (lastComparison != 0) {
3505
        return lastComparison;
3506
      }
3507
      return 0;
3508
    }
3509
 
3510
    public void read(TProtocol iprot) throws TException {
3511
      TField field;
3512
      iprot.readStructBegin();
3513
      while (true)
3514
      {
3515
        field = iprot.readFieldBegin();
3516
        if (field.type == TType.STOP) { 
3517
          break;
3518
        }
3519
        _Fields fieldId = _Fields.findByThriftId(field.id);
3520
        if (fieldId == null) {
3521
          TProtocolUtil.skip(iprot, field.type);
3522
        } else {
3523
          switch (fieldId) {
3524
            case CUSTOMER_ID:
3525
              if (field.type == TType.I64) {
3526
                this.customerId = iprot.readI64();
3527
                setCustomerIdIsSet(true);
3528
              } else { 
3529
                TProtocolUtil.skip(iprot, field.type);
3530
              }
3531
              break;
132 ashish 3532
            case FROM_DATE:
68 ashish 3533
              if (field.type == TType.I64) {
132 ashish 3534
                this.from_date = iprot.readI64();
3535
                setFrom_dateIsSet(true);
68 ashish 3536
              } else { 
3537
                TProtocolUtil.skip(iprot, field.type);
3538
              }
3539
              break;
132 ashish 3540
            case TO_DATE:
68 ashish 3541
              if (field.type == TType.I64) {
132 ashish 3542
                this.to_date = iprot.readI64();
3543
                setTo_dateIsSet(true);
68 ashish 3544
              } else { 
3545
                TProtocolUtil.skip(iprot, field.type);
3546
              }
3547
              break;
3548
            case STATUS:
3549
              if (field.type == TType.I32) {
3550
                this.status = TransactionStatus.findByValue(iprot.readI32());
3551
              } else { 
3552
                TProtocolUtil.skip(iprot, field.type);
3553
              }
3554
              break;
3555
          }
3556
          iprot.readFieldEnd();
3557
        }
3558
      }
3559
      iprot.readStructEnd();
3560
      validate();
3561
    }
3562
 
3563
    public void write(TProtocol oprot) throws TException {
3564
      validate();
3565
 
3566
      oprot.writeStructBegin(STRUCT_DESC);
3567
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
3568
      oprot.writeI64(this.customerId);
3569
      oprot.writeFieldEnd();
132 ashish 3570
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3571
      oprot.writeI64(this.from_date);
68 ashish 3572
      oprot.writeFieldEnd();
132 ashish 3573
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3574
      oprot.writeI64(this.to_date);
68 ashish 3575
      oprot.writeFieldEnd();
3576
      if (this.status != null) {
3577
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3578
        oprot.writeI32(this.status.getValue());
3579
        oprot.writeFieldEnd();
3580
      }
3581
      oprot.writeFieldStop();
3582
      oprot.writeStructEnd();
3583
    }
3584
 
3585
    @Override
3586
    public String toString() {
3587
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
3588
      boolean first = true;
3589
 
3590
      sb.append("customerId:");
3591
      sb.append(this.customerId);
3592
      first = false;
3593
      if (!first) sb.append(", ");
132 ashish 3594
      sb.append("from_date:");
3595
      sb.append(this.from_date);
68 ashish 3596
      first = false;
3597
      if (!first) sb.append(", ");
132 ashish 3598
      sb.append("to_date:");
3599
      sb.append(this.to_date);
68 ashish 3600
      first = false;
3601
      if (!first) sb.append(", ");
3602
      sb.append("status:");
3603
      if (this.status == null) {
3604
        sb.append("null");
3605
      } else {
3606
        String status_name = status.name();
3607
        if (status_name != null) {
3608
          sb.append(status_name);
3609
          sb.append(" (");
3610
        }
3611
        sb.append(this.status);
3612
        if (status_name != null) {
3613
          sb.append(")");
3614
        }
3615
      }
3616
      first = false;
3617
      sb.append(")");
3618
      return sb.toString();
3619
    }
3620
 
3621
    public void validate() throws TException {
3622
      // check for required fields
3623
    }
3624
 
3625
  }
3626
 
684 chandransh 3627
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 3628
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
3629
 
3630
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3631
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3632
 
3633
    private List<Transaction> success;
3634
    private TransactionServiceException ex;
3635
 
3636
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3637
    public enum _Fields implements TFieldIdEnum {
3638
      SUCCESS((short)0, "success"),
3639
      EX((short)1, "ex");
3640
 
3641
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3643
 
3644
      static {
3645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3646
          byId.put((int)field._thriftId, field);
3647
          byName.put(field.getFieldName(), field);
3648
        }
3649
      }
3650
 
3651
      /**
3652
       * Find the _Fields constant that matches fieldId, or null if its not found.
3653
       */
3654
      public static _Fields findByThriftId(int fieldId) {
3655
        return byId.get(fieldId);
3656
      }
3657
 
3658
      /**
3659
       * Find the _Fields constant that matches fieldId, throwing an exception
3660
       * if it is not found.
3661
       */
3662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3663
        _Fields fields = findByThriftId(fieldId);
3664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3665
        return fields;
3666
      }
3667
 
3668
      /**
3669
       * Find the _Fields constant that matches name, or null if its not found.
3670
       */
3671
      public static _Fields findByName(String name) {
3672
        return byName.get(name);
3673
      }
3674
 
3675
      private final short _thriftId;
3676
      private final String _fieldName;
3677
 
3678
      _Fields(short thriftId, String fieldName) {
3679
        _thriftId = thriftId;
3680
        _fieldName = fieldName;
3681
      }
3682
 
3683
      public short getThriftFieldId() {
3684
        return _thriftId;
3685
      }
3686
 
3687
      public String getFieldName() {
3688
        return _fieldName;
3689
      }
3690
    }
3691
 
3692
    // isset id assignments
3693
 
3694
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3695
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3696
          new ListMetaData(TType.LIST, 
3697
              new StructMetaData(TType.STRUCT, Transaction.class))));
3698
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3699
          new FieldValueMetaData(TType.STRUCT)));
3700
    }});
3701
 
3702
    static {
3703
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
3704
    }
3705
 
3706
    public getTransactionsForCustomer_result() {
3707
    }
3708
 
3709
    public getTransactionsForCustomer_result(
3710
      List<Transaction> success,
3711
      TransactionServiceException ex)
3712
    {
3713
      this();
3714
      this.success = success;
3715
      this.ex = ex;
3716
    }
3717
 
3718
    /**
3719
     * Performs a deep copy on <i>other</i>.
3720
     */
3721
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
3722
      if (other.isSetSuccess()) {
3723
        List<Transaction> __this__success = new ArrayList<Transaction>();
3724
        for (Transaction other_element : other.success) {
3725
          __this__success.add(new Transaction(other_element));
3726
        }
3727
        this.success = __this__success;
3728
      }
3729
      if (other.isSetEx()) {
3730
        this.ex = new TransactionServiceException(other.ex);
3731
      }
3732
    }
3733
 
3734
    public getTransactionsForCustomer_result deepCopy() {
3735
      return new getTransactionsForCustomer_result(this);
3736
    }
3737
 
3738
    @Deprecated
3739
    public getTransactionsForCustomer_result clone() {
3740
      return new getTransactionsForCustomer_result(this);
3741
    }
3742
 
3743
    public int getSuccessSize() {
3744
      return (this.success == null) ? 0 : this.success.size();
3745
    }
3746
 
3747
    public java.util.Iterator<Transaction> getSuccessIterator() {
3748
      return (this.success == null) ? null : this.success.iterator();
3749
    }
3750
 
3751
    public void addToSuccess(Transaction elem) {
3752
      if (this.success == null) {
3753
        this.success = new ArrayList<Transaction>();
3754
      }
3755
      this.success.add(elem);
3756
    }
3757
 
3758
    public List<Transaction> getSuccess() {
3759
      return this.success;
3760
    }
3761
 
3762
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
3763
      this.success = success;
3764
      return this;
3765
    }
3766
 
3767
    public void unsetSuccess() {
3768
      this.success = null;
3769
    }
3770
 
3771
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3772
    public boolean isSetSuccess() {
3773
      return this.success != null;
3774
    }
3775
 
3776
    public void setSuccessIsSet(boolean value) {
3777
      if (!value) {
3778
        this.success = null;
3779
      }
3780
    }
3781
 
3782
    public TransactionServiceException getEx() {
3783
      return this.ex;
3784
    }
3785
 
3786
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
3787
      this.ex = ex;
3788
      return this;
3789
    }
3790
 
3791
    public void unsetEx() {
3792
      this.ex = null;
3793
    }
3794
 
3795
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3796
    public boolean isSetEx() {
3797
      return this.ex != null;
3798
    }
3799
 
3800
    public void setExIsSet(boolean value) {
3801
      if (!value) {
3802
        this.ex = null;
3803
      }
3804
    }
3805
 
3806
    public void setFieldValue(_Fields field, Object value) {
3807
      switch (field) {
3808
      case SUCCESS:
3809
        if (value == null) {
3810
          unsetSuccess();
3811
        } else {
3812
          setSuccess((List<Transaction>)value);
3813
        }
3814
        break;
3815
 
3816
      case EX:
3817
        if (value == null) {
3818
          unsetEx();
3819
        } else {
3820
          setEx((TransactionServiceException)value);
3821
        }
3822
        break;
3823
 
3824
      }
3825
    }
3826
 
3827
    public void setFieldValue(int fieldID, Object value) {
3828
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3829
    }
3830
 
3831
    public Object getFieldValue(_Fields field) {
3832
      switch (field) {
3833
      case SUCCESS:
3834
        return getSuccess();
3835
 
3836
      case EX:
3837
        return getEx();
3838
 
3839
      }
3840
      throw new IllegalStateException();
3841
    }
3842
 
3843
    public Object getFieldValue(int fieldId) {
3844
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3845
    }
3846
 
3847
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3848
    public boolean isSet(_Fields field) {
3849
      switch (field) {
3850
      case SUCCESS:
3851
        return isSetSuccess();
3852
      case EX:
3853
        return isSetEx();
3854
      }
3855
      throw new IllegalStateException();
3856
    }
3857
 
3858
    public boolean isSet(int fieldID) {
3859
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3860
    }
3861
 
3862
    @Override
3863
    public boolean equals(Object that) {
3864
      if (that == null)
3865
        return false;
3866
      if (that instanceof getTransactionsForCustomer_result)
3867
        return this.equals((getTransactionsForCustomer_result)that);
3868
      return false;
3869
    }
3870
 
3871
    public boolean equals(getTransactionsForCustomer_result that) {
3872
      if (that == null)
3873
        return false;
3874
 
3875
      boolean this_present_success = true && this.isSetSuccess();
3876
      boolean that_present_success = true && that.isSetSuccess();
3877
      if (this_present_success || that_present_success) {
3878
        if (!(this_present_success && that_present_success))
3879
          return false;
3880
        if (!this.success.equals(that.success))
3881
          return false;
3882
      }
3883
 
3884
      boolean this_present_ex = true && this.isSetEx();
3885
      boolean that_present_ex = true && that.isSetEx();
3886
      if (this_present_ex || that_present_ex) {
3887
        if (!(this_present_ex && that_present_ex))
3888
          return false;
3889
        if (!this.ex.equals(that.ex))
3890
          return false;
3891
      }
3892
 
3893
      return true;
3894
    }
3895
 
3896
    @Override
3897
    public int hashCode() {
3898
      return 0;
3899
    }
3900
 
684 chandransh 3901
    public int compareTo(getTransactionsForCustomer_result other) {
3902
      if (!getClass().equals(other.getClass())) {
3903
        return getClass().getName().compareTo(other.getClass().getName());
3904
      }
3905
 
3906
      int lastComparison = 0;
3907
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
3908
 
3909
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3910
      if (lastComparison != 0) {
3911
        return lastComparison;
3912
      }
3913
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3914
      if (lastComparison != 0) {
3915
        return lastComparison;
3916
      }
3917
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3918
      if (lastComparison != 0) {
3919
        return lastComparison;
3920
      }
3921
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3922
      if (lastComparison != 0) {
3923
        return lastComparison;
3924
      }
3925
      return 0;
3926
    }
3927
 
68 ashish 3928
    public void read(TProtocol iprot) throws TException {
3929
      TField field;
3930
      iprot.readStructBegin();
3931
      while (true)
3932
      {
3933
        field = iprot.readFieldBegin();
3934
        if (field.type == TType.STOP) { 
3935
          break;
3936
        }
3937
        _Fields fieldId = _Fields.findByThriftId(field.id);
3938
        if (fieldId == null) {
3939
          TProtocolUtil.skip(iprot, field.type);
3940
        } else {
3941
          switch (fieldId) {
3942
            case SUCCESS:
3943
              if (field.type == TType.LIST) {
3944
                {
684 chandransh 3945
                  TList _list8 = iprot.readListBegin();
3946
                  this.success = new ArrayList<Transaction>(_list8.size);
3947
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 3948
                  {
684 chandransh 3949
                    Transaction _elem10;
3950
                    _elem10 = new Transaction();
3951
                    _elem10.read(iprot);
3952
                    this.success.add(_elem10);
68 ashish 3953
                  }
3954
                  iprot.readListEnd();
3955
                }
3956
              } else { 
3957
                TProtocolUtil.skip(iprot, field.type);
3958
              }
3959
              break;
3960
            case EX:
3961
              if (field.type == TType.STRUCT) {
3962
                this.ex = new TransactionServiceException();
3963
                this.ex.read(iprot);
3964
              } else { 
3965
                TProtocolUtil.skip(iprot, field.type);
3966
              }
3967
              break;
3968
          }
3969
          iprot.readFieldEnd();
3970
        }
3971
      }
3972
      iprot.readStructEnd();
3973
      validate();
3974
    }
3975
 
3976
    public void write(TProtocol oprot) throws TException {
3977
      oprot.writeStructBegin(STRUCT_DESC);
3978
 
3979
      if (this.isSetSuccess()) {
3980
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3981
        {
3982
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 3983
          for (Transaction _iter11 : this.success)
68 ashish 3984
          {
684 chandransh 3985
            _iter11.write(oprot);
68 ashish 3986
          }
3987
          oprot.writeListEnd();
3988
        }
3989
        oprot.writeFieldEnd();
3990
      } else if (this.isSetEx()) {
3991
        oprot.writeFieldBegin(EX_FIELD_DESC);
3992
        this.ex.write(oprot);
3993
        oprot.writeFieldEnd();
3994
      }
3995
      oprot.writeFieldStop();
3996
      oprot.writeStructEnd();
3997
    }
3998
 
3999
    @Override
4000
    public String toString() {
4001
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4002
      boolean first = true;
4003
 
4004
      sb.append("success:");
4005
      if (this.success == null) {
4006
        sb.append("null");
4007
      } else {
4008
        sb.append(this.success);
4009
      }
4010
      first = false;
4011
      if (!first) sb.append(", ");
4012
      sb.append("ex:");
4013
      if (this.ex == null) {
4014
        sb.append("null");
4015
      } else {
4016
        sb.append(this.ex);
4017
      }
4018
      first = false;
4019
      sb.append(")");
4020
      return sb.toString();
4021
    }
4022
 
4023
    public void validate() throws TException {
4024
      // check for required fields
4025
    }
4026
 
4027
  }
4028
 
132 ashish 4029
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4030
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4031
 
4032
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4033
 
4034
    private long shoppingCartId;
4035
 
4036
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4037
    public enum _Fields implements TFieldIdEnum {
4038
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4039
 
4040
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4042
 
4043
      static {
4044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4045
          byId.put((int)field._thriftId, field);
4046
          byName.put(field.getFieldName(), field);
4047
        }
4048
      }
4049
 
4050
      /**
4051
       * Find the _Fields constant that matches fieldId, or null if its not found.
4052
       */
4053
      public static _Fields findByThriftId(int fieldId) {
4054
        return byId.get(fieldId);
4055
      }
4056
 
4057
      /**
4058
       * Find the _Fields constant that matches fieldId, throwing an exception
4059
       * if it is not found.
4060
       */
4061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4062
        _Fields fields = findByThriftId(fieldId);
4063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4064
        return fields;
4065
      }
4066
 
4067
      /**
4068
       * Find the _Fields constant that matches name, or null if its not found.
4069
       */
4070
      public static _Fields findByName(String name) {
4071
        return byName.get(name);
4072
      }
4073
 
4074
      private final short _thriftId;
4075
      private final String _fieldName;
4076
 
4077
      _Fields(short thriftId, String fieldName) {
4078
        _thriftId = thriftId;
4079
        _fieldName = fieldName;
4080
      }
4081
 
4082
      public short getThriftFieldId() {
4083
        return _thriftId;
4084
      }
4085
 
4086
      public String getFieldName() {
4087
        return _fieldName;
4088
      }
4089
    }
4090
 
4091
    // isset id assignments
4092
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4093
    private BitSet __isset_bit_vector = new BitSet(1);
4094
 
4095
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4096
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4097
          new FieldValueMetaData(TType.I64)));
4098
    }});
4099
 
4100
    static {
4101
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4102
    }
4103
 
4104
    public getTransactionsForShoppingCartId_args() {
4105
    }
4106
 
4107
    public getTransactionsForShoppingCartId_args(
4108
      long shoppingCartId)
4109
    {
4110
      this();
4111
      this.shoppingCartId = shoppingCartId;
4112
      setShoppingCartIdIsSet(true);
4113
    }
4114
 
4115
    /**
4116
     * Performs a deep copy on <i>other</i>.
4117
     */
4118
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4119
      __isset_bit_vector.clear();
4120
      __isset_bit_vector.or(other.__isset_bit_vector);
4121
      this.shoppingCartId = other.shoppingCartId;
4122
    }
4123
 
4124
    public getTransactionsForShoppingCartId_args deepCopy() {
4125
      return new getTransactionsForShoppingCartId_args(this);
4126
    }
4127
 
4128
    @Deprecated
4129
    public getTransactionsForShoppingCartId_args clone() {
4130
      return new getTransactionsForShoppingCartId_args(this);
4131
    }
4132
 
4133
    public long getShoppingCartId() {
4134
      return this.shoppingCartId;
4135
    }
4136
 
4137
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4138
      this.shoppingCartId = shoppingCartId;
4139
      setShoppingCartIdIsSet(true);
4140
      return this;
4141
    }
4142
 
4143
    public void unsetShoppingCartId() {
4144
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4145
    }
4146
 
4147
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4148
    public boolean isSetShoppingCartId() {
4149
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4150
    }
4151
 
4152
    public void setShoppingCartIdIsSet(boolean value) {
4153
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4154
    }
4155
 
4156
    public void setFieldValue(_Fields field, Object value) {
4157
      switch (field) {
4158
      case SHOPPING_CART_ID:
4159
        if (value == null) {
4160
          unsetShoppingCartId();
4161
        } else {
4162
          setShoppingCartId((Long)value);
4163
        }
4164
        break;
4165
 
4166
      }
4167
    }
4168
 
4169
    public void setFieldValue(int fieldID, Object value) {
4170
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4171
    }
4172
 
4173
    public Object getFieldValue(_Fields field) {
4174
      switch (field) {
4175
      case SHOPPING_CART_ID:
4176
        return new Long(getShoppingCartId());
4177
 
4178
      }
4179
      throw new IllegalStateException();
4180
    }
4181
 
4182
    public Object getFieldValue(int fieldId) {
4183
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4184
    }
4185
 
4186
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4187
    public boolean isSet(_Fields field) {
4188
      switch (field) {
4189
      case SHOPPING_CART_ID:
4190
        return isSetShoppingCartId();
4191
      }
4192
      throw new IllegalStateException();
4193
    }
4194
 
4195
    public boolean isSet(int fieldID) {
4196
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4197
    }
4198
 
4199
    @Override
4200
    public boolean equals(Object that) {
4201
      if (that == null)
4202
        return false;
4203
      if (that instanceof getTransactionsForShoppingCartId_args)
4204
        return this.equals((getTransactionsForShoppingCartId_args)that);
4205
      return false;
4206
    }
4207
 
4208
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4209
      if (that == null)
4210
        return false;
4211
 
4212
      boolean this_present_shoppingCartId = true;
4213
      boolean that_present_shoppingCartId = true;
4214
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4215
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4216
          return false;
4217
        if (this.shoppingCartId != that.shoppingCartId)
4218
          return false;
4219
      }
4220
 
4221
      return true;
4222
    }
4223
 
4224
    @Override
4225
    public int hashCode() {
4226
      return 0;
4227
    }
4228
 
4229
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4230
      if (!getClass().equals(other.getClass())) {
4231
        return getClass().getName().compareTo(other.getClass().getName());
4232
      }
4233
 
4234
      int lastComparison = 0;
4235
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4236
 
4237
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4238
      if (lastComparison != 0) {
4239
        return lastComparison;
4240
      }
4241
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4242
      if (lastComparison != 0) {
4243
        return lastComparison;
4244
      }
4245
      return 0;
4246
    }
4247
 
4248
    public void read(TProtocol iprot) throws TException {
4249
      TField field;
4250
      iprot.readStructBegin();
4251
      while (true)
4252
      {
4253
        field = iprot.readFieldBegin();
4254
        if (field.type == TType.STOP) { 
4255
          break;
4256
        }
4257
        _Fields fieldId = _Fields.findByThriftId(field.id);
4258
        if (fieldId == null) {
4259
          TProtocolUtil.skip(iprot, field.type);
4260
        } else {
4261
          switch (fieldId) {
4262
            case SHOPPING_CART_ID:
4263
              if (field.type == TType.I64) {
4264
                this.shoppingCartId = iprot.readI64();
4265
                setShoppingCartIdIsSet(true);
4266
              } else { 
4267
                TProtocolUtil.skip(iprot, field.type);
4268
              }
4269
              break;
4270
          }
4271
          iprot.readFieldEnd();
4272
        }
4273
      }
4274
      iprot.readStructEnd();
4275
      validate();
4276
    }
4277
 
4278
    public void write(TProtocol oprot) throws TException {
4279
      validate();
4280
 
4281
      oprot.writeStructBegin(STRUCT_DESC);
4282
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4283
      oprot.writeI64(this.shoppingCartId);
4284
      oprot.writeFieldEnd();
4285
      oprot.writeFieldStop();
4286
      oprot.writeStructEnd();
4287
    }
4288
 
4289
    @Override
4290
    public String toString() {
4291
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4292
      boolean first = true;
4293
 
4294
      sb.append("shoppingCartId:");
4295
      sb.append(this.shoppingCartId);
4296
      first = false;
4297
      sb.append(")");
4298
      return sb.toString();
4299
    }
4300
 
4301
    public void validate() throws TException {
4302
      // check for required fields
4303
    }
4304
 
4305
  }
4306
 
684 chandransh 4307
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4308
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4309
 
4310
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4311
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4312
 
4313
    private List<Transaction> success;
4314
    private TransactionServiceException ex;
4315
 
4316
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4317
    public enum _Fields implements TFieldIdEnum {
4318
      SUCCESS((short)0, "success"),
4319
      EX((short)1, "ex");
4320
 
4321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4323
 
4324
      static {
4325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4326
          byId.put((int)field._thriftId, field);
4327
          byName.put(field.getFieldName(), field);
4328
        }
4329
      }
4330
 
4331
      /**
4332
       * Find the _Fields constant that matches fieldId, or null if its not found.
4333
       */
4334
      public static _Fields findByThriftId(int fieldId) {
4335
        return byId.get(fieldId);
4336
      }
4337
 
4338
      /**
4339
       * Find the _Fields constant that matches fieldId, throwing an exception
4340
       * if it is not found.
4341
       */
4342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4343
        _Fields fields = findByThriftId(fieldId);
4344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4345
        return fields;
4346
      }
4347
 
4348
      /**
4349
       * Find the _Fields constant that matches name, or null if its not found.
4350
       */
4351
      public static _Fields findByName(String name) {
4352
        return byName.get(name);
4353
      }
4354
 
4355
      private final short _thriftId;
4356
      private final String _fieldName;
4357
 
4358
      _Fields(short thriftId, String fieldName) {
4359
        _thriftId = thriftId;
4360
        _fieldName = fieldName;
4361
      }
4362
 
4363
      public short getThriftFieldId() {
4364
        return _thriftId;
4365
      }
4366
 
4367
      public String getFieldName() {
4368
        return _fieldName;
4369
      }
4370
    }
4371
 
4372
    // isset id assignments
4373
 
4374
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4375
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4376
          new ListMetaData(TType.LIST, 
4377
              new StructMetaData(TType.STRUCT, Transaction.class))));
4378
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4379
          new FieldValueMetaData(TType.STRUCT)));
4380
    }});
4381
 
4382
    static {
4383
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4384
    }
4385
 
4386
    public getTransactionsForShoppingCartId_result() {
4387
    }
4388
 
4389
    public getTransactionsForShoppingCartId_result(
4390
      List<Transaction> success,
4391
      TransactionServiceException ex)
4392
    {
4393
      this();
4394
      this.success = success;
4395
      this.ex = ex;
4396
    }
4397
 
4398
    /**
4399
     * Performs a deep copy on <i>other</i>.
4400
     */
4401
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4402
      if (other.isSetSuccess()) {
4403
        List<Transaction> __this__success = new ArrayList<Transaction>();
4404
        for (Transaction other_element : other.success) {
4405
          __this__success.add(new Transaction(other_element));
4406
        }
4407
        this.success = __this__success;
4408
      }
4409
      if (other.isSetEx()) {
4410
        this.ex = new TransactionServiceException(other.ex);
4411
      }
4412
    }
4413
 
4414
    public getTransactionsForShoppingCartId_result deepCopy() {
4415
      return new getTransactionsForShoppingCartId_result(this);
4416
    }
4417
 
4418
    @Deprecated
4419
    public getTransactionsForShoppingCartId_result clone() {
4420
      return new getTransactionsForShoppingCartId_result(this);
4421
    }
4422
 
4423
    public int getSuccessSize() {
4424
      return (this.success == null) ? 0 : this.success.size();
4425
    }
4426
 
4427
    public java.util.Iterator<Transaction> getSuccessIterator() {
4428
      return (this.success == null) ? null : this.success.iterator();
4429
    }
4430
 
4431
    public void addToSuccess(Transaction elem) {
4432
      if (this.success == null) {
4433
        this.success = new ArrayList<Transaction>();
4434
      }
4435
      this.success.add(elem);
4436
    }
4437
 
4438
    public List<Transaction> getSuccess() {
4439
      return this.success;
4440
    }
4441
 
4442
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4443
      this.success = success;
4444
      return this;
4445
    }
4446
 
4447
    public void unsetSuccess() {
4448
      this.success = null;
4449
    }
4450
 
4451
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4452
    public boolean isSetSuccess() {
4453
      return this.success != null;
4454
    }
4455
 
4456
    public void setSuccessIsSet(boolean value) {
4457
      if (!value) {
4458
        this.success = null;
4459
      }
4460
    }
4461
 
4462
    public TransactionServiceException getEx() {
4463
      return this.ex;
4464
    }
4465
 
4466
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4467
      this.ex = ex;
4468
      return this;
4469
    }
4470
 
4471
    public void unsetEx() {
4472
      this.ex = null;
4473
    }
4474
 
4475
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4476
    public boolean isSetEx() {
4477
      return this.ex != null;
4478
    }
4479
 
4480
    public void setExIsSet(boolean value) {
4481
      if (!value) {
4482
        this.ex = null;
4483
      }
4484
    }
4485
 
4486
    public void setFieldValue(_Fields field, Object value) {
4487
      switch (field) {
4488
      case SUCCESS:
4489
        if (value == null) {
4490
          unsetSuccess();
4491
        } else {
4492
          setSuccess((List<Transaction>)value);
4493
        }
4494
        break;
4495
 
4496
      case EX:
4497
        if (value == null) {
4498
          unsetEx();
4499
        } else {
4500
          setEx((TransactionServiceException)value);
4501
        }
4502
        break;
4503
 
4504
      }
4505
    }
4506
 
4507
    public void setFieldValue(int fieldID, Object value) {
4508
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4509
    }
4510
 
4511
    public Object getFieldValue(_Fields field) {
4512
      switch (field) {
4513
      case SUCCESS:
4514
        return getSuccess();
4515
 
4516
      case EX:
4517
        return getEx();
4518
 
4519
      }
4520
      throw new IllegalStateException();
4521
    }
4522
 
4523
    public Object getFieldValue(int fieldId) {
4524
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4525
    }
4526
 
4527
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4528
    public boolean isSet(_Fields field) {
4529
      switch (field) {
4530
      case SUCCESS:
4531
        return isSetSuccess();
4532
      case EX:
4533
        return isSetEx();
4534
      }
4535
      throw new IllegalStateException();
4536
    }
4537
 
4538
    public boolean isSet(int fieldID) {
4539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4540
    }
4541
 
4542
    @Override
4543
    public boolean equals(Object that) {
4544
      if (that == null)
4545
        return false;
4546
      if (that instanceof getTransactionsForShoppingCartId_result)
4547
        return this.equals((getTransactionsForShoppingCartId_result)that);
4548
      return false;
4549
    }
4550
 
4551
    public boolean equals(getTransactionsForShoppingCartId_result that) {
4552
      if (that == null)
4553
        return false;
4554
 
4555
      boolean this_present_success = true && this.isSetSuccess();
4556
      boolean that_present_success = true && that.isSetSuccess();
4557
      if (this_present_success || that_present_success) {
4558
        if (!(this_present_success && that_present_success))
4559
          return false;
4560
        if (!this.success.equals(that.success))
4561
          return false;
4562
      }
4563
 
4564
      boolean this_present_ex = true && this.isSetEx();
4565
      boolean that_present_ex = true && that.isSetEx();
4566
      if (this_present_ex || that_present_ex) {
4567
        if (!(this_present_ex && that_present_ex))
4568
          return false;
4569
        if (!this.ex.equals(that.ex))
4570
          return false;
4571
      }
4572
 
4573
      return true;
4574
    }
4575
 
4576
    @Override
4577
    public int hashCode() {
4578
      return 0;
4579
    }
4580
 
684 chandransh 4581
    public int compareTo(getTransactionsForShoppingCartId_result other) {
4582
      if (!getClass().equals(other.getClass())) {
4583
        return getClass().getName().compareTo(other.getClass().getName());
4584
      }
4585
 
4586
      int lastComparison = 0;
4587
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
4588
 
4589
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4590
      if (lastComparison != 0) {
4591
        return lastComparison;
4592
      }
4593
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4594
      if (lastComparison != 0) {
4595
        return lastComparison;
4596
      }
4597
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4598
      if (lastComparison != 0) {
4599
        return lastComparison;
4600
      }
4601
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4602
      if (lastComparison != 0) {
4603
        return lastComparison;
4604
      }
4605
      return 0;
4606
    }
4607
 
132 ashish 4608
    public void read(TProtocol iprot) throws TException {
4609
      TField field;
4610
      iprot.readStructBegin();
4611
      while (true)
4612
      {
4613
        field = iprot.readFieldBegin();
4614
        if (field.type == TType.STOP) { 
4615
          break;
4616
        }
4617
        _Fields fieldId = _Fields.findByThriftId(field.id);
4618
        if (fieldId == null) {
4619
          TProtocolUtil.skip(iprot, field.type);
4620
        } else {
4621
          switch (fieldId) {
4622
            case SUCCESS:
4623
              if (field.type == TType.LIST) {
4624
                {
684 chandransh 4625
                  TList _list12 = iprot.readListBegin();
4626
                  this.success = new ArrayList<Transaction>(_list12.size);
4627
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 4628
                  {
684 chandransh 4629
                    Transaction _elem14;
4630
                    _elem14 = new Transaction();
4631
                    _elem14.read(iprot);
4632
                    this.success.add(_elem14);
132 ashish 4633
                  }
4634
                  iprot.readListEnd();
4635
                }
4636
              } else { 
4637
                TProtocolUtil.skip(iprot, field.type);
4638
              }
4639
              break;
4640
            case EX:
4641
              if (field.type == TType.STRUCT) {
4642
                this.ex = new TransactionServiceException();
4643
                this.ex.read(iprot);
4644
              } else { 
4645
                TProtocolUtil.skip(iprot, field.type);
4646
              }
4647
              break;
4648
          }
4649
          iprot.readFieldEnd();
4650
        }
4651
      }
4652
      iprot.readStructEnd();
4653
      validate();
4654
    }
4655
 
4656
    public void write(TProtocol oprot) throws TException {
4657
      oprot.writeStructBegin(STRUCT_DESC);
4658
 
4659
      if (this.isSetSuccess()) {
4660
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4661
        {
4662
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4663
          for (Transaction _iter15 : this.success)
132 ashish 4664
          {
684 chandransh 4665
            _iter15.write(oprot);
132 ashish 4666
          }
4667
          oprot.writeListEnd();
4668
        }
4669
        oprot.writeFieldEnd();
4670
      } else if (this.isSetEx()) {
4671
        oprot.writeFieldBegin(EX_FIELD_DESC);
4672
        this.ex.write(oprot);
4673
        oprot.writeFieldEnd();
4674
      }
4675
      oprot.writeFieldStop();
4676
      oprot.writeStructEnd();
4677
    }
4678
 
4679
    @Override
4680
    public String toString() {
4681
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
4682
      boolean first = true;
4683
 
4684
      sb.append("success:");
4685
      if (this.success == null) {
4686
        sb.append("null");
4687
      } else {
4688
        sb.append(this.success);
4689
      }
4690
      first = false;
4691
      if (!first) sb.append(", ");
4692
      sb.append("ex:");
4693
      if (this.ex == null) {
4694
        sb.append("null");
4695
      } else {
4696
        sb.append(this.ex);
4697
      }
4698
      first = false;
4699
      sb.append(")");
4700
      return sb.toString();
4701
    }
4702
 
4703
    public void validate() throws TException {
4704
      // check for required fields
4705
    }
4706
 
4707
  }
4708
 
68 ashish 4709
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
4710
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
4711
 
4712
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
4713
 
4714
    private long transactionId;
4715
 
4716
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4717
    public enum _Fields implements TFieldIdEnum {
4718
      TRANSACTION_ID((short)1, "transactionId");
4719
 
4720
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4721
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4722
 
4723
      static {
4724
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4725
          byId.put((int)field._thriftId, field);
4726
          byName.put(field.getFieldName(), field);
4727
        }
4728
      }
4729
 
4730
      /**
4731
       * Find the _Fields constant that matches fieldId, or null if its not found.
4732
       */
4733
      public static _Fields findByThriftId(int fieldId) {
4734
        return byId.get(fieldId);
4735
      }
4736
 
4737
      /**
4738
       * Find the _Fields constant that matches fieldId, throwing an exception
4739
       * if it is not found.
4740
       */
4741
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4742
        _Fields fields = findByThriftId(fieldId);
4743
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4744
        return fields;
4745
      }
4746
 
4747
      /**
4748
       * Find the _Fields constant that matches name, or null if its not found.
4749
       */
4750
      public static _Fields findByName(String name) {
4751
        return byName.get(name);
4752
      }
4753
 
4754
      private final short _thriftId;
4755
      private final String _fieldName;
4756
 
4757
      _Fields(short thriftId, String fieldName) {
4758
        _thriftId = thriftId;
4759
        _fieldName = fieldName;
4760
      }
4761
 
4762
      public short getThriftFieldId() {
4763
        return _thriftId;
4764
      }
4765
 
4766
      public String getFieldName() {
4767
        return _fieldName;
4768
      }
4769
    }
4770
 
4771
    // isset id assignments
4772
    private static final int __TRANSACTIONID_ISSET_ID = 0;
4773
    private BitSet __isset_bit_vector = new BitSet(1);
4774
 
4775
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4776
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
4777
          new FieldValueMetaData(TType.I64)));
4778
    }});
4779
 
4780
    static {
4781
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
4782
    }
4783
 
4784
    public getTransactionStatus_args() {
4785
    }
4786
 
4787
    public getTransactionStatus_args(
4788
      long transactionId)
4789
    {
4790
      this();
4791
      this.transactionId = transactionId;
4792
      setTransactionIdIsSet(true);
4793
    }
4794
 
4795
    /**
4796
     * Performs a deep copy on <i>other</i>.
4797
     */
4798
    public getTransactionStatus_args(getTransactionStatus_args other) {
4799
      __isset_bit_vector.clear();
4800
      __isset_bit_vector.or(other.__isset_bit_vector);
4801
      this.transactionId = other.transactionId;
4802
    }
4803
 
4804
    public getTransactionStatus_args deepCopy() {
4805
      return new getTransactionStatus_args(this);
4806
    }
4807
 
4808
    @Deprecated
4809
    public getTransactionStatus_args clone() {
4810
      return new getTransactionStatus_args(this);
4811
    }
4812
 
4813
    public long getTransactionId() {
4814
      return this.transactionId;
4815
    }
4816
 
4817
    public getTransactionStatus_args setTransactionId(long transactionId) {
4818
      this.transactionId = transactionId;
4819
      setTransactionIdIsSet(true);
4820
      return this;
4821
    }
4822
 
4823
    public void unsetTransactionId() {
4824
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
4825
    }
4826
 
4827
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
4828
    public boolean isSetTransactionId() {
4829
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
4830
    }
4831
 
4832
    public void setTransactionIdIsSet(boolean value) {
4833
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
4834
    }
4835
 
4836
    public void setFieldValue(_Fields field, Object value) {
4837
      switch (field) {
4838
      case TRANSACTION_ID:
4839
        if (value == null) {
4840
          unsetTransactionId();
4841
        } else {
4842
          setTransactionId((Long)value);
4843
        }
4844
        break;
4845
 
4846
      }
4847
    }
4848
 
4849
    public void setFieldValue(int fieldID, Object value) {
4850
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4851
    }
4852
 
4853
    public Object getFieldValue(_Fields field) {
4854
      switch (field) {
4855
      case TRANSACTION_ID:
4856
        return new Long(getTransactionId());
4857
 
4858
      }
4859
      throw new IllegalStateException();
4860
    }
4861
 
4862
    public Object getFieldValue(int fieldId) {
4863
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4864
    }
4865
 
4866
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4867
    public boolean isSet(_Fields field) {
4868
      switch (field) {
4869
      case TRANSACTION_ID:
4870
        return isSetTransactionId();
4871
      }
4872
      throw new IllegalStateException();
4873
    }
4874
 
4875
    public boolean isSet(int fieldID) {
4876
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4877
    }
4878
 
4879
    @Override
4880
    public boolean equals(Object that) {
4881
      if (that == null)
4882
        return false;
4883
      if (that instanceof getTransactionStatus_args)
4884
        return this.equals((getTransactionStatus_args)that);
4885
      return false;
4886
    }
4887
 
4888
    public boolean equals(getTransactionStatus_args that) {
4889
      if (that == null)
4890
        return false;
4891
 
4892
      boolean this_present_transactionId = true;
4893
      boolean that_present_transactionId = true;
4894
      if (this_present_transactionId || that_present_transactionId) {
4895
        if (!(this_present_transactionId && that_present_transactionId))
4896
          return false;
4897
        if (this.transactionId != that.transactionId)
4898
          return false;
4899
      }
4900
 
4901
      return true;
4902
    }
4903
 
4904
    @Override
4905
    public int hashCode() {
4906
      return 0;
4907
    }
4908
 
4909
    public int compareTo(getTransactionStatus_args other) {
4910
      if (!getClass().equals(other.getClass())) {
4911
        return getClass().getName().compareTo(other.getClass().getName());
4912
      }
4913
 
4914
      int lastComparison = 0;
4915
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
4916
 
4917
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
4918
      if (lastComparison != 0) {
4919
        return lastComparison;
4920
      }
4921
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
4922
      if (lastComparison != 0) {
4923
        return lastComparison;
4924
      }
4925
      return 0;
4926
    }
4927
 
4928
    public void read(TProtocol iprot) throws TException {
4929
      TField field;
4930
      iprot.readStructBegin();
4931
      while (true)
4932
      {
4933
        field = iprot.readFieldBegin();
4934
        if (field.type == TType.STOP) { 
4935
          break;
4936
        }
4937
        _Fields fieldId = _Fields.findByThriftId(field.id);
4938
        if (fieldId == null) {
4939
          TProtocolUtil.skip(iprot, field.type);
4940
        } else {
4941
          switch (fieldId) {
4942
            case TRANSACTION_ID:
4943
              if (field.type == TType.I64) {
4944
                this.transactionId = iprot.readI64();
4945
                setTransactionIdIsSet(true);
4946
              } else { 
4947
                TProtocolUtil.skip(iprot, field.type);
4948
              }
4949
              break;
4950
          }
4951
          iprot.readFieldEnd();
4952
        }
4953
      }
4954
      iprot.readStructEnd();
4955
      validate();
4956
    }
4957
 
4958
    public void write(TProtocol oprot) throws TException {
4959
      validate();
4960
 
4961
      oprot.writeStructBegin(STRUCT_DESC);
4962
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
4963
      oprot.writeI64(this.transactionId);
4964
      oprot.writeFieldEnd();
4965
      oprot.writeFieldStop();
4966
      oprot.writeStructEnd();
4967
    }
4968
 
4969
    @Override
4970
    public String toString() {
4971
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
4972
      boolean first = true;
4973
 
4974
      sb.append("transactionId:");
4975
      sb.append(this.transactionId);
4976
      first = false;
4977
      sb.append(")");
4978
      return sb.toString();
4979
    }
4980
 
4981
    public void validate() throws TException {
4982
      // check for required fields
4983
    }
4984
 
4985
  }
4986
 
4987
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
4988
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
4989
 
4990
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
4991
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4992
 
4993
    private TransactionStatus success;
4994
    private TransactionServiceException ex;
4995
 
4996
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4997
    public enum _Fields implements TFieldIdEnum {
4998
      /**
4999
       * 
5000
       * @see TransactionStatus
5001
       */
5002
      SUCCESS((short)0, "success"),
5003
      EX((short)1, "ex");
5004
 
5005
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5006
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5007
 
5008
      static {
5009
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5010
          byId.put((int)field._thriftId, field);
5011
          byName.put(field.getFieldName(), field);
5012
        }
5013
      }
5014
 
5015
      /**
5016
       * Find the _Fields constant that matches fieldId, or null if its not found.
5017
       */
5018
      public static _Fields findByThriftId(int fieldId) {
5019
        return byId.get(fieldId);
5020
      }
5021
 
5022
      /**
5023
       * Find the _Fields constant that matches fieldId, throwing an exception
5024
       * if it is not found.
5025
       */
5026
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5027
        _Fields fields = findByThriftId(fieldId);
5028
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5029
        return fields;
5030
      }
5031
 
5032
      /**
5033
       * Find the _Fields constant that matches name, or null if its not found.
5034
       */
5035
      public static _Fields findByName(String name) {
5036
        return byName.get(name);
5037
      }
5038
 
5039
      private final short _thriftId;
5040
      private final String _fieldName;
5041
 
5042
      _Fields(short thriftId, String fieldName) {
5043
        _thriftId = thriftId;
5044
        _fieldName = fieldName;
5045
      }
5046
 
5047
      public short getThriftFieldId() {
5048
        return _thriftId;
5049
      }
5050
 
5051
      public String getFieldName() {
5052
        return _fieldName;
5053
      }
5054
    }
5055
 
5056
    // isset id assignments
5057
 
5058
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5059
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5060
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5061
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5062
          new FieldValueMetaData(TType.STRUCT)));
5063
    }});
5064
 
5065
    static {
5066
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5067
    }
5068
 
5069
    public getTransactionStatus_result() {
5070
    }
5071
 
5072
    public getTransactionStatus_result(
5073
      TransactionStatus success,
5074
      TransactionServiceException ex)
5075
    {
5076
      this();
5077
      this.success = success;
5078
      this.ex = ex;
5079
    }
5080
 
5081
    /**
5082
     * Performs a deep copy on <i>other</i>.
5083
     */
5084
    public getTransactionStatus_result(getTransactionStatus_result other) {
5085
      if (other.isSetSuccess()) {
5086
        this.success = other.success;
5087
      }
5088
      if (other.isSetEx()) {
5089
        this.ex = new TransactionServiceException(other.ex);
5090
      }
5091
    }
5092
 
5093
    public getTransactionStatus_result deepCopy() {
5094
      return new getTransactionStatus_result(this);
5095
    }
5096
 
5097
    @Deprecated
5098
    public getTransactionStatus_result clone() {
5099
      return new getTransactionStatus_result(this);
5100
    }
5101
 
5102
    /**
5103
     * 
5104
     * @see TransactionStatus
5105
     */
5106
    public TransactionStatus getSuccess() {
5107
      return this.success;
5108
    }
5109
 
5110
    /**
5111
     * 
5112
     * @see TransactionStatus
5113
     */
5114
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5115
      this.success = success;
5116
      return this;
5117
    }
5118
 
5119
    public void unsetSuccess() {
5120
      this.success = null;
5121
    }
5122
 
5123
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5124
    public boolean isSetSuccess() {
5125
      return this.success != null;
5126
    }
5127
 
5128
    public void setSuccessIsSet(boolean value) {
5129
      if (!value) {
5130
        this.success = null;
5131
      }
5132
    }
5133
 
5134
    public TransactionServiceException getEx() {
5135
      return this.ex;
5136
    }
5137
 
5138
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5139
      this.ex = ex;
5140
      return this;
5141
    }
5142
 
5143
    public void unsetEx() {
5144
      this.ex = null;
5145
    }
5146
 
5147
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5148
    public boolean isSetEx() {
5149
      return this.ex != null;
5150
    }
5151
 
5152
    public void setExIsSet(boolean value) {
5153
      if (!value) {
5154
        this.ex = null;
5155
      }
5156
    }
5157
 
5158
    public void setFieldValue(_Fields field, Object value) {
5159
      switch (field) {
5160
      case SUCCESS:
5161
        if (value == null) {
5162
          unsetSuccess();
5163
        } else {
5164
          setSuccess((TransactionStatus)value);
5165
        }
5166
        break;
5167
 
5168
      case EX:
5169
        if (value == null) {
5170
          unsetEx();
5171
        } else {
5172
          setEx((TransactionServiceException)value);
5173
        }
5174
        break;
5175
 
5176
      }
5177
    }
5178
 
5179
    public void setFieldValue(int fieldID, Object value) {
5180
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5181
    }
5182
 
5183
    public Object getFieldValue(_Fields field) {
5184
      switch (field) {
5185
      case SUCCESS:
5186
        return getSuccess();
5187
 
5188
      case EX:
5189
        return getEx();
5190
 
5191
      }
5192
      throw new IllegalStateException();
5193
    }
5194
 
5195
    public Object getFieldValue(int fieldId) {
5196
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5197
    }
5198
 
5199
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5200
    public boolean isSet(_Fields field) {
5201
      switch (field) {
5202
      case SUCCESS:
5203
        return isSetSuccess();
5204
      case EX:
5205
        return isSetEx();
5206
      }
5207
      throw new IllegalStateException();
5208
    }
5209
 
5210
    public boolean isSet(int fieldID) {
5211
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5212
    }
5213
 
5214
    @Override
5215
    public boolean equals(Object that) {
5216
      if (that == null)
5217
        return false;
5218
      if (that instanceof getTransactionStatus_result)
5219
        return this.equals((getTransactionStatus_result)that);
5220
      return false;
5221
    }
5222
 
5223
    public boolean equals(getTransactionStatus_result that) {
5224
      if (that == null)
5225
        return false;
5226
 
5227
      boolean this_present_success = true && this.isSetSuccess();
5228
      boolean that_present_success = true && that.isSetSuccess();
5229
      if (this_present_success || that_present_success) {
5230
        if (!(this_present_success && that_present_success))
5231
          return false;
5232
        if (!this.success.equals(that.success))
5233
          return false;
5234
      }
5235
 
5236
      boolean this_present_ex = true && this.isSetEx();
5237
      boolean that_present_ex = true && that.isSetEx();
5238
      if (this_present_ex || that_present_ex) {
5239
        if (!(this_present_ex && that_present_ex))
5240
          return false;
5241
        if (!this.ex.equals(that.ex))
5242
          return false;
5243
      }
5244
 
5245
      return true;
5246
    }
5247
 
5248
    @Override
5249
    public int hashCode() {
5250
      return 0;
5251
    }
5252
 
5253
    public int compareTo(getTransactionStatus_result other) {
5254
      if (!getClass().equals(other.getClass())) {
5255
        return getClass().getName().compareTo(other.getClass().getName());
5256
      }
5257
 
5258
      int lastComparison = 0;
5259
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5260
 
5261
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5262
      if (lastComparison != 0) {
5263
        return lastComparison;
5264
      }
5265
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5266
      if (lastComparison != 0) {
5267
        return lastComparison;
5268
      }
5269
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5270
      if (lastComparison != 0) {
5271
        return lastComparison;
5272
      }
5273
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5274
      if (lastComparison != 0) {
5275
        return lastComparison;
5276
      }
5277
      return 0;
5278
    }
5279
 
5280
    public void read(TProtocol iprot) throws TException {
5281
      TField field;
5282
      iprot.readStructBegin();
5283
      while (true)
5284
      {
5285
        field = iprot.readFieldBegin();
5286
        if (field.type == TType.STOP) { 
5287
          break;
5288
        }
5289
        _Fields fieldId = _Fields.findByThriftId(field.id);
5290
        if (fieldId == null) {
5291
          TProtocolUtil.skip(iprot, field.type);
5292
        } else {
5293
          switch (fieldId) {
5294
            case SUCCESS:
5295
              if (field.type == TType.I32) {
5296
                this.success = TransactionStatus.findByValue(iprot.readI32());
5297
              } else { 
5298
                TProtocolUtil.skip(iprot, field.type);
5299
              }
5300
              break;
5301
            case EX:
5302
              if (field.type == TType.STRUCT) {
5303
                this.ex = new TransactionServiceException();
5304
                this.ex.read(iprot);
5305
              } else { 
5306
                TProtocolUtil.skip(iprot, field.type);
5307
              }
5308
              break;
5309
          }
5310
          iprot.readFieldEnd();
5311
        }
5312
      }
5313
      iprot.readStructEnd();
5314
      validate();
5315
    }
5316
 
5317
    public void write(TProtocol oprot) throws TException {
5318
      oprot.writeStructBegin(STRUCT_DESC);
5319
 
5320
      if (this.isSetSuccess()) {
5321
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5322
        oprot.writeI32(this.success.getValue());
5323
        oprot.writeFieldEnd();
5324
      } else if (this.isSetEx()) {
5325
        oprot.writeFieldBegin(EX_FIELD_DESC);
5326
        this.ex.write(oprot);
5327
        oprot.writeFieldEnd();
5328
      }
5329
      oprot.writeFieldStop();
5330
      oprot.writeStructEnd();
5331
    }
5332
 
5333
    @Override
5334
    public String toString() {
5335
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5336
      boolean first = true;
5337
 
5338
      sb.append("success:");
5339
      if (this.success == null) {
5340
        sb.append("null");
5341
      } else {
5342
        String success_name = success.name();
5343
        if (success_name != null) {
5344
          sb.append(success_name);
5345
          sb.append(" (");
5346
        }
5347
        sb.append(this.success);
5348
        if (success_name != null) {
5349
          sb.append(")");
5350
        }
5351
      }
5352
      first = false;
5353
      if (!first) sb.append(", ");
5354
      sb.append("ex:");
5355
      if (this.ex == null) {
5356
        sb.append("null");
5357
      } else {
5358
        sb.append(this.ex);
5359
      }
5360
      first = false;
5361
      sb.append(")");
5362
      return sb.toString();
5363
    }
5364
 
5365
    public void validate() throws TException {
5366
      // check for required fields
5367
    }
5368
 
5369
  }
5370
 
5371
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5372
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5373
 
5374
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5375
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5376
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5377
 
5378
    private long transactionId;
5379
    private TransactionStatus status;
5380
    private String description;
5381
 
5382
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5383
    public enum _Fields implements TFieldIdEnum {
5384
      TRANSACTION_ID((short)1, "transactionId"),
5385
      /**
5386
       * 
5387
       * @see TransactionStatus
5388
       */
5389
      STATUS((short)2, "status"),
5390
      DESCRIPTION((short)3, "description");
5391
 
5392
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5393
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5394
 
5395
      static {
5396
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5397
          byId.put((int)field._thriftId, field);
5398
          byName.put(field.getFieldName(), field);
5399
        }
5400
      }
5401
 
5402
      /**
5403
       * Find the _Fields constant that matches fieldId, or null if its not found.
5404
       */
5405
      public static _Fields findByThriftId(int fieldId) {
5406
        return byId.get(fieldId);
5407
      }
5408
 
5409
      /**
5410
       * Find the _Fields constant that matches fieldId, throwing an exception
5411
       * if it is not found.
5412
       */
5413
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5414
        _Fields fields = findByThriftId(fieldId);
5415
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5416
        return fields;
5417
      }
5418
 
5419
      /**
5420
       * Find the _Fields constant that matches name, or null if its not found.
5421
       */
5422
      public static _Fields findByName(String name) {
5423
        return byName.get(name);
5424
      }
5425
 
5426
      private final short _thriftId;
5427
      private final String _fieldName;
5428
 
5429
      _Fields(short thriftId, String fieldName) {
5430
        _thriftId = thriftId;
5431
        _fieldName = fieldName;
5432
      }
5433
 
5434
      public short getThriftFieldId() {
5435
        return _thriftId;
5436
      }
5437
 
5438
      public String getFieldName() {
5439
        return _fieldName;
5440
      }
5441
    }
5442
 
5443
    // isset id assignments
5444
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5445
    private BitSet __isset_bit_vector = new BitSet(1);
5446
 
5447
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5448
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5449
          new FieldValueMetaData(TType.I64)));
5450
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5451
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5452
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5453
          new FieldValueMetaData(TType.STRING)));
5454
    }});
5455
 
5456
    static {
5457
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5458
    }
5459
 
5460
    public changeTransactionStatus_args() {
5461
    }
5462
 
5463
    public changeTransactionStatus_args(
5464
      long transactionId,
5465
      TransactionStatus status,
5466
      String description)
5467
    {
5468
      this();
5469
      this.transactionId = transactionId;
5470
      setTransactionIdIsSet(true);
5471
      this.status = status;
5472
      this.description = description;
5473
    }
5474
 
5475
    /**
5476
     * Performs a deep copy on <i>other</i>.
5477
     */
5478
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
5479
      __isset_bit_vector.clear();
5480
      __isset_bit_vector.or(other.__isset_bit_vector);
5481
      this.transactionId = other.transactionId;
5482
      if (other.isSetStatus()) {
5483
        this.status = other.status;
5484
      }
5485
      if (other.isSetDescription()) {
5486
        this.description = other.description;
5487
      }
5488
    }
5489
 
5490
    public changeTransactionStatus_args deepCopy() {
5491
      return new changeTransactionStatus_args(this);
5492
    }
5493
 
5494
    @Deprecated
5495
    public changeTransactionStatus_args clone() {
5496
      return new changeTransactionStatus_args(this);
5497
    }
5498
 
5499
    public long getTransactionId() {
5500
      return this.transactionId;
5501
    }
5502
 
5503
    public changeTransactionStatus_args setTransactionId(long transactionId) {
5504
      this.transactionId = transactionId;
5505
      setTransactionIdIsSet(true);
5506
      return this;
5507
    }
5508
 
5509
    public void unsetTransactionId() {
5510
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5511
    }
5512
 
5513
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5514
    public boolean isSetTransactionId() {
5515
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5516
    }
5517
 
5518
    public void setTransactionIdIsSet(boolean value) {
5519
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5520
    }
5521
 
5522
    /**
5523
     * 
5524
     * @see TransactionStatus
5525
     */
5526
    public TransactionStatus getStatus() {
5527
      return this.status;
5528
    }
5529
 
5530
    /**
5531
     * 
5532
     * @see TransactionStatus
5533
     */
5534
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
5535
      this.status = status;
5536
      return this;
5537
    }
5538
 
5539
    public void unsetStatus() {
5540
      this.status = null;
5541
    }
5542
 
5543
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5544
    public boolean isSetStatus() {
5545
      return this.status != null;
5546
    }
5547
 
5548
    public void setStatusIsSet(boolean value) {
5549
      if (!value) {
5550
        this.status = null;
5551
      }
5552
    }
5553
 
5554
    public String getDescription() {
5555
      return this.description;
5556
    }
5557
 
5558
    public changeTransactionStatus_args setDescription(String description) {
5559
      this.description = description;
5560
      return this;
5561
    }
5562
 
5563
    public void unsetDescription() {
5564
      this.description = null;
5565
    }
5566
 
5567
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
5568
    public boolean isSetDescription() {
5569
      return this.description != null;
5570
    }
5571
 
5572
    public void setDescriptionIsSet(boolean value) {
5573
      if (!value) {
5574
        this.description = null;
5575
      }
5576
    }
5577
 
5578
    public void setFieldValue(_Fields field, Object value) {
5579
      switch (field) {
5580
      case TRANSACTION_ID:
5581
        if (value == null) {
5582
          unsetTransactionId();
5583
        } else {
5584
          setTransactionId((Long)value);
5585
        }
5586
        break;
5587
 
5588
      case STATUS:
5589
        if (value == null) {
5590
          unsetStatus();
5591
        } else {
5592
          setStatus((TransactionStatus)value);
5593
        }
5594
        break;
5595
 
5596
      case DESCRIPTION:
5597
        if (value == null) {
5598
          unsetDescription();
5599
        } else {
5600
          setDescription((String)value);
5601
        }
5602
        break;
5603
 
5604
      }
5605
    }
5606
 
5607
    public void setFieldValue(int fieldID, Object value) {
5608
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5609
    }
5610
 
5611
    public Object getFieldValue(_Fields field) {
5612
      switch (field) {
5613
      case TRANSACTION_ID:
5614
        return new Long(getTransactionId());
5615
 
5616
      case STATUS:
5617
        return getStatus();
5618
 
5619
      case DESCRIPTION:
5620
        return getDescription();
5621
 
5622
      }
5623
      throw new IllegalStateException();
5624
    }
5625
 
5626
    public Object getFieldValue(int fieldId) {
5627
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5628
    }
5629
 
5630
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5631
    public boolean isSet(_Fields field) {
5632
      switch (field) {
5633
      case TRANSACTION_ID:
5634
        return isSetTransactionId();
5635
      case STATUS:
5636
        return isSetStatus();
5637
      case DESCRIPTION:
5638
        return isSetDescription();
5639
      }
5640
      throw new IllegalStateException();
5641
    }
5642
 
5643
    public boolean isSet(int fieldID) {
5644
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5645
    }
5646
 
5647
    @Override
5648
    public boolean equals(Object that) {
5649
      if (that == null)
5650
        return false;
5651
      if (that instanceof changeTransactionStatus_args)
5652
        return this.equals((changeTransactionStatus_args)that);
5653
      return false;
5654
    }
5655
 
5656
    public boolean equals(changeTransactionStatus_args that) {
5657
      if (that == null)
5658
        return false;
5659
 
5660
      boolean this_present_transactionId = true;
5661
      boolean that_present_transactionId = true;
5662
      if (this_present_transactionId || that_present_transactionId) {
5663
        if (!(this_present_transactionId && that_present_transactionId))
5664
          return false;
5665
        if (this.transactionId != that.transactionId)
5666
          return false;
5667
      }
5668
 
5669
      boolean this_present_status = true && this.isSetStatus();
5670
      boolean that_present_status = true && that.isSetStatus();
5671
      if (this_present_status || that_present_status) {
5672
        if (!(this_present_status && that_present_status))
5673
          return false;
5674
        if (!this.status.equals(that.status))
5675
          return false;
5676
      }
5677
 
5678
      boolean this_present_description = true && this.isSetDescription();
5679
      boolean that_present_description = true && that.isSetDescription();
5680
      if (this_present_description || that_present_description) {
5681
        if (!(this_present_description && that_present_description))
5682
          return false;
5683
        if (!this.description.equals(that.description))
5684
          return false;
5685
      }
5686
 
5687
      return true;
5688
    }
5689
 
5690
    @Override
5691
    public int hashCode() {
5692
      return 0;
5693
    }
5694
 
5695
    public int compareTo(changeTransactionStatus_args other) {
5696
      if (!getClass().equals(other.getClass())) {
5697
        return getClass().getName().compareTo(other.getClass().getName());
5698
      }
5699
 
5700
      int lastComparison = 0;
5701
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
5702
 
5703
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5704
      if (lastComparison != 0) {
5705
        return lastComparison;
5706
      }
5707
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5708
      if (lastComparison != 0) {
5709
        return lastComparison;
5710
      }
5711
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5712
      if (lastComparison != 0) {
5713
        return lastComparison;
5714
      }
5715
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5716
      if (lastComparison != 0) {
5717
        return lastComparison;
5718
      }
5719
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
5720
      if (lastComparison != 0) {
5721
        return lastComparison;
5722
      }
5723
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
5724
      if (lastComparison != 0) {
5725
        return lastComparison;
5726
      }
5727
      return 0;
5728
    }
5729
 
5730
    public void read(TProtocol iprot) throws TException {
5731
      TField field;
5732
      iprot.readStructBegin();
5733
      while (true)
5734
      {
5735
        field = iprot.readFieldBegin();
5736
        if (field.type == TType.STOP) { 
5737
          break;
5738
        }
5739
        _Fields fieldId = _Fields.findByThriftId(field.id);
5740
        if (fieldId == null) {
5741
          TProtocolUtil.skip(iprot, field.type);
5742
        } else {
5743
          switch (fieldId) {
5744
            case TRANSACTION_ID:
5745
              if (field.type == TType.I64) {
5746
                this.transactionId = iprot.readI64();
5747
                setTransactionIdIsSet(true);
5748
              } else { 
5749
                TProtocolUtil.skip(iprot, field.type);
5750
              }
5751
              break;
5752
            case STATUS:
5753
              if (field.type == TType.I32) {
5754
                this.status = TransactionStatus.findByValue(iprot.readI32());
5755
              } else { 
5756
                TProtocolUtil.skip(iprot, field.type);
5757
              }
5758
              break;
5759
            case DESCRIPTION:
5760
              if (field.type == TType.STRING) {
5761
                this.description = iprot.readString();
5762
              } else { 
5763
                TProtocolUtil.skip(iprot, field.type);
5764
              }
5765
              break;
5766
          }
5767
          iprot.readFieldEnd();
5768
        }
5769
      }
5770
      iprot.readStructEnd();
5771
      validate();
5772
    }
5773
 
5774
    public void write(TProtocol oprot) throws TException {
5775
      validate();
5776
 
5777
      oprot.writeStructBegin(STRUCT_DESC);
5778
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5779
      oprot.writeI64(this.transactionId);
5780
      oprot.writeFieldEnd();
5781
      if (this.status != null) {
5782
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5783
        oprot.writeI32(this.status.getValue());
5784
        oprot.writeFieldEnd();
5785
      }
5786
      if (this.description != null) {
5787
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
5788
        oprot.writeString(this.description);
5789
        oprot.writeFieldEnd();
5790
      }
5791
      oprot.writeFieldStop();
5792
      oprot.writeStructEnd();
5793
    }
5794
 
5795
    @Override
5796
    public String toString() {
5797
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
5798
      boolean first = true;
5799
 
5800
      sb.append("transactionId:");
5801
      sb.append(this.transactionId);
5802
      first = false;
5803
      if (!first) sb.append(", ");
5804
      sb.append("status:");
5805
      if (this.status == null) {
5806
        sb.append("null");
5807
      } else {
5808
        String status_name = status.name();
5809
        if (status_name != null) {
5810
          sb.append(status_name);
5811
          sb.append(" (");
5812
        }
5813
        sb.append(this.status);
5814
        if (status_name != null) {
5815
          sb.append(")");
5816
        }
5817
      }
5818
      first = false;
5819
      if (!first) sb.append(", ");
5820
      sb.append("description:");
5821
      if (this.description == null) {
5822
        sb.append("null");
5823
      } else {
5824
        sb.append(this.description);
5825
      }
5826
      first = false;
5827
      sb.append(")");
5828
      return sb.toString();
5829
    }
5830
 
5831
    public void validate() throws TException {
5832
      // check for required fields
5833
    }
5834
 
5835
  }
5836
 
5837
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
5838
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
5839
 
5840
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
5841
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5842
 
5843
    private boolean success;
5844
    private TransactionServiceException ex;
5845
 
5846
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5847
    public enum _Fields implements TFieldIdEnum {
5848
      SUCCESS((short)0, "success"),
5849
      EX((short)1, "ex");
5850
 
5851
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5852
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5853
 
5854
      static {
5855
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5856
          byId.put((int)field._thriftId, field);
5857
          byName.put(field.getFieldName(), field);
5858
        }
5859
      }
5860
 
5861
      /**
5862
       * Find the _Fields constant that matches fieldId, or null if its not found.
5863
       */
5864
      public static _Fields findByThriftId(int fieldId) {
5865
        return byId.get(fieldId);
5866
      }
5867
 
5868
      /**
5869
       * Find the _Fields constant that matches fieldId, throwing an exception
5870
       * if it is not found.
5871
       */
5872
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5873
        _Fields fields = findByThriftId(fieldId);
5874
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5875
        return fields;
5876
      }
5877
 
5878
      /**
5879
       * Find the _Fields constant that matches name, or null if its not found.
5880
       */
5881
      public static _Fields findByName(String name) {
5882
        return byName.get(name);
5883
      }
5884
 
5885
      private final short _thriftId;
5886
      private final String _fieldName;
5887
 
5888
      _Fields(short thriftId, String fieldName) {
5889
        _thriftId = thriftId;
5890
        _fieldName = fieldName;
5891
      }
5892
 
5893
      public short getThriftFieldId() {
5894
        return _thriftId;
5895
      }
5896
 
5897
      public String getFieldName() {
5898
        return _fieldName;
5899
      }
5900
    }
5901
 
5902
    // isset id assignments
5903
    private static final int __SUCCESS_ISSET_ID = 0;
5904
    private BitSet __isset_bit_vector = new BitSet(1);
5905
 
5906
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5907
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5908
          new FieldValueMetaData(TType.BOOL)));
5909
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5910
          new FieldValueMetaData(TType.STRUCT)));
5911
    }});
5912
 
5913
    static {
5914
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
5915
    }
5916
 
5917
    public changeTransactionStatus_result() {
5918
    }
5919
 
5920
    public changeTransactionStatus_result(
5921
      boolean success,
5922
      TransactionServiceException ex)
5923
    {
5924
      this();
5925
      this.success = success;
5926
      setSuccessIsSet(true);
5927
      this.ex = ex;
5928
    }
5929
 
5930
    /**
5931
     * Performs a deep copy on <i>other</i>.
5932
     */
5933
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
5934
      __isset_bit_vector.clear();
5935
      __isset_bit_vector.or(other.__isset_bit_vector);
5936
      this.success = other.success;
5937
      if (other.isSetEx()) {
5938
        this.ex = new TransactionServiceException(other.ex);
5939
      }
5940
    }
5941
 
5942
    public changeTransactionStatus_result deepCopy() {
5943
      return new changeTransactionStatus_result(this);
5944
    }
5945
 
5946
    @Deprecated
5947
    public changeTransactionStatus_result clone() {
5948
      return new changeTransactionStatus_result(this);
5949
    }
5950
 
5951
    public boolean isSuccess() {
5952
      return this.success;
5953
    }
5954
 
5955
    public changeTransactionStatus_result setSuccess(boolean success) {
5956
      this.success = success;
5957
      setSuccessIsSet(true);
5958
      return this;
5959
    }
5960
 
5961
    public void unsetSuccess() {
5962
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5963
    }
5964
 
5965
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5966
    public boolean isSetSuccess() {
5967
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5968
    }
5969
 
5970
    public void setSuccessIsSet(boolean value) {
5971
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
5972
    }
5973
 
5974
    public TransactionServiceException getEx() {
5975
      return this.ex;
5976
    }
5977
 
5978
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
5979
      this.ex = ex;
5980
      return this;
5981
    }
5982
 
5983
    public void unsetEx() {
5984
      this.ex = null;
5985
    }
5986
 
5987
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5988
    public boolean isSetEx() {
5989
      return this.ex != null;
5990
    }
5991
 
5992
    public void setExIsSet(boolean value) {
5993
      if (!value) {
5994
        this.ex = null;
5995
      }
5996
    }
5997
 
5998
    public void setFieldValue(_Fields field, Object value) {
5999
      switch (field) {
6000
      case SUCCESS:
6001
        if (value == null) {
6002
          unsetSuccess();
6003
        } else {
6004
          setSuccess((Boolean)value);
6005
        }
6006
        break;
6007
 
6008
      case EX:
6009
        if (value == null) {
6010
          unsetEx();
6011
        } else {
6012
          setEx((TransactionServiceException)value);
6013
        }
6014
        break;
6015
 
6016
      }
6017
    }
6018
 
6019
    public void setFieldValue(int fieldID, Object value) {
6020
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6021
    }
6022
 
6023
    public Object getFieldValue(_Fields field) {
6024
      switch (field) {
6025
      case SUCCESS:
6026
        return new Boolean(isSuccess());
6027
 
6028
      case EX:
6029
        return getEx();
6030
 
6031
      }
6032
      throw new IllegalStateException();
6033
    }
6034
 
6035
    public Object getFieldValue(int fieldId) {
6036
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6037
    }
6038
 
6039
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6040
    public boolean isSet(_Fields field) {
6041
      switch (field) {
6042
      case SUCCESS:
6043
        return isSetSuccess();
6044
      case EX:
6045
        return isSetEx();
6046
      }
6047
      throw new IllegalStateException();
6048
    }
6049
 
6050
    public boolean isSet(int fieldID) {
6051
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6052
    }
6053
 
6054
    @Override
6055
    public boolean equals(Object that) {
6056
      if (that == null)
6057
        return false;
6058
      if (that instanceof changeTransactionStatus_result)
6059
        return this.equals((changeTransactionStatus_result)that);
6060
      return false;
6061
    }
6062
 
6063
    public boolean equals(changeTransactionStatus_result that) {
6064
      if (that == null)
6065
        return false;
6066
 
6067
      boolean this_present_success = true;
6068
      boolean that_present_success = true;
6069
      if (this_present_success || that_present_success) {
6070
        if (!(this_present_success && that_present_success))
6071
          return false;
6072
        if (this.success != that.success)
6073
          return false;
6074
      }
6075
 
6076
      boolean this_present_ex = true && this.isSetEx();
6077
      boolean that_present_ex = true && that.isSetEx();
6078
      if (this_present_ex || that_present_ex) {
6079
        if (!(this_present_ex && that_present_ex))
6080
          return false;
6081
        if (!this.ex.equals(that.ex))
6082
          return false;
6083
      }
6084
 
6085
      return true;
6086
    }
6087
 
6088
    @Override
6089
    public int hashCode() {
6090
      return 0;
6091
    }
6092
 
6093
    public int compareTo(changeTransactionStatus_result other) {
6094
      if (!getClass().equals(other.getClass())) {
6095
        return getClass().getName().compareTo(other.getClass().getName());
6096
      }
6097
 
6098
      int lastComparison = 0;
6099
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6100
 
6101
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6102
      if (lastComparison != 0) {
6103
        return lastComparison;
6104
      }
6105
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6106
      if (lastComparison != 0) {
6107
        return lastComparison;
6108
      }
6109
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6110
      if (lastComparison != 0) {
6111
        return lastComparison;
6112
      }
6113
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6114
      if (lastComparison != 0) {
6115
        return lastComparison;
6116
      }
6117
      return 0;
6118
    }
6119
 
6120
    public void read(TProtocol iprot) throws TException {
6121
      TField field;
6122
      iprot.readStructBegin();
6123
      while (true)
6124
      {
6125
        field = iprot.readFieldBegin();
6126
        if (field.type == TType.STOP) { 
6127
          break;
6128
        }
6129
        _Fields fieldId = _Fields.findByThriftId(field.id);
6130
        if (fieldId == null) {
6131
          TProtocolUtil.skip(iprot, field.type);
6132
        } else {
6133
          switch (fieldId) {
6134
            case SUCCESS:
6135
              if (field.type == TType.BOOL) {
6136
                this.success = iprot.readBool();
6137
                setSuccessIsSet(true);
6138
              } else { 
6139
                TProtocolUtil.skip(iprot, field.type);
6140
              }
6141
              break;
6142
            case EX:
6143
              if (field.type == TType.STRUCT) {
6144
                this.ex = new TransactionServiceException();
6145
                this.ex.read(iprot);
6146
              } else { 
6147
                TProtocolUtil.skip(iprot, field.type);
6148
              }
6149
              break;
6150
          }
6151
          iprot.readFieldEnd();
6152
        }
6153
      }
6154
      iprot.readStructEnd();
6155
      validate();
6156
    }
6157
 
6158
    public void write(TProtocol oprot) throws TException {
6159
      oprot.writeStructBegin(STRUCT_DESC);
6160
 
6161
      if (this.isSetSuccess()) {
6162
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6163
        oprot.writeBool(this.success);
6164
        oprot.writeFieldEnd();
6165
      } else if (this.isSetEx()) {
6166
        oprot.writeFieldBegin(EX_FIELD_DESC);
6167
        this.ex.write(oprot);
6168
        oprot.writeFieldEnd();
6169
      }
6170
      oprot.writeFieldStop();
6171
      oprot.writeStructEnd();
6172
    }
6173
 
6174
    @Override
6175
    public String toString() {
6176
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6177
      boolean first = true;
6178
 
6179
      sb.append("success:");
6180
      sb.append(this.success);
6181
      first = false;
6182
      if (!first) sb.append(", ");
6183
      sb.append("ex:");
6184
      if (this.ex == null) {
6185
        sb.append("null");
6186
      } else {
6187
        sb.append(this.ex);
6188
      }
6189
      first = false;
6190
      sb.append(")");
6191
      return sb.toString();
6192
    }
6193
 
6194
    public void validate() throws TException {
6195
      // check for required fields
6196
    }
6197
 
6198
  }
6199
 
483 rajveer 6200
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6201
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6202
 
483 rajveer 6203
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6204
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6205
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6206
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6207
 
483 rajveer 6208
    private OrderStatus status;
6209
    private long from_date;
6210
    private long to_date;
6211
    private long warehouse_id;
68 ashish 6212
 
6213
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6214
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6215
      /**
6216
       * 
6217
       * @see OrderStatus
6218
       */
6219
      STATUS((short)1, "status"),
6220
      FROM_DATE((short)2, "from_date"),
6221
      TO_DATE((short)3, "to_date"),
6222
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6223
 
6224
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6225
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6226
 
6227
      static {
6228
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6229
          byId.put((int)field._thriftId, field);
6230
          byName.put(field.getFieldName(), field);
6231
        }
6232
      }
6233
 
6234
      /**
6235
       * Find the _Fields constant that matches fieldId, or null if its not found.
6236
       */
6237
      public static _Fields findByThriftId(int fieldId) {
6238
        return byId.get(fieldId);
6239
      }
6240
 
6241
      /**
6242
       * Find the _Fields constant that matches fieldId, throwing an exception
6243
       * if it is not found.
6244
       */
6245
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6246
        _Fields fields = findByThriftId(fieldId);
6247
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6248
        return fields;
6249
      }
6250
 
6251
      /**
6252
       * Find the _Fields constant that matches name, or null if its not found.
6253
       */
6254
      public static _Fields findByName(String name) {
6255
        return byName.get(name);
6256
      }
6257
 
6258
      private final short _thriftId;
6259
      private final String _fieldName;
6260
 
6261
      _Fields(short thriftId, String fieldName) {
6262
        _thriftId = thriftId;
6263
        _fieldName = fieldName;
6264
      }
6265
 
6266
      public short getThriftFieldId() {
6267
        return _thriftId;
6268
      }
6269
 
6270
      public String getFieldName() {
6271
        return _fieldName;
6272
      }
6273
    }
6274
 
6275
    // isset id assignments
483 rajveer 6276
    private static final int __FROM_DATE_ISSET_ID = 0;
6277
    private static final int __TO_DATE_ISSET_ID = 1;
6278
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6279
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6280
 
6281
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6282
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6283
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6284
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6285
          new FieldValueMetaData(TType.I64)));
483 rajveer 6286
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6287
          new FieldValueMetaData(TType.I64)));
6288
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6289
          new FieldValueMetaData(TType.I64)));
68 ashish 6290
    }});
6291
 
6292
    static {
483 rajveer 6293
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6294
    }
6295
 
483 rajveer 6296
    public getAllOrders_args() {
68 ashish 6297
    }
6298
 
483 rajveer 6299
    public getAllOrders_args(
6300
      OrderStatus status,
6301
      long from_date,
6302
      long to_date,
6303
      long warehouse_id)
68 ashish 6304
    {
6305
      this();
483 rajveer 6306
      this.status = status;
6307
      this.from_date = from_date;
6308
      setFrom_dateIsSet(true);
6309
      this.to_date = to_date;
6310
      setTo_dateIsSet(true);
6311
      this.warehouse_id = warehouse_id;
6312
      setWarehouse_idIsSet(true);
68 ashish 6313
    }
6314
 
6315
    /**
6316
     * Performs a deep copy on <i>other</i>.
6317
     */
483 rajveer 6318
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6319
      __isset_bit_vector.clear();
6320
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6321
      if (other.isSetStatus()) {
6322
        this.status = other.status;
6323
      }
6324
      this.from_date = other.from_date;
6325
      this.to_date = other.to_date;
6326
      this.warehouse_id = other.warehouse_id;
68 ashish 6327
    }
6328
 
483 rajveer 6329
    public getAllOrders_args deepCopy() {
6330
      return new getAllOrders_args(this);
68 ashish 6331
    }
6332
 
6333
    @Deprecated
483 rajveer 6334
    public getAllOrders_args clone() {
6335
      return new getAllOrders_args(this);
68 ashish 6336
    }
6337
 
483 rajveer 6338
    /**
6339
     * 
6340
     * @see OrderStatus
6341
     */
6342
    public OrderStatus getStatus() {
6343
      return this.status;
68 ashish 6344
    }
6345
 
483 rajveer 6346
    /**
6347
     * 
6348
     * @see OrderStatus
6349
     */
6350
    public getAllOrders_args setStatus(OrderStatus status) {
6351
      this.status = status;
68 ashish 6352
      return this;
6353
    }
6354
 
483 rajveer 6355
    public void unsetStatus() {
6356
      this.status = null;
68 ashish 6357
    }
6358
 
483 rajveer 6359
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6360
    public boolean isSetStatus() {
6361
      return this.status != null;
68 ashish 6362
    }
6363
 
483 rajveer 6364
    public void setStatusIsSet(boolean value) {
6365
      if (!value) {
6366
        this.status = null;
68 ashish 6367
      }
6368
    }
6369
 
483 rajveer 6370
    public long getFrom_date() {
6371
      return this.from_date;
68 ashish 6372
    }
6373
 
483 rajveer 6374
    public getAllOrders_args setFrom_date(long from_date) {
6375
      this.from_date = from_date;
6376
      setFrom_dateIsSet(true);
6377
      return this;
68 ashish 6378
    }
6379
 
483 rajveer 6380
    public void unsetFrom_date() {
6381
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6382
    }
6383
 
483 rajveer 6384
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6385
    public boolean isSetFrom_date() {
6386
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6387
    }
6388
 
483 rajveer 6389
    public void setFrom_dateIsSet(boolean value) {
6390
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6391
    }
6392
 
483 rajveer 6393
    public long getTo_date() {
6394
      return this.to_date;
68 ashish 6395
    }
6396
 
483 rajveer 6397
    public getAllOrders_args setTo_date(long to_date) {
6398
      this.to_date = to_date;
6399
      setTo_dateIsSet(true);
68 ashish 6400
      return this;
6401
    }
6402
 
483 rajveer 6403
    public void unsetTo_date() {
6404
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6405
    }
6406
 
483 rajveer 6407
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6408
    public boolean isSetTo_date() {
6409
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6410
    }
6411
 
483 rajveer 6412
    public void setTo_dateIsSet(boolean value) {
6413
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6414
    }
6415
 
483 rajveer 6416
    public long getWarehouse_id() {
6417
      return this.warehouse_id;
68 ashish 6418
    }
6419
 
483 rajveer 6420
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6421
      this.warehouse_id = warehouse_id;
6422
      setWarehouse_idIsSet(true);
68 ashish 6423
      return this;
6424
    }
6425
 
483 rajveer 6426
    public void unsetWarehouse_id() {
6427
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6428
    }
6429
 
483 rajveer 6430
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6431
    public boolean isSetWarehouse_id() {
6432
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6433
    }
6434
 
483 rajveer 6435
    public void setWarehouse_idIsSet(boolean value) {
6436
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6437
    }
6438
 
6439
    public void setFieldValue(_Fields field, Object value) {
6440
      switch (field) {
483 rajveer 6441
      case STATUS:
68 ashish 6442
        if (value == null) {
483 rajveer 6443
          unsetStatus();
68 ashish 6444
        } else {
483 rajveer 6445
          setStatus((OrderStatus)value);
68 ashish 6446
        }
6447
        break;
6448
 
483 rajveer 6449
      case FROM_DATE:
68 ashish 6450
        if (value == null) {
483 rajveer 6451
          unsetFrom_date();
68 ashish 6452
        } else {
483 rajveer 6453
          setFrom_date((Long)value);
68 ashish 6454
        }
6455
        break;
6456
 
483 rajveer 6457
      case TO_DATE:
6458
        if (value == null) {
6459
          unsetTo_date();
6460
        } else {
6461
          setTo_date((Long)value);
6462
        }
6463
        break;
6464
 
6465
      case WAREHOUSE_ID:
6466
        if (value == null) {
6467
          unsetWarehouse_id();
6468
        } else {
6469
          setWarehouse_id((Long)value);
6470
        }
6471
        break;
6472
 
68 ashish 6473
      }
6474
    }
6475
 
6476
    public void setFieldValue(int fieldID, Object value) {
6477
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6478
    }
6479
 
6480
    public Object getFieldValue(_Fields field) {
6481
      switch (field) {
483 rajveer 6482
      case STATUS:
6483
        return getStatus();
68 ashish 6484
 
483 rajveer 6485
      case FROM_DATE:
6486
        return new Long(getFrom_date());
68 ashish 6487
 
483 rajveer 6488
      case TO_DATE:
6489
        return new Long(getTo_date());
6490
 
6491
      case WAREHOUSE_ID:
6492
        return new Long(getWarehouse_id());
6493
 
68 ashish 6494
      }
6495
      throw new IllegalStateException();
6496
    }
6497
 
6498
    public Object getFieldValue(int fieldId) {
6499
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6500
    }
6501
 
6502
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6503
    public boolean isSet(_Fields field) {
6504
      switch (field) {
483 rajveer 6505
      case STATUS:
6506
        return isSetStatus();
6507
      case FROM_DATE:
6508
        return isSetFrom_date();
6509
      case TO_DATE:
6510
        return isSetTo_date();
6511
      case WAREHOUSE_ID:
6512
        return isSetWarehouse_id();
68 ashish 6513
      }
6514
      throw new IllegalStateException();
6515
    }
6516
 
6517
    public boolean isSet(int fieldID) {
6518
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6519
    }
6520
 
6521
    @Override
6522
    public boolean equals(Object that) {
6523
      if (that == null)
6524
        return false;
483 rajveer 6525
      if (that instanceof getAllOrders_args)
6526
        return this.equals((getAllOrders_args)that);
68 ashish 6527
      return false;
6528
    }
6529
 
483 rajveer 6530
    public boolean equals(getAllOrders_args that) {
68 ashish 6531
      if (that == null)
6532
        return false;
6533
 
483 rajveer 6534
      boolean this_present_status = true && this.isSetStatus();
6535
      boolean that_present_status = true && that.isSetStatus();
6536
      if (this_present_status || that_present_status) {
6537
        if (!(this_present_status && that_present_status))
68 ashish 6538
          return false;
483 rajveer 6539
        if (!this.status.equals(that.status))
68 ashish 6540
          return false;
6541
      }
6542
 
483 rajveer 6543
      boolean this_present_from_date = true;
6544
      boolean that_present_from_date = true;
6545
      if (this_present_from_date || that_present_from_date) {
6546
        if (!(this_present_from_date && that_present_from_date))
68 ashish 6547
          return false;
483 rajveer 6548
        if (this.from_date != that.from_date)
68 ashish 6549
          return false;
6550
      }
6551
 
483 rajveer 6552
      boolean this_present_to_date = true;
6553
      boolean that_present_to_date = true;
6554
      if (this_present_to_date || that_present_to_date) {
6555
        if (!(this_present_to_date && that_present_to_date))
6556
          return false;
6557
        if (this.to_date != that.to_date)
6558
          return false;
68 ashish 6559
      }
6560
 
483 rajveer 6561
      boolean this_present_warehouse_id = true;
6562
      boolean that_present_warehouse_id = true;
6563
      if (this_present_warehouse_id || that_present_warehouse_id) {
6564
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 6565
          return false;
483 rajveer 6566
        if (this.warehouse_id != that.warehouse_id)
68 ashish 6567
          return false;
6568
      }
6569
 
6570
      return true;
6571
    }
6572
 
6573
    @Override
6574
    public int hashCode() {
6575
      return 0;
6576
    }
6577
 
483 rajveer 6578
    public int compareTo(getAllOrders_args other) {
68 ashish 6579
      if (!getClass().equals(other.getClass())) {
6580
        return getClass().getName().compareTo(other.getClass().getName());
6581
      }
6582
 
6583
      int lastComparison = 0;
483 rajveer 6584
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 6585
 
483 rajveer 6586
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 6587
      if (lastComparison != 0) {
6588
        return lastComparison;
6589
      }
483 rajveer 6590
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 6591
      if (lastComparison != 0) {
6592
        return lastComparison;
6593
      }
483 rajveer 6594
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
6595
      if (lastComparison != 0) {
6596
        return lastComparison;
6597
      }
6598
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
6599
      if (lastComparison != 0) {
6600
        return lastComparison;
6601
      }
6602
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
6603
      if (lastComparison != 0) {
6604
        return lastComparison;
6605
      }
6606
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
6607
      if (lastComparison != 0) {
6608
        return lastComparison;
6609
      }
6610
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
6611
      if (lastComparison != 0) {
6612
        return lastComparison;
6613
      }
6614
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
6615
      if (lastComparison != 0) {
6616
        return lastComparison;
6617
      }
68 ashish 6618
      return 0;
6619
    }
6620
 
6621
    public void read(TProtocol iprot) throws TException {
6622
      TField field;
6623
      iprot.readStructBegin();
6624
      while (true)
6625
      {
6626
        field = iprot.readFieldBegin();
6627
        if (field.type == TType.STOP) { 
6628
          break;
6629
        }
6630
        _Fields fieldId = _Fields.findByThriftId(field.id);
6631
        if (fieldId == null) {
6632
          TProtocolUtil.skip(iprot, field.type);
6633
        } else {
6634
          switch (fieldId) {
483 rajveer 6635
            case STATUS:
6636
              if (field.type == TType.I32) {
6637
                this.status = OrderStatus.findByValue(iprot.readI32());
6638
              } else { 
6639
                TProtocolUtil.skip(iprot, field.type);
6640
              }
6641
              break;
6642
            case FROM_DATE:
68 ashish 6643
              if (field.type == TType.I64) {
483 rajveer 6644
                this.from_date = iprot.readI64();
6645
                setFrom_dateIsSet(true);
68 ashish 6646
              } else { 
6647
                TProtocolUtil.skip(iprot, field.type);
6648
              }
6649
              break;
483 rajveer 6650
            case TO_DATE:
6651
              if (field.type == TType.I64) {
6652
                this.to_date = iprot.readI64();
6653
                setTo_dateIsSet(true);
6654
              } else { 
6655
                TProtocolUtil.skip(iprot, field.type);
6656
              }
6657
              break;
6658
            case WAREHOUSE_ID:
6659
              if (field.type == TType.I64) {
6660
                this.warehouse_id = iprot.readI64();
6661
                setWarehouse_idIsSet(true);
6662
              } else { 
6663
                TProtocolUtil.skip(iprot, field.type);
6664
              }
6665
              break;
68 ashish 6666
          }
6667
          iprot.readFieldEnd();
6668
        }
6669
      }
6670
      iprot.readStructEnd();
6671
      validate();
6672
    }
6673
 
6674
    public void write(TProtocol oprot) throws TException {
6675
      validate();
6676
 
6677
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 6678
      if (this.status != null) {
6679
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6680
        oprot.writeI32(this.status.getValue());
6681
        oprot.writeFieldEnd();
6682
      }
6683
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
6684
      oprot.writeI64(this.from_date);
68 ashish 6685
      oprot.writeFieldEnd();
483 rajveer 6686
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
6687
      oprot.writeI64(this.to_date);
6688
      oprot.writeFieldEnd();
6689
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
6690
      oprot.writeI64(this.warehouse_id);
6691
      oprot.writeFieldEnd();
68 ashish 6692
      oprot.writeFieldStop();
6693
      oprot.writeStructEnd();
6694
    }
6695
 
6696
    @Override
6697
    public String toString() {
483 rajveer 6698
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 6699
      boolean first = true;
6700
 
483 rajveer 6701
      sb.append("status:");
6702
      if (this.status == null) {
6703
        sb.append("null");
6704
      } else {
6705
        String status_name = status.name();
6706
        if (status_name != null) {
6707
          sb.append(status_name);
6708
          sb.append(" (");
6709
        }
6710
        sb.append(this.status);
6711
        if (status_name != null) {
6712
          sb.append(")");
6713
        }
6714
      }
68 ashish 6715
      first = false;
483 rajveer 6716
      if (!first) sb.append(", ");
6717
      sb.append("from_date:");
6718
      sb.append(this.from_date);
6719
      first = false;
6720
      if (!first) sb.append(", ");
6721
      sb.append("to_date:");
6722
      sb.append(this.to_date);
6723
      first = false;
6724
      if (!first) sb.append(", ");
6725
      sb.append("warehouse_id:");
6726
      sb.append(this.warehouse_id);
6727
      first = false;
68 ashish 6728
      sb.append(")");
6729
      return sb.toString();
6730
    }
6731
 
6732
    public void validate() throws TException {
6733
      // check for required fields
6734
    }
6735
 
6736
  }
6737
 
483 rajveer 6738
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
6739
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 6740
 
483 rajveer 6741
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 6742
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6743
 
483 rajveer 6744
    private List<Order> success;
68 ashish 6745
    private TransactionServiceException ex;
6746
 
6747
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6748
    public enum _Fields implements TFieldIdEnum {
6749
      SUCCESS((short)0, "success"),
6750
      EX((short)1, "ex");
6751
 
6752
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6753
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6754
 
6755
      static {
6756
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6757
          byId.put((int)field._thriftId, field);
6758
          byName.put(field.getFieldName(), field);
6759
        }
6760
      }
6761
 
6762
      /**
6763
       * Find the _Fields constant that matches fieldId, or null if its not found.
6764
       */
6765
      public static _Fields findByThriftId(int fieldId) {
6766
        return byId.get(fieldId);
6767
      }
6768
 
6769
      /**
6770
       * Find the _Fields constant that matches fieldId, throwing an exception
6771
       * if it is not found.
6772
       */
6773
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6774
        _Fields fields = findByThriftId(fieldId);
6775
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6776
        return fields;
6777
      }
6778
 
6779
      /**
6780
       * Find the _Fields constant that matches name, or null if its not found.
6781
       */
6782
      public static _Fields findByName(String name) {
6783
        return byName.get(name);
6784
      }
6785
 
6786
      private final short _thriftId;
6787
      private final String _fieldName;
6788
 
6789
      _Fields(short thriftId, String fieldName) {
6790
        _thriftId = thriftId;
6791
        _fieldName = fieldName;
6792
      }
6793
 
6794
      public short getThriftFieldId() {
6795
        return _thriftId;
6796
      }
6797
 
6798
      public String getFieldName() {
6799
        return _fieldName;
6800
      }
6801
    }
6802
 
6803
    // isset id assignments
6804
 
6805
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6806
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 6807
          new ListMetaData(TType.LIST, 
6808
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 6809
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6810
          new FieldValueMetaData(TType.STRUCT)));
6811
    }});
6812
 
6813
    static {
483 rajveer 6814
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 6815
    }
6816
 
483 rajveer 6817
    public getAllOrders_result() {
68 ashish 6818
    }
6819
 
483 rajveer 6820
    public getAllOrders_result(
6821
      List<Order> success,
68 ashish 6822
      TransactionServiceException ex)
6823
    {
6824
      this();
6825
      this.success = success;
6826
      this.ex = ex;
6827
    }
6828
 
6829
    /**
6830
     * Performs a deep copy on <i>other</i>.
6831
     */
483 rajveer 6832
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 6833
      if (other.isSetSuccess()) {
483 rajveer 6834
        List<Order> __this__success = new ArrayList<Order>();
6835
        for (Order other_element : other.success) {
6836
          __this__success.add(new Order(other_element));
6837
        }
6838
        this.success = __this__success;
68 ashish 6839
      }
6840
      if (other.isSetEx()) {
6841
        this.ex = new TransactionServiceException(other.ex);
6842
      }
6843
    }
6844
 
483 rajveer 6845
    public getAllOrders_result deepCopy() {
6846
      return new getAllOrders_result(this);
68 ashish 6847
    }
6848
 
6849
    @Deprecated
483 rajveer 6850
    public getAllOrders_result clone() {
6851
      return new getAllOrders_result(this);
68 ashish 6852
    }
6853
 
483 rajveer 6854
    public int getSuccessSize() {
6855
      return (this.success == null) ? 0 : this.success.size();
6856
    }
6857
 
6858
    public java.util.Iterator<Order> getSuccessIterator() {
6859
      return (this.success == null) ? null : this.success.iterator();
6860
    }
6861
 
6862
    public void addToSuccess(Order elem) {
6863
      if (this.success == null) {
6864
        this.success = new ArrayList<Order>();
6865
      }
6866
      this.success.add(elem);
6867
    }
6868
 
6869
    public List<Order> getSuccess() {
68 ashish 6870
      return this.success;
6871
    }
6872
 
483 rajveer 6873
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 6874
      this.success = success;
6875
      return this;
6876
    }
6877
 
6878
    public void unsetSuccess() {
6879
      this.success = null;
6880
    }
6881
 
6882
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6883
    public boolean isSetSuccess() {
6884
      return this.success != null;
6885
    }
6886
 
6887
    public void setSuccessIsSet(boolean value) {
6888
      if (!value) {
6889
        this.success = null;
6890
      }
6891
    }
6892
 
6893
    public TransactionServiceException getEx() {
6894
      return this.ex;
6895
    }
6896
 
483 rajveer 6897
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 6898
      this.ex = ex;
6899
      return this;
6900
    }
6901
 
6902
    public void unsetEx() {
6903
      this.ex = null;
6904
    }
6905
 
6906
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6907
    public boolean isSetEx() {
6908
      return this.ex != null;
6909
    }
6910
 
6911
    public void setExIsSet(boolean value) {
6912
      if (!value) {
6913
        this.ex = null;
6914
      }
6915
    }
6916
 
6917
    public void setFieldValue(_Fields field, Object value) {
6918
      switch (field) {
6919
      case SUCCESS:
6920
        if (value == null) {
6921
          unsetSuccess();
6922
        } else {
483 rajveer 6923
          setSuccess((List<Order>)value);
68 ashish 6924
        }
6925
        break;
6926
 
6927
      case EX:
6928
        if (value == null) {
6929
          unsetEx();
6930
        } else {
6931
          setEx((TransactionServiceException)value);
6932
        }
6933
        break;
6934
 
6935
      }
6936
    }
6937
 
6938
    public void setFieldValue(int fieldID, Object value) {
6939
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6940
    }
6941
 
6942
    public Object getFieldValue(_Fields field) {
6943
      switch (field) {
6944
      case SUCCESS:
6945
        return getSuccess();
6946
 
6947
      case EX:
6948
        return getEx();
6949
 
6950
      }
6951
      throw new IllegalStateException();
6952
    }
6953
 
6954
    public Object getFieldValue(int fieldId) {
6955
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6956
    }
6957
 
6958
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6959
    public boolean isSet(_Fields field) {
6960
      switch (field) {
6961
      case SUCCESS:
6962
        return isSetSuccess();
6963
      case EX:
6964
        return isSetEx();
6965
      }
6966
      throw new IllegalStateException();
6967
    }
6968
 
6969
    public boolean isSet(int fieldID) {
6970
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6971
    }
6972
 
6973
    @Override
6974
    public boolean equals(Object that) {
6975
      if (that == null)
6976
        return false;
483 rajveer 6977
      if (that instanceof getAllOrders_result)
6978
        return this.equals((getAllOrders_result)that);
68 ashish 6979
      return false;
6980
    }
6981
 
483 rajveer 6982
    public boolean equals(getAllOrders_result that) {
68 ashish 6983
      if (that == null)
6984
        return false;
6985
 
6986
      boolean this_present_success = true && this.isSetSuccess();
6987
      boolean that_present_success = true && that.isSetSuccess();
6988
      if (this_present_success || that_present_success) {
6989
        if (!(this_present_success && that_present_success))
6990
          return false;
6991
        if (!this.success.equals(that.success))
6992
          return false;
6993
      }
6994
 
6995
      boolean this_present_ex = true && this.isSetEx();
6996
      boolean that_present_ex = true && that.isSetEx();
6997
      if (this_present_ex || that_present_ex) {
6998
        if (!(this_present_ex && that_present_ex))
6999
          return false;
7000
        if (!this.ex.equals(that.ex))
7001
          return false;
7002
      }
7003
 
7004
      return true;
7005
    }
7006
 
7007
    @Override
7008
    public int hashCode() {
7009
      return 0;
7010
    }
7011
 
483 rajveer 7012
    public int compareTo(getAllOrders_result other) {
7013
      if (!getClass().equals(other.getClass())) {
7014
        return getClass().getName().compareTo(other.getClass().getName());
7015
      }
7016
 
7017
      int lastComparison = 0;
7018
      getAllOrders_result typedOther = (getAllOrders_result)other;
7019
 
7020
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7021
      if (lastComparison != 0) {
7022
        return lastComparison;
7023
      }
7024
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7025
      if (lastComparison != 0) {
7026
        return lastComparison;
7027
      }
7028
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7029
      if (lastComparison != 0) {
7030
        return lastComparison;
7031
      }
7032
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7033
      if (lastComparison != 0) {
7034
        return lastComparison;
7035
      }
7036
      return 0;
7037
    }
7038
 
68 ashish 7039
    public void read(TProtocol iprot) throws TException {
7040
      TField field;
7041
      iprot.readStructBegin();
7042
      while (true)
7043
      {
7044
        field = iprot.readFieldBegin();
7045
        if (field.type == TType.STOP) { 
7046
          break;
7047
        }
7048
        _Fields fieldId = _Fields.findByThriftId(field.id);
7049
        if (fieldId == null) {
7050
          TProtocolUtil.skip(iprot, field.type);
7051
        } else {
7052
          switch (fieldId) {
7053
            case SUCCESS:
483 rajveer 7054
              if (field.type == TType.LIST) {
7055
                {
684 chandransh 7056
                  TList _list16 = iprot.readListBegin();
7057
                  this.success = new ArrayList<Order>(_list16.size);
7058
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7059
                  {
684 chandransh 7060
                    Order _elem18;
7061
                    _elem18 = new Order();
7062
                    _elem18.read(iprot);
7063
                    this.success.add(_elem18);
483 rajveer 7064
                  }
7065
                  iprot.readListEnd();
7066
                }
68 ashish 7067
              } else { 
7068
                TProtocolUtil.skip(iprot, field.type);
7069
              }
7070
              break;
7071
            case EX:
7072
              if (field.type == TType.STRUCT) {
7073
                this.ex = new TransactionServiceException();
7074
                this.ex.read(iprot);
7075
              } else { 
7076
                TProtocolUtil.skip(iprot, field.type);
7077
              }
7078
              break;
7079
          }
7080
          iprot.readFieldEnd();
7081
        }
7082
      }
7083
      iprot.readStructEnd();
7084
      validate();
7085
    }
7086
 
7087
    public void write(TProtocol oprot) throws TException {
7088
      oprot.writeStructBegin(STRUCT_DESC);
7089
 
7090
      if (this.isSetSuccess()) {
7091
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7092
        {
7093
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7094
          for (Order _iter19 : this.success)
483 rajveer 7095
          {
684 chandransh 7096
            _iter19.write(oprot);
483 rajveer 7097
          }
7098
          oprot.writeListEnd();
7099
        }
68 ashish 7100
        oprot.writeFieldEnd();
7101
      } else if (this.isSetEx()) {
7102
        oprot.writeFieldBegin(EX_FIELD_DESC);
7103
        this.ex.write(oprot);
7104
        oprot.writeFieldEnd();
7105
      }
7106
      oprot.writeFieldStop();
7107
      oprot.writeStructEnd();
7108
    }
7109
 
7110
    @Override
7111
    public String toString() {
483 rajveer 7112
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7113
      boolean first = true;
7114
 
7115
      sb.append("success:");
7116
      if (this.success == null) {
7117
        sb.append("null");
7118
      } else {
7119
        sb.append(this.success);
7120
      }
7121
      first = false;
7122
      if (!first) sb.append(", ");
7123
      sb.append("ex:");
7124
      if (this.ex == null) {
7125
        sb.append("null");
7126
      } else {
7127
        sb.append(this.ex);
7128
      }
7129
      first = false;
7130
      sb.append(")");
7131
      return sb.toString();
7132
    }
7133
 
7134
    public void validate() throws TException {
7135
      // check for required fields
7136
    }
7137
 
7138
  }
7139
 
483 rajveer 7140
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
7141
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 7142
 
483 rajveer 7143
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
7144
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
7145
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 7146
 
483 rajveer 7147
    private long orderId;
7148
    private OrderStatus status;
7149
    private String description;
68 ashish 7150
 
7151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7152
    public enum _Fields implements TFieldIdEnum {
483 rajveer 7153
      ORDER_ID((short)1, "orderId"),
7154
      /**
7155
       * 
7156
       * @see OrderStatus
7157
       */
7158
      STATUS((short)2, "status"),
7159
      DESCRIPTION((short)3, "description");
68 ashish 7160
 
7161
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7162
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7163
 
7164
      static {
7165
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7166
          byId.put((int)field._thriftId, field);
7167
          byName.put(field.getFieldName(), field);
7168
        }
7169
      }
7170
 
7171
      /**
7172
       * Find the _Fields constant that matches fieldId, or null if its not found.
7173
       */
7174
      public static _Fields findByThriftId(int fieldId) {
7175
        return byId.get(fieldId);
7176
      }
7177
 
7178
      /**
7179
       * Find the _Fields constant that matches fieldId, throwing an exception
7180
       * if it is not found.
7181
       */
7182
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7183
        _Fields fields = findByThriftId(fieldId);
7184
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7185
        return fields;
7186
      }
7187
 
7188
      /**
7189
       * Find the _Fields constant that matches name, or null if its not found.
7190
       */
7191
      public static _Fields findByName(String name) {
7192
        return byName.get(name);
7193
      }
7194
 
7195
      private final short _thriftId;
7196
      private final String _fieldName;
7197
 
7198
      _Fields(short thriftId, String fieldName) {
7199
        _thriftId = thriftId;
7200
        _fieldName = fieldName;
7201
      }
7202
 
7203
      public short getThriftFieldId() {
7204
        return _thriftId;
7205
      }
7206
 
7207
      public String getFieldName() {
7208
        return _fieldName;
7209
      }
7210
    }
7211
 
7212
    // isset id assignments
483 rajveer 7213
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 7214
    private BitSet __isset_bit_vector = new BitSet(1);
7215
 
7216
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 7217
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 7218
          new FieldValueMetaData(TType.I64)));
483 rajveer 7219
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7220
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7221
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7222
          new FieldValueMetaData(TType.STRING)));
68 ashish 7223
    }});
7224
 
7225
    static {
483 rajveer 7226
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 7227
    }
7228
 
483 rajveer 7229
    public changeOrderStatus_args() {
68 ashish 7230
    }
7231
 
483 rajveer 7232
    public changeOrderStatus_args(
7233
      long orderId,
7234
      OrderStatus status,
7235
      String description)
68 ashish 7236
    {
7237
      this();
483 rajveer 7238
      this.orderId = orderId;
7239
      setOrderIdIsSet(true);
7240
      this.status = status;
7241
      this.description = description;
68 ashish 7242
    }
7243
 
7244
    /**
7245
     * Performs a deep copy on <i>other</i>.
7246
     */
483 rajveer 7247
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 7248
      __isset_bit_vector.clear();
7249
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 7250
      this.orderId = other.orderId;
7251
      if (other.isSetStatus()) {
7252
        this.status = other.status;
7253
      }
7254
      if (other.isSetDescription()) {
7255
        this.description = other.description;
7256
      }
68 ashish 7257
    }
7258
 
483 rajveer 7259
    public changeOrderStatus_args deepCopy() {
7260
      return new changeOrderStatus_args(this);
68 ashish 7261
    }
7262
 
7263
    @Deprecated
483 rajveer 7264
    public changeOrderStatus_args clone() {
7265
      return new changeOrderStatus_args(this);
68 ashish 7266
    }
7267
 
483 rajveer 7268
    public long getOrderId() {
7269
      return this.orderId;
68 ashish 7270
    }
7271
 
483 rajveer 7272
    public changeOrderStatus_args setOrderId(long orderId) {
7273
      this.orderId = orderId;
7274
      setOrderIdIsSet(true);
68 ashish 7275
      return this;
7276
    }
7277
 
483 rajveer 7278
    public void unsetOrderId() {
7279
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 7280
    }
7281
 
483 rajveer 7282
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
7283
    public boolean isSetOrderId() {
7284
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 7285
    }
7286
 
483 rajveer 7287
    public void setOrderIdIsSet(boolean value) {
7288
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 7289
    }
7290
 
483 rajveer 7291
    /**
7292
     * 
7293
     * @see OrderStatus
7294
     */
7295
    public OrderStatus getStatus() {
7296
      return this.status;
68 ashish 7297
    }
7298
 
7299
    /**
483 rajveer 7300
     * 
7301
     * @see OrderStatus
68 ashish 7302
     */
483 rajveer 7303
    public changeOrderStatus_args setStatus(OrderStatus status) {
7304
      this.status = status;
68 ashish 7305
      return this;
7306
    }
7307
 
483 rajveer 7308
    public void unsetStatus() {
7309
      this.status = null;
68 ashish 7310
    }
7311
 
483 rajveer 7312
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7313
    public boolean isSetStatus() {
7314
      return this.status != null;
68 ashish 7315
    }
7316
 
483 rajveer 7317
    public void setStatusIsSet(boolean value) {
68 ashish 7318
      if (!value) {
483 rajveer 7319
        this.status = null;
68 ashish 7320
      }
7321
    }
7322
 
483 rajveer 7323
    public String getDescription() {
7324
      return this.description;
68 ashish 7325
    }
7326
 
483 rajveer 7327
    public changeOrderStatus_args setDescription(String description) {
7328
      this.description = description;
68 ashish 7329
      return this;
7330
    }
7331
 
483 rajveer 7332
    public void unsetDescription() {
7333
      this.description = null;
68 ashish 7334
    }
7335
 
483 rajveer 7336
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7337
    public boolean isSetDescription() {
7338
      return this.description != null;
68 ashish 7339
    }
7340
 
483 rajveer 7341
    public void setDescriptionIsSet(boolean value) {
68 ashish 7342
      if (!value) {
483 rajveer 7343
        this.description = null;
68 ashish 7344
      }
7345
    }
7346
 
7347
    public void setFieldValue(_Fields field, Object value) {
7348
      switch (field) {
483 rajveer 7349
      case ORDER_ID:
68 ashish 7350
        if (value == null) {
483 rajveer 7351
          unsetOrderId();
68 ashish 7352
        } else {
483 rajveer 7353
          setOrderId((Long)value);
68 ashish 7354
        }
7355
        break;
7356
 
483 rajveer 7357
      case STATUS:
68 ashish 7358
        if (value == null) {
483 rajveer 7359
          unsetStatus();
68 ashish 7360
        } else {
483 rajveer 7361
          setStatus((OrderStatus)value);
68 ashish 7362
        }
7363
        break;
7364
 
483 rajveer 7365
      case DESCRIPTION:
7366
        if (value == null) {
7367
          unsetDescription();
7368
        } else {
7369
          setDescription((String)value);
7370
        }
7371
        break;
7372
 
68 ashish 7373
      }
7374
    }
7375
 
7376
    public void setFieldValue(int fieldID, Object value) {
7377
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7378
    }
7379
 
7380
    public Object getFieldValue(_Fields field) {
7381
      switch (field) {
483 rajveer 7382
      case ORDER_ID:
7383
        return new Long(getOrderId());
68 ashish 7384
 
483 rajveer 7385
      case STATUS:
7386
        return getStatus();
68 ashish 7387
 
483 rajveer 7388
      case DESCRIPTION:
7389
        return getDescription();
7390
 
68 ashish 7391
      }
7392
      throw new IllegalStateException();
7393
    }
7394
 
7395
    public Object getFieldValue(int fieldId) {
7396
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7397
    }
7398
 
7399
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7400
    public boolean isSet(_Fields field) {
7401
      switch (field) {
483 rajveer 7402
      case ORDER_ID:
7403
        return isSetOrderId();
7404
      case STATUS:
7405
        return isSetStatus();
7406
      case DESCRIPTION:
7407
        return isSetDescription();
68 ashish 7408
      }
7409
      throw new IllegalStateException();
7410
    }
7411
 
7412
    public boolean isSet(int fieldID) {
7413
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7414
    }
7415
 
7416
    @Override
7417
    public boolean equals(Object that) {
7418
      if (that == null)
7419
        return false;
483 rajveer 7420
      if (that instanceof changeOrderStatus_args)
7421
        return this.equals((changeOrderStatus_args)that);
68 ashish 7422
      return false;
7423
    }
7424
 
483 rajveer 7425
    public boolean equals(changeOrderStatus_args that) {
68 ashish 7426
      if (that == null)
7427
        return false;
7428
 
483 rajveer 7429
      boolean this_present_orderId = true;
7430
      boolean that_present_orderId = true;
7431
      if (this_present_orderId || that_present_orderId) {
7432
        if (!(this_present_orderId && that_present_orderId))
68 ashish 7433
          return false;
483 rajveer 7434
        if (this.orderId != that.orderId)
68 ashish 7435
          return false;
7436
      }
7437
 
483 rajveer 7438
      boolean this_present_status = true && this.isSetStatus();
7439
      boolean that_present_status = true && that.isSetStatus();
7440
      if (this_present_status || that_present_status) {
7441
        if (!(this_present_status && that_present_status))
68 ashish 7442
          return false;
483 rajveer 7443
        if (!this.status.equals(that.status))
68 ashish 7444
          return false;
7445
      }
7446
 
483 rajveer 7447
      boolean this_present_description = true && this.isSetDescription();
7448
      boolean that_present_description = true && that.isSetDescription();
7449
      if (this_present_description || that_present_description) {
7450
        if (!(this_present_description && that_present_description))
7451
          return false;
7452
        if (!this.description.equals(that.description))
7453
          return false;
7454
      }
7455
 
68 ashish 7456
      return true;
7457
    }
7458
 
7459
    @Override
7460
    public int hashCode() {
7461
      return 0;
7462
    }
7463
 
483 rajveer 7464
    public int compareTo(changeOrderStatus_args other) {
7465
      if (!getClass().equals(other.getClass())) {
7466
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 7467
      }
7468
 
483 rajveer 7469
      int lastComparison = 0;
7470
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 7471
 
483 rajveer 7472
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
7473
      if (lastComparison != 0) {
7474
        return lastComparison;
68 ashish 7475
      }
483 rajveer 7476
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
7477
      if (lastComparison != 0) {
7478
        return lastComparison;
68 ashish 7479
      }
483 rajveer 7480
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7481
      if (lastComparison != 0) {
7482
        return lastComparison;
68 ashish 7483
      }
483 rajveer 7484
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7485
      if (lastComparison != 0) {
7486
        return lastComparison;
68 ashish 7487
      }
483 rajveer 7488
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7489
      if (lastComparison != 0) {
7490
        return lastComparison;
68 ashish 7491
      }
483 rajveer 7492
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7493
      if (lastComparison != 0) {
7494
        return lastComparison;
68 ashish 7495
      }
7496
      return 0;
7497
    }
7498
 
7499
    public void read(TProtocol iprot) throws TException {
7500
      TField field;
7501
      iprot.readStructBegin();
7502
      while (true)
7503
      {
7504
        field = iprot.readFieldBegin();
7505
        if (field.type == TType.STOP) { 
7506
          break;
7507
        }
7508
        _Fields fieldId = _Fields.findByThriftId(field.id);
7509
        if (fieldId == null) {
7510
          TProtocolUtil.skip(iprot, field.type);
7511
        } else {
7512
          switch (fieldId) {
483 rajveer 7513
            case ORDER_ID:
68 ashish 7514
              if (field.type == TType.I64) {
483 rajveer 7515
                this.orderId = iprot.readI64();
7516
                setOrderIdIsSet(true);
68 ashish 7517
              } else { 
7518
                TProtocolUtil.skip(iprot, field.type);
7519
              }
7520
              break;
483 rajveer 7521
            case STATUS:
7522
              if (field.type == TType.I32) {
7523
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 7524
              } else { 
7525
                TProtocolUtil.skip(iprot, field.type);
7526
              }
7527
              break;
483 rajveer 7528
            case DESCRIPTION:
7529
              if (field.type == TType.STRING) {
7530
                this.description = iprot.readString();
7531
              } else { 
7532
                TProtocolUtil.skip(iprot, field.type);
7533
              }
7534
              break;
68 ashish 7535
          }
7536
          iprot.readFieldEnd();
7537
        }
7538
      }
7539
      iprot.readStructEnd();
7540
      validate();
7541
    }
7542
 
7543
    public void write(TProtocol oprot) throws TException {
7544
      validate();
7545
 
7546
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 7547
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
7548
      oprot.writeI64(this.orderId);
68 ashish 7549
      oprot.writeFieldEnd();
483 rajveer 7550
      if (this.status != null) {
7551
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7552
        oprot.writeI32(this.status.getValue());
68 ashish 7553
        oprot.writeFieldEnd();
7554
      }
483 rajveer 7555
      if (this.description != null) {
7556
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7557
        oprot.writeString(this.description);
7558
        oprot.writeFieldEnd();
7559
      }
68 ashish 7560
      oprot.writeFieldStop();
7561
      oprot.writeStructEnd();
7562
    }
7563
 
7564
    @Override
7565
    public String toString() {
483 rajveer 7566
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 7567
      boolean first = true;
7568
 
483 rajveer 7569
      sb.append("orderId:");
7570
      sb.append(this.orderId);
68 ashish 7571
      first = false;
7572
      if (!first) sb.append(", ");
483 rajveer 7573
      sb.append("status:");
7574
      if (this.status == null) {
68 ashish 7575
        sb.append("null");
7576
      } else {
483 rajveer 7577
        String status_name = status.name();
7578
        if (status_name != null) {
7579
          sb.append(status_name);
7580
          sb.append(" (");
7581
        }
7582
        sb.append(this.status);
7583
        if (status_name != null) {
7584
          sb.append(")");
7585
        }
68 ashish 7586
      }
7587
      first = false;
483 rajveer 7588
      if (!first) sb.append(", ");
7589
      sb.append("description:");
7590
      if (this.description == null) {
7591
        sb.append("null");
7592
      } else {
7593
        sb.append(this.description);
7594
      }
7595
      first = false;
68 ashish 7596
      sb.append(")");
7597
      return sb.toString();
7598
    }
7599
 
7600
    public void validate() throws TException {
7601
      // check for required fields
7602
    }
7603
 
7604
  }
7605
 
483 rajveer 7606
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
7607
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 7608
 
7609
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7610
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7611
 
7612
    private boolean success;
7613
    private TransactionServiceException ex;
7614
 
7615
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7616
    public enum _Fields implements TFieldIdEnum {
7617
      SUCCESS((short)0, "success"),
7618
      EX((short)1, "ex");
7619
 
7620
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7621
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7622
 
7623
      static {
7624
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7625
          byId.put((int)field._thriftId, field);
7626
          byName.put(field.getFieldName(), field);
7627
        }
7628
      }
7629
 
7630
      /**
7631
       * Find the _Fields constant that matches fieldId, or null if its not found.
7632
       */
7633
      public static _Fields findByThriftId(int fieldId) {
7634
        return byId.get(fieldId);
7635
      }
7636
 
7637
      /**
7638
       * Find the _Fields constant that matches fieldId, throwing an exception
7639
       * if it is not found.
7640
       */
7641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7642
        _Fields fields = findByThriftId(fieldId);
7643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7644
        return fields;
7645
      }
7646
 
7647
      /**
7648
       * Find the _Fields constant that matches name, or null if its not found.
7649
       */
7650
      public static _Fields findByName(String name) {
7651
        return byName.get(name);
7652
      }
7653
 
7654
      private final short _thriftId;
7655
      private final String _fieldName;
7656
 
7657
      _Fields(short thriftId, String fieldName) {
7658
        _thriftId = thriftId;
7659
        _fieldName = fieldName;
7660
      }
7661
 
7662
      public short getThriftFieldId() {
7663
        return _thriftId;
7664
      }
7665
 
7666
      public String getFieldName() {
7667
        return _fieldName;
7668
      }
7669
    }
7670
 
7671
    // isset id assignments
7672
    private static final int __SUCCESS_ISSET_ID = 0;
7673
    private BitSet __isset_bit_vector = new BitSet(1);
7674
 
7675
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7676
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7677
          new FieldValueMetaData(TType.BOOL)));
7678
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7679
          new FieldValueMetaData(TType.STRUCT)));
7680
    }});
7681
 
7682
    static {
483 rajveer 7683
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 7684
    }
7685
 
483 rajveer 7686
    public changeOrderStatus_result() {
68 ashish 7687
    }
7688
 
483 rajveer 7689
    public changeOrderStatus_result(
68 ashish 7690
      boolean success,
7691
      TransactionServiceException ex)
7692
    {
7693
      this();
7694
      this.success = success;
7695
      setSuccessIsSet(true);
7696
      this.ex = ex;
7697
    }
7698
 
7699
    /**
7700
     * Performs a deep copy on <i>other</i>.
7701
     */
483 rajveer 7702
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 7703
      __isset_bit_vector.clear();
7704
      __isset_bit_vector.or(other.__isset_bit_vector);
7705
      this.success = other.success;
7706
      if (other.isSetEx()) {
7707
        this.ex = new TransactionServiceException(other.ex);
7708
      }
7709
    }
7710
 
483 rajveer 7711
    public changeOrderStatus_result deepCopy() {
7712
      return new changeOrderStatus_result(this);
68 ashish 7713
    }
7714
 
7715
    @Deprecated
483 rajveer 7716
    public changeOrderStatus_result clone() {
7717
      return new changeOrderStatus_result(this);
68 ashish 7718
    }
7719
 
7720
    public boolean isSuccess() {
7721
      return this.success;
7722
    }
7723
 
483 rajveer 7724
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 7725
      this.success = success;
7726
      setSuccessIsSet(true);
7727
      return this;
7728
    }
7729
 
7730
    public void unsetSuccess() {
7731
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7732
    }
7733
 
7734
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7735
    public boolean isSetSuccess() {
7736
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7737
    }
7738
 
7739
    public void setSuccessIsSet(boolean value) {
7740
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7741
    }
7742
 
7743
    public TransactionServiceException getEx() {
7744
      return this.ex;
7745
    }
7746
 
483 rajveer 7747
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 7748
      this.ex = ex;
7749
      return this;
7750
    }
7751
 
7752
    public void unsetEx() {
7753
      this.ex = null;
7754
    }
7755
 
7756
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7757
    public boolean isSetEx() {
7758
      return this.ex != null;
7759
    }
7760
 
7761
    public void setExIsSet(boolean value) {
7762
      if (!value) {
7763
        this.ex = null;
7764
      }
7765
    }
7766
 
7767
    public void setFieldValue(_Fields field, Object value) {
7768
      switch (field) {
7769
      case SUCCESS:
7770
        if (value == null) {
7771
          unsetSuccess();
7772
        } else {
7773
          setSuccess((Boolean)value);
7774
        }
7775
        break;
7776
 
7777
      case EX:
7778
        if (value == null) {
7779
          unsetEx();
7780
        } else {
7781
          setEx((TransactionServiceException)value);
7782
        }
7783
        break;
7784
 
7785
      }
7786
    }
7787
 
7788
    public void setFieldValue(int fieldID, Object value) {
7789
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7790
    }
7791
 
7792
    public Object getFieldValue(_Fields field) {
7793
      switch (field) {
7794
      case SUCCESS:
7795
        return new Boolean(isSuccess());
7796
 
7797
      case EX:
7798
        return getEx();
7799
 
7800
      }
7801
      throw new IllegalStateException();
7802
    }
7803
 
7804
    public Object getFieldValue(int fieldId) {
7805
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7806
    }
7807
 
7808
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7809
    public boolean isSet(_Fields field) {
7810
      switch (field) {
7811
      case SUCCESS:
7812
        return isSetSuccess();
7813
      case EX:
7814
        return isSetEx();
7815
      }
7816
      throw new IllegalStateException();
7817
    }
7818
 
7819
    public boolean isSet(int fieldID) {
7820
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7821
    }
7822
 
7823
    @Override
7824
    public boolean equals(Object that) {
7825
      if (that == null)
7826
        return false;
483 rajveer 7827
      if (that instanceof changeOrderStatus_result)
7828
        return this.equals((changeOrderStatus_result)that);
68 ashish 7829
      return false;
7830
    }
7831
 
483 rajveer 7832
    public boolean equals(changeOrderStatus_result that) {
68 ashish 7833
      if (that == null)
7834
        return false;
7835
 
7836
      boolean this_present_success = true;
7837
      boolean that_present_success = true;
7838
      if (this_present_success || that_present_success) {
7839
        if (!(this_present_success && that_present_success))
7840
          return false;
7841
        if (this.success != that.success)
7842
          return false;
7843
      }
7844
 
7845
      boolean this_present_ex = true && this.isSetEx();
7846
      boolean that_present_ex = true && that.isSetEx();
7847
      if (this_present_ex || that_present_ex) {
7848
        if (!(this_present_ex && that_present_ex))
7849
          return false;
7850
        if (!this.ex.equals(that.ex))
7851
          return false;
7852
      }
7853
 
7854
      return true;
7855
    }
7856
 
7857
    @Override
7858
    public int hashCode() {
7859
      return 0;
7860
    }
7861
 
483 rajveer 7862
    public int compareTo(changeOrderStatus_result other) {
68 ashish 7863
      if (!getClass().equals(other.getClass())) {
7864
        return getClass().getName().compareTo(other.getClass().getName());
7865
      }
7866
 
7867
      int lastComparison = 0;
483 rajveer 7868
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 7869
 
7870
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7871
      if (lastComparison != 0) {
7872
        return lastComparison;
7873
      }
7874
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7875
      if (lastComparison != 0) {
7876
        return lastComparison;
7877
      }
7878
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7879
      if (lastComparison != 0) {
7880
        return lastComparison;
7881
      }
7882
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7883
      if (lastComparison != 0) {
7884
        return lastComparison;
7885
      }
7886
      return 0;
7887
    }
7888
 
7889
    public void read(TProtocol iprot) throws TException {
7890
      TField field;
7891
      iprot.readStructBegin();
7892
      while (true)
7893
      {
7894
        field = iprot.readFieldBegin();
7895
        if (field.type == TType.STOP) { 
7896
          break;
7897
        }
7898
        _Fields fieldId = _Fields.findByThriftId(field.id);
7899
        if (fieldId == null) {
7900
          TProtocolUtil.skip(iprot, field.type);
7901
        } else {
7902
          switch (fieldId) {
7903
            case SUCCESS:
7904
              if (field.type == TType.BOOL) {
7905
                this.success = iprot.readBool();
7906
                setSuccessIsSet(true);
7907
              } else { 
7908
                TProtocolUtil.skip(iprot, field.type);
7909
              }
7910
              break;
7911
            case EX:
7912
              if (field.type == TType.STRUCT) {
7913
                this.ex = new TransactionServiceException();
7914
                this.ex.read(iprot);
7915
              } else { 
7916
                TProtocolUtil.skip(iprot, field.type);
7917
              }
7918
              break;
7919
          }
7920
          iprot.readFieldEnd();
7921
        }
7922
      }
7923
      iprot.readStructEnd();
7924
      validate();
7925
    }
7926
 
7927
    public void write(TProtocol oprot) throws TException {
7928
      oprot.writeStructBegin(STRUCT_DESC);
7929
 
7930
      if (this.isSetSuccess()) {
7931
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7932
        oprot.writeBool(this.success);
7933
        oprot.writeFieldEnd();
7934
      } else if (this.isSetEx()) {
7935
        oprot.writeFieldBegin(EX_FIELD_DESC);
7936
        this.ex.write(oprot);
7937
        oprot.writeFieldEnd();
7938
      }
7939
      oprot.writeFieldStop();
7940
      oprot.writeStructEnd();
7941
    }
7942
 
7943
    @Override
7944
    public String toString() {
483 rajveer 7945
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 7946
      boolean first = true;
7947
 
7948
      sb.append("success:");
7949
      sb.append(this.success);
7950
      first = false;
7951
      if (!first) sb.append(", ");
7952
      sb.append("ex:");
7953
      if (this.ex == null) {
7954
        sb.append("null");
7955
      } else {
7956
        sb.append(this.ex);
7957
      }
7958
      first = false;
7959
      sb.append(")");
7960
      return sb.toString();
7961
    }
7962
 
7963
    public void validate() throws TException {
7964
      // check for required fields
7965
    }
7966
 
7967
  }
7968
 
495 rajveer 7969
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
7970
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
7971
 
7972
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
7973
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
640 chandransh 7974
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)3);
7975
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)4);
495 rajveer 7976
 
7977
    private long orderId;
7978
    private String invoice_number;
640 chandransh 7979
    private long jacket_number;
495 rajveer 7980
    private String billed_by;
7981
 
7982
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7983
    public enum _Fields implements TFieldIdEnum {
7984
      ORDER_ID((short)1, "orderId"),
7985
      INVOICE_NUMBER((short)2, "invoice_number"),
640 chandransh 7986
      JACKET_NUMBER((short)3, "jacket_number"),
7987
      BILLED_BY((short)4, "billed_by");
495 rajveer 7988
 
7989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7991
 
7992
      static {
7993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7994
          byId.put((int)field._thriftId, field);
7995
          byName.put(field.getFieldName(), field);
7996
        }
7997
      }
7998
 
7999
      /**
8000
       * Find the _Fields constant that matches fieldId, or null if its not found.
8001
       */
8002
      public static _Fields findByThriftId(int fieldId) {
8003
        return byId.get(fieldId);
8004
      }
8005
 
8006
      /**
8007
       * Find the _Fields constant that matches fieldId, throwing an exception
8008
       * if it is not found.
8009
       */
8010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8011
        _Fields fields = findByThriftId(fieldId);
8012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8013
        return fields;
8014
      }
8015
 
8016
      /**
8017
       * Find the _Fields constant that matches name, or null if its not found.
8018
       */
8019
      public static _Fields findByName(String name) {
8020
        return byName.get(name);
8021
      }
8022
 
8023
      private final short _thriftId;
8024
      private final String _fieldName;
8025
 
8026
      _Fields(short thriftId, String fieldName) {
8027
        _thriftId = thriftId;
8028
        _fieldName = fieldName;
8029
      }
8030
 
8031
      public short getThriftFieldId() {
8032
        return _thriftId;
8033
      }
8034
 
8035
      public String getFieldName() {
8036
        return _fieldName;
8037
      }
8038
    }
8039
 
8040
    // isset id assignments
8041
    private static final int __ORDERID_ISSET_ID = 0;
640 chandransh 8042
    private static final int __JACKET_NUMBER_ISSET_ID = 1;
8043
    private BitSet __isset_bit_vector = new BitSet(2);
495 rajveer 8044
 
8045
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8046
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
8047
          new FieldValueMetaData(TType.I64)));
8048
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
8049
          new FieldValueMetaData(TType.STRING)));
640 chandransh 8050
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
8051
          new FieldValueMetaData(TType.I64)));
495 rajveer 8052
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
8053
          new FieldValueMetaData(TType.STRING)));
8054
    }});
8055
 
8056
    static {
8057
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
8058
    }
8059
 
8060
    public addBillingDetails_args() {
8061
    }
8062
 
8063
    public addBillingDetails_args(
8064
      long orderId,
8065
      String invoice_number,
640 chandransh 8066
      long jacket_number,
495 rajveer 8067
      String billed_by)
8068
    {
8069
      this();
8070
      this.orderId = orderId;
8071
      setOrderIdIsSet(true);
8072
      this.invoice_number = invoice_number;
640 chandransh 8073
      this.jacket_number = jacket_number;
8074
      setJacket_numberIsSet(true);
495 rajveer 8075
      this.billed_by = billed_by;
8076
    }
8077
 
8078
    /**
8079
     * Performs a deep copy on <i>other</i>.
8080
     */
8081
    public addBillingDetails_args(addBillingDetails_args other) {
8082
      __isset_bit_vector.clear();
8083
      __isset_bit_vector.or(other.__isset_bit_vector);
8084
      this.orderId = other.orderId;
8085
      if (other.isSetInvoice_number()) {
8086
        this.invoice_number = other.invoice_number;
8087
      }
640 chandransh 8088
      this.jacket_number = other.jacket_number;
495 rajveer 8089
      if (other.isSetBilled_by()) {
8090
        this.billed_by = other.billed_by;
8091
      }
8092
    }
8093
 
8094
    public addBillingDetails_args deepCopy() {
8095
      return new addBillingDetails_args(this);
8096
    }
8097
 
8098
    @Deprecated
8099
    public addBillingDetails_args clone() {
8100
      return new addBillingDetails_args(this);
8101
    }
8102
 
8103
    public long getOrderId() {
8104
      return this.orderId;
8105
    }
8106
 
8107
    public addBillingDetails_args setOrderId(long orderId) {
8108
      this.orderId = orderId;
8109
      setOrderIdIsSet(true);
8110
      return this;
8111
    }
8112
 
8113
    public void unsetOrderId() {
8114
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
8115
    }
8116
 
8117
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8118
    public boolean isSetOrderId() {
8119
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
8120
    }
8121
 
8122
    public void setOrderIdIsSet(boolean value) {
8123
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
8124
    }
8125
 
8126
    public String getInvoice_number() {
8127
      return this.invoice_number;
8128
    }
8129
 
8130
    public addBillingDetails_args setInvoice_number(String invoice_number) {
8131
      this.invoice_number = invoice_number;
8132
      return this;
8133
    }
8134
 
8135
    public void unsetInvoice_number() {
8136
      this.invoice_number = null;
8137
    }
8138
 
8139
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
8140
    public boolean isSetInvoice_number() {
8141
      return this.invoice_number != null;
8142
    }
8143
 
8144
    public void setInvoice_numberIsSet(boolean value) {
8145
      if (!value) {
8146
        this.invoice_number = null;
8147
      }
8148
    }
8149
 
640 chandransh 8150
    public long getJacket_number() {
8151
      return this.jacket_number;
8152
    }
8153
 
8154
    public addBillingDetails_args setJacket_number(long jacket_number) {
8155
      this.jacket_number = jacket_number;
8156
      setJacket_numberIsSet(true);
8157
      return this;
8158
    }
8159
 
8160
    public void unsetJacket_number() {
8161
      __isset_bit_vector.clear(__JACKET_NUMBER_ISSET_ID);
8162
    }
8163
 
8164
    /** Returns true if field jacket_number is set (has been asigned a value) and false otherwise */
8165
    public boolean isSetJacket_number() {
8166
      return __isset_bit_vector.get(__JACKET_NUMBER_ISSET_ID);
8167
    }
8168
 
8169
    public void setJacket_numberIsSet(boolean value) {
8170
      __isset_bit_vector.set(__JACKET_NUMBER_ISSET_ID, value);
8171
    }
8172
 
495 rajveer 8173
    public String getBilled_by() {
8174
      return this.billed_by;
8175
    }
8176
 
8177
    public addBillingDetails_args setBilled_by(String billed_by) {
8178
      this.billed_by = billed_by;
8179
      return this;
8180
    }
8181
 
8182
    public void unsetBilled_by() {
8183
      this.billed_by = null;
8184
    }
8185
 
8186
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
8187
    public boolean isSetBilled_by() {
8188
      return this.billed_by != null;
8189
    }
8190
 
8191
    public void setBilled_byIsSet(boolean value) {
8192
      if (!value) {
8193
        this.billed_by = null;
8194
      }
8195
    }
8196
 
8197
    public void setFieldValue(_Fields field, Object value) {
8198
      switch (field) {
8199
      case ORDER_ID:
8200
        if (value == null) {
8201
          unsetOrderId();
8202
        } else {
8203
          setOrderId((Long)value);
8204
        }
8205
        break;
8206
 
8207
      case INVOICE_NUMBER:
8208
        if (value == null) {
8209
          unsetInvoice_number();
8210
        } else {
8211
          setInvoice_number((String)value);
8212
        }
8213
        break;
8214
 
640 chandransh 8215
      case JACKET_NUMBER:
8216
        if (value == null) {
8217
          unsetJacket_number();
8218
        } else {
8219
          setJacket_number((Long)value);
8220
        }
8221
        break;
8222
 
495 rajveer 8223
      case BILLED_BY:
8224
        if (value == null) {
8225
          unsetBilled_by();
8226
        } else {
8227
          setBilled_by((String)value);
8228
        }
8229
        break;
8230
 
8231
      }
8232
    }
8233
 
8234
    public void setFieldValue(int fieldID, Object value) {
8235
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8236
    }
8237
 
8238
    public Object getFieldValue(_Fields field) {
8239
      switch (field) {
8240
      case ORDER_ID:
8241
        return new Long(getOrderId());
8242
 
8243
      case INVOICE_NUMBER:
8244
        return getInvoice_number();
8245
 
640 chandransh 8246
      case JACKET_NUMBER:
8247
        return new Long(getJacket_number());
8248
 
495 rajveer 8249
      case BILLED_BY:
8250
        return getBilled_by();
8251
 
8252
      }
8253
      throw new IllegalStateException();
8254
    }
8255
 
8256
    public Object getFieldValue(int fieldId) {
8257
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8258
    }
8259
 
8260
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8261
    public boolean isSet(_Fields field) {
8262
      switch (field) {
8263
      case ORDER_ID:
8264
        return isSetOrderId();
8265
      case INVOICE_NUMBER:
8266
        return isSetInvoice_number();
640 chandransh 8267
      case JACKET_NUMBER:
8268
        return isSetJacket_number();
495 rajveer 8269
      case BILLED_BY:
8270
        return isSetBilled_by();
8271
      }
8272
      throw new IllegalStateException();
8273
    }
8274
 
8275
    public boolean isSet(int fieldID) {
8276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8277
    }
8278
 
8279
    @Override
8280
    public boolean equals(Object that) {
8281
      if (that == null)
8282
        return false;
8283
      if (that instanceof addBillingDetails_args)
8284
        return this.equals((addBillingDetails_args)that);
8285
      return false;
8286
    }
8287
 
8288
    public boolean equals(addBillingDetails_args that) {
8289
      if (that == null)
8290
        return false;
8291
 
8292
      boolean this_present_orderId = true;
8293
      boolean that_present_orderId = true;
8294
      if (this_present_orderId || that_present_orderId) {
8295
        if (!(this_present_orderId && that_present_orderId))
8296
          return false;
8297
        if (this.orderId != that.orderId)
8298
          return false;
8299
      }
8300
 
8301
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
8302
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
8303
      if (this_present_invoice_number || that_present_invoice_number) {
8304
        if (!(this_present_invoice_number && that_present_invoice_number))
8305
          return false;
8306
        if (!this.invoice_number.equals(that.invoice_number))
8307
          return false;
8308
      }
8309
 
640 chandransh 8310
      boolean this_present_jacket_number = true;
8311
      boolean that_present_jacket_number = true;
8312
      if (this_present_jacket_number || that_present_jacket_number) {
8313
        if (!(this_present_jacket_number && that_present_jacket_number))
8314
          return false;
8315
        if (this.jacket_number != that.jacket_number)
8316
          return false;
8317
      }
8318
 
495 rajveer 8319
      boolean this_present_billed_by = true && this.isSetBilled_by();
8320
      boolean that_present_billed_by = true && that.isSetBilled_by();
8321
      if (this_present_billed_by || that_present_billed_by) {
8322
        if (!(this_present_billed_by && that_present_billed_by))
8323
          return false;
8324
        if (!this.billed_by.equals(that.billed_by))
8325
          return false;
8326
      }
8327
 
8328
      return true;
8329
    }
8330
 
8331
    @Override
8332
    public int hashCode() {
8333
      return 0;
8334
    }
8335
 
8336
    public int compareTo(addBillingDetails_args other) {
8337
      if (!getClass().equals(other.getClass())) {
8338
        return getClass().getName().compareTo(other.getClass().getName());
8339
      }
8340
 
8341
      int lastComparison = 0;
8342
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
8343
 
8344
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8345
      if (lastComparison != 0) {
8346
        return lastComparison;
8347
      }
8348
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8349
      if (lastComparison != 0) {
8350
        return lastComparison;
8351
      }
8352
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
8353
      if (lastComparison != 0) {
8354
        return lastComparison;
8355
      }
8356
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
8357
      if (lastComparison != 0) {
8358
        return lastComparison;
8359
      }
640 chandransh 8360
      lastComparison = Boolean.valueOf(isSetJacket_number()).compareTo(isSetJacket_number());
8361
      if (lastComparison != 0) {
8362
        return lastComparison;
8363
      }
8364
      lastComparison = TBaseHelper.compareTo(jacket_number, typedOther.jacket_number);
8365
      if (lastComparison != 0) {
8366
        return lastComparison;
8367
      }
495 rajveer 8368
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
8369
      if (lastComparison != 0) {
8370
        return lastComparison;
8371
      }
8372
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
8373
      if (lastComparison != 0) {
8374
        return lastComparison;
8375
      }
8376
      return 0;
8377
    }
8378
 
8379
    public void read(TProtocol iprot) throws TException {
8380
      TField field;
8381
      iprot.readStructBegin();
8382
      while (true)
8383
      {
8384
        field = iprot.readFieldBegin();
8385
        if (field.type == TType.STOP) { 
8386
          break;
8387
        }
8388
        _Fields fieldId = _Fields.findByThriftId(field.id);
8389
        if (fieldId == null) {
8390
          TProtocolUtil.skip(iprot, field.type);
8391
        } else {
8392
          switch (fieldId) {
8393
            case ORDER_ID:
8394
              if (field.type == TType.I64) {
8395
                this.orderId = iprot.readI64();
8396
                setOrderIdIsSet(true);
8397
              } else { 
8398
                TProtocolUtil.skip(iprot, field.type);
8399
              }
8400
              break;
8401
            case INVOICE_NUMBER:
8402
              if (field.type == TType.STRING) {
8403
                this.invoice_number = iprot.readString();
8404
              } else { 
8405
                TProtocolUtil.skip(iprot, field.type);
8406
              }
8407
              break;
640 chandransh 8408
            case JACKET_NUMBER:
8409
              if (field.type == TType.I64) {
8410
                this.jacket_number = iprot.readI64();
8411
                setJacket_numberIsSet(true);
8412
              } else { 
8413
                TProtocolUtil.skip(iprot, field.type);
8414
              }
8415
              break;
495 rajveer 8416
            case BILLED_BY:
8417
              if (field.type == TType.STRING) {
8418
                this.billed_by = iprot.readString();
8419
              } else { 
8420
                TProtocolUtil.skip(iprot, field.type);
8421
              }
8422
              break;
8423
          }
8424
          iprot.readFieldEnd();
8425
        }
8426
      }
8427
      iprot.readStructEnd();
8428
      validate();
8429
    }
8430
 
8431
    public void write(TProtocol oprot) throws TException {
8432
      validate();
8433
 
8434
      oprot.writeStructBegin(STRUCT_DESC);
8435
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8436
      oprot.writeI64(this.orderId);
8437
      oprot.writeFieldEnd();
8438
      if (this.invoice_number != null) {
8439
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
8440
        oprot.writeString(this.invoice_number);
8441
        oprot.writeFieldEnd();
8442
      }
640 chandransh 8443
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
8444
      oprot.writeI64(this.jacket_number);
8445
      oprot.writeFieldEnd();
495 rajveer 8446
      if (this.billed_by != null) {
8447
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
8448
        oprot.writeString(this.billed_by);
8449
        oprot.writeFieldEnd();
8450
      }
8451
      oprot.writeFieldStop();
8452
      oprot.writeStructEnd();
8453
    }
8454
 
8455
    @Override
8456
    public String toString() {
8457
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
8458
      boolean first = true;
8459
 
8460
      sb.append("orderId:");
8461
      sb.append(this.orderId);
8462
      first = false;
8463
      if (!first) sb.append(", ");
8464
      sb.append("invoice_number:");
8465
      if (this.invoice_number == null) {
8466
        sb.append("null");
8467
      } else {
8468
        sb.append(this.invoice_number);
8469
      }
8470
      first = false;
8471
      if (!first) sb.append(", ");
640 chandransh 8472
      sb.append("jacket_number:");
8473
      sb.append(this.jacket_number);
8474
      first = false;
8475
      if (!first) sb.append(", ");
495 rajveer 8476
      sb.append("billed_by:");
8477
      if (this.billed_by == null) {
8478
        sb.append("null");
8479
      } else {
8480
        sb.append(this.billed_by);
8481
      }
8482
      first = false;
8483
      sb.append(")");
8484
      return sb.toString();
8485
    }
8486
 
8487
    public void validate() throws TException {
8488
      // check for required fields
8489
    }
8490
 
8491
  }
8492
 
8493
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
8494
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
8495
 
8496
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8497
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8498
 
8499
    private boolean success;
8500
    private TransactionServiceException ex;
8501
 
8502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8503
    public enum _Fields implements TFieldIdEnum {
8504
      SUCCESS((short)0, "success"),
8505
      EX((short)1, "ex");
8506
 
8507
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8509
 
8510
      static {
8511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8512
          byId.put((int)field._thriftId, field);
8513
          byName.put(field.getFieldName(), field);
8514
        }
8515
      }
8516
 
8517
      /**
8518
       * Find the _Fields constant that matches fieldId, or null if its not found.
8519
       */
8520
      public static _Fields findByThriftId(int fieldId) {
8521
        return byId.get(fieldId);
8522
      }
8523
 
8524
      /**
8525
       * Find the _Fields constant that matches fieldId, throwing an exception
8526
       * if it is not found.
8527
       */
8528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8529
        _Fields fields = findByThriftId(fieldId);
8530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8531
        return fields;
8532
      }
8533
 
8534
      /**
8535
       * Find the _Fields constant that matches name, or null if its not found.
8536
       */
8537
      public static _Fields findByName(String name) {
8538
        return byName.get(name);
8539
      }
8540
 
8541
      private final short _thriftId;
8542
      private final String _fieldName;
8543
 
8544
      _Fields(short thriftId, String fieldName) {
8545
        _thriftId = thriftId;
8546
        _fieldName = fieldName;
8547
      }
8548
 
8549
      public short getThriftFieldId() {
8550
        return _thriftId;
8551
      }
8552
 
8553
      public String getFieldName() {
8554
        return _fieldName;
8555
      }
8556
    }
8557
 
8558
    // isset id assignments
8559
    private static final int __SUCCESS_ISSET_ID = 0;
8560
    private BitSet __isset_bit_vector = new BitSet(1);
8561
 
8562
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8563
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8564
          new FieldValueMetaData(TType.BOOL)));
8565
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8566
          new FieldValueMetaData(TType.STRUCT)));
8567
    }});
8568
 
8569
    static {
8570
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
8571
    }
8572
 
8573
    public addBillingDetails_result() {
8574
    }
8575
 
8576
    public addBillingDetails_result(
8577
      boolean success,
8578
      TransactionServiceException ex)
8579
    {
8580
      this();
8581
      this.success = success;
8582
      setSuccessIsSet(true);
8583
      this.ex = ex;
8584
    }
8585
 
8586
    /**
8587
     * Performs a deep copy on <i>other</i>.
8588
     */
8589
    public addBillingDetails_result(addBillingDetails_result other) {
8590
      __isset_bit_vector.clear();
8591
      __isset_bit_vector.or(other.__isset_bit_vector);
8592
      this.success = other.success;
8593
      if (other.isSetEx()) {
8594
        this.ex = new TransactionServiceException(other.ex);
8595
      }
8596
    }
8597
 
8598
    public addBillingDetails_result deepCopy() {
8599
      return new addBillingDetails_result(this);
8600
    }
8601
 
8602
    @Deprecated
8603
    public addBillingDetails_result clone() {
8604
      return new addBillingDetails_result(this);
8605
    }
8606
 
8607
    public boolean isSuccess() {
8608
      return this.success;
8609
    }
8610
 
8611
    public addBillingDetails_result setSuccess(boolean success) {
8612
      this.success = success;
8613
      setSuccessIsSet(true);
8614
      return this;
8615
    }
8616
 
8617
    public void unsetSuccess() {
8618
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8619
    }
8620
 
8621
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8622
    public boolean isSetSuccess() {
8623
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8624
    }
8625
 
8626
    public void setSuccessIsSet(boolean value) {
8627
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8628
    }
8629
 
8630
    public TransactionServiceException getEx() {
8631
      return this.ex;
8632
    }
8633
 
8634
    public addBillingDetails_result setEx(TransactionServiceException ex) {
8635
      this.ex = ex;
8636
      return this;
8637
    }
8638
 
8639
    public void unsetEx() {
8640
      this.ex = null;
8641
    }
8642
 
8643
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8644
    public boolean isSetEx() {
8645
      return this.ex != null;
8646
    }
8647
 
8648
    public void setExIsSet(boolean value) {
8649
      if (!value) {
8650
        this.ex = null;
8651
      }
8652
    }
8653
 
8654
    public void setFieldValue(_Fields field, Object value) {
8655
      switch (field) {
8656
      case SUCCESS:
8657
        if (value == null) {
8658
          unsetSuccess();
8659
        } else {
8660
          setSuccess((Boolean)value);
8661
        }
8662
        break;
8663
 
8664
      case EX:
8665
        if (value == null) {
8666
          unsetEx();
8667
        } else {
8668
          setEx((TransactionServiceException)value);
8669
        }
8670
        break;
8671
 
8672
      }
8673
    }
8674
 
8675
    public void setFieldValue(int fieldID, Object value) {
8676
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8677
    }
8678
 
8679
    public Object getFieldValue(_Fields field) {
8680
      switch (field) {
8681
      case SUCCESS:
8682
        return new Boolean(isSuccess());
8683
 
8684
      case EX:
8685
        return getEx();
8686
 
8687
      }
8688
      throw new IllegalStateException();
8689
    }
8690
 
8691
    public Object getFieldValue(int fieldId) {
8692
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8693
    }
8694
 
8695
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8696
    public boolean isSet(_Fields field) {
8697
      switch (field) {
8698
      case SUCCESS:
8699
        return isSetSuccess();
8700
      case EX:
8701
        return isSetEx();
8702
      }
8703
      throw new IllegalStateException();
8704
    }
8705
 
8706
    public boolean isSet(int fieldID) {
8707
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8708
    }
8709
 
8710
    @Override
8711
    public boolean equals(Object that) {
8712
      if (that == null)
8713
        return false;
8714
      if (that instanceof addBillingDetails_result)
8715
        return this.equals((addBillingDetails_result)that);
8716
      return false;
8717
    }
8718
 
8719
    public boolean equals(addBillingDetails_result that) {
8720
      if (that == null)
8721
        return false;
8722
 
8723
      boolean this_present_success = true;
8724
      boolean that_present_success = true;
8725
      if (this_present_success || that_present_success) {
8726
        if (!(this_present_success && that_present_success))
8727
          return false;
8728
        if (this.success != that.success)
8729
          return false;
8730
      }
8731
 
8732
      boolean this_present_ex = true && this.isSetEx();
8733
      boolean that_present_ex = true && that.isSetEx();
8734
      if (this_present_ex || that_present_ex) {
8735
        if (!(this_present_ex && that_present_ex))
8736
          return false;
8737
        if (!this.ex.equals(that.ex))
8738
          return false;
8739
      }
8740
 
8741
      return true;
8742
    }
8743
 
8744
    @Override
8745
    public int hashCode() {
8746
      return 0;
8747
    }
8748
 
8749
    public int compareTo(addBillingDetails_result other) {
8750
      if (!getClass().equals(other.getClass())) {
8751
        return getClass().getName().compareTo(other.getClass().getName());
8752
      }
8753
 
8754
      int lastComparison = 0;
8755
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
8756
 
8757
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8758
      if (lastComparison != 0) {
8759
        return lastComparison;
8760
      }
8761
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8762
      if (lastComparison != 0) {
8763
        return lastComparison;
8764
      }
8765
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8766
      if (lastComparison != 0) {
8767
        return lastComparison;
8768
      }
8769
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8770
      if (lastComparison != 0) {
8771
        return lastComparison;
8772
      }
8773
      return 0;
8774
    }
8775
 
8776
    public void read(TProtocol iprot) throws TException {
8777
      TField field;
8778
      iprot.readStructBegin();
8779
      while (true)
8780
      {
8781
        field = iprot.readFieldBegin();
8782
        if (field.type == TType.STOP) { 
8783
          break;
8784
        }
8785
        _Fields fieldId = _Fields.findByThriftId(field.id);
8786
        if (fieldId == null) {
8787
          TProtocolUtil.skip(iprot, field.type);
8788
        } else {
8789
          switch (fieldId) {
8790
            case SUCCESS:
8791
              if (field.type == TType.BOOL) {
8792
                this.success = iprot.readBool();
8793
                setSuccessIsSet(true);
8794
              } else { 
8795
                TProtocolUtil.skip(iprot, field.type);
8796
              }
8797
              break;
8798
            case EX:
8799
              if (field.type == TType.STRUCT) {
8800
                this.ex = new TransactionServiceException();
8801
                this.ex.read(iprot);
8802
              } else { 
8803
                TProtocolUtil.skip(iprot, field.type);
8804
              }
8805
              break;
8806
          }
8807
          iprot.readFieldEnd();
8808
        }
8809
      }
8810
      iprot.readStructEnd();
8811
      validate();
8812
    }
8813
 
8814
    public void write(TProtocol oprot) throws TException {
8815
      oprot.writeStructBegin(STRUCT_DESC);
8816
 
8817
      if (this.isSetSuccess()) {
8818
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8819
        oprot.writeBool(this.success);
8820
        oprot.writeFieldEnd();
8821
      } else if (this.isSetEx()) {
8822
        oprot.writeFieldBegin(EX_FIELD_DESC);
8823
        this.ex.write(oprot);
8824
        oprot.writeFieldEnd();
8825
      }
8826
      oprot.writeFieldStop();
8827
      oprot.writeStructEnd();
8828
    }
8829
 
8830
    @Override
8831
    public String toString() {
8832
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
8833
      boolean first = true;
8834
 
8835
      sb.append("success:");
8836
      sb.append(this.success);
8837
      first = false;
8838
      if (!first) sb.append(", ");
8839
      sb.append("ex:");
8840
      if (this.ex == null) {
8841
        sb.append("null");
8842
      } else {
8843
        sb.append(this.ex);
8844
      }
8845
      first = false;
8846
      sb.append(")");
8847
      return sb.toString();
8848
    }
8849
 
8850
    public void validate() throws TException {
8851
      // check for required fields
8852
    }
8853
 
8854
  }
8855
 
923 rajveer 8856
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
8857
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
8858
 
8859
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8860
 
8861
    private long orderId;
8862
 
8863
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8864
    public enum _Fields implements TFieldIdEnum {
8865
      ORDER_ID((short)1, "orderId");
8866
 
8867
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8868
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8869
 
8870
      static {
8871
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8872
          byId.put((int)field._thriftId, field);
8873
          byName.put(field.getFieldName(), field);
8874
        }
8875
      }
8876
 
8877
      /**
8878
       * Find the _Fields constant that matches fieldId, or null if its not found.
8879
       */
8880
      public static _Fields findByThriftId(int fieldId) {
8881
        return byId.get(fieldId);
8882
      }
8883
 
8884
      /**
8885
       * Find the _Fields constant that matches fieldId, throwing an exception
8886
       * if it is not found.
8887
       */
8888
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8889
        _Fields fields = findByThriftId(fieldId);
8890
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8891
        return fields;
8892
      }
8893
 
8894
      /**
8895
       * Find the _Fields constant that matches name, or null if its not found.
8896
       */
8897
      public static _Fields findByName(String name) {
8898
        return byName.get(name);
8899
      }
8900
 
8901
      private final short _thriftId;
8902
      private final String _fieldName;
8903
 
8904
      _Fields(short thriftId, String fieldName) {
8905
        _thriftId = thriftId;
8906
        _fieldName = fieldName;
8907
      }
8908
 
8909
      public short getThriftFieldId() {
8910
        return _thriftId;
8911
      }
8912
 
8913
      public String getFieldName() {
8914
        return _fieldName;
8915
      }
8916
    }
8917
 
8918
    // isset id assignments
8919
    private static final int __ORDERID_ISSET_ID = 0;
8920
    private BitSet __isset_bit_vector = new BitSet(1);
8921
 
8922
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8923
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
8924
          new FieldValueMetaData(TType.I64)));
8925
    }});
8926
 
8927
    static {
8928
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
8929
    }
8930
 
8931
    public acceptOrder_args() {
8932
    }
8933
 
8934
    public acceptOrder_args(
8935
      long orderId)
8936
    {
8937
      this();
8938
      this.orderId = orderId;
8939
      setOrderIdIsSet(true);
8940
    }
8941
 
8942
    /**
8943
     * Performs a deep copy on <i>other</i>.
8944
     */
8945
    public acceptOrder_args(acceptOrder_args other) {
8946
      __isset_bit_vector.clear();
8947
      __isset_bit_vector.or(other.__isset_bit_vector);
8948
      this.orderId = other.orderId;
8949
    }
8950
 
8951
    public acceptOrder_args deepCopy() {
8952
      return new acceptOrder_args(this);
8953
    }
8954
 
8955
    @Deprecated
8956
    public acceptOrder_args clone() {
8957
      return new acceptOrder_args(this);
8958
    }
8959
 
8960
    public long getOrderId() {
8961
      return this.orderId;
8962
    }
8963
 
8964
    public acceptOrder_args setOrderId(long orderId) {
8965
      this.orderId = orderId;
8966
      setOrderIdIsSet(true);
8967
      return this;
8968
    }
8969
 
8970
    public void unsetOrderId() {
8971
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
8972
    }
8973
 
8974
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8975
    public boolean isSetOrderId() {
8976
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
8977
    }
8978
 
8979
    public void setOrderIdIsSet(boolean value) {
8980
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
8981
    }
8982
 
8983
    public void setFieldValue(_Fields field, Object value) {
8984
      switch (field) {
8985
      case ORDER_ID:
8986
        if (value == null) {
8987
          unsetOrderId();
8988
        } else {
8989
          setOrderId((Long)value);
8990
        }
8991
        break;
8992
 
8993
      }
8994
    }
8995
 
8996
    public void setFieldValue(int fieldID, Object value) {
8997
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8998
    }
8999
 
9000
    public Object getFieldValue(_Fields field) {
9001
      switch (field) {
9002
      case ORDER_ID:
9003
        return new Long(getOrderId());
9004
 
9005
      }
9006
      throw new IllegalStateException();
9007
    }
9008
 
9009
    public Object getFieldValue(int fieldId) {
9010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9011
    }
9012
 
9013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9014
    public boolean isSet(_Fields field) {
9015
      switch (field) {
9016
      case ORDER_ID:
9017
        return isSetOrderId();
9018
      }
9019
      throw new IllegalStateException();
9020
    }
9021
 
9022
    public boolean isSet(int fieldID) {
9023
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9024
    }
9025
 
9026
    @Override
9027
    public boolean equals(Object that) {
9028
      if (that == null)
9029
        return false;
9030
      if (that instanceof acceptOrder_args)
9031
        return this.equals((acceptOrder_args)that);
9032
      return false;
9033
    }
9034
 
9035
    public boolean equals(acceptOrder_args that) {
9036
      if (that == null)
9037
        return false;
9038
 
9039
      boolean this_present_orderId = true;
9040
      boolean that_present_orderId = true;
9041
      if (this_present_orderId || that_present_orderId) {
9042
        if (!(this_present_orderId && that_present_orderId))
9043
          return false;
9044
        if (this.orderId != that.orderId)
9045
          return false;
9046
      }
9047
 
9048
      return true;
9049
    }
9050
 
9051
    @Override
9052
    public int hashCode() {
9053
      return 0;
9054
    }
9055
 
9056
    public int compareTo(acceptOrder_args other) {
9057
      if (!getClass().equals(other.getClass())) {
9058
        return getClass().getName().compareTo(other.getClass().getName());
9059
      }
9060
 
9061
      int lastComparison = 0;
9062
      acceptOrder_args typedOther = (acceptOrder_args)other;
9063
 
9064
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9065
      if (lastComparison != 0) {
9066
        return lastComparison;
9067
      }
9068
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9069
      if (lastComparison != 0) {
9070
        return lastComparison;
9071
      }
9072
      return 0;
9073
    }
9074
 
9075
    public void read(TProtocol iprot) throws TException {
9076
      TField field;
9077
      iprot.readStructBegin();
9078
      while (true)
9079
      {
9080
        field = iprot.readFieldBegin();
9081
        if (field.type == TType.STOP) { 
9082
          break;
9083
        }
9084
        _Fields fieldId = _Fields.findByThriftId(field.id);
9085
        if (fieldId == null) {
9086
          TProtocolUtil.skip(iprot, field.type);
9087
        } else {
9088
          switch (fieldId) {
9089
            case ORDER_ID:
9090
              if (field.type == TType.I64) {
9091
                this.orderId = iprot.readI64();
9092
                setOrderIdIsSet(true);
9093
              } else { 
9094
                TProtocolUtil.skip(iprot, field.type);
9095
              }
9096
              break;
9097
          }
9098
          iprot.readFieldEnd();
9099
        }
9100
      }
9101
      iprot.readStructEnd();
9102
      validate();
9103
    }
9104
 
9105
    public void write(TProtocol oprot) throws TException {
9106
      validate();
9107
 
9108
      oprot.writeStructBegin(STRUCT_DESC);
9109
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9110
      oprot.writeI64(this.orderId);
9111
      oprot.writeFieldEnd();
9112
      oprot.writeFieldStop();
9113
      oprot.writeStructEnd();
9114
    }
9115
 
9116
    @Override
9117
    public String toString() {
9118
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
9119
      boolean first = true;
9120
 
9121
      sb.append("orderId:");
9122
      sb.append(this.orderId);
9123
      first = false;
9124
      sb.append(")");
9125
      return sb.toString();
9126
    }
9127
 
9128
    public void validate() throws TException {
9129
      // check for required fields
9130
    }
9131
 
9132
  }
9133
 
9134
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
9135
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
9136
 
9137
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9138
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9139
 
9140
    private boolean success;
9141
    private TransactionServiceException ex;
9142
 
9143
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9144
    public enum _Fields implements TFieldIdEnum {
9145
      SUCCESS((short)0, "success"),
9146
      EX((short)1, "ex");
9147
 
9148
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9149
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9150
 
9151
      static {
9152
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9153
          byId.put((int)field._thriftId, field);
9154
          byName.put(field.getFieldName(), field);
9155
        }
9156
      }
9157
 
9158
      /**
9159
       * Find the _Fields constant that matches fieldId, or null if its not found.
9160
       */
9161
      public static _Fields findByThriftId(int fieldId) {
9162
        return byId.get(fieldId);
9163
      }
9164
 
9165
      /**
9166
       * Find the _Fields constant that matches fieldId, throwing an exception
9167
       * if it is not found.
9168
       */
9169
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9170
        _Fields fields = findByThriftId(fieldId);
9171
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9172
        return fields;
9173
      }
9174
 
9175
      /**
9176
       * Find the _Fields constant that matches name, or null if its not found.
9177
       */
9178
      public static _Fields findByName(String name) {
9179
        return byName.get(name);
9180
      }
9181
 
9182
      private final short _thriftId;
9183
      private final String _fieldName;
9184
 
9185
      _Fields(short thriftId, String fieldName) {
9186
        _thriftId = thriftId;
9187
        _fieldName = fieldName;
9188
      }
9189
 
9190
      public short getThriftFieldId() {
9191
        return _thriftId;
9192
      }
9193
 
9194
      public String getFieldName() {
9195
        return _fieldName;
9196
      }
9197
    }
9198
 
9199
    // isset id assignments
9200
    private static final int __SUCCESS_ISSET_ID = 0;
9201
    private BitSet __isset_bit_vector = new BitSet(1);
9202
 
9203
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9204
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9205
          new FieldValueMetaData(TType.BOOL)));
9206
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9207
          new FieldValueMetaData(TType.STRUCT)));
9208
    }});
9209
 
9210
    static {
9211
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
9212
    }
9213
 
9214
    public acceptOrder_result() {
9215
    }
9216
 
9217
    public acceptOrder_result(
9218
      boolean success,
9219
      TransactionServiceException ex)
9220
    {
9221
      this();
9222
      this.success = success;
9223
      setSuccessIsSet(true);
9224
      this.ex = ex;
9225
    }
9226
 
9227
    /**
9228
     * Performs a deep copy on <i>other</i>.
9229
     */
9230
    public acceptOrder_result(acceptOrder_result other) {
9231
      __isset_bit_vector.clear();
9232
      __isset_bit_vector.or(other.__isset_bit_vector);
9233
      this.success = other.success;
9234
      if (other.isSetEx()) {
9235
        this.ex = new TransactionServiceException(other.ex);
9236
      }
9237
    }
9238
 
9239
    public acceptOrder_result deepCopy() {
9240
      return new acceptOrder_result(this);
9241
    }
9242
 
9243
    @Deprecated
9244
    public acceptOrder_result clone() {
9245
      return new acceptOrder_result(this);
9246
    }
9247
 
9248
    public boolean isSuccess() {
9249
      return this.success;
9250
    }
9251
 
9252
    public acceptOrder_result setSuccess(boolean success) {
9253
      this.success = success;
9254
      setSuccessIsSet(true);
9255
      return this;
9256
    }
9257
 
9258
    public void unsetSuccess() {
9259
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9260
    }
9261
 
9262
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9263
    public boolean isSetSuccess() {
9264
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9265
    }
9266
 
9267
    public void setSuccessIsSet(boolean value) {
9268
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9269
    }
9270
 
9271
    public TransactionServiceException getEx() {
9272
      return this.ex;
9273
    }
9274
 
9275
    public acceptOrder_result setEx(TransactionServiceException ex) {
9276
      this.ex = ex;
9277
      return this;
9278
    }
9279
 
9280
    public void unsetEx() {
9281
      this.ex = null;
9282
    }
9283
 
9284
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9285
    public boolean isSetEx() {
9286
      return this.ex != null;
9287
    }
9288
 
9289
    public void setExIsSet(boolean value) {
9290
      if (!value) {
9291
        this.ex = null;
9292
      }
9293
    }
9294
 
9295
    public void setFieldValue(_Fields field, Object value) {
9296
      switch (field) {
9297
      case SUCCESS:
9298
        if (value == null) {
9299
          unsetSuccess();
9300
        } else {
9301
          setSuccess((Boolean)value);
9302
        }
9303
        break;
9304
 
9305
      case EX:
9306
        if (value == null) {
9307
          unsetEx();
9308
        } else {
9309
          setEx((TransactionServiceException)value);
9310
        }
9311
        break;
9312
 
9313
      }
9314
    }
9315
 
9316
    public void setFieldValue(int fieldID, Object value) {
9317
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9318
    }
9319
 
9320
    public Object getFieldValue(_Fields field) {
9321
      switch (field) {
9322
      case SUCCESS:
9323
        return new Boolean(isSuccess());
9324
 
9325
      case EX:
9326
        return getEx();
9327
 
9328
      }
9329
      throw new IllegalStateException();
9330
    }
9331
 
9332
    public Object getFieldValue(int fieldId) {
9333
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9334
    }
9335
 
9336
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9337
    public boolean isSet(_Fields field) {
9338
      switch (field) {
9339
      case SUCCESS:
9340
        return isSetSuccess();
9341
      case EX:
9342
        return isSetEx();
9343
      }
9344
      throw new IllegalStateException();
9345
    }
9346
 
9347
    public boolean isSet(int fieldID) {
9348
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9349
    }
9350
 
9351
    @Override
9352
    public boolean equals(Object that) {
9353
      if (that == null)
9354
        return false;
9355
      if (that instanceof acceptOrder_result)
9356
        return this.equals((acceptOrder_result)that);
9357
      return false;
9358
    }
9359
 
9360
    public boolean equals(acceptOrder_result that) {
9361
      if (that == null)
9362
        return false;
9363
 
9364
      boolean this_present_success = true;
9365
      boolean that_present_success = true;
9366
      if (this_present_success || that_present_success) {
9367
        if (!(this_present_success && that_present_success))
9368
          return false;
9369
        if (this.success != that.success)
9370
          return false;
9371
      }
9372
 
9373
      boolean this_present_ex = true && this.isSetEx();
9374
      boolean that_present_ex = true && that.isSetEx();
9375
      if (this_present_ex || that_present_ex) {
9376
        if (!(this_present_ex && that_present_ex))
9377
          return false;
9378
        if (!this.ex.equals(that.ex))
9379
          return false;
9380
      }
9381
 
9382
      return true;
9383
    }
9384
 
9385
    @Override
9386
    public int hashCode() {
9387
      return 0;
9388
    }
9389
 
9390
    public int compareTo(acceptOrder_result other) {
9391
      if (!getClass().equals(other.getClass())) {
9392
        return getClass().getName().compareTo(other.getClass().getName());
9393
      }
9394
 
9395
      int lastComparison = 0;
9396
      acceptOrder_result typedOther = (acceptOrder_result)other;
9397
 
9398
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9399
      if (lastComparison != 0) {
9400
        return lastComparison;
9401
      }
9402
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9403
      if (lastComparison != 0) {
9404
        return lastComparison;
9405
      }
9406
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9407
      if (lastComparison != 0) {
9408
        return lastComparison;
9409
      }
9410
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9411
      if (lastComparison != 0) {
9412
        return lastComparison;
9413
      }
9414
      return 0;
9415
    }
9416
 
9417
    public void read(TProtocol iprot) throws TException {
9418
      TField field;
9419
      iprot.readStructBegin();
9420
      while (true)
9421
      {
9422
        field = iprot.readFieldBegin();
9423
        if (field.type == TType.STOP) { 
9424
          break;
9425
        }
9426
        _Fields fieldId = _Fields.findByThriftId(field.id);
9427
        if (fieldId == null) {
9428
          TProtocolUtil.skip(iprot, field.type);
9429
        } else {
9430
          switch (fieldId) {
9431
            case SUCCESS:
9432
              if (field.type == TType.BOOL) {
9433
                this.success = iprot.readBool();
9434
                setSuccessIsSet(true);
9435
              } else { 
9436
                TProtocolUtil.skip(iprot, field.type);
9437
              }
9438
              break;
9439
            case EX:
9440
              if (field.type == TType.STRUCT) {
9441
                this.ex = new TransactionServiceException();
9442
                this.ex.read(iprot);
9443
              } else { 
9444
                TProtocolUtil.skip(iprot, field.type);
9445
              }
9446
              break;
9447
          }
9448
          iprot.readFieldEnd();
9449
        }
9450
      }
9451
      iprot.readStructEnd();
9452
      validate();
9453
    }
9454
 
9455
    public void write(TProtocol oprot) throws TException {
9456
      oprot.writeStructBegin(STRUCT_DESC);
9457
 
9458
      if (this.isSetSuccess()) {
9459
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9460
        oprot.writeBool(this.success);
9461
        oprot.writeFieldEnd();
9462
      } else if (this.isSetEx()) {
9463
        oprot.writeFieldBegin(EX_FIELD_DESC);
9464
        this.ex.write(oprot);
9465
        oprot.writeFieldEnd();
9466
      }
9467
      oprot.writeFieldStop();
9468
      oprot.writeStructEnd();
9469
    }
9470
 
9471
    @Override
9472
    public String toString() {
9473
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
9474
      boolean first = true;
9475
 
9476
      sb.append("success:");
9477
      sb.append(this.success);
9478
      first = false;
9479
      if (!first) sb.append(", ");
9480
      sb.append("ex:");
9481
      if (this.ex == null) {
9482
        sb.append("null");
9483
      } else {
9484
        sb.append(this.ex);
9485
      }
9486
      first = false;
9487
      sb.append(")");
9488
      return sb.toString();
9489
    }
9490
 
9491
    public void validate() throws TException {
9492
      // check for required fields
9493
    }
9494
 
9495
  }
9496
 
9497
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
9498
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
9499
 
9500
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9501
 
9502
    private long orderId;
9503
 
9504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9505
    public enum _Fields implements TFieldIdEnum {
9506
      ORDER_ID((short)1, "orderId");
9507
 
9508
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9510
 
9511
      static {
9512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9513
          byId.put((int)field._thriftId, field);
9514
          byName.put(field.getFieldName(), field);
9515
        }
9516
      }
9517
 
9518
      /**
9519
       * Find the _Fields constant that matches fieldId, or null if its not found.
9520
       */
9521
      public static _Fields findByThriftId(int fieldId) {
9522
        return byId.get(fieldId);
9523
      }
9524
 
9525
      /**
9526
       * Find the _Fields constant that matches fieldId, throwing an exception
9527
       * if it is not found.
9528
       */
9529
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9530
        _Fields fields = findByThriftId(fieldId);
9531
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9532
        return fields;
9533
      }
9534
 
9535
      /**
9536
       * Find the _Fields constant that matches name, or null if its not found.
9537
       */
9538
      public static _Fields findByName(String name) {
9539
        return byName.get(name);
9540
      }
9541
 
9542
      private final short _thriftId;
9543
      private final String _fieldName;
9544
 
9545
      _Fields(short thriftId, String fieldName) {
9546
        _thriftId = thriftId;
9547
        _fieldName = fieldName;
9548
      }
9549
 
9550
      public short getThriftFieldId() {
9551
        return _thriftId;
9552
      }
9553
 
9554
      public String getFieldName() {
9555
        return _fieldName;
9556
      }
9557
    }
9558
 
9559
    // isset id assignments
9560
    private static final int __ORDERID_ISSET_ID = 0;
9561
    private BitSet __isset_bit_vector = new BitSet(1);
9562
 
9563
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9564
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9565
          new FieldValueMetaData(TType.I64)));
9566
    }});
9567
 
9568
    static {
9569
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
9570
    }
9571
 
9572
    public billOrder_args() {
9573
    }
9574
 
9575
    public billOrder_args(
9576
      long orderId)
9577
    {
9578
      this();
9579
      this.orderId = orderId;
9580
      setOrderIdIsSet(true);
9581
    }
9582
 
9583
    /**
9584
     * Performs a deep copy on <i>other</i>.
9585
     */
9586
    public billOrder_args(billOrder_args other) {
9587
      __isset_bit_vector.clear();
9588
      __isset_bit_vector.or(other.__isset_bit_vector);
9589
      this.orderId = other.orderId;
9590
    }
9591
 
9592
    public billOrder_args deepCopy() {
9593
      return new billOrder_args(this);
9594
    }
9595
 
9596
    @Deprecated
9597
    public billOrder_args clone() {
9598
      return new billOrder_args(this);
9599
    }
9600
 
9601
    public long getOrderId() {
9602
      return this.orderId;
9603
    }
9604
 
9605
    public billOrder_args setOrderId(long orderId) {
9606
      this.orderId = orderId;
9607
      setOrderIdIsSet(true);
9608
      return this;
9609
    }
9610
 
9611
    public void unsetOrderId() {
9612
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9613
    }
9614
 
9615
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9616
    public boolean isSetOrderId() {
9617
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9618
    }
9619
 
9620
    public void setOrderIdIsSet(boolean value) {
9621
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9622
    }
9623
 
9624
    public void setFieldValue(_Fields field, Object value) {
9625
      switch (field) {
9626
      case ORDER_ID:
9627
        if (value == null) {
9628
          unsetOrderId();
9629
        } else {
9630
          setOrderId((Long)value);
9631
        }
9632
        break;
9633
 
9634
      }
9635
    }
9636
 
9637
    public void setFieldValue(int fieldID, Object value) {
9638
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9639
    }
9640
 
9641
    public Object getFieldValue(_Fields field) {
9642
      switch (field) {
9643
      case ORDER_ID:
9644
        return new Long(getOrderId());
9645
 
9646
      }
9647
      throw new IllegalStateException();
9648
    }
9649
 
9650
    public Object getFieldValue(int fieldId) {
9651
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9652
    }
9653
 
9654
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9655
    public boolean isSet(_Fields field) {
9656
      switch (field) {
9657
      case ORDER_ID:
9658
        return isSetOrderId();
9659
      }
9660
      throw new IllegalStateException();
9661
    }
9662
 
9663
    public boolean isSet(int fieldID) {
9664
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9665
    }
9666
 
9667
    @Override
9668
    public boolean equals(Object that) {
9669
      if (that == null)
9670
        return false;
9671
      if (that instanceof billOrder_args)
9672
        return this.equals((billOrder_args)that);
9673
      return false;
9674
    }
9675
 
9676
    public boolean equals(billOrder_args that) {
9677
      if (that == null)
9678
        return false;
9679
 
9680
      boolean this_present_orderId = true;
9681
      boolean that_present_orderId = true;
9682
      if (this_present_orderId || that_present_orderId) {
9683
        if (!(this_present_orderId && that_present_orderId))
9684
          return false;
9685
        if (this.orderId != that.orderId)
9686
          return false;
9687
      }
9688
 
9689
      return true;
9690
    }
9691
 
9692
    @Override
9693
    public int hashCode() {
9694
      return 0;
9695
    }
9696
 
9697
    public int compareTo(billOrder_args other) {
9698
      if (!getClass().equals(other.getClass())) {
9699
        return getClass().getName().compareTo(other.getClass().getName());
9700
      }
9701
 
9702
      int lastComparison = 0;
9703
      billOrder_args typedOther = (billOrder_args)other;
9704
 
9705
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9706
      if (lastComparison != 0) {
9707
        return lastComparison;
9708
      }
9709
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9710
      if (lastComparison != 0) {
9711
        return lastComparison;
9712
      }
9713
      return 0;
9714
    }
9715
 
9716
    public void read(TProtocol iprot) throws TException {
9717
      TField field;
9718
      iprot.readStructBegin();
9719
      while (true)
9720
      {
9721
        field = iprot.readFieldBegin();
9722
        if (field.type == TType.STOP) { 
9723
          break;
9724
        }
9725
        _Fields fieldId = _Fields.findByThriftId(field.id);
9726
        if (fieldId == null) {
9727
          TProtocolUtil.skip(iprot, field.type);
9728
        } else {
9729
          switch (fieldId) {
9730
            case ORDER_ID:
9731
              if (field.type == TType.I64) {
9732
                this.orderId = iprot.readI64();
9733
                setOrderIdIsSet(true);
9734
              } else { 
9735
                TProtocolUtil.skip(iprot, field.type);
9736
              }
9737
              break;
9738
          }
9739
          iprot.readFieldEnd();
9740
        }
9741
      }
9742
      iprot.readStructEnd();
9743
      validate();
9744
    }
9745
 
9746
    public void write(TProtocol oprot) throws TException {
9747
      validate();
9748
 
9749
      oprot.writeStructBegin(STRUCT_DESC);
9750
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9751
      oprot.writeI64(this.orderId);
9752
      oprot.writeFieldEnd();
9753
      oprot.writeFieldStop();
9754
      oprot.writeStructEnd();
9755
    }
9756
 
9757
    @Override
9758
    public String toString() {
9759
      StringBuilder sb = new StringBuilder("billOrder_args(");
9760
      boolean first = true;
9761
 
9762
      sb.append("orderId:");
9763
      sb.append(this.orderId);
9764
      first = false;
9765
      sb.append(")");
9766
      return sb.toString();
9767
    }
9768
 
9769
    public void validate() throws TException {
9770
      // check for required fields
9771
    }
9772
 
9773
  }
9774
 
9775
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
9776
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
9777
 
9778
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9779
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9780
 
9781
    private boolean success;
9782
    private TransactionServiceException ex;
9783
 
9784
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9785
    public enum _Fields implements TFieldIdEnum {
9786
      SUCCESS((short)0, "success"),
9787
      EX((short)1, "ex");
9788
 
9789
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9791
 
9792
      static {
9793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9794
          byId.put((int)field._thriftId, field);
9795
          byName.put(field.getFieldName(), field);
9796
        }
9797
      }
9798
 
9799
      /**
9800
       * Find the _Fields constant that matches fieldId, or null if its not found.
9801
       */
9802
      public static _Fields findByThriftId(int fieldId) {
9803
        return byId.get(fieldId);
9804
      }
9805
 
9806
      /**
9807
       * Find the _Fields constant that matches fieldId, throwing an exception
9808
       * if it is not found.
9809
       */
9810
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9811
        _Fields fields = findByThriftId(fieldId);
9812
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9813
        return fields;
9814
      }
9815
 
9816
      /**
9817
       * Find the _Fields constant that matches name, or null if its not found.
9818
       */
9819
      public static _Fields findByName(String name) {
9820
        return byName.get(name);
9821
      }
9822
 
9823
      private final short _thriftId;
9824
      private final String _fieldName;
9825
 
9826
      _Fields(short thriftId, String fieldName) {
9827
        _thriftId = thriftId;
9828
        _fieldName = fieldName;
9829
      }
9830
 
9831
      public short getThriftFieldId() {
9832
        return _thriftId;
9833
      }
9834
 
9835
      public String getFieldName() {
9836
        return _fieldName;
9837
      }
9838
    }
9839
 
9840
    // isset id assignments
9841
    private static final int __SUCCESS_ISSET_ID = 0;
9842
    private BitSet __isset_bit_vector = new BitSet(1);
9843
 
9844
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9845
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9846
          new FieldValueMetaData(TType.BOOL)));
9847
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9848
          new FieldValueMetaData(TType.STRUCT)));
9849
    }});
9850
 
9851
    static {
9852
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
9853
    }
9854
 
9855
    public billOrder_result() {
9856
    }
9857
 
9858
    public billOrder_result(
9859
      boolean success,
9860
      TransactionServiceException ex)
9861
    {
9862
      this();
9863
      this.success = success;
9864
      setSuccessIsSet(true);
9865
      this.ex = ex;
9866
    }
9867
 
9868
    /**
9869
     * Performs a deep copy on <i>other</i>.
9870
     */
9871
    public billOrder_result(billOrder_result other) {
9872
      __isset_bit_vector.clear();
9873
      __isset_bit_vector.or(other.__isset_bit_vector);
9874
      this.success = other.success;
9875
      if (other.isSetEx()) {
9876
        this.ex = new TransactionServiceException(other.ex);
9877
      }
9878
    }
9879
 
9880
    public billOrder_result deepCopy() {
9881
      return new billOrder_result(this);
9882
    }
9883
 
9884
    @Deprecated
9885
    public billOrder_result clone() {
9886
      return new billOrder_result(this);
9887
    }
9888
 
9889
    public boolean isSuccess() {
9890
      return this.success;
9891
    }
9892
 
9893
    public billOrder_result setSuccess(boolean success) {
9894
      this.success = success;
9895
      setSuccessIsSet(true);
9896
      return this;
9897
    }
9898
 
9899
    public void unsetSuccess() {
9900
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9901
    }
9902
 
9903
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9904
    public boolean isSetSuccess() {
9905
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9906
    }
9907
 
9908
    public void setSuccessIsSet(boolean value) {
9909
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9910
    }
9911
 
9912
    public TransactionServiceException getEx() {
9913
      return this.ex;
9914
    }
9915
 
9916
    public billOrder_result setEx(TransactionServiceException ex) {
9917
      this.ex = ex;
9918
      return this;
9919
    }
9920
 
9921
    public void unsetEx() {
9922
      this.ex = null;
9923
    }
9924
 
9925
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9926
    public boolean isSetEx() {
9927
      return this.ex != null;
9928
    }
9929
 
9930
    public void setExIsSet(boolean value) {
9931
      if (!value) {
9932
        this.ex = null;
9933
      }
9934
    }
9935
 
9936
    public void setFieldValue(_Fields field, Object value) {
9937
      switch (field) {
9938
      case SUCCESS:
9939
        if (value == null) {
9940
          unsetSuccess();
9941
        } else {
9942
          setSuccess((Boolean)value);
9943
        }
9944
        break;
9945
 
9946
      case EX:
9947
        if (value == null) {
9948
          unsetEx();
9949
        } else {
9950
          setEx((TransactionServiceException)value);
9951
        }
9952
        break;
9953
 
9954
      }
9955
    }
9956
 
9957
    public void setFieldValue(int fieldID, Object value) {
9958
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9959
    }
9960
 
9961
    public Object getFieldValue(_Fields field) {
9962
      switch (field) {
9963
      case SUCCESS:
9964
        return new Boolean(isSuccess());
9965
 
9966
      case EX:
9967
        return getEx();
9968
 
9969
      }
9970
      throw new IllegalStateException();
9971
    }
9972
 
9973
    public Object getFieldValue(int fieldId) {
9974
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9975
    }
9976
 
9977
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9978
    public boolean isSet(_Fields field) {
9979
      switch (field) {
9980
      case SUCCESS:
9981
        return isSetSuccess();
9982
      case EX:
9983
        return isSetEx();
9984
      }
9985
      throw new IllegalStateException();
9986
    }
9987
 
9988
    public boolean isSet(int fieldID) {
9989
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9990
    }
9991
 
9992
    @Override
9993
    public boolean equals(Object that) {
9994
      if (that == null)
9995
        return false;
9996
      if (that instanceof billOrder_result)
9997
        return this.equals((billOrder_result)that);
9998
      return false;
9999
    }
10000
 
10001
    public boolean equals(billOrder_result that) {
10002
      if (that == null)
10003
        return false;
10004
 
10005
      boolean this_present_success = true;
10006
      boolean that_present_success = true;
10007
      if (this_present_success || that_present_success) {
10008
        if (!(this_present_success && that_present_success))
10009
          return false;
10010
        if (this.success != that.success)
10011
          return false;
10012
      }
10013
 
10014
      boolean this_present_ex = true && this.isSetEx();
10015
      boolean that_present_ex = true && that.isSetEx();
10016
      if (this_present_ex || that_present_ex) {
10017
        if (!(this_present_ex && that_present_ex))
10018
          return false;
10019
        if (!this.ex.equals(that.ex))
10020
          return false;
10021
      }
10022
 
10023
      return true;
10024
    }
10025
 
10026
    @Override
10027
    public int hashCode() {
10028
      return 0;
10029
    }
10030
 
10031
    public int compareTo(billOrder_result other) {
10032
      if (!getClass().equals(other.getClass())) {
10033
        return getClass().getName().compareTo(other.getClass().getName());
10034
      }
10035
 
10036
      int lastComparison = 0;
10037
      billOrder_result typedOther = (billOrder_result)other;
10038
 
10039
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10040
      if (lastComparison != 0) {
10041
        return lastComparison;
10042
      }
10043
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10044
      if (lastComparison != 0) {
10045
        return lastComparison;
10046
      }
10047
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10048
      if (lastComparison != 0) {
10049
        return lastComparison;
10050
      }
10051
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10052
      if (lastComparison != 0) {
10053
        return lastComparison;
10054
      }
10055
      return 0;
10056
    }
10057
 
10058
    public void read(TProtocol iprot) throws TException {
10059
      TField field;
10060
      iprot.readStructBegin();
10061
      while (true)
10062
      {
10063
        field = iprot.readFieldBegin();
10064
        if (field.type == TType.STOP) { 
10065
          break;
10066
        }
10067
        _Fields fieldId = _Fields.findByThriftId(field.id);
10068
        if (fieldId == null) {
10069
          TProtocolUtil.skip(iprot, field.type);
10070
        } else {
10071
          switch (fieldId) {
10072
            case SUCCESS:
10073
              if (field.type == TType.BOOL) {
10074
                this.success = iprot.readBool();
10075
                setSuccessIsSet(true);
10076
              } else { 
10077
                TProtocolUtil.skip(iprot, field.type);
10078
              }
10079
              break;
10080
            case EX:
10081
              if (field.type == TType.STRUCT) {
10082
                this.ex = new TransactionServiceException();
10083
                this.ex.read(iprot);
10084
              } else { 
10085
                TProtocolUtil.skip(iprot, field.type);
10086
              }
10087
              break;
10088
          }
10089
          iprot.readFieldEnd();
10090
        }
10091
      }
10092
      iprot.readStructEnd();
10093
      validate();
10094
    }
10095
 
10096
    public void write(TProtocol oprot) throws TException {
10097
      oprot.writeStructBegin(STRUCT_DESC);
10098
 
10099
      if (this.isSetSuccess()) {
10100
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10101
        oprot.writeBool(this.success);
10102
        oprot.writeFieldEnd();
10103
      } else if (this.isSetEx()) {
10104
        oprot.writeFieldBegin(EX_FIELD_DESC);
10105
        this.ex.write(oprot);
10106
        oprot.writeFieldEnd();
10107
      }
10108
      oprot.writeFieldStop();
10109
      oprot.writeStructEnd();
10110
    }
10111
 
10112
    @Override
10113
    public String toString() {
10114
      StringBuilder sb = new StringBuilder("billOrder_result(");
10115
      boolean first = true;
10116
 
10117
      sb.append("success:");
10118
      sb.append(this.success);
10119
      first = false;
10120
      if (!first) sb.append(", ");
10121
      sb.append("ex:");
10122
      if (this.ex == null) {
10123
        sb.append("null");
10124
      } else {
10125
        sb.append(this.ex);
10126
      }
10127
      first = false;
10128
      sb.append(")");
10129
      return sb.toString();
10130
    }
10131
 
10132
    public void validate() throws TException {
10133
      // check for required fields
10134
    }
10135
 
10136
  }
10137
 
483 rajveer 10138
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
10139
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 10140
 
10141
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
10142
 
10143
    private long transactionId;
10144
 
10145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10146
    public enum _Fields implements TFieldIdEnum {
483 rajveer 10147
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 10148
 
10149
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10150
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10151
 
10152
      static {
10153
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10154
          byId.put((int)field._thriftId, field);
10155
          byName.put(field.getFieldName(), field);
10156
        }
10157
      }
10158
 
10159
      /**
10160
       * Find the _Fields constant that matches fieldId, or null if its not found.
10161
       */
10162
      public static _Fields findByThriftId(int fieldId) {
10163
        return byId.get(fieldId);
10164
      }
10165
 
10166
      /**
10167
       * Find the _Fields constant that matches fieldId, throwing an exception
10168
       * if it is not found.
10169
       */
10170
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10171
        _Fields fields = findByThriftId(fieldId);
10172
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10173
        return fields;
10174
      }
10175
 
10176
      /**
10177
       * Find the _Fields constant that matches name, or null if its not found.
10178
       */
10179
      public static _Fields findByName(String name) {
10180
        return byName.get(name);
10181
      }
10182
 
10183
      private final short _thriftId;
10184
      private final String _fieldName;
10185
 
10186
      _Fields(short thriftId, String fieldName) {
10187
        _thriftId = thriftId;
10188
        _fieldName = fieldName;
10189
      }
10190
 
10191
      public short getThriftFieldId() {
10192
        return _thriftId;
10193
      }
10194
 
10195
      public String getFieldName() {
10196
        return _fieldName;
10197
      }
10198
    }
10199
 
10200
    // isset id assignments
10201
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 10202
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 10203
 
10204
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10205
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
10206
          new FieldValueMetaData(TType.I64)));
10207
    }});
10208
 
10209
    static {
483 rajveer 10210
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 10211
    }
10212
 
483 rajveer 10213
    public getOrdersForTransaction_args() {
68 ashish 10214
    }
10215
 
483 rajveer 10216
    public getOrdersForTransaction_args(
10217
      long transactionId)
68 ashish 10218
    {
10219
      this();
10220
      this.transactionId = transactionId;
10221
      setTransactionIdIsSet(true);
10222
    }
10223
 
10224
    /**
10225
     * Performs a deep copy on <i>other</i>.
10226
     */
483 rajveer 10227
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 10228
      __isset_bit_vector.clear();
10229
      __isset_bit_vector.or(other.__isset_bit_vector);
10230
      this.transactionId = other.transactionId;
10231
    }
10232
 
483 rajveer 10233
    public getOrdersForTransaction_args deepCopy() {
10234
      return new getOrdersForTransaction_args(this);
68 ashish 10235
    }
10236
 
10237
    @Deprecated
483 rajveer 10238
    public getOrdersForTransaction_args clone() {
10239
      return new getOrdersForTransaction_args(this);
68 ashish 10240
    }
10241
 
10242
    public long getTransactionId() {
10243
      return this.transactionId;
10244
    }
10245
 
483 rajveer 10246
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 10247
      this.transactionId = transactionId;
10248
      setTransactionIdIsSet(true);
10249
      return this;
10250
    }
10251
 
10252
    public void unsetTransactionId() {
10253
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
10254
    }
10255
 
10256
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
10257
    public boolean isSetTransactionId() {
10258
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
10259
    }
10260
 
10261
    public void setTransactionIdIsSet(boolean value) {
10262
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
10263
    }
10264
 
10265
    public void setFieldValue(_Fields field, Object value) {
10266
      switch (field) {
10267
      case TRANSACTION_ID:
10268
        if (value == null) {
10269
          unsetTransactionId();
10270
        } else {
10271
          setTransactionId((Long)value);
10272
        }
10273
        break;
10274
 
10275
      }
10276
    }
10277
 
10278
    public void setFieldValue(int fieldID, Object value) {
10279
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10280
    }
10281
 
10282
    public Object getFieldValue(_Fields field) {
10283
      switch (field) {
10284
      case TRANSACTION_ID:
10285
        return new Long(getTransactionId());
10286
 
10287
      }
10288
      throw new IllegalStateException();
10289
    }
10290
 
10291
    public Object getFieldValue(int fieldId) {
10292
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10293
    }
10294
 
10295
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10296
    public boolean isSet(_Fields field) {
10297
      switch (field) {
10298
      case TRANSACTION_ID:
10299
        return isSetTransactionId();
10300
      }
10301
      throw new IllegalStateException();
10302
    }
10303
 
10304
    public boolean isSet(int fieldID) {
10305
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10306
    }
10307
 
10308
    @Override
10309
    public boolean equals(Object that) {
10310
      if (that == null)
10311
        return false;
483 rajveer 10312
      if (that instanceof getOrdersForTransaction_args)
10313
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 10314
      return false;
10315
    }
10316
 
483 rajveer 10317
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 10318
      if (that == null)
10319
        return false;
10320
 
10321
      boolean this_present_transactionId = true;
10322
      boolean that_present_transactionId = true;
10323
      if (this_present_transactionId || that_present_transactionId) {
10324
        if (!(this_present_transactionId && that_present_transactionId))
10325
          return false;
10326
        if (this.transactionId != that.transactionId)
10327
          return false;
10328
      }
10329
 
10330
      return true;
10331
    }
10332
 
10333
    @Override
10334
    public int hashCode() {
10335
      return 0;
10336
    }
10337
 
483 rajveer 10338
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 10339
      if (!getClass().equals(other.getClass())) {
10340
        return getClass().getName().compareTo(other.getClass().getName());
10341
      }
10342
 
10343
      int lastComparison = 0;
483 rajveer 10344
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 10345
 
10346
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
10347
      if (lastComparison != 0) {
10348
        return lastComparison;
10349
      }
10350
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
10351
      if (lastComparison != 0) {
10352
        return lastComparison;
10353
      }
10354
      return 0;
10355
    }
10356
 
10357
    public void read(TProtocol iprot) throws TException {
10358
      TField field;
10359
      iprot.readStructBegin();
10360
      while (true)
10361
      {
10362
        field = iprot.readFieldBegin();
10363
        if (field.type == TType.STOP) { 
10364
          break;
10365
        }
10366
        _Fields fieldId = _Fields.findByThriftId(field.id);
10367
        if (fieldId == null) {
10368
          TProtocolUtil.skip(iprot, field.type);
10369
        } else {
10370
          switch (fieldId) {
10371
            case TRANSACTION_ID:
10372
              if (field.type == TType.I64) {
10373
                this.transactionId = iprot.readI64();
10374
                setTransactionIdIsSet(true);
10375
              } else { 
10376
                TProtocolUtil.skip(iprot, field.type);
10377
              }
10378
              break;
10379
          }
10380
          iprot.readFieldEnd();
10381
        }
10382
      }
10383
      iprot.readStructEnd();
10384
      validate();
10385
    }
10386
 
10387
    public void write(TProtocol oprot) throws TException {
10388
      validate();
10389
 
10390
      oprot.writeStructBegin(STRUCT_DESC);
10391
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
10392
      oprot.writeI64(this.transactionId);
10393
      oprot.writeFieldEnd();
10394
      oprot.writeFieldStop();
10395
      oprot.writeStructEnd();
10396
    }
10397
 
10398
    @Override
10399
    public String toString() {
483 rajveer 10400
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 10401
      boolean first = true;
10402
 
10403
      sb.append("transactionId:");
10404
      sb.append(this.transactionId);
10405
      first = false;
10406
      sb.append(")");
10407
      return sb.toString();
10408
    }
10409
 
10410
    public void validate() throws TException {
10411
      // check for required fields
10412
    }
10413
 
10414
  }
10415
 
483 rajveer 10416
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
10417
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 10418
 
483 rajveer 10419
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 10420
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10421
 
483 rajveer 10422
    private List<Order> success;
68 ashish 10423
    private TransactionServiceException ex;
10424
 
10425
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10426
    public enum _Fields implements TFieldIdEnum {
10427
      SUCCESS((short)0, "success"),
10428
      EX((short)1, "ex");
10429
 
10430
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10432
 
10433
      static {
10434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10435
          byId.put((int)field._thriftId, field);
10436
          byName.put(field.getFieldName(), field);
10437
        }
10438
      }
10439
 
10440
      /**
10441
       * Find the _Fields constant that matches fieldId, or null if its not found.
10442
       */
10443
      public static _Fields findByThriftId(int fieldId) {
10444
        return byId.get(fieldId);
10445
      }
10446
 
10447
      /**
10448
       * Find the _Fields constant that matches fieldId, throwing an exception
10449
       * if it is not found.
10450
       */
10451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10452
        _Fields fields = findByThriftId(fieldId);
10453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10454
        return fields;
10455
      }
10456
 
10457
      /**
10458
       * Find the _Fields constant that matches name, or null if its not found.
10459
       */
10460
      public static _Fields findByName(String name) {
10461
        return byName.get(name);
10462
      }
10463
 
10464
      private final short _thriftId;
10465
      private final String _fieldName;
10466
 
10467
      _Fields(short thriftId, String fieldName) {
10468
        _thriftId = thriftId;
10469
        _fieldName = fieldName;
10470
      }
10471
 
10472
      public short getThriftFieldId() {
10473
        return _thriftId;
10474
      }
10475
 
10476
      public String getFieldName() {
10477
        return _fieldName;
10478
      }
10479
    }
10480
 
10481
    // isset id assignments
10482
 
10483
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10484
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 10485
          new ListMetaData(TType.LIST, 
10486
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 10487
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10488
          new FieldValueMetaData(TType.STRUCT)));
10489
    }});
10490
 
10491
    static {
483 rajveer 10492
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 10493
    }
10494
 
483 rajveer 10495
    public getOrdersForTransaction_result() {
68 ashish 10496
    }
10497
 
483 rajveer 10498
    public getOrdersForTransaction_result(
10499
      List<Order> success,
68 ashish 10500
      TransactionServiceException ex)
10501
    {
10502
      this();
10503
      this.success = success;
10504
      this.ex = ex;
10505
    }
10506
 
10507
    /**
10508
     * Performs a deep copy on <i>other</i>.
10509
     */
483 rajveer 10510
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
10511
      if (other.isSetSuccess()) {
10512
        List<Order> __this__success = new ArrayList<Order>();
10513
        for (Order other_element : other.success) {
10514
          __this__success.add(new Order(other_element));
10515
        }
10516
        this.success = __this__success;
10517
      }
68 ashish 10518
      if (other.isSetEx()) {
10519
        this.ex = new TransactionServiceException(other.ex);
10520
      }
10521
    }
10522
 
483 rajveer 10523
    public getOrdersForTransaction_result deepCopy() {
10524
      return new getOrdersForTransaction_result(this);
68 ashish 10525
    }
10526
 
10527
    @Deprecated
483 rajveer 10528
    public getOrdersForTransaction_result clone() {
10529
      return new getOrdersForTransaction_result(this);
68 ashish 10530
    }
10531
 
483 rajveer 10532
    public int getSuccessSize() {
10533
      return (this.success == null) ? 0 : this.success.size();
10534
    }
10535
 
10536
    public java.util.Iterator<Order> getSuccessIterator() {
10537
      return (this.success == null) ? null : this.success.iterator();
10538
    }
10539
 
10540
    public void addToSuccess(Order elem) {
10541
      if (this.success == null) {
10542
        this.success = new ArrayList<Order>();
10543
      }
10544
      this.success.add(elem);
10545
    }
10546
 
10547
    public List<Order> getSuccess() {
68 ashish 10548
      return this.success;
10549
    }
10550
 
483 rajveer 10551
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 10552
      this.success = success;
10553
      return this;
10554
    }
10555
 
10556
    public void unsetSuccess() {
483 rajveer 10557
      this.success = null;
68 ashish 10558
    }
10559
 
10560
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10561
    public boolean isSetSuccess() {
483 rajveer 10562
      return this.success != null;
68 ashish 10563
    }
10564
 
10565
    public void setSuccessIsSet(boolean value) {
483 rajveer 10566
      if (!value) {
10567
        this.success = null;
10568
      }
68 ashish 10569
    }
10570
 
10571
    public TransactionServiceException getEx() {
10572
      return this.ex;
10573
    }
10574
 
483 rajveer 10575
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 10576
      this.ex = ex;
10577
      return this;
10578
    }
10579
 
10580
    public void unsetEx() {
10581
      this.ex = null;
10582
    }
10583
 
10584
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10585
    public boolean isSetEx() {
10586
      return this.ex != null;
10587
    }
10588
 
10589
    public void setExIsSet(boolean value) {
10590
      if (!value) {
10591
        this.ex = null;
10592
      }
10593
    }
10594
 
10595
    public void setFieldValue(_Fields field, Object value) {
10596
      switch (field) {
10597
      case SUCCESS:
10598
        if (value == null) {
10599
          unsetSuccess();
10600
        } else {
483 rajveer 10601
          setSuccess((List<Order>)value);
68 ashish 10602
        }
10603
        break;
10604
 
10605
      case EX:
10606
        if (value == null) {
10607
          unsetEx();
10608
        } else {
10609
          setEx((TransactionServiceException)value);
10610
        }
10611
        break;
10612
 
10613
      }
10614
    }
10615
 
10616
    public void setFieldValue(int fieldID, Object value) {
10617
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10618
    }
10619
 
10620
    public Object getFieldValue(_Fields field) {
10621
      switch (field) {
10622
      case SUCCESS:
483 rajveer 10623
        return getSuccess();
68 ashish 10624
 
10625
      case EX:
10626
        return getEx();
10627
 
10628
      }
10629
      throw new IllegalStateException();
10630
    }
10631
 
10632
    public Object getFieldValue(int fieldId) {
10633
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10634
    }
10635
 
10636
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10637
    public boolean isSet(_Fields field) {
10638
      switch (field) {
10639
      case SUCCESS:
10640
        return isSetSuccess();
10641
      case EX:
10642
        return isSetEx();
10643
      }
10644
      throw new IllegalStateException();
10645
    }
10646
 
10647
    public boolean isSet(int fieldID) {
10648
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10649
    }
10650
 
10651
    @Override
10652
    public boolean equals(Object that) {
10653
      if (that == null)
10654
        return false;
483 rajveer 10655
      if (that instanceof getOrdersForTransaction_result)
10656
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 10657
      return false;
10658
    }
10659
 
483 rajveer 10660
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 10661
      if (that == null)
10662
        return false;
10663
 
483 rajveer 10664
      boolean this_present_success = true && this.isSetSuccess();
10665
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 10666
      if (this_present_success || that_present_success) {
10667
        if (!(this_present_success && that_present_success))
10668
          return false;
483 rajveer 10669
        if (!this.success.equals(that.success))
68 ashish 10670
          return false;
10671
      }
10672
 
10673
      boolean this_present_ex = true && this.isSetEx();
10674
      boolean that_present_ex = true && that.isSetEx();
10675
      if (this_present_ex || that_present_ex) {
10676
        if (!(this_present_ex && that_present_ex))
10677
          return false;
10678
        if (!this.ex.equals(that.ex))
10679
          return false;
10680
      }
10681
 
10682
      return true;
10683
    }
10684
 
10685
    @Override
10686
    public int hashCode() {
10687
      return 0;
10688
    }
10689
 
483 rajveer 10690
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 10691
      if (!getClass().equals(other.getClass())) {
10692
        return getClass().getName().compareTo(other.getClass().getName());
10693
      }
10694
 
10695
      int lastComparison = 0;
483 rajveer 10696
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 10697
 
10698
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10699
      if (lastComparison != 0) {
10700
        return lastComparison;
10701
      }
10702
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10703
      if (lastComparison != 0) {
10704
        return lastComparison;
10705
      }
10706
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10707
      if (lastComparison != 0) {
10708
        return lastComparison;
10709
      }
10710
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10711
      if (lastComparison != 0) {
10712
        return lastComparison;
10713
      }
10714
      return 0;
10715
    }
10716
 
10717
    public void read(TProtocol iprot) throws TException {
10718
      TField field;
10719
      iprot.readStructBegin();
10720
      while (true)
10721
      {
10722
        field = iprot.readFieldBegin();
10723
        if (field.type == TType.STOP) { 
10724
          break;
10725
        }
10726
        _Fields fieldId = _Fields.findByThriftId(field.id);
10727
        if (fieldId == null) {
10728
          TProtocolUtil.skip(iprot, field.type);
10729
        } else {
10730
          switch (fieldId) {
10731
            case SUCCESS:
483 rajveer 10732
              if (field.type == TType.LIST) {
10733
                {
684 chandransh 10734
                  TList _list20 = iprot.readListBegin();
10735
                  this.success = new ArrayList<Order>(_list20.size);
10736
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
483 rajveer 10737
                  {
684 chandransh 10738
                    Order _elem22;
10739
                    _elem22 = new Order();
10740
                    _elem22.read(iprot);
10741
                    this.success.add(_elem22);
483 rajveer 10742
                  }
10743
                  iprot.readListEnd();
10744
                }
68 ashish 10745
              } else { 
10746
                TProtocolUtil.skip(iprot, field.type);
10747
              }
10748
              break;
10749
            case EX:
10750
              if (field.type == TType.STRUCT) {
10751
                this.ex = new TransactionServiceException();
10752
                this.ex.read(iprot);
10753
              } else { 
10754
                TProtocolUtil.skip(iprot, field.type);
10755
              }
10756
              break;
10757
          }
10758
          iprot.readFieldEnd();
10759
        }
10760
      }
10761
      iprot.readStructEnd();
10762
      validate();
10763
    }
10764
 
10765
    public void write(TProtocol oprot) throws TException {
10766
      oprot.writeStructBegin(STRUCT_DESC);
10767
 
10768
      if (this.isSetSuccess()) {
10769
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 10770
        {
10771
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 10772
          for (Order _iter23 : this.success)
483 rajveer 10773
          {
684 chandransh 10774
            _iter23.write(oprot);
483 rajveer 10775
          }
10776
          oprot.writeListEnd();
10777
        }
68 ashish 10778
        oprot.writeFieldEnd();
10779
      } else if (this.isSetEx()) {
10780
        oprot.writeFieldBegin(EX_FIELD_DESC);
10781
        this.ex.write(oprot);
10782
        oprot.writeFieldEnd();
10783
      }
10784
      oprot.writeFieldStop();
10785
      oprot.writeStructEnd();
10786
    }
10787
 
10788
    @Override
10789
    public String toString() {
483 rajveer 10790
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 10791
      boolean first = true;
10792
 
10793
      sb.append("success:");
483 rajveer 10794
      if (this.success == null) {
10795
        sb.append("null");
10796
      } else {
10797
        sb.append(this.success);
10798
      }
68 ashish 10799
      first = false;
10800
      if (!first) sb.append(", ");
10801
      sb.append("ex:");
10802
      if (this.ex == null) {
10803
        sb.append("null");
10804
      } else {
10805
        sb.append(this.ex);
10806
      }
10807
      first = false;
10808
      sb.append(")");
10809
      return sb.toString();
10810
    }
10811
 
10812
    public void validate() throws TException {
10813
      // check for required fields
10814
    }
10815
 
10816
  }
10817
 
483 rajveer 10818
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
10819
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 10820
 
483 rajveer 10821
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
10822
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
10823
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
10824
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 10825
 
483 rajveer 10826
    private long customerId;
10827
    private long from_date;
10828
    private long to_date;
10829
    private OrderStatus status;
68 ashish 10830
 
10831
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10832
    public enum _Fields implements TFieldIdEnum {
483 rajveer 10833
      CUSTOMER_ID((short)1, "customerId"),
10834
      FROM_DATE((short)2, "from_date"),
10835
      TO_DATE((short)3, "to_date"),
10836
      /**
10837
       * 
10838
       * @see OrderStatus
10839
       */
10840
      STATUS((short)4, "status");
68 ashish 10841
 
10842
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10844
 
10845
      static {
10846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10847
          byId.put((int)field._thriftId, field);
10848
          byName.put(field.getFieldName(), field);
10849
        }
10850
      }
10851
 
10852
      /**
10853
       * Find the _Fields constant that matches fieldId, or null if its not found.
10854
       */
10855
      public static _Fields findByThriftId(int fieldId) {
10856
        return byId.get(fieldId);
10857
      }
10858
 
10859
      /**
10860
       * Find the _Fields constant that matches fieldId, throwing an exception
10861
       * if it is not found.
10862
       */
10863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10864
        _Fields fields = findByThriftId(fieldId);
10865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10866
        return fields;
10867
      }
10868
 
10869
      /**
10870
       * Find the _Fields constant that matches name, or null if its not found.
10871
       */
10872
      public static _Fields findByName(String name) {
10873
        return byName.get(name);
10874
      }
10875
 
10876
      private final short _thriftId;
10877
      private final String _fieldName;
10878
 
10879
      _Fields(short thriftId, String fieldName) {
10880
        _thriftId = thriftId;
10881
        _fieldName = fieldName;
10882
      }
10883
 
10884
      public short getThriftFieldId() {
10885
        return _thriftId;
10886
      }
10887
 
10888
      public String getFieldName() {
10889
        return _fieldName;
10890
      }
10891
    }
10892
 
10893
    // isset id assignments
483 rajveer 10894
    private static final int __CUSTOMERID_ISSET_ID = 0;
10895
    private static final int __FROM_DATE_ISSET_ID = 1;
10896
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 10897
    private BitSet __isset_bit_vector = new BitSet(3);
10898
 
10899
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 10900
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 10901
          new FieldValueMetaData(TType.I64)));
483 rajveer 10902
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 10903
          new FieldValueMetaData(TType.I64)));
483 rajveer 10904
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 10905
          new FieldValueMetaData(TType.I64)));
483 rajveer 10906
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
10907
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 10908
    }});
10909
 
10910
    static {
483 rajveer 10911
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 10912
    }
10913
 
483 rajveer 10914
    public getOrdersForCustomer_args() {
68 ashish 10915
    }
10916
 
483 rajveer 10917
    public getOrdersForCustomer_args(
10918
      long customerId,
10919
      long from_date,
10920
      long to_date,
10921
      OrderStatus status)
68 ashish 10922
    {
10923
      this();
483 rajveer 10924
      this.customerId = customerId;
10925
      setCustomerIdIsSet(true);
10926
      this.from_date = from_date;
10927
      setFrom_dateIsSet(true);
10928
      this.to_date = to_date;
10929
      setTo_dateIsSet(true);
10930
      this.status = status;
68 ashish 10931
    }
10932
 
10933
    /**
10934
     * Performs a deep copy on <i>other</i>.
10935
     */
483 rajveer 10936
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 10937
      __isset_bit_vector.clear();
10938
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 10939
      this.customerId = other.customerId;
10940
      this.from_date = other.from_date;
10941
      this.to_date = other.to_date;
10942
      if (other.isSetStatus()) {
10943
        this.status = other.status;
10944
      }
68 ashish 10945
    }
10946
 
483 rajveer 10947
    public getOrdersForCustomer_args deepCopy() {
10948
      return new getOrdersForCustomer_args(this);
68 ashish 10949
    }
10950
 
10951
    @Deprecated
483 rajveer 10952
    public getOrdersForCustomer_args clone() {
10953
      return new getOrdersForCustomer_args(this);
68 ashish 10954
    }
10955
 
483 rajveer 10956
    public long getCustomerId() {
10957
      return this.customerId;
68 ashish 10958
    }
10959
 
483 rajveer 10960
    public getOrdersForCustomer_args setCustomerId(long customerId) {
10961
      this.customerId = customerId;
10962
      setCustomerIdIsSet(true);
68 ashish 10963
      return this;
10964
    }
10965
 
483 rajveer 10966
    public void unsetCustomerId() {
10967
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 10968
    }
10969
 
483 rajveer 10970
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
10971
    public boolean isSetCustomerId() {
10972
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 10973
    }
10974
 
483 rajveer 10975
    public void setCustomerIdIsSet(boolean value) {
10976
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 10977
    }
10978
 
483 rajveer 10979
    public long getFrom_date() {
10980
      return this.from_date;
68 ashish 10981
    }
10982
 
483 rajveer 10983
    public getOrdersForCustomer_args setFrom_date(long from_date) {
10984
      this.from_date = from_date;
10985
      setFrom_dateIsSet(true);
68 ashish 10986
      return this;
10987
    }
10988
 
483 rajveer 10989
    public void unsetFrom_date() {
10990
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 10991
    }
10992
 
483 rajveer 10993
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
10994
    public boolean isSetFrom_date() {
10995
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 10996
    }
10997
 
483 rajveer 10998
    public void setFrom_dateIsSet(boolean value) {
10999
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 11000
    }
11001
 
483 rajveer 11002
    public long getTo_date() {
11003
      return this.to_date;
68 ashish 11004
    }
11005
 
483 rajveer 11006
    public getOrdersForCustomer_args setTo_date(long to_date) {
11007
      this.to_date = to_date;
11008
      setTo_dateIsSet(true);
68 ashish 11009
      return this;
11010
    }
11011
 
483 rajveer 11012
    public void unsetTo_date() {
11013
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 11014
    }
11015
 
483 rajveer 11016
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
11017
    public boolean isSetTo_date() {
11018
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 11019
    }
11020
 
483 rajveer 11021
    public void setTo_dateIsSet(boolean value) {
11022
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 11023
    }
11024
 
483 rajveer 11025
    /**
11026
     * 
11027
     * @see OrderStatus
11028
     */
11029
    public OrderStatus getStatus() {
11030
      return this.status;
11031
    }
11032
 
11033
    /**
11034
     * 
11035
     * @see OrderStatus
11036
     */
11037
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
11038
      this.status = status;
11039
      return this;
11040
    }
11041
 
11042
    public void unsetStatus() {
11043
      this.status = null;
11044
    }
11045
 
11046
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11047
    public boolean isSetStatus() {
11048
      return this.status != null;
11049
    }
11050
 
11051
    public void setStatusIsSet(boolean value) {
11052
      if (!value) {
11053
        this.status = null;
11054
      }
11055
    }
11056
 
68 ashish 11057
    public void setFieldValue(_Fields field, Object value) {
11058
      switch (field) {
483 rajveer 11059
      case CUSTOMER_ID:
68 ashish 11060
        if (value == null) {
483 rajveer 11061
          unsetCustomerId();
68 ashish 11062
        } else {
483 rajveer 11063
          setCustomerId((Long)value);
68 ashish 11064
        }
11065
        break;
11066
 
483 rajveer 11067
      case FROM_DATE:
68 ashish 11068
        if (value == null) {
483 rajveer 11069
          unsetFrom_date();
68 ashish 11070
        } else {
483 rajveer 11071
          setFrom_date((Long)value);
68 ashish 11072
        }
11073
        break;
11074
 
483 rajveer 11075
      case TO_DATE:
68 ashish 11076
        if (value == null) {
483 rajveer 11077
          unsetTo_date();
68 ashish 11078
        } else {
483 rajveer 11079
          setTo_date((Long)value);
68 ashish 11080
        }
11081
        break;
11082
 
483 rajveer 11083
      case STATUS:
11084
        if (value == null) {
11085
          unsetStatus();
11086
        } else {
11087
          setStatus((OrderStatus)value);
11088
        }
11089
        break;
11090
 
68 ashish 11091
      }
11092
    }
11093
 
11094
    public void setFieldValue(int fieldID, Object value) {
11095
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11096
    }
11097
 
11098
    public Object getFieldValue(_Fields field) {
11099
      switch (field) {
483 rajveer 11100
      case CUSTOMER_ID:
11101
        return new Long(getCustomerId());
68 ashish 11102
 
483 rajveer 11103
      case FROM_DATE:
11104
        return new Long(getFrom_date());
68 ashish 11105
 
483 rajveer 11106
      case TO_DATE:
11107
        return new Long(getTo_date());
68 ashish 11108
 
483 rajveer 11109
      case STATUS:
11110
        return getStatus();
11111
 
68 ashish 11112
      }
11113
      throw new IllegalStateException();
11114
    }
11115
 
11116
    public Object getFieldValue(int fieldId) {
11117
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11118
    }
11119
 
11120
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11121
    public boolean isSet(_Fields field) {
11122
      switch (field) {
483 rajveer 11123
      case CUSTOMER_ID:
11124
        return isSetCustomerId();
11125
      case FROM_DATE:
11126
        return isSetFrom_date();
11127
      case TO_DATE:
11128
        return isSetTo_date();
11129
      case STATUS:
11130
        return isSetStatus();
68 ashish 11131
      }
11132
      throw new IllegalStateException();
11133
    }
11134
 
11135
    public boolean isSet(int fieldID) {
11136
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11137
    }
11138
 
11139
    @Override
11140
    public boolean equals(Object that) {
11141
      if (that == null)
11142
        return false;
483 rajveer 11143
      if (that instanceof getOrdersForCustomer_args)
11144
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 11145
      return false;
11146
    }
11147
 
483 rajveer 11148
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 11149
      if (that == null)
11150
        return false;
11151
 
483 rajveer 11152
      boolean this_present_customerId = true;
11153
      boolean that_present_customerId = true;
11154
      if (this_present_customerId || that_present_customerId) {
11155
        if (!(this_present_customerId && that_present_customerId))
68 ashish 11156
          return false;
483 rajveer 11157
        if (this.customerId != that.customerId)
68 ashish 11158
          return false;
11159
      }
11160
 
483 rajveer 11161
      boolean this_present_from_date = true;
11162
      boolean that_present_from_date = true;
11163
      if (this_present_from_date || that_present_from_date) {
11164
        if (!(this_present_from_date && that_present_from_date))
68 ashish 11165
          return false;
483 rajveer 11166
        if (this.from_date != that.from_date)
68 ashish 11167
          return false;
11168
      }
11169
 
483 rajveer 11170
      boolean this_present_to_date = true;
11171
      boolean that_present_to_date = true;
11172
      if (this_present_to_date || that_present_to_date) {
11173
        if (!(this_present_to_date && that_present_to_date))
68 ashish 11174
          return false;
483 rajveer 11175
        if (this.to_date != that.to_date)
68 ashish 11176
          return false;
11177
      }
11178
 
483 rajveer 11179
      boolean this_present_status = true && this.isSetStatus();
11180
      boolean that_present_status = true && that.isSetStatus();
11181
      if (this_present_status || that_present_status) {
11182
        if (!(this_present_status && that_present_status))
11183
          return false;
11184
        if (!this.status.equals(that.status))
11185
          return false;
11186
      }
11187
 
68 ashish 11188
      return true;
11189
    }
11190
 
11191
    @Override
11192
    public int hashCode() {
11193
      return 0;
11194
    }
11195
 
483 rajveer 11196
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 11197
      if (!getClass().equals(other.getClass())) {
11198
        return getClass().getName().compareTo(other.getClass().getName());
11199
      }
11200
 
11201
      int lastComparison = 0;
483 rajveer 11202
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 11203
 
483 rajveer 11204
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 11205
      if (lastComparison != 0) {
11206
        return lastComparison;
11207
      }
483 rajveer 11208
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 11209
      if (lastComparison != 0) {
11210
        return lastComparison;
11211
      }
483 rajveer 11212
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 11213
      if (lastComparison != 0) {
11214
        return lastComparison;
11215
      }
483 rajveer 11216
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 11217
      if (lastComparison != 0) {
11218
        return lastComparison;
11219
      }
483 rajveer 11220
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 11221
      if (lastComparison != 0) {
11222
        return lastComparison;
11223
      }
483 rajveer 11224
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 11225
      if (lastComparison != 0) {
11226
        return lastComparison;
11227
      }
483 rajveer 11228
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11229
      if (lastComparison != 0) {
11230
        return lastComparison;
11231
      }
11232
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11233
      if (lastComparison != 0) {
11234
        return lastComparison;
11235
      }
68 ashish 11236
      return 0;
11237
    }
11238
 
11239
    public void read(TProtocol iprot) throws TException {
11240
      TField field;
11241
      iprot.readStructBegin();
11242
      while (true)
11243
      {
11244
        field = iprot.readFieldBegin();
11245
        if (field.type == TType.STOP) { 
11246
          break;
11247
        }
11248
        _Fields fieldId = _Fields.findByThriftId(field.id);
11249
        if (fieldId == null) {
11250
          TProtocolUtil.skip(iprot, field.type);
11251
        } else {
11252
          switch (fieldId) {
483 rajveer 11253
            case CUSTOMER_ID:
68 ashish 11254
              if (field.type == TType.I64) {
483 rajveer 11255
                this.customerId = iprot.readI64();
11256
                setCustomerIdIsSet(true);
68 ashish 11257
              } else { 
11258
                TProtocolUtil.skip(iprot, field.type);
11259
              }
11260
              break;
483 rajveer 11261
            case FROM_DATE:
68 ashish 11262
              if (field.type == TType.I64) {
483 rajveer 11263
                this.from_date = iprot.readI64();
11264
                setFrom_dateIsSet(true);
68 ashish 11265
              } else { 
11266
                TProtocolUtil.skip(iprot, field.type);
11267
              }
11268
              break;
483 rajveer 11269
            case TO_DATE:
68 ashish 11270
              if (field.type == TType.I64) {
483 rajveer 11271
                this.to_date = iprot.readI64();
11272
                setTo_dateIsSet(true);
68 ashish 11273
              } else { 
11274
                TProtocolUtil.skip(iprot, field.type);
11275
              }
11276
              break;
483 rajveer 11277
            case STATUS:
11278
              if (field.type == TType.I32) {
11279
                this.status = OrderStatus.findByValue(iprot.readI32());
11280
              } else { 
11281
                TProtocolUtil.skip(iprot, field.type);
11282
              }
11283
              break;
68 ashish 11284
          }
11285
          iprot.readFieldEnd();
11286
        }
11287
      }
11288
      iprot.readStructEnd();
11289
      validate();
11290
    }
11291
 
11292
    public void write(TProtocol oprot) throws TException {
11293
      validate();
11294
 
11295
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11296
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11297
      oprot.writeI64(this.customerId);
68 ashish 11298
      oprot.writeFieldEnd();
483 rajveer 11299
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
11300
      oprot.writeI64(this.from_date);
68 ashish 11301
      oprot.writeFieldEnd();
483 rajveer 11302
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
11303
      oprot.writeI64(this.to_date);
68 ashish 11304
      oprot.writeFieldEnd();
483 rajveer 11305
      if (this.status != null) {
11306
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11307
        oprot.writeI32(this.status.getValue());
11308
        oprot.writeFieldEnd();
11309
      }
68 ashish 11310
      oprot.writeFieldStop();
11311
      oprot.writeStructEnd();
11312
    }
11313
 
11314
    @Override
11315
    public String toString() {
483 rajveer 11316
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 11317
      boolean first = true;
11318
 
483 rajveer 11319
      sb.append("customerId:");
11320
      sb.append(this.customerId);
68 ashish 11321
      first = false;
11322
      if (!first) sb.append(", ");
483 rajveer 11323
      sb.append("from_date:");
11324
      sb.append(this.from_date);
68 ashish 11325
      first = false;
11326
      if (!first) sb.append(", ");
483 rajveer 11327
      sb.append("to_date:");
11328
      sb.append(this.to_date);
68 ashish 11329
      first = false;
483 rajveer 11330
      if (!first) sb.append(", ");
11331
      sb.append("status:");
11332
      if (this.status == null) {
11333
        sb.append("null");
11334
      } else {
11335
        String status_name = status.name();
11336
        if (status_name != null) {
11337
          sb.append(status_name);
11338
          sb.append(" (");
11339
        }
11340
        sb.append(this.status);
11341
        if (status_name != null) {
11342
          sb.append(")");
11343
        }
11344
      }
11345
      first = false;
68 ashish 11346
      sb.append(")");
11347
      return sb.toString();
11348
    }
11349
 
11350
    public void validate() throws TException {
11351
      // check for required fields
11352
    }
11353
 
11354
  }
11355
 
483 rajveer 11356
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
11357
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 11358
 
483 rajveer 11359
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 11360
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11361
 
483 rajveer 11362
    private List<Order> success;
68 ashish 11363
    private TransactionServiceException ex;
11364
 
11365
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11366
    public enum _Fields implements TFieldIdEnum {
11367
      SUCCESS((short)0, "success"),
11368
      EX((short)1, "ex");
11369
 
11370
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11371
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11372
 
11373
      static {
11374
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11375
          byId.put((int)field._thriftId, field);
11376
          byName.put(field.getFieldName(), field);
11377
        }
11378
      }
11379
 
11380
      /**
11381
       * Find the _Fields constant that matches fieldId, or null if its not found.
11382
       */
11383
      public static _Fields findByThriftId(int fieldId) {
11384
        return byId.get(fieldId);
11385
      }
11386
 
11387
      /**
11388
       * Find the _Fields constant that matches fieldId, throwing an exception
11389
       * if it is not found.
11390
       */
11391
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11392
        _Fields fields = findByThriftId(fieldId);
11393
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11394
        return fields;
11395
      }
11396
 
11397
      /**
11398
       * Find the _Fields constant that matches name, or null if its not found.
11399
       */
11400
      public static _Fields findByName(String name) {
11401
        return byName.get(name);
11402
      }
11403
 
11404
      private final short _thriftId;
11405
      private final String _fieldName;
11406
 
11407
      _Fields(short thriftId, String fieldName) {
11408
        _thriftId = thriftId;
11409
        _fieldName = fieldName;
11410
      }
11411
 
11412
      public short getThriftFieldId() {
11413
        return _thriftId;
11414
      }
11415
 
11416
      public String getFieldName() {
11417
        return _fieldName;
11418
      }
11419
    }
11420
 
11421
    // isset id assignments
11422
 
11423
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11424
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 11425
          new ListMetaData(TType.LIST, 
11426
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 11427
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11428
          new FieldValueMetaData(TType.STRUCT)));
11429
    }});
11430
 
11431
    static {
483 rajveer 11432
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 11433
    }
11434
 
483 rajveer 11435
    public getOrdersForCustomer_result() {
68 ashish 11436
    }
11437
 
483 rajveer 11438
    public getOrdersForCustomer_result(
11439
      List<Order> success,
68 ashish 11440
      TransactionServiceException ex)
11441
    {
11442
      this();
11443
      this.success = success;
11444
      this.ex = ex;
11445
    }
11446
 
11447
    /**
11448
     * Performs a deep copy on <i>other</i>.
11449
     */
483 rajveer 11450
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
11451
      if (other.isSetSuccess()) {
11452
        List<Order> __this__success = new ArrayList<Order>();
11453
        for (Order other_element : other.success) {
11454
          __this__success.add(new Order(other_element));
11455
        }
11456
        this.success = __this__success;
11457
      }
68 ashish 11458
      if (other.isSetEx()) {
11459
        this.ex = new TransactionServiceException(other.ex);
11460
      }
11461
    }
11462
 
483 rajveer 11463
    public getOrdersForCustomer_result deepCopy() {
11464
      return new getOrdersForCustomer_result(this);
68 ashish 11465
    }
11466
 
11467
    @Deprecated
483 rajveer 11468
    public getOrdersForCustomer_result clone() {
11469
      return new getOrdersForCustomer_result(this);
68 ashish 11470
    }
11471
 
483 rajveer 11472
    public int getSuccessSize() {
11473
      return (this.success == null) ? 0 : this.success.size();
11474
    }
11475
 
11476
    public java.util.Iterator<Order> getSuccessIterator() {
11477
      return (this.success == null) ? null : this.success.iterator();
11478
    }
11479
 
11480
    public void addToSuccess(Order elem) {
11481
      if (this.success == null) {
11482
        this.success = new ArrayList<Order>();
11483
      }
11484
      this.success.add(elem);
11485
    }
11486
 
11487
    public List<Order> getSuccess() {
68 ashish 11488
      return this.success;
11489
    }
11490
 
483 rajveer 11491
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 11492
      this.success = success;
11493
      return this;
11494
    }
11495
 
11496
    public void unsetSuccess() {
483 rajveer 11497
      this.success = null;
68 ashish 11498
    }
11499
 
11500
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11501
    public boolean isSetSuccess() {
483 rajveer 11502
      return this.success != null;
68 ashish 11503
    }
11504
 
11505
    public void setSuccessIsSet(boolean value) {
483 rajveer 11506
      if (!value) {
11507
        this.success = null;
11508
      }
68 ashish 11509
    }
11510
 
11511
    public TransactionServiceException getEx() {
11512
      return this.ex;
11513
    }
11514
 
483 rajveer 11515
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 11516
      this.ex = ex;
11517
      return this;
11518
    }
11519
 
11520
    public void unsetEx() {
11521
      this.ex = null;
11522
    }
11523
 
11524
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11525
    public boolean isSetEx() {
11526
      return this.ex != null;
11527
    }
11528
 
11529
    public void setExIsSet(boolean value) {
11530
      if (!value) {
11531
        this.ex = null;
11532
      }
11533
    }
11534
 
11535
    public void setFieldValue(_Fields field, Object value) {
11536
      switch (field) {
11537
      case SUCCESS:
11538
        if (value == null) {
11539
          unsetSuccess();
11540
        } else {
483 rajveer 11541
          setSuccess((List<Order>)value);
68 ashish 11542
        }
11543
        break;
11544
 
11545
      case EX:
11546
        if (value == null) {
11547
          unsetEx();
11548
        } else {
11549
          setEx((TransactionServiceException)value);
11550
        }
11551
        break;
11552
 
11553
      }
11554
    }
11555
 
11556
    public void setFieldValue(int fieldID, Object value) {
11557
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11558
    }
11559
 
11560
    public Object getFieldValue(_Fields field) {
11561
      switch (field) {
11562
      case SUCCESS:
483 rajveer 11563
        return getSuccess();
68 ashish 11564
 
11565
      case EX:
11566
        return getEx();
11567
 
11568
      }
11569
      throw new IllegalStateException();
11570
    }
11571
 
11572
    public Object getFieldValue(int fieldId) {
11573
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11574
    }
11575
 
11576
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11577
    public boolean isSet(_Fields field) {
11578
      switch (field) {
11579
      case SUCCESS:
11580
        return isSetSuccess();
11581
      case EX:
11582
        return isSetEx();
11583
      }
11584
      throw new IllegalStateException();
11585
    }
11586
 
11587
    public boolean isSet(int fieldID) {
11588
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11589
    }
11590
 
11591
    @Override
11592
    public boolean equals(Object that) {
11593
      if (that == null)
11594
        return false;
483 rajveer 11595
      if (that instanceof getOrdersForCustomer_result)
11596
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 11597
      return false;
11598
    }
11599
 
483 rajveer 11600
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 11601
      if (that == null)
11602
        return false;
11603
 
483 rajveer 11604
      boolean this_present_success = true && this.isSetSuccess();
11605
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 11606
      if (this_present_success || that_present_success) {
11607
        if (!(this_present_success && that_present_success))
11608
          return false;
483 rajveer 11609
        if (!this.success.equals(that.success))
68 ashish 11610
          return false;
11611
      }
11612
 
11613
      boolean this_present_ex = true && this.isSetEx();
11614
      boolean that_present_ex = true && that.isSetEx();
11615
      if (this_present_ex || that_present_ex) {
11616
        if (!(this_present_ex && that_present_ex))
11617
          return false;
11618
        if (!this.ex.equals(that.ex))
11619
          return false;
11620
      }
11621
 
11622
      return true;
11623
    }
11624
 
11625
    @Override
11626
    public int hashCode() {
11627
      return 0;
11628
    }
11629
 
483 rajveer 11630
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 11631
      if (!getClass().equals(other.getClass())) {
11632
        return getClass().getName().compareTo(other.getClass().getName());
11633
      }
11634
 
11635
      int lastComparison = 0;
483 rajveer 11636
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 11637
 
11638
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11639
      if (lastComparison != 0) {
11640
        return lastComparison;
11641
      }
11642
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11643
      if (lastComparison != 0) {
11644
        return lastComparison;
11645
      }
11646
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11647
      if (lastComparison != 0) {
11648
        return lastComparison;
11649
      }
11650
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11651
      if (lastComparison != 0) {
11652
        return lastComparison;
11653
      }
11654
      return 0;
11655
    }
11656
 
11657
    public void read(TProtocol iprot) throws TException {
11658
      TField field;
11659
      iprot.readStructBegin();
11660
      while (true)
11661
      {
11662
        field = iprot.readFieldBegin();
11663
        if (field.type == TType.STOP) { 
11664
          break;
11665
        }
11666
        _Fields fieldId = _Fields.findByThriftId(field.id);
11667
        if (fieldId == null) {
11668
          TProtocolUtil.skip(iprot, field.type);
11669
        } else {
11670
          switch (fieldId) {
11671
            case SUCCESS:
483 rajveer 11672
              if (field.type == TType.LIST) {
11673
                {
684 chandransh 11674
                  TList _list24 = iprot.readListBegin();
11675
                  this.success = new ArrayList<Order>(_list24.size);
11676
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 11677
                  {
684 chandransh 11678
                    Order _elem26;
11679
                    _elem26 = new Order();
11680
                    _elem26.read(iprot);
11681
                    this.success.add(_elem26);
483 rajveer 11682
                  }
11683
                  iprot.readListEnd();
11684
                }
68 ashish 11685
              } else { 
11686
                TProtocolUtil.skip(iprot, field.type);
11687
              }
11688
              break;
11689
            case EX:
11690
              if (field.type == TType.STRUCT) {
11691
                this.ex = new TransactionServiceException();
11692
                this.ex.read(iprot);
11693
              } else { 
11694
                TProtocolUtil.skip(iprot, field.type);
11695
              }
11696
              break;
11697
          }
11698
          iprot.readFieldEnd();
11699
        }
11700
      }
11701
      iprot.readStructEnd();
11702
      validate();
11703
    }
11704
 
11705
    public void write(TProtocol oprot) throws TException {
11706
      oprot.writeStructBegin(STRUCT_DESC);
11707
 
11708
      if (this.isSetSuccess()) {
11709
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 11710
        {
11711
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 11712
          for (Order _iter27 : this.success)
483 rajveer 11713
          {
684 chandransh 11714
            _iter27.write(oprot);
483 rajveer 11715
          }
11716
          oprot.writeListEnd();
11717
        }
68 ashish 11718
        oprot.writeFieldEnd();
11719
      } else if (this.isSetEx()) {
11720
        oprot.writeFieldBegin(EX_FIELD_DESC);
11721
        this.ex.write(oprot);
11722
        oprot.writeFieldEnd();
11723
      }
11724
      oprot.writeFieldStop();
11725
      oprot.writeStructEnd();
11726
    }
11727
 
11728
    @Override
11729
    public String toString() {
483 rajveer 11730
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 11731
      boolean first = true;
11732
 
11733
      sb.append("success:");
483 rajveer 11734
      if (this.success == null) {
11735
        sb.append("null");
11736
      } else {
11737
        sb.append(this.success);
11738
      }
68 ashish 11739
      first = false;
11740
      if (!first) sb.append(", ");
11741
      sb.append("ex:");
11742
      if (this.ex == null) {
11743
        sb.append("null");
11744
      } else {
11745
        sb.append(this.ex);
11746
      }
11747
      first = false;
11748
      sb.append(")");
11749
      return sb.toString();
11750
    }
11751
 
11752
    public void validate() throws TException {
11753
      // check for required fields
11754
    }
11755
 
11756
  }
11757
 
483 rajveer 11758
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
11759
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 11760
 
483 rajveer 11761
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 11762
 
483 rajveer 11763
    private Order order;
68 ashish 11764
 
11765
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11766
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11767
      ORDER((short)1, "order");
68 ashish 11768
 
11769
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11770
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11771
 
11772
      static {
11773
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11774
          byId.put((int)field._thriftId, field);
11775
          byName.put(field.getFieldName(), field);
11776
        }
11777
      }
11778
 
11779
      /**
11780
       * Find the _Fields constant that matches fieldId, or null if its not found.
11781
       */
11782
      public static _Fields findByThriftId(int fieldId) {
11783
        return byId.get(fieldId);
11784
      }
11785
 
11786
      /**
11787
       * Find the _Fields constant that matches fieldId, throwing an exception
11788
       * if it is not found.
11789
       */
11790
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11791
        _Fields fields = findByThriftId(fieldId);
11792
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11793
        return fields;
11794
      }
11795
 
11796
      /**
11797
       * Find the _Fields constant that matches name, or null if its not found.
11798
       */
11799
      public static _Fields findByName(String name) {
11800
        return byName.get(name);
11801
      }
11802
 
11803
      private final short _thriftId;
11804
      private final String _fieldName;
11805
 
11806
      _Fields(short thriftId, String fieldName) {
11807
        _thriftId = thriftId;
11808
        _fieldName = fieldName;
11809
      }
11810
 
11811
      public short getThriftFieldId() {
11812
        return _thriftId;
11813
      }
11814
 
11815
      public String getFieldName() {
11816
        return _fieldName;
11817
      }
11818
    }
11819
 
11820
    // isset id assignments
11821
 
11822
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11823
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
11824
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 11825
    }});
11826
 
11827
    static {
483 rajveer 11828
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 11829
    }
11830
 
483 rajveer 11831
    public createOrder_args() {
68 ashish 11832
    }
11833
 
483 rajveer 11834
    public createOrder_args(
11835
      Order order)
68 ashish 11836
    {
11837
      this();
483 rajveer 11838
      this.order = order;
68 ashish 11839
    }
11840
 
11841
    /**
11842
     * Performs a deep copy on <i>other</i>.
11843
     */
483 rajveer 11844
    public createOrder_args(createOrder_args other) {
11845
      if (other.isSetOrder()) {
11846
        this.order = new Order(other.order);
11847
      }
68 ashish 11848
    }
11849
 
483 rajveer 11850
    public createOrder_args deepCopy() {
11851
      return new createOrder_args(this);
68 ashish 11852
    }
11853
 
11854
    @Deprecated
483 rajveer 11855
    public createOrder_args clone() {
11856
      return new createOrder_args(this);
68 ashish 11857
    }
11858
 
483 rajveer 11859
    public Order getOrder() {
11860
      return this.order;
68 ashish 11861
    }
11862
 
483 rajveer 11863
    public createOrder_args setOrder(Order order) {
11864
      this.order = order;
68 ashish 11865
      return this;
11866
    }
11867
 
483 rajveer 11868
    public void unsetOrder() {
11869
      this.order = null;
68 ashish 11870
    }
11871
 
483 rajveer 11872
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
11873
    public boolean isSetOrder() {
11874
      return this.order != null;
68 ashish 11875
    }
11876
 
483 rajveer 11877
    public void setOrderIsSet(boolean value) {
11878
      if (!value) {
11879
        this.order = null;
11880
      }
68 ashish 11881
    }
11882
 
11883
    public void setFieldValue(_Fields field, Object value) {
11884
      switch (field) {
483 rajveer 11885
      case ORDER:
68 ashish 11886
        if (value == null) {
483 rajveer 11887
          unsetOrder();
68 ashish 11888
        } else {
483 rajveer 11889
          setOrder((Order)value);
68 ashish 11890
        }
11891
        break;
11892
 
11893
      }
11894
    }
11895
 
11896
    public void setFieldValue(int fieldID, Object value) {
11897
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11898
    }
11899
 
11900
    public Object getFieldValue(_Fields field) {
11901
      switch (field) {
483 rajveer 11902
      case ORDER:
11903
        return getOrder();
68 ashish 11904
 
11905
      }
11906
      throw new IllegalStateException();
11907
    }
11908
 
11909
    public Object getFieldValue(int fieldId) {
11910
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11911
    }
11912
 
11913
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11914
    public boolean isSet(_Fields field) {
11915
      switch (field) {
483 rajveer 11916
      case ORDER:
11917
        return isSetOrder();
68 ashish 11918
      }
11919
      throw new IllegalStateException();
11920
    }
11921
 
11922
    public boolean isSet(int fieldID) {
11923
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11924
    }
11925
 
11926
    @Override
11927
    public boolean equals(Object that) {
11928
      if (that == null)
11929
        return false;
483 rajveer 11930
      if (that instanceof createOrder_args)
11931
        return this.equals((createOrder_args)that);
68 ashish 11932
      return false;
11933
    }
11934
 
483 rajveer 11935
    public boolean equals(createOrder_args that) {
68 ashish 11936
      if (that == null)
11937
        return false;
11938
 
483 rajveer 11939
      boolean this_present_order = true && this.isSetOrder();
11940
      boolean that_present_order = true && that.isSetOrder();
11941
      if (this_present_order || that_present_order) {
11942
        if (!(this_present_order && that_present_order))
68 ashish 11943
          return false;
483 rajveer 11944
        if (!this.order.equals(that.order))
68 ashish 11945
          return false;
11946
      }
11947
 
11948
      return true;
11949
    }
11950
 
11951
    @Override
11952
    public int hashCode() {
11953
      return 0;
11954
    }
11955
 
483 rajveer 11956
    public int compareTo(createOrder_args other) {
68 ashish 11957
      if (!getClass().equals(other.getClass())) {
11958
        return getClass().getName().compareTo(other.getClass().getName());
11959
      }
11960
 
11961
      int lastComparison = 0;
483 rajveer 11962
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 11963
 
483 rajveer 11964
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 11965
      if (lastComparison != 0) {
11966
        return lastComparison;
11967
      }
483 rajveer 11968
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 11969
      if (lastComparison != 0) {
11970
        return lastComparison;
11971
      }
11972
      return 0;
11973
    }
11974
 
11975
    public void read(TProtocol iprot) throws TException {
11976
      TField field;
11977
      iprot.readStructBegin();
11978
      while (true)
11979
      {
11980
        field = iprot.readFieldBegin();
11981
        if (field.type == TType.STOP) { 
11982
          break;
11983
        }
11984
        _Fields fieldId = _Fields.findByThriftId(field.id);
11985
        if (fieldId == null) {
11986
          TProtocolUtil.skip(iprot, field.type);
11987
        } else {
11988
          switch (fieldId) {
483 rajveer 11989
            case ORDER:
11990
              if (field.type == TType.STRUCT) {
11991
                this.order = new Order();
11992
                this.order.read(iprot);
68 ashish 11993
              } else { 
11994
                TProtocolUtil.skip(iprot, field.type);
11995
              }
11996
              break;
11997
          }
11998
          iprot.readFieldEnd();
11999
        }
12000
      }
12001
      iprot.readStructEnd();
12002
      validate();
12003
    }
12004
 
12005
    public void write(TProtocol oprot) throws TException {
12006
      validate();
12007
 
12008
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12009
      if (this.order != null) {
12010
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
12011
        this.order.write(oprot);
12012
        oprot.writeFieldEnd();
12013
      }
68 ashish 12014
      oprot.writeFieldStop();
12015
      oprot.writeStructEnd();
12016
    }
12017
 
12018
    @Override
12019
    public String toString() {
483 rajveer 12020
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 12021
      boolean first = true;
12022
 
483 rajveer 12023
      sb.append("order:");
12024
      if (this.order == null) {
12025
        sb.append("null");
12026
      } else {
12027
        sb.append(this.order);
12028
      }
68 ashish 12029
      first = false;
12030
      sb.append(")");
12031
      return sb.toString();
12032
    }
12033
 
12034
    public void validate() throws TException {
12035
      // check for required fields
12036
    }
12037
 
12038
  }
12039
 
483 rajveer 12040
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
12041
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 12042
 
483 rajveer 12043
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 12044
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12045
 
483 rajveer 12046
    private long success;
68 ashish 12047
    private TransactionServiceException ex;
12048
 
12049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12050
    public enum _Fields implements TFieldIdEnum {
12051
      SUCCESS((short)0, "success"),
12052
      EX((short)1, "ex");
12053
 
12054
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12056
 
12057
      static {
12058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12059
          byId.put((int)field._thriftId, field);
12060
          byName.put(field.getFieldName(), field);
12061
        }
12062
      }
12063
 
12064
      /**
12065
       * Find the _Fields constant that matches fieldId, or null if its not found.
12066
       */
12067
      public static _Fields findByThriftId(int fieldId) {
12068
        return byId.get(fieldId);
12069
      }
12070
 
12071
      /**
12072
       * Find the _Fields constant that matches fieldId, throwing an exception
12073
       * if it is not found.
12074
       */
12075
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12076
        _Fields fields = findByThriftId(fieldId);
12077
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12078
        return fields;
12079
      }
12080
 
12081
      /**
12082
       * Find the _Fields constant that matches name, or null if its not found.
12083
       */
12084
      public static _Fields findByName(String name) {
12085
        return byName.get(name);
12086
      }
12087
 
12088
      private final short _thriftId;
12089
      private final String _fieldName;
12090
 
12091
      _Fields(short thriftId, String fieldName) {
12092
        _thriftId = thriftId;
12093
        _fieldName = fieldName;
12094
      }
12095
 
12096
      public short getThriftFieldId() {
12097
        return _thriftId;
12098
      }
12099
 
12100
      public String getFieldName() {
12101
        return _fieldName;
12102
      }
12103
    }
12104
 
12105
    // isset id assignments
12106
    private static final int __SUCCESS_ISSET_ID = 0;
12107
    private BitSet __isset_bit_vector = new BitSet(1);
12108
 
12109
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12110
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12111
          new FieldValueMetaData(TType.I64)));
68 ashish 12112
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12113
          new FieldValueMetaData(TType.STRUCT)));
12114
    }});
12115
 
12116
    static {
483 rajveer 12117
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 12118
    }
12119
 
483 rajveer 12120
    public createOrder_result() {
68 ashish 12121
    }
12122
 
483 rajveer 12123
    public createOrder_result(
12124
      long success,
68 ashish 12125
      TransactionServiceException ex)
12126
    {
12127
      this();
12128
      this.success = success;
12129
      setSuccessIsSet(true);
12130
      this.ex = ex;
12131
    }
12132
 
12133
    /**
12134
     * Performs a deep copy on <i>other</i>.
12135
     */
483 rajveer 12136
    public createOrder_result(createOrder_result other) {
68 ashish 12137
      __isset_bit_vector.clear();
12138
      __isset_bit_vector.or(other.__isset_bit_vector);
12139
      this.success = other.success;
12140
      if (other.isSetEx()) {
12141
        this.ex = new TransactionServiceException(other.ex);
12142
      }
12143
    }
12144
 
483 rajveer 12145
    public createOrder_result deepCopy() {
12146
      return new createOrder_result(this);
68 ashish 12147
    }
12148
 
12149
    @Deprecated
483 rajveer 12150
    public createOrder_result clone() {
12151
      return new createOrder_result(this);
68 ashish 12152
    }
12153
 
483 rajveer 12154
    public long getSuccess() {
68 ashish 12155
      return this.success;
12156
    }
12157
 
483 rajveer 12158
    public createOrder_result setSuccess(long success) {
68 ashish 12159
      this.success = success;
12160
      setSuccessIsSet(true);
12161
      return this;
12162
    }
12163
 
12164
    public void unsetSuccess() {
12165
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12166
    }
12167
 
12168
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12169
    public boolean isSetSuccess() {
12170
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12171
    }
12172
 
12173
    public void setSuccessIsSet(boolean value) {
12174
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12175
    }
12176
 
12177
    public TransactionServiceException getEx() {
12178
      return this.ex;
12179
    }
12180
 
483 rajveer 12181
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 12182
      this.ex = ex;
12183
      return this;
12184
    }
12185
 
12186
    public void unsetEx() {
12187
      this.ex = null;
12188
    }
12189
 
12190
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12191
    public boolean isSetEx() {
12192
      return this.ex != null;
12193
    }
12194
 
12195
    public void setExIsSet(boolean value) {
12196
      if (!value) {
12197
        this.ex = null;
12198
      }
12199
    }
12200
 
12201
    public void setFieldValue(_Fields field, Object value) {
12202
      switch (field) {
12203
      case SUCCESS:
12204
        if (value == null) {
12205
          unsetSuccess();
12206
        } else {
483 rajveer 12207
          setSuccess((Long)value);
68 ashish 12208
        }
12209
        break;
12210
 
12211
      case EX:
12212
        if (value == null) {
12213
          unsetEx();
12214
        } else {
12215
          setEx((TransactionServiceException)value);
12216
        }
12217
        break;
12218
 
12219
      }
12220
    }
12221
 
12222
    public void setFieldValue(int fieldID, Object value) {
12223
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12224
    }
12225
 
12226
    public Object getFieldValue(_Fields field) {
12227
      switch (field) {
12228
      case SUCCESS:
483 rajveer 12229
        return new Long(getSuccess());
68 ashish 12230
 
12231
      case EX:
12232
        return getEx();
12233
 
12234
      }
12235
      throw new IllegalStateException();
12236
    }
12237
 
12238
    public Object getFieldValue(int fieldId) {
12239
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12240
    }
12241
 
12242
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12243
    public boolean isSet(_Fields field) {
12244
      switch (field) {
12245
      case SUCCESS:
12246
        return isSetSuccess();
12247
      case EX:
12248
        return isSetEx();
12249
      }
12250
      throw new IllegalStateException();
12251
    }
12252
 
12253
    public boolean isSet(int fieldID) {
12254
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12255
    }
12256
 
12257
    @Override
12258
    public boolean equals(Object that) {
12259
      if (that == null)
12260
        return false;
483 rajveer 12261
      if (that instanceof createOrder_result)
12262
        return this.equals((createOrder_result)that);
68 ashish 12263
      return false;
12264
    }
12265
 
483 rajveer 12266
    public boolean equals(createOrder_result that) {
68 ashish 12267
      if (that == null)
12268
        return false;
12269
 
12270
      boolean this_present_success = true;
12271
      boolean that_present_success = true;
12272
      if (this_present_success || that_present_success) {
12273
        if (!(this_present_success && that_present_success))
12274
          return false;
12275
        if (this.success != that.success)
12276
          return false;
12277
      }
12278
 
12279
      boolean this_present_ex = true && this.isSetEx();
12280
      boolean that_present_ex = true && that.isSetEx();
12281
      if (this_present_ex || that_present_ex) {
12282
        if (!(this_present_ex && that_present_ex))
12283
          return false;
12284
        if (!this.ex.equals(that.ex))
12285
          return false;
12286
      }
12287
 
12288
      return true;
12289
    }
12290
 
12291
    @Override
12292
    public int hashCode() {
12293
      return 0;
12294
    }
12295
 
483 rajveer 12296
    public int compareTo(createOrder_result other) {
68 ashish 12297
      if (!getClass().equals(other.getClass())) {
12298
        return getClass().getName().compareTo(other.getClass().getName());
12299
      }
12300
 
12301
      int lastComparison = 0;
483 rajveer 12302
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 12303
 
12304
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12305
      if (lastComparison != 0) {
12306
        return lastComparison;
12307
      }
12308
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12309
      if (lastComparison != 0) {
12310
        return lastComparison;
12311
      }
12312
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12313
      if (lastComparison != 0) {
12314
        return lastComparison;
12315
      }
12316
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12317
      if (lastComparison != 0) {
12318
        return lastComparison;
12319
      }
12320
      return 0;
12321
    }
12322
 
12323
    public void read(TProtocol iprot) throws TException {
12324
      TField field;
12325
      iprot.readStructBegin();
12326
      while (true)
12327
      {
12328
        field = iprot.readFieldBegin();
12329
        if (field.type == TType.STOP) { 
12330
          break;
12331
        }
12332
        _Fields fieldId = _Fields.findByThriftId(field.id);
12333
        if (fieldId == null) {
12334
          TProtocolUtil.skip(iprot, field.type);
12335
        } else {
12336
          switch (fieldId) {
12337
            case SUCCESS:
483 rajveer 12338
              if (field.type == TType.I64) {
12339
                this.success = iprot.readI64();
68 ashish 12340
                setSuccessIsSet(true);
12341
              } else { 
12342
                TProtocolUtil.skip(iprot, field.type);
12343
              }
12344
              break;
12345
            case EX:
12346
              if (field.type == TType.STRUCT) {
12347
                this.ex = new TransactionServiceException();
12348
                this.ex.read(iprot);
12349
              } else { 
12350
                TProtocolUtil.skip(iprot, field.type);
12351
              }
12352
              break;
12353
          }
12354
          iprot.readFieldEnd();
12355
        }
12356
      }
12357
      iprot.readStructEnd();
12358
      validate();
12359
    }
12360
 
12361
    public void write(TProtocol oprot) throws TException {
12362
      oprot.writeStructBegin(STRUCT_DESC);
12363
 
12364
      if (this.isSetSuccess()) {
12365
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12366
        oprot.writeI64(this.success);
68 ashish 12367
        oprot.writeFieldEnd();
12368
      } else if (this.isSetEx()) {
12369
        oprot.writeFieldBegin(EX_FIELD_DESC);
12370
        this.ex.write(oprot);
12371
        oprot.writeFieldEnd();
12372
      }
12373
      oprot.writeFieldStop();
12374
      oprot.writeStructEnd();
12375
    }
12376
 
12377
    @Override
12378
    public String toString() {
483 rajveer 12379
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 12380
      boolean first = true;
12381
 
12382
      sb.append("success:");
12383
      sb.append(this.success);
12384
      first = false;
12385
      if (!first) sb.append(", ");
12386
      sb.append("ex:");
12387
      if (this.ex == null) {
12388
        sb.append("null");
12389
      } else {
12390
        sb.append(this.ex);
12391
      }
12392
      first = false;
12393
      sb.append(")");
12394
      return sb.toString();
12395
    }
12396
 
12397
    public void validate() throws TException {
12398
      // check for required fields
12399
    }
12400
 
12401
  }
12402
 
483 rajveer 12403
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
12404
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 12405
 
483 rajveer 12406
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 12407
 
483 rajveer 12408
    private long id;
68 ashish 12409
 
12410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12411
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12412
      ID((short)1, "id");
68 ashish 12413
 
12414
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12415
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12416
 
12417
      static {
12418
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12419
          byId.put((int)field._thriftId, field);
12420
          byName.put(field.getFieldName(), field);
12421
        }
12422
      }
12423
 
12424
      /**
12425
       * Find the _Fields constant that matches fieldId, or null if its not found.
12426
       */
12427
      public static _Fields findByThriftId(int fieldId) {
12428
        return byId.get(fieldId);
12429
      }
12430
 
12431
      /**
12432
       * Find the _Fields constant that matches fieldId, throwing an exception
12433
       * if it is not found.
12434
       */
12435
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12436
        _Fields fields = findByThriftId(fieldId);
12437
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12438
        return fields;
12439
      }
12440
 
12441
      /**
12442
       * Find the _Fields constant that matches name, or null if its not found.
12443
       */
12444
      public static _Fields findByName(String name) {
12445
        return byName.get(name);
12446
      }
12447
 
12448
      private final short _thriftId;
12449
      private final String _fieldName;
12450
 
12451
      _Fields(short thriftId, String fieldName) {
12452
        _thriftId = thriftId;
12453
        _fieldName = fieldName;
12454
      }
12455
 
12456
      public short getThriftFieldId() {
12457
        return _thriftId;
12458
      }
12459
 
12460
      public String getFieldName() {
12461
        return _fieldName;
12462
      }
12463
    }
12464
 
12465
    // isset id assignments
483 rajveer 12466
    private static final int __ID_ISSET_ID = 0;
12467
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 12468
 
12469
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12470
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 12471
          new FieldValueMetaData(TType.I64)));
12472
    }});
12473
 
12474
    static {
483 rajveer 12475
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 12476
    }
12477
 
483 rajveer 12478
    public getOrder_args() {
68 ashish 12479
    }
12480
 
483 rajveer 12481
    public getOrder_args(
12482
      long id)
68 ashish 12483
    {
12484
      this();
483 rajveer 12485
      this.id = id;
12486
      setIdIsSet(true);
68 ashish 12487
    }
12488
 
12489
    /**
12490
     * Performs a deep copy on <i>other</i>.
12491
     */
483 rajveer 12492
    public getOrder_args(getOrder_args other) {
68 ashish 12493
      __isset_bit_vector.clear();
12494
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12495
      this.id = other.id;
68 ashish 12496
    }
12497
 
483 rajveer 12498
    public getOrder_args deepCopy() {
12499
      return new getOrder_args(this);
68 ashish 12500
    }
12501
 
12502
    @Deprecated
483 rajveer 12503
    public getOrder_args clone() {
12504
      return new getOrder_args(this);
68 ashish 12505
    }
12506
 
483 rajveer 12507
    public long getId() {
12508
      return this.id;
68 ashish 12509
    }
12510
 
483 rajveer 12511
    public getOrder_args setId(long id) {
12512
      this.id = id;
12513
      setIdIsSet(true);
68 ashish 12514
      return this;
12515
    }
12516
 
483 rajveer 12517
    public void unsetId() {
12518
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 12519
    }
12520
 
483 rajveer 12521
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
12522
    public boolean isSetId() {
12523
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 12524
    }
12525
 
483 rajveer 12526
    public void setIdIsSet(boolean value) {
12527
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 12528
    }
12529
 
12530
    public void setFieldValue(_Fields field, Object value) {
12531
      switch (field) {
483 rajveer 12532
      case ID:
68 ashish 12533
        if (value == null) {
483 rajveer 12534
          unsetId();
68 ashish 12535
        } else {
483 rajveer 12536
          setId((Long)value);
68 ashish 12537
        }
12538
        break;
12539
 
12540
      }
12541
    }
12542
 
12543
    public void setFieldValue(int fieldID, Object value) {
12544
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12545
    }
12546
 
12547
    public Object getFieldValue(_Fields field) {
12548
      switch (field) {
483 rajveer 12549
      case ID:
12550
        return new Long(getId());
68 ashish 12551
 
12552
      }
12553
      throw new IllegalStateException();
12554
    }
12555
 
12556
    public Object getFieldValue(int fieldId) {
12557
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12558
    }
12559
 
12560
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12561
    public boolean isSet(_Fields field) {
12562
      switch (field) {
483 rajveer 12563
      case ID:
12564
        return isSetId();
68 ashish 12565
      }
12566
      throw new IllegalStateException();
12567
    }
12568
 
12569
    public boolean isSet(int fieldID) {
12570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12571
    }
12572
 
12573
    @Override
12574
    public boolean equals(Object that) {
12575
      if (that == null)
12576
        return false;
483 rajveer 12577
      if (that instanceof getOrder_args)
12578
        return this.equals((getOrder_args)that);
68 ashish 12579
      return false;
12580
    }
12581
 
483 rajveer 12582
    public boolean equals(getOrder_args that) {
68 ashish 12583
      if (that == null)
12584
        return false;
12585
 
483 rajveer 12586
      boolean this_present_id = true;
12587
      boolean that_present_id = true;
12588
      if (this_present_id || that_present_id) {
12589
        if (!(this_present_id && that_present_id))
68 ashish 12590
          return false;
483 rajveer 12591
        if (this.id != that.id)
68 ashish 12592
          return false;
12593
      }
12594
 
12595
      return true;
12596
    }
12597
 
12598
    @Override
12599
    public int hashCode() {
12600
      return 0;
12601
    }
12602
 
483 rajveer 12603
    public int compareTo(getOrder_args other) {
68 ashish 12604
      if (!getClass().equals(other.getClass())) {
12605
        return getClass().getName().compareTo(other.getClass().getName());
12606
      }
12607
 
12608
      int lastComparison = 0;
483 rajveer 12609
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 12610
 
483 rajveer 12611
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 12612
      if (lastComparison != 0) {
12613
        return lastComparison;
12614
      }
483 rajveer 12615
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 12616
      if (lastComparison != 0) {
12617
        return lastComparison;
12618
      }
12619
      return 0;
12620
    }
12621
 
12622
    public void read(TProtocol iprot) throws TException {
12623
      TField field;
12624
      iprot.readStructBegin();
12625
      while (true)
12626
      {
12627
        field = iprot.readFieldBegin();
12628
        if (field.type == TType.STOP) { 
12629
          break;
12630
        }
12631
        _Fields fieldId = _Fields.findByThriftId(field.id);
12632
        if (fieldId == null) {
12633
          TProtocolUtil.skip(iprot, field.type);
12634
        } else {
12635
          switch (fieldId) {
483 rajveer 12636
            case ID:
68 ashish 12637
              if (field.type == TType.I64) {
483 rajveer 12638
                this.id = iprot.readI64();
12639
                setIdIsSet(true);
68 ashish 12640
              } else { 
12641
                TProtocolUtil.skip(iprot, field.type);
12642
              }
12643
              break;
12644
          }
12645
          iprot.readFieldEnd();
12646
        }
12647
      }
12648
      iprot.readStructEnd();
12649
      validate();
12650
    }
12651
 
12652
    public void write(TProtocol oprot) throws TException {
12653
      validate();
12654
 
12655
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12656
      oprot.writeFieldBegin(ID_FIELD_DESC);
12657
      oprot.writeI64(this.id);
68 ashish 12658
      oprot.writeFieldEnd();
12659
      oprot.writeFieldStop();
12660
      oprot.writeStructEnd();
12661
    }
12662
 
12663
    @Override
12664
    public String toString() {
483 rajveer 12665
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 12666
      boolean first = true;
12667
 
483 rajveer 12668
      sb.append("id:");
12669
      sb.append(this.id);
68 ashish 12670
      first = false;
12671
      sb.append(")");
12672
      return sb.toString();
12673
    }
12674
 
12675
    public void validate() throws TException {
12676
      // check for required fields
12677
    }
12678
 
12679
  }
12680
 
483 rajveer 12681
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
12682
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 12683
 
483 rajveer 12684
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 12685
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12686
 
483 rajveer 12687
    private Order success;
68 ashish 12688
    private TransactionServiceException ex;
12689
 
12690
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12691
    public enum _Fields implements TFieldIdEnum {
12692
      SUCCESS((short)0, "success"),
12693
      EX((short)1, "ex");
12694
 
12695
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12696
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12697
 
12698
      static {
12699
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12700
          byId.put((int)field._thriftId, field);
12701
          byName.put(field.getFieldName(), field);
12702
        }
12703
      }
12704
 
12705
      /**
12706
       * Find the _Fields constant that matches fieldId, or null if its not found.
12707
       */
12708
      public static _Fields findByThriftId(int fieldId) {
12709
        return byId.get(fieldId);
12710
      }
12711
 
12712
      /**
12713
       * Find the _Fields constant that matches fieldId, throwing an exception
12714
       * if it is not found.
12715
       */
12716
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12717
        _Fields fields = findByThriftId(fieldId);
12718
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12719
        return fields;
12720
      }
12721
 
12722
      /**
12723
       * Find the _Fields constant that matches name, or null if its not found.
12724
       */
12725
      public static _Fields findByName(String name) {
12726
        return byName.get(name);
12727
      }
12728
 
12729
      private final short _thriftId;
12730
      private final String _fieldName;
12731
 
12732
      _Fields(short thriftId, String fieldName) {
12733
        _thriftId = thriftId;
12734
        _fieldName = fieldName;
12735
      }
12736
 
12737
      public short getThriftFieldId() {
12738
        return _thriftId;
12739
      }
12740
 
12741
      public String getFieldName() {
12742
        return _fieldName;
12743
      }
12744
    }
12745
 
12746
    // isset id assignments
12747
 
12748
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12749
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12750
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 12751
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12752
          new FieldValueMetaData(TType.STRUCT)));
12753
    }});
12754
 
12755
    static {
483 rajveer 12756
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 12757
    }
12758
 
483 rajveer 12759
    public getOrder_result() {
68 ashish 12760
    }
12761
 
483 rajveer 12762
    public getOrder_result(
12763
      Order success,
68 ashish 12764
      TransactionServiceException ex)
12765
    {
12766
      this();
12767
      this.success = success;
12768
      this.ex = ex;
12769
    }
12770
 
12771
    /**
12772
     * Performs a deep copy on <i>other</i>.
12773
     */
483 rajveer 12774
    public getOrder_result(getOrder_result other) {
12775
      if (other.isSetSuccess()) {
12776
        this.success = new Order(other.success);
12777
      }
68 ashish 12778
      if (other.isSetEx()) {
12779
        this.ex = new TransactionServiceException(other.ex);
12780
      }
12781
    }
12782
 
483 rajveer 12783
    public getOrder_result deepCopy() {
12784
      return new getOrder_result(this);
68 ashish 12785
    }
12786
 
12787
    @Deprecated
483 rajveer 12788
    public getOrder_result clone() {
12789
      return new getOrder_result(this);
68 ashish 12790
    }
12791
 
483 rajveer 12792
    public Order getSuccess() {
68 ashish 12793
      return this.success;
12794
    }
12795
 
483 rajveer 12796
    public getOrder_result setSuccess(Order success) {
68 ashish 12797
      this.success = success;
12798
      return this;
12799
    }
12800
 
12801
    public void unsetSuccess() {
483 rajveer 12802
      this.success = null;
68 ashish 12803
    }
12804
 
12805
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12806
    public boolean isSetSuccess() {
483 rajveer 12807
      return this.success != null;
68 ashish 12808
    }
12809
 
12810
    public void setSuccessIsSet(boolean value) {
483 rajveer 12811
      if (!value) {
12812
        this.success = null;
12813
      }
68 ashish 12814
    }
12815
 
12816
    public TransactionServiceException getEx() {
12817
      return this.ex;
12818
    }
12819
 
483 rajveer 12820
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 12821
      this.ex = ex;
12822
      return this;
12823
    }
12824
 
12825
    public void unsetEx() {
12826
      this.ex = null;
12827
    }
12828
 
12829
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12830
    public boolean isSetEx() {
12831
      return this.ex != null;
12832
    }
12833
 
12834
    public void setExIsSet(boolean value) {
12835
      if (!value) {
12836
        this.ex = null;
12837
      }
12838
    }
12839
 
12840
    public void setFieldValue(_Fields field, Object value) {
12841
      switch (field) {
12842
      case SUCCESS:
12843
        if (value == null) {
12844
          unsetSuccess();
12845
        } else {
483 rajveer 12846
          setSuccess((Order)value);
68 ashish 12847
        }
12848
        break;
12849
 
12850
      case EX:
12851
        if (value == null) {
12852
          unsetEx();
12853
        } else {
12854
          setEx((TransactionServiceException)value);
12855
        }
12856
        break;
12857
 
12858
      }
12859
    }
12860
 
12861
    public void setFieldValue(int fieldID, Object value) {
12862
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12863
    }
12864
 
12865
    public Object getFieldValue(_Fields field) {
12866
      switch (field) {
12867
      case SUCCESS:
483 rajveer 12868
        return getSuccess();
68 ashish 12869
 
12870
      case EX:
12871
        return getEx();
12872
 
12873
      }
12874
      throw new IllegalStateException();
12875
    }
12876
 
12877
    public Object getFieldValue(int fieldId) {
12878
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12879
    }
12880
 
12881
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12882
    public boolean isSet(_Fields field) {
12883
      switch (field) {
12884
      case SUCCESS:
12885
        return isSetSuccess();
12886
      case EX:
12887
        return isSetEx();
12888
      }
12889
      throw new IllegalStateException();
12890
    }
12891
 
12892
    public boolean isSet(int fieldID) {
12893
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12894
    }
12895
 
12896
    @Override
12897
    public boolean equals(Object that) {
12898
      if (that == null)
12899
        return false;
483 rajveer 12900
      if (that instanceof getOrder_result)
12901
        return this.equals((getOrder_result)that);
68 ashish 12902
      return false;
12903
    }
12904
 
483 rajveer 12905
    public boolean equals(getOrder_result that) {
68 ashish 12906
      if (that == null)
12907
        return false;
12908
 
483 rajveer 12909
      boolean this_present_success = true && this.isSetSuccess();
12910
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12911
      if (this_present_success || that_present_success) {
12912
        if (!(this_present_success && that_present_success))
12913
          return false;
483 rajveer 12914
        if (!this.success.equals(that.success))
68 ashish 12915
          return false;
12916
      }
12917
 
12918
      boolean this_present_ex = true && this.isSetEx();
12919
      boolean that_present_ex = true && that.isSetEx();
12920
      if (this_present_ex || that_present_ex) {
12921
        if (!(this_present_ex && that_present_ex))
12922
          return false;
12923
        if (!this.ex.equals(that.ex))
12924
          return false;
12925
      }
12926
 
12927
      return true;
12928
    }
12929
 
12930
    @Override
12931
    public int hashCode() {
12932
      return 0;
12933
    }
12934
 
483 rajveer 12935
    public int compareTo(getOrder_result other) {
68 ashish 12936
      if (!getClass().equals(other.getClass())) {
12937
        return getClass().getName().compareTo(other.getClass().getName());
12938
      }
12939
 
12940
      int lastComparison = 0;
483 rajveer 12941
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 12942
 
12943
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12944
      if (lastComparison != 0) {
12945
        return lastComparison;
12946
      }
12947
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12948
      if (lastComparison != 0) {
12949
        return lastComparison;
12950
      }
12951
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12952
      if (lastComparison != 0) {
12953
        return lastComparison;
12954
      }
12955
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12956
      if (lastComparison != 0) {
12957
        return lastComparison;
12958
      }
12959
      return 0;
12960
    }
12961
 
12962
    public void read(TProtocol iprot) throws TException {
12963
      TField field;
12964
      iprot.readStructBegin();
12965
      while (true)
12966
      {
12967
        field = iprot.readFieldBegin();
12968
        if (field.type == TType.STOP) { 
12969
          break;
12970
        }
12971
        _Fields fieldId = _Fields.findByThriftId(field.id);
12972
        if (fieldId == null) {
12973
          TProtocolUtil.skip(iprot, field.type);
12974
        } else {
12975
          switch (fieldId) {
12976
            case SUCCESS:
483 rajveer 12977
              if (field.type == TType.STRUCT) {
12978
                this.success = new Order();
12979
                this.success.read(iprot);
68 ashish 12980
              } else { 
12981
                TProtocolUtil.skip(iprot, field.type);
12982
              }
12983
              break;
12984
            case EX:
12985
              if (field.type == TType.STRUCT) {
12986
                this.ex = new TransactionServiceException();
12987
                this.ex.read(iprot);
12988
              } else { 
12989
                TProtocolUtil.skip(iprot, field.type);
12990
              }
12991
              break;
12992
          }
12993
          iprot.readFieldEnd();
12994
        }
12995
      }
12996
      iprot.readStructEnd();
12997
      validate();
12998
    }
12999
 
13000
    public void write(TProtocol oprot) throws TException {
13001
      oprot.writeStructBegin(STRUCT_DESC);
13002
 
13003
      if (this.isSetSuccess()) {
13004
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13005
        this.success.write(oprot);
68 ashish 13006
        oprot.writeFieldEnd();
13007
      } else if (this.isSetEx()) {
13008
        oprot.writeFieldBegin(EX_FIELD_DESC);
13009
        this.ex.write(oprot);
13010
        oprot.writeFieldEnd();
13011
      }
13012
      oprot.writeFieldStop();
13013
      oprot.writeStructEnd();
13014
    }
13015
 
13016
    @Override
13017
    public String toString() {
483 rajveer 13018
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 13019
      boolean first = true;
13020
 
13021
      sb.append("success:");
483 rajveer 13022
      if (this.success == null) {
13023
        sb.append("null");
13024
      } else {
13025
        sb.append(this.success);
13026
      }
68 ashish 13027
      first = false;
13028
      if (!first) sb.append(", ");
13029
      sb.append("ex:");
13030
      if (this.ex == null) {
13031
        sb.append("null");
13032
      } else {
13033
        sb.append(this.ex);
13034
      }
13035
      first = false;
13036
      sb.append(")");
13037
      return sb.toString();
13038
    }
13039
 
13040
    public void validate() throws TException {
13041
      // check for required fields
13042
    }
13043
 
13044
  }
13045
 
483 rajveer 13046
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
13047
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 13048
 
483 rajveer 13049
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 13050
 
483 rajveer 13051
    private long orderId;
68 ashish 13052
 
13053
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13054
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13055
      ORDER_ID((short)1, "orderId");
68 ashish 13056
 
13057
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13059
 
13060
      static {
13061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13062
          byId.put((int)field._thriftId, field);
13063
          byName.put(field.getFieldName(), field);
13064
        }
13065
      }
13066
 
13067
      /**
13068
       * Find the _Fields constant that matches fieldId, or null if its not found.
13069
       */
13070
      public static _Fields findByThriftId(int fieldId) {
13071
        return byId.get(fieldId);
13072
      }
13073
 
13074
      /**
13075
       * Find the _Fields constant that matches fieldId, throwing an exception
13076
       * if it is not found.
13077
       */
13078
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13079
        _Fields fields = findByThriftId(fieldId);
13080
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13081
        return fields;
13082
      }
13083
 
13084
      /**
13085
       * Find the _Fields constant that matches name, or null if its not found.
13086
       */
13087
      public static _Fields findByName(String name) {
13088
        return byName.get(name);
13089
      }
13090
 
13091
      private final short _thriftId;
13092
      private final String _fieldName;
13093
 
13094
      _Fields(short thriftId, String fieldName) {
13095
        _thriftId = thriftId;
13096
        _fieldName = fieldName;
13097
      }
13098
 
13099
      public short getThriftFieldId() {
13100
        return _thriftId;
13101
      }
13102
 
13103
      public String getFieldName() {
13104
        return _fieldName;
13105
      }
13106
    }
13107
 
13108
    // isset id assignments
483 rajveer 13109
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 13110
    private BitSet __isset_bit_vector = new BitSet(1);
13111
 
13112
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13113
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 13114
          new FieldValueMetaData(TType.I64)));
13115
    }});
13116
 
13117
    static {
483 rajveer 13118
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 13119
    }
13120
 
483 rajveer 13121
    public getLineItemsForOrder_args() {
68 ashish 13122
    }
13123
 
483 rajveer 13124
    public getLineItemsForOrder_args(
13125
      long orderId)
68 ashish 13126
    {
13127
      this();
483 rajveer 13128
      this.orderId = orderId;
13129
      setOrderIdIsSet(true);
68 ashish 13130
    }
13131
 
13132
    /**
13133
     * Performs a deep copy on <i>other</i>.
13134
     */
483 rajveer 13135
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 13136
      __isset_bit_vector.clear();
13137
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 13138
      this.orderId = other.orderId;
68 ashish 13139
    }
13140
 
483 rajveer 13141
    public getLineItemsForOrder_args deepCopy() {
13142
      return new getLineItemsForOrder_args(this);
68 ashish 13143
    }
13144
 
13145
    @Deprecated
483 rajveer 13146
    public getLineItemsForOrder_args clone() {
13147
      return new getLineItemsForOrder_args(this);
68 ashish 13148
    }
13149
 
483 rajveer 13150
    public long getOrderId() {
13151
      return this.orderId;
68 ashish 13152
    }
13153
 
483 rajveer 13154
    public getLineItemsForOrder_args setOrderId(long orderId) {
13155
      this.orderId = orderId;
13156
      setOrderIdIsSet(true);
68 ashish 13157
      return this;
13158
    }
13159
 
483 rajveer 13160
    public void unsetOrderId() {
13161
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 13162
    }
13163
 
483 rajveer 13164
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13165
    public boolean isSetOrderId() {
13166
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 13167
    }
13168
 
483 rajveer 13169
    public void setOrderIdIsSet(boolean value) {
13170
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 13171
    }
13172
 
13173
    public void setFieldValue(_Fields field, Object value) {
13174
      switch (field) {
483 rajveer 13175
      case ORDER_ID:
68 ashish 13176
        if (value == null) {
483 rajveer 13177
          unsetOrderId();
68 ashish 13178
        } else {
483 rajveer 13179
          setOrderId((Long)value);
68 ashish 13180
        }
13181
        break;
13182
 
13183
      }
13184
    }
13185
 
13186
    public void setFieldValue(int fieldID, Object value) {
13187
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13188
    }
13189
 
13190
    public Object getFieldValue(_Fields field) {
13191
      switch (field) {
483 rajveer 13192
      case ORDER_ID:
13193
        return new Long(getOrderId());
68 ashish 13194
 
13195
      }
13196
      throw new IllegalStateException();
13197
    }
13198
 
13199
    public Object getFieldValue(int fieldId) {
13200
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13201
    }
13202
 
13203
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13204
    public boolean isSet(_Fields field) {
13205
      switch (field) {
483 rajveer 13206
      case ORDER_ID:
13207
        return isSetOrderId();
68 ashish 13208
      }
13209
      throw new IllegalStateException();
13210
    }
13211
 
13212
    public boolean isSet(int fieldID) {
13213
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13214
    }
13215
 
13216
    @Override
13217
    public boolean equals(Object that) {
13218
      if (that == null)
13219
        return false;
483 rajveer 13220
      if (that instanceof getLineItemsForOrder_args)
13221
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 13222
      return false;
13223
    }
13224
 
483 rajveer 13225
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 13226
      if (that == null)
13227
        return false;
13228
 
483 rajveer 13229
      boolean this_present_orderId = true;
13230
      boolean that_present_orderId = true;
13231
      if (this_present_orderId || that_present_orderId) {
13232
        if (!(this_present_orderId && that_present_orderId))
68 ashish 13233
          return false;
483 rajveer 13234
        if (this.orderId != that.orderId)
68 ashish 13235
          return false;
13236
      }
13237
 
13238
      return true;
13239
    }
13240
 
13241
    @Override
13242
    public int hashCode() {
13243
      return 0;
13244
    }
13245
 
483 rajveer 13246
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 13247
      if (!getClass().equals(other.getClass())) {
13248
        return getClass().getName().compareTo(other.getClass().getName());
13249
      }
13250
 
13251
      int lastComparison = 0;
483 rajveer 13252
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 13253
 
483 rajveer 13254
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 13255
      if (lastComparison != 0) {
13256
        return lastComparison;
13257
      }
483 rajveer 13258
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 13259
      if (lastComparison != 0) {
13260
        return lastComparison;
13261
      }
13262
      return 0;
13263
    }
13264
 
13265
    public void read(TProtocol iprot) throws TException {
13266
      TField field;
13267
      iprot.readStructBegin();
13268
      while (true)
13269
      {
13270
        field = iprot.readFieldBegin();
13271
        if (field.type == TType.STOP) { 
13272
          break;
13273
        }
13274
        _Fields fieldId = _Fields.findByThriftId(field.id);
13275
        if (fieldId == null) {
13276
          TProtocolUtil.skip(iprot, field.type);
13277
        } else {
13278
          switch (fieldId) {
483 rajveer 13279
            case ORDER_ID:
68 ashish 13280
              if (field.type == TType.I64) {
483 rajveer 13281
                this.orderId = iprot.readI64();
13282
                setOrderIdIsSet(true);
68 ashish 13283
              } else { 
13284
                TProtocolUtil.skip(iprot, field.type);
13285
              }
13286
              break;
13287
          }
13288
          iprot.readFieldEnd();
13289
        }
13290
      }
13291
      iprot.readStructEnd();
13292
      validate();
13293
    }
13294
 
13295
    public void write(TProtocol oprot) throws TException {
13296
      validate();
13297
 
13298
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13299
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13300
      oprot.writeI64(this.orderId);
68 ashish 13301
      oprot.writeFieldEnd();
13302
      oprot.writeFieldStop();
13303
      oprot.writeStructEnd();
13304
    }
13305
 
13306
    @Override
13307
    public String toString() {
483 rajveer 13308
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 13309
      boolean first = true;
13310
 
483 rajveer 13311
      sb.append("orderId:");
13312
      sb.append(this.orderId);
68 ashish 13313
      first = false;
13314
      sb.append(")");
13315
      return sb.toString();
13316
    }
13317
 
13318
    public void validate() throws TException {
13319
      // check for required fields
13320
    }
13321
 
13322
  }
13323
 
483 rajveer 13324
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
13325
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 13326
 
483 rajveer 13327
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 13328
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13329
 
483 rajveer 13330
    private List<LineItem> success;
68 ashish 13331
    private TransactionServiceException ex;
13332
 
13333
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13334
    public enum _Fields implements TFieldIdEnum {
13335
      SUCCESS((short)0, "success"),
13336
      EX((short)1, "ex");
13337
 
13338
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13339
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13340
 
13341
      static {
13342
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13343
          byId.put((int)field._thriftId, field);
13344
          byName.put(field.getFieldName(), field);
13345
        }
13346
      }
13347
 
13348
      /**
13349
       * Find the _Fields constant that matches fieldId, or null if its not found.
13350
       */
13351
      public static _Fields findByThriftId(int fieldId) {
13352
        return byId.get(fieldId);
13353
      }
13354
 
13355
      /**
13356
       * Find the _Fields constant that matches fieldId, throwing an exception
13357
       * if it is not found.
13358
       */
13359
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13360
        _Fields fields = findByThriftId(fieldId);
13361
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13362
        return fields;
13363
      }
13364
 
13365
      /**
13366
       * Find the _Fields constant that matches name, or null if its not found.
13367
       */
13368
      public static _Fields findByName(String name) {
13369
        return byName.get(name);
13370
      }
13371
 
13372
      private final short _thriftId;
13373
      private final String _fieldName;
13374
 
13375
      _Fields(short thriftId, String fieldName) {
13376
        _thriftId = thriftId;
13377
        _fieldName = fieldName;
13378
      }
13379
 
13380
      public short getThriftFieldId() {
13381
        return _thriftId;
13382
      }
13383
 
13384
      public String getFieldName() {
13385
        return _fieldName;
13386
      }
13387
    }
13388
 
13389
    // isset id assignments
13390
 
13391
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13392
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13393
          new ListMetaData(TType.LIST, 
13394
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 13395
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13396
          new FieldValueMetaData(TType.STRUCT)));
13397
    }});
13398
 
13399
    static {
483 rajveer 13400
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 13401
    }
13402
 
483 rajveer 13403
    public getLineItemsForOrder_result() {
68 ashish 13404
    }
13405
 
483 rajveer 13406
    public getLineItemsForOrder_result(
13407
      List<LineItem> success,
68 ashish 13408
      TransactionServiceException ex)
13409
    {
13410
      this();
13411
      this.success = success;
13412
      this.ex = ex;
13413
    }
13414
 
13415
    /**
13416
     * Performs a deep copy on <i>other</i>.
13417
     */
483 rajveer 13418
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
13419
      if (other.isSetSuccess()) {
13420
        List<LineItem> __this__success = new ArrayList<LineItem>();
13421
        for (LineItem other_element : other.success) {
13422
          __this__success.add(new LineItem(other_element));
13423
        }
13424
        this.success = __this__success;
13425
      }
68 ashish 13426
      if (other.isSetEx()) {
13427
        this.ex = new TransactionServiceException(other.ex);
13428
      }
13429
    }
13430
 
483 rajveer 13431
    public getLineItemsForOrder_result deepCopy() {
13432
      return new getLineItemsForOrder_result(this);
68 ashish 13433
    }
13434
 
13435
    @Deprecated
483 rajveer 13436
    public getLineItemsForOrder_result clone() {
13437
      return new getLineItemsForOrder_result(this);
68 ashish 13438
    }
13439
 
483 rajveer 13440
    public int getSuccessSize() {
13441
      return (this.success == null) ? 0 : this.success.size();
13442
    }
13443
 
13444
    public java.util.Iterator<LineItem> getSuccessIterator() {
13445
      return (this.success == null) ? null : this.success.iterator();
13446
    }
13447
 
13448
    public void addToSuccess(LineItem elem) {
13449
      if (this.success == null) {
13450
        this.success = new ArrayList<LineItem>();
13451
      }
13452
      this.success.add(elem);
13453
    }
13454
 
13455
    public List<LineItem> getSuccess() {
68 ashish 13456
      return this.success;
13457
    }
13458
 
483 rajveer 13459
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 13460
      this.success = success;
13461
      return this;
13462
    }
13463
 
13464
    public void unsetSuccess() {
483 rajveer 13465
      this.success = null;
68 ashish 13466
    }
13467
 
13468
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13469
    public boolean isSetSuccess() {
483 rajveer 13470
      return this.success != null;
68 ashish 13471
    }
13472
 
13473
    public void setSuccessIsSet(boolean value) {
483 rajveer 13474
      if (!value) {
13475
        this.success = null;
13476
      }
68 ashish 13477
    }
13478
 
13479
    public TransactionServiceException getEx() {
13480
      return this.ex;
13481
    }
13482
 
483 rajveer 13483
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 13484
      this.ex = ex;
13485
      return this;
13486
    }
13487
 
13488
    public void unsetEx() {
13489
      this.ex = null;
13490
    }
13491
 
13492
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13493
    public boolean isSetEx() {
13494
      return this.ex != null;
13495
    }
13496
 
13497
    public void setExIsSet(boolean value) {
13498
      if (!value) {
13499
        this.ex = null;
13500
      }
13501
    }
13502
 
13503
    public void setFieldValue(_Fields field, Object value) {
13504
      switch (field) {
13505
      case SUCCESS:
13506
        if (value == null) {
13507
          unsetSuccess();
13508
        } else {
483 rajveer 13509
          setSuccess((List<LineItem>)value);
68 ashish 13510
        }
13511
        break;
13512
 
13513
      case EX:
13514
        if (value == null) {
13515
          unsetEx();
13516
        } else {
13517
          setEx((TransactionServiceException)value);
13518
        }
13519
        break;
13520
 
13521
      }
13522
    }
13523
 
13524
    public void setFieldValue(int fieldID, Object value) {
13525
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13526
    }
13527
 
13528
    public Object getFieldValue(_Fields field) {
13529
      switch (field) {
13530
      case SUCCESS:
483 rajveer 13531
        return getSuccess();
68 ashish 13532
 
13533
      case EX:
13534
        return getEx();
13535
 
13536
      }
13537
      throw new IllegalStateException();
13538
    }
13539
 
13540
    public Object getFieldValue(int fieldId) {
13541
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13542
    }
13543
 
13544
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13545
    public boolean isSet(_Fields field) {
13546
      switch (field) {
13547
      case SUCCESS:
13548
        return isSetSuccess();
13549
      case EX:
13550
        return isSetEx();
13551
      }
13552
      throw new IllegalStateException();
13553
    }
13554
 
13555
    public boolean isSet(int fieldID) {
13556
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13557
    }
13558
 
13559
    @Override
13560
    public boolean equals(Object that) {
13561
      if (that == null)
13562
        return false;
483 rajveer 13563
      if (that instanceof getLineItemsForOrder_result)
13564
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 13565
      return false;
13566
    }
13567
 
483 rajveer 13568
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 13569
      if (that == null)
13570
        return false;
13571
 
483 rajveer 13572
      boolean this_present_success = true && this.isSetSuccess();
13573
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13574
      if (this_present_success || that_present_success) {
13575
        if (!(this_present_success && that_present_success))
13576
          return false;
483 rajveer 13577
        if (!this.success.equals(that.success))
68 ashish 13578
          return false;
13579
      }
13580
 
13581
      boolean this_present_ex = true && this.isSetEx();
13582
      boolean that_present_ex = true && that.isSetEx();
13583
      if (this_present_ex || that_present_ex) {
13584
        if (!(this_present_ex && that_present_ex))
13585
          return false;
13586
        if (!this.ex.equals(that.ex))
13587
          return false;
13588
      }
13589
 
13590
      return true;
13591
    }
13592
 
13593
    @Override
13594
    public int hashCode() {
13595
      return 0;
13596
    }
13597
 
483 rajveer 13598
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 13599
      if (!getClass().equals(other.getClass())) {
13600
        return getClass().getName().compareTo(other.getClass().getName());
13601
      }
13602
 
13603
      int lastComparison = 0;
483 rajveer 13604
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 13605
 
13606
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13607
      if (lastComparison != 0) {
13608
        return lastComparison;
13609
      }
13610
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13611
      if (lastComparison != 0) {
13612
        return lastComparison;
13613
      }
13614
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13615
      if (lastComparison != 0) {
13616
        return lastComparison;
13617
      }
13618
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13619
      if (lastComparison != 0) {
13620
        return lastComparison;
13621
      }
13622
      return 0;
13623
    }
13624
 
13625
    public void read(TProtocol iprot) throws TException {
13626
      TField field;
13627
      iprot.readStructBegin();
13628
      while (true)
13629
      {
13630
        field = iprot.readFieldBegin();
13631
        if (field.type == TType.STOP) { 
13632
          break;
13633
        }
13634
        _Fields fieldId = _Fields.findByThriftId(field.id);
13635
        if (fieldId == null) {
13636
          TProtocolUtil.skip(iprot, field.type);
13637
        } else {
13638
          switch (fieldId) {
13639
            case SUCCESS:
483 rajveer 13640
              if (field.type == TType.LIST) {
13641
                {
684 chandransh 13642
                  TList _list28 = iprot.readListBegin();
13643
                  this.success = new ArrayList<LineItem>(_list28.size);
13644
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 13645
                  {
684 chandransh 13646
                    LineItem _elem30;
13647
                    _elem30 = new LineItem();
13648
                    _elem30.read(iprot);
13649
                    this.success.add(_elem30);
483 rajveer 13650
                  }
13651
                  iprot.readListEnd();
13652
                }
68 ashish 13653
              } else { 
13654
                TProtocolUtil.skip(iprot, field.type);
13655
              }
13656
              break;
13657
            case EX:
13658
              if (field.type == TType.STRUCT) {
13659
                this.ex = new TransactionServiceException();
13660
                this.ex.read(iprot);
13661
              } else { 
13662
                TProtocolUtil.skip(iprot, field.type);
13663
              }
13664
              break;
13665
          }
13666
          iprot.readFieldEnd();
13667
        }
13668
      }
13669
      iprot.readStructEnd();
13670
      validate();
13671
    }
13672
 
13673
    public void write(TProtocol oprot) throws TException {
13674
      oprot.writeStructBegin(STRUCT_DESC);
13675
 
13676
      if (this.isSetSuccess()) {
13677
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13678
        {
13679
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 13680
          for (LineItem _iter31 : this.success)
483 rajveer 13681
          {
684 chandransh 13682
            _iter31.write(oprot);
483 rajveer 13683
          }
13684
          oprot.writeListEnd();
13685
        }
68 ashish 13686
        oprot.writeFieldEnd();
13687
      } else if (this.isSetEx()) {
13688
        oprot.writeFieldBegin(EX_FIELD_DESC);
13689
        this.ex.write(oprot);
13690
        oprot.writeFieldEnd();
13691
      }
13692
      oprot.writeFieldStop();
13693
      oprot.writeStructEnd();
13694
    }
13695
 
13696
    @Override
13697
    public String toString() {
483 rajveer 13698
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 13699
      boolean first = true;
13700
 
13701
      sb.append("success:");
483 rajveer 13702
      if (this.success == null) {
13703
        sb.append("null");
13704
      } else {
13705
        sb.append(this.success);
13706
      }
68 ashish 13707
      first = false;
13708
      if (!first) sb.append(", ");
13709
      sb.append("ex:");
13710
      if (this.ex == null) {
13711
        sb.append("null");
13712
      } else {
13713
        sb.append(this.ex);
13714
      }
13715
      first = false;
13716
      sb.append(")");
13717
      return sb.toString();
13718
    }
13719
 
13720
    public void validate() throws TException {
13721
      // check for required fields
13722
    }
13723
 
13724
  }
13725
 
758 chandransh 13726
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
13727
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
13728
 
13729
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
13730
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
13731
 
13732
    private long warehouseId;
13733
    private long providerId;
13734
 
13735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13736
    public enum _Fields implements TFieldIdEnum {
13737
      WAREHOUSE_ID((short)1, "warehouseId"),
13738
      PROVIDER_ID((short)2, "providerId");
13739
 
13740
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13741
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13742
 
13743
      static {
13744
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13745
          byId.put((int)field._thriftId, field);
13746
          byName.put(field.getFieldName(), field);
13747
        }
13748
      }
13749
 
13750
      /**
13751
       * Find the _Fields constant that matches fieldId, or null if its not found.
13752
       */
13753
      public static _Fields findByThriftId(int fieldId) {
13754
        return byId.get(fieldId);
13755
      }
13756
 
13757
      /**
13758
       * Find the _Fields constant that matches fieldId, throwing an exception
13759
       * if it is not found.
13760
       */
13761
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13762
        _Fields fields = findByThriftId(fieldId);
13763
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13764
        return fields;
13765
      }
13766
 
13767
      /**
13768
       * Find the _Fields constant that matches name, or null if its not found.
13769
       */
13770
      public static _Fields findByName(String name) {
13771
        return byName.get(name);
13772
      }
13773
 
13774
      private final short _thriftId;
13775
      private final String _fieldName;
13776
 
13777
      _Fields(short thriftId, String fieldName) {
13778
        _thriftId = thriftId;
13779
        _fieldName = fieldName;
13780
      }
13781
 
13782
      public short getThriftFieldId() {
13783
        return _thriftId;
13784
      }
13785
 
13786
      public String getFieldName() {
13787
        return _fieldName;
13788
      }
13789
    }
13790
 
13791
    // isset id assignments
13792
    private static final int __WAREHOUSEID_ISSET_ID = 0;
13793
    private static final int __PROVIDERID_ISSET_ID = 1;
13794
    private BitSet __isset_bit_vector = new BitSet(2);
13795
 
13796
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13797
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
13798
          new FieldValueMetaData(TType.I64)));
13799
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
13800
          new FieldValueMetaData(TType.I64)));
13801
    }});
13802
 
13803
    static {
13804
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
13805
    }
13806
 
13807
    public markOrdersAsManifested_args() {
13808
    }
13809
 
13810
    public markOrdersAsManifested_args(
13811
      long warehouseId,
13812
      long providerId)
13813
    {
13814
      this();
13815
      this.warehouseId = warehouseId;
13816
      setWarehouseIdIsSet(true);
13817
      this.providerId = providerId;
13818
      setProviderIdIsSet(true);
13819
    }
13820
 
13821
    /**
13822
     * Performs a deep copy on <i>other</i>.
13823
     */
13824
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
13825
      __isset_bit_vector.clear();
13826
      __isset_bit_vector.or(other.__isset_bit_vector);
13827
      this.warehouseId = other.warehouseId;
13828
      this.providerId = other.providerId;
13829
    }
13830
 
13831
    public markOrdersAsManifested_args deepCopy() {
13832
      return new markOrdersAsManifested_args(this);
13833
    }
13834
 
13835
    @Deprecated
13836
    public markOrdersAsManifested_args clone() {
13837
      return new markOrdersAsManifested_args(this);
13838
    }
13839
 
13840
    public long getWarehouseId() {
13841
      return this.warehouseId;
13842
    }
13843
 
13844
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
13845
      this.warehouseId = warehouseId;
13846
      setWarehouseIdIsSet(true);
13847
      return this;
13848
    }
13849
 
13850
    public void unsetWarehouseId() {
13851
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
13852
    }
13853
 
13854
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
13855
    public boolean isSetWarehouseId() {
13856
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
13857
    }
13858
 
13859
    public void setWarehouseIdIsSet(boolean value) {
13860
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
13861
    }
13862
 
13863
    public long getProviderId() {
13864
      return this.providerId;
13865
    }
13866
 
13867
    public markOrdersAsManifested_args setProviderId(long providerId) {
13868
      this.providerId = providerId;
13869
      setProviderIdIsSet(true);
13870
      return this;
13871
    }
13872
 
13873
    public void unsetProviderId() {
13874
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
13875
    }
13876
 
13877
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
13878
    public boolean isSetProviderId() {
13879
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
13880
    }
13881
 
13882
    public void setProviderIdIsSet(boolean value) {
13883
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
13884
    }
13885
 
13886
    public void setFieldValue(_Fields field, Object value) {
13887
      switch (field) {
13888
      case WAREHOUSE_ID:
13889
        if (value == null) {
13890
          unsetWarehouseId();
13891
        } else {
13892
          setWarehouseId((Long)value);
13893
        }
13894
        break;
13895
 
13896
      case PROVIDER_ID:
13897
        if (value == null) {
13898
          unsetProviderId();
13899
        } else {
13900
          setProviderId((Long)value);
13901
        }
13902
        break;
13903
 
13904
      }
13905
    }
13906
 
13907
    public void setFieldValue(int fieldID, Object value) {
13908
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13909
    }
13910
 
13911
    public Object getFieldValue(_Fields field) {
13912
      switch (field) {
13913
      case WAREHOUSE_ID:
13914
        return new Long(getWarehouseId());
13915
 
13916
      case PROVIDER_ID:
13917
        return new Long(getProviderId());
13918
 
13919
      }
13920
      throw new IllegalStateException();
13921
    }
13922
 
13923
    public Object getFieldValue(int fieldId) {
13924
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13925
    }
13926
 
13927
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13928
    public boolean isSet(_Fields field) {
13929
      switch (field) {
13930
      case WAREHOUSE_ID:
13931
        return isSetWarehouseId();
13932
      case PROVIDER_ID:
13933
        return isSetProviderId();
13934
      }
13935
      throw new IllegalStateException();
13936
    }
13937
 
13938
    public boolean isSet(int fieldID) {
13939
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13940
    }
13941
 
13942
    @Override
13943
    public boolean equals(Object that) {
13944
      if (that == null)
13945
        return false;
13946
      if (that instanceof markOrdersAsManifested_args)
13947
        return this.equals((markOrdersAsManifested_args)that);
13948
      return false;
13949
    }
13950
 
13951
    public boolean equals(markOrdersAsManifested_args that) {
13952
      if (that == null)
13953
        return false;
13954
 
13955
      boolean this_present_warehouseId = true;
13956
      boolean that_present_warehouseId = true;
13957
      if (this_present_warehouseId || that_present_warehouseId) {
13958
        if (!(this_present_warehouseId && that_present_warehouseId))
13959
          return false;
13960
        if (this.warehouseId != that.warehouseId)
13961
          return false;
13962
      }
13963
 
13964
      boolean this_present_providerId = true;
13965
      boolean that_present_providerId = true;
13966
      if (this_present_providerId || that_present_providerId) {
13967
        if (!(this_present_providerId && that_present_providerId))
13968
          return false;
13969
        if (this.providerId != that.providerId)
13970
          return false;
13971
      }
13972
 
13973
      return true;
13974
    }
13975
 
13976
    @Override
13977
    public int hashCode() {
13978
      return 0;
13979
    }
13980
 
13981
    public int compareTo(markOrdersAsManifested_args other) {
13982
      if (!getClass().equals(other.getClass())) {
13983
        return getClass().getName().compareTo(other.getClass().getName());
13984
      }
13985
 
13986
      int lastComparison = 0;
13987
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
13988
 
13989
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
13990
      if (lastComparison != 0) {
13991
        return lastComparison;
13992
      }
13993
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
13994
      if (lastComparison != 0) {
13995
        return lastComparison;
13996
      }
13997
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
13998
      if (lastComparison != 0) {
13999
        return lastComparison;
14000
      }
14001
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
14002
      if (lastComparison != 0) {
14003
        return lastComparison;
14004
      }
14005
      return 0;
14006
    }
14007
 
14008
    public void read(TProtocol iprot) throws TException {
14009
      TField field;
14010
      iprot.readStructBegin();
14011
      while (true)
14012
      {
14013
        field = iprot.readFieldBegin();
14014
        if (field.type == TType.STOP) { 
14015
          break;
14016
        }
14017
        _Fields fieldId = _Fields.findByThriftId(field.id);
14018
        if (fieldId == null) {
14019
          TProtocolUtil.skip(iprot, field.type);
14020
        } else {
14021
          switch (fieldId) {
14022
            case WAREHOUSE_ID:
14023
              if (field.type == TType.I64) {
14024
                this.warehouseId = iprot.readI64();
14025
                setWarehouseIdIsSet(true);
14026
              } else { 
14027
                TProtocolUtil.skip(iprot, field.type);
14028
              }
14029
              break;
14030
            case PROVIDER_ID:
14031
              if (field.type == TType.I64) {
14032
                this.providerId = iprot.readI64();
14033
                setProviderIdIsSet(true);
14034
              } else { 
14035
                TProtocolUtil.skip(iprot, field.type);
14036
              }
14037
              break;
14038
          }
14039
          iprot.readFieldEnd();
14040
        }
14041
      }
14042
      iprot.readStructEnd();
14043
      validate();
14044
    }
14045
 
14046
    public void write(TProtocol oprot) throws TException {
14047
      validate();
14048
 
14049
      oprot.writeStructBegin(STRUCT_DESC);
14050
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
14051
      oprot.writeI64(this.warehouseId);
14052
      oprot.writeFieldEnd();
14053
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
14054
      oprot.writeI64(this.providerId);
14055
      oprot.writeFieldEnd();
14056
      oprot.writeFieldStop();
14057
      oprot.writeStructEnd();
14058
    }
14059
 
14060
    @Override
14061
    public String toString() {
14062
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
14063
      boolean first = true;
14064
 
14065
      sb.append("warehouseId:");
14066
      sb.append(this.warehouseId);
14067
      first = false;
14068
      if (!first) sb.append(", ");
14069
      sb.append("providerId:");
14070
      sb.append(this.providerId);
14071
      first = false;
14072
      sb.append(")");
14073
      return sb.toString();
14074
    }
14075
 
14076
    public void validate() throws TException {
14077
      // check for required fields
14078
    }
14079
 
14080
  }
14081
 
14082
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
14083
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
14084
 
14085
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14086
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14087
 
14088
    private boolean success;
14089
    private TransactionServiceException ex;
14090
 
14091
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14092
    public enum _Fields implements TFieldIdEnum {
14093
      SUCCESS((short)0, "success"),
14094
      EX((short)1, "ex");
14095
 
14096
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14097
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14098
 
14099
      static {
14100
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14101
          byId.put((int)field._thriftId, field);
14102
          byName.put(field.getFieldName(), field);
14103
        }
14104
      }
14105
 
14106
      /**
14107
       * Find the _Fields constant that matches fieldId, or null if its not found.
14108
       */
14109
      public static _Fields findByThriftId(int fieldId) {
14110
        return byId.get(fieldId);
14111
      }
14112
 
14113
      /**
14114
       * Find the _Fields constant that matches fieldId, throwing an exception
14115
       * if it is not found.
14116
       */
14117
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14118
        _Fields fields = findByThriftId(fieldId);
14119
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14120
        return fields;
14121
      }
14122
 
14123
      /**
14124
       * Find the _Fields constant that matches name, or null if its not found.
14125
       */
14126
      public static _Fields findByName(String name) {
14127
        return byName.get(name);
14128
      }
14129
 
14130
      private final short _thriftId;
14131
      private final String _fieldName;
14132
 
14133
      _Fields(short thriftId, String fieldName) {
14134
        _thriftId = thriftId;
14135
        _fieldName = fieldName;
14136
      }
14137
 
14138
      public short getThriftFieldId() {
14139
        return _thriftId;
14140
      }
14141
 
14142
      public String getFieldName() {
14143
        return _fieldName;
14144
      }
14145
    }
14146
 
14147
    // isset id assignments
14148
    private static final int __SUCCESS_ISSET_ID = 0;
14149
    private BitSet __isset_bit_vector = new BitSet(1);
14150
 
14151
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14152
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14153
          new FieldValueMetaData(TType.BOOL)));
14154
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14155
          new FieldValueMetaData(TType.STRUCT)));
14156
    }});
14157
 
14158
    static {
14159
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
14160
    }
14161
 
14162
    public markOrdersAsManifested_result() {
14163
    }
14164
 
14165
    public markOrdersAsManifested_result(
14166
      boolean success,
14167
      TransactionServiceException ex)
14168
    {
14169
      this();
14170
      this.success = success;
14171
      setSuccessIsSet(true);
14172
      this.ex = ex;
14173
    }
14174
 
14175
    /**
14176
     * Performs a deep copy on <i>other</i>.
14177
     */
14178
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
14179
      __isset_bit_vector.clear();
14180
      __isset_bit_vector.or(other.__isset_bit_vector);
14181
      this.success = other.success;
14182
      if (other.isSetEx()) {
14183
        this.ex = new TransactionServiceException(other.ex);
14184
      }
14185
    }
14186
 
14187
    public markOrdersAsManifested_result deepCopy() {
14188
      return new markOrdersAsManifested_result(this);
14189
    }
14190
 
14191
    @Deprecated
14192
    public markOrdersAsManifested_result clone() {
14193
      return new markOrdersAsManifested_result(this);
14194
    }
14195
 
14196
    public boolean isSuccess() {
14197
      return this.success;
14198
    }
14199
 
14200
    public markOrdersAsManifested_result setSuccess(boolean success) {
14201
      this.success = success;
14202
      setSuccessIsSet(true);
14203
      return this;
14204
    }
14205
 
14206
    public void unsetSuccess() {
14207
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14208
    }
14209
 
14210
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14211
    public boolean isSetSuccess() {
14212
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14213
    }
14214
 
14215
    public void setSuccessIsSet(boolean value) {
14216
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14217
    }
14218
 
14219
    public TransactionServiceException getEx() {
14220
      return this.ex;
14221
    }
14222
 
14223
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
14224
      this.ex = ex;
14225
      return this;
14226
    }
14227
 
14228
    public void unsetEx() {
14229
      this.ex = null;
14230
    }
14231
 
14232
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14233
    public boolean isSetEx() {
14234
      return this.ex != null;
14235
    }
14236
 
14237
    public void setExIsSet(boolean value) {
14238
      if (!value) {
14239
        this.ex = null;
14240
      }
14241
    }
14242
 
14243
    public void setFieldValue(_Fields field, Object value) {
14244
      switch (field) {
14245
      case SUCCESS:
14246
        if (value == null) {
14247
          unsetSuccess();
14248
        } else {
14249
          setSuccess((Boolean)value);
14250
        }
14251
        break;
14252
 
14253
      case EX:
14254
        if (value == null) {
14255
          unsetEx();
14256
        } else {
14257
          setEx((TransactionServiceException)value);
14258
        }
14259
        break;
14260
 
14261
      }
14262
    }
14263
 
14264
    public void setFieldValue(int fieldID, Object value) {
14265
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14266
    }
14267
 
14268
    public Object getFieldValue(_Fields field) {
14269
      switch (field) {
14270
      case SUCCESS:
14271
        return new Boolean(isSuccess());
14272
 
14273
      case EX:
14274
        return getEx();
14275
 
14276
      }
14277
      throw new IllegalStateException();
14278
    }
14279
 
14280
    public Object getFieldValue(int fieldId) {
14281
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14282
    }
14283
 
14284
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14285
    public boolean isSet(_Fields field) {
14286
      switch (field) {
14287
      case SUCCESS:
14288
        return isSetSuccess();
14289
      case EX:
14290
        return isSetEx();
14291
      }
14292
      throw new IllegalStateException();
14293
    }
14294
 
14295
    public boolean isSet(int fieldID) {
14296
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14297
    }
14298
 
14299
    @Override
14300
    public boolean equals(Object that) {
14301
      if (that == null)
14302
        return false;
14303
      if (that instanceof markOrdersAsManifested_result)
14304
        return this.equals((markOrdersAsManifested_result)that);
14305
      return false;
14306
    }
14307
 
14308
    public boolean equals(markOrdersAsManifested_result that) {
14309
      if (that == null)
14310
        return false;
14311
 
14312
      boolean this_present_success = true;
14313
      boolean that_present_success = true;
14314
      if (this_present_success || that_present_success) {
14315
        if (!(this_present_success && that_present_success))
14316
          return false;
14317
        if (this.success != that.success)
14318
          return false;
14319
      }
14320
 
14321
      boolean this_present_ex = true && this.isSetEx();
14322
      boolean that_present_ex = true && that.isSetEx();
14323
      if (this_present_ex || that_present_ex) {
14324
        if (!(this_present_ex && that_present_ex))
14325
          return false;
14326
        if (!this.ex.equals(that.ex))
14327
          return false;
14328
      }
14329
 
14330
      return true;
14331
    }
14332
 
14333
    @Override
14334
    public int hashCode() {
14335
      return 0;
14336
    }
14337
 
14338
    public int compareTo(markOrdersAsManifested_result other) {
14339
      if (!getClass().equals(other.getClass())) {
14340
        return getClass().getName().compareTo(other.getClass().getName());
14341
      }
14342
 
14343
      int lastComparison = 0;
14344
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
14345
 
14346
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14347
      if (lastComparison != 0) {
14348
        return lastComparison;
14349
      }
14350
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14351
      if (lastComparison != 0) {
14352
        return lastComparison;
14353
      }
14354
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14355
      if (lastComparison != 0) {
14356
        return lastComparison;
14357
      }
14358
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14359
      if (lastComparison != 0) {
14360
        return lastComparison;
14361
      }
14362
      return 0;
14363
    }
14364
 
14365
    public void read(TProtocol iprot) throws TException {
14366
      TField field;
14367
      iprot.readStructBegin();
14368
      while (true)
14369
      {
14370
        field = iprot.readFieldBegin();
14371
        if (field.type == TType.STOP) { 
14372
          break;
14373
        }
14374
        _Fields fieldId = _Fields.findByThriftId(field.id);
14375
        if (fieldId == null) {
14376
          TProtocolUtil.skip(iprot, field.type);
14377
        } else {
14378
          switch (fieldId) {
14379
            case SUCCESS:
14380
              if (field.type == TType.BOOL) {
14381
                this.success = iprot.readBool();
14382
                setSuccessIsSet(true);
14383
              } else { 
14384
                TProtocolUtil.skip(iprot, field.type);
14385
              }
14386
              break;
14387
            case EX:
14388
              if (field.type == TType.STRUCT) {
14389
                this.ex = new TransactionServiceException();
14390
                this.ex.read(iprot);
14391
              } else { 
14392
                TProtocolUtil.skip(iprot, field.type);
14393
              }
14394
              break;
14395
          }
14396
          iprot.readFieldEnd();
14397
        }
14398
      }
14399
      iprot.readStructEnd();
14400
      validate();
14401
    }
14402
 
14403
    public void write(TProtocol oprot) throws TException {
14404
      oprot.writeStructBegin(STRUCT_DESC);
14405
 
14406
      if (this.isSetSuccess()) {
14407
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14408
        oprot.writeBool(this.success);
14409
        oprot.writeFieldEnd();
14410
      } else if (this.isSetEx()) {
14411
        oprot.writeFieldBegin(EX_FIELD_DESC);
14412
        this.ex.write(oprot);
14413
        oprot.writeFieldEnd();
14414
      }
14415
      oprot.writeFieldStop();
14416
      oprot.writeStructEnd();
14417
    }
14418
 
14419
    @Override
14420
    public String toString() {
14421
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
14422
      boolean first = true;
14423
 
14424
      sb.append("success:");
14425
      sb.append(this.success);
14426
      first = false;
14427
      if (!first) sb.append(", ");
14428
      sb.append("ex:");
14429
      if (this.ex == null) {
14430
        sb.append("null");
14431
      } else {
14432
        sb.append(this.ex);
14433
      }
14434
      first = false;
14435
      sb.append(")");
14436
      return sb.toString();
14437
    }
14438
 
14439
    public void validate() throws TException {
14440
      // check for required fields
14441
    }
14442
 
14443
  }
14444
 
305 ashish 14445
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
14446
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
14447
 
483 rajveer 14448
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 14449
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
14450
 
483 rajveer 14451
    private long orderId;
305 ashish 14452
    private boolean valid;
14453
 
14454
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14455
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14456
      ORDER_ID((short)1, "orderId"),
305 ashish 14457
      VALID((short)2, "valid");
14458
 
14459
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14460
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14461
 
14462
      static {
14463
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14464
          byId.put((int)field._thriftId, field);
14465
          byName.put(field.getFieldName(), field);
14466
        }
14467
      }
14468
 
14469
      /**
14470
       * Find the _Fields constant that matches fieldId, or null if its not found.
14471
       */
14472
      public static _Fields findByThriftId(int fieldId) {
14473
        return byId.get(fieldId);
14474
      }
14475
 
14476
      /**
14477
       * Find the _Fields constant that matches fieldId, throwing an exception
14478
       * if it is not found.
14479
       */
14480
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14481
        _Fields fields = findByThriftId(fieldId);
14482
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14483
        return fields;
14484
      }
14485
 
14486
      /**
14487
       * Find the _Fields constant that matches name, or null if its not found.
14488
       */
14489
      public static _Fields findByName(String name) {
14490
        return byName.get(name);
14491
      }
14492
 
14493
      private final short _thriftId;
14494
      private final String _fieldName;
14495
 
14496
      _Fields(short thriftId, String fieldName) {
14497
        _thriftId = thriftId;
14498
        _fieldName = fieldName;
14499
      }
14500
 
14501
      public short getThriftFieldId() {
14502
        return _thriftId;
14503
      }
14504
 
14505
      public String getFieldName() {
14506
        return _fieldName;
14507
      }
14508
    }
14509
 
14510
    // isset id assignments
483 rajveer 14511
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 14512
    private static final int __VALID_ISSET_ID = 1;
14513
    private BitSet __isset_bit_vector = new BitSet(2);
14514
 
14515
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14516
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 14517
          new FieldValueMetaData(TType.I64)));
14518
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
14519
          new FieldValueMetaData(TType.BOOL)));
14520
    }});
14521
 
14522
    static {
14523
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
14524
    }
14525
 
14526
    public getAlerts_args() {
14527
    }
14528
 
14529
    public getAlerts_args(
483 rajveer 14530
      long orderId,
305 ashish 14531
      boolean valid)
14532
    {
14533
      this();
483 rajveer 14534
      this.orderId = orderId;
14535
      setOrderIdIsSet(true);
305 ashish 14536
      this.valid = valid;
14537
      setValidIsSet(true);
14538
    }
14539
 
14540
    /**
14541
     * Performs a deep copy on <i>other</i>.
14542
     */
14543
    public getAlerts_args(getAlerts_args other) {
14544
      __isset_bit_vector.clear();
14545
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14546
      this.orderId = other.orderId;
305 ashish 14547
      this.valid = other.valid;
14548
    }
14549
 
14550
    public getAlerts_args deepCopy() {
14551
      return new getAlerts_args(this);
14552
    }
14553
 
14554
    @Deprecated
14555
    public getAlerts_args clone() {
14556
      return new getAlerts_args(this);
14557
    }
14558
 
483 rajveer 14559
    public long getOrderId() {
14560
      return this.orderId;
305 ashish 14561
    }
14562
 
483 rajveer 14563
    public getAlerts_args setOrderId(long orderId) {
14564
      this.orderId = orderId;
14565
      setOrderIdIsSet(true);
305 ashish 14566
      return this;
14567
    }
14568
 
483 rajveer 14569
    public void unsetOrderId() {
14570
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 14571
    }
14572
 
483 rajveer 14573
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14574
    public boolean isSetOrderId() {
14575
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 14576
    }
14577
 
483 rajveer 14578
    public void setOrderIdIsSet(boolean value) {
14579
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 14580
    }
14581
 
14582
    public boolean isValid() {
14583
      return this.valid;
14584
    }
14585
 
14586
    public getAlerts_args setValid(boolean valid) {
14587
      this.valid = valid;
14588
      setValidIsSet(true);
14589
      return this;
14590
    }
14591
 
14592
    public void unsetValid() {
14593
      __isset_bit_vector.clear(__VALID_ISSET_ID);
14594
    }
14595
 
14596
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
14597
    public boolean isSetValid() {
14598
      return __isset_bit_vector.get(__VALID_ISSET_ID);
14599
    }
14600
 
14601
    public void setValidIsSet(boolean value) {
14602
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
14603
    }
14604
 
14605
    public void setFieldValue(_Fields field, Object value) {
14606
      switch (field) {
483 rajveer 14607
      case ORDER_ID:
305 ashish 14608
        if (value == null) {
483 rajveer 14609
          unsetOrderId();
305 ashish 14610
        } else {
483 rajveer 14611
          setOrderId((Long)value);
305 ashish 14612
        }
14613
        break;
14614
 
14615
      case VALID:
14616
        if (value == null) {
14617
          unsetValid();
14618
        } else {
14619
          setValid((Boolean)value);
14620
        }
14621
        break;
14622
 
14623
      }
14624
    }
14625
 
14626
    public void setFieldValue(int fieldID, Object value) {
14627
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14628
    }
14629
 
14630
    public Object getFieldValue(_Fields field) {
14631
      switch (field) {
483 rajveer 14632
      case ORDER_ID:
14633
        return new Long(getOrderId());
305 ashish 14634
 
14635
      case VALID:
14636
        return new Boolean(isValid());
14637
 
14638
      }
14639
      throw new IllegalStateException();
14640
    }
14641
 
14642
    public Object getFieldValue(int fieldId) {
14643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14644
    }
14645
 
14646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14647
    public boolean isSet(_Fields field) {
14648
      switch (field) {
483 rajveer 14649
      case ORDER_ID:
14650
        return isSetOrderId();
305 ashish 14651
      case VALID:
14652
        return isSetValid();
14653
      }
14654
      throw new IllegalStateException();
14655
    }
14656
 
14657
    public boolean isSet(int fieldID) {
14658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14659
    }
14660
 
14661
    @Override
14662
    public boolean equals(Object that) {
14663
      if (that == null)
14664
        return false;
14665
      if (that instanceof getAlerts_args)
14666
        return this.equals((getAlerts_args)that);
14667
      return false;
14668
    }
14669
 
14670
    public boolean equals(getAlerts_args that) {
14671
      if (that == null)
14672
        return false;
14673
 
483 rajveer 14674
      boolean this_present_orderId = true;
14675
      boolean that_present_orderId = true;
14676
      if (this_present_orderId || that_present_orderId) {
14677
        if (!(this_present_orderId && that_present_orderId))
305 ashish 14678
          return false;
483 rajveer 14679
        if (this.orderId != that.orderId)
305 ashish 14680
          return false;
14681
      }
14682
 
14683
      boolean this_present_valid = true;
14684
      boolean that_present_valid = true;
14685
      if (this_present_valid || that_present_valid) {
14686
        if (!(this_present_valid && that_present_valid))
14687
          return false;
14688
        if (this.valid != that.valid)
14689
          return false;
14690
      }
14691
 
14692
      return true;
14693
    }
14694
 
14695
    @Override
14696
    public int hashCode() {
14697
      return 0;
14698
    }
14699
 
14700
    public int compareTo(getAlerts_args other) {
14701
      if (!getClass().equals(other.getClass())) {
14702
        return getClass().getName().compareTo(other.getClass().getName());
14703
      }
14704
 
14705
      int lastComparison = 0;
14706
      getAlerts_args typedOther = (getAlerts_args)other;
14707
 
483 rajveer 14708
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 14709
      if (lastComparison != 0) {
14710
        return lastComparison;
14711
      }
483 rajveer 14712
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 14713
      if (lastComparison != 0) {
14714
        return lastComparison;
14715
      }
14716
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
14717
      if (lastComparison != 0) {
14718
        return lastComparison;
14719
      }
14720
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
14721
      if (lastComparison != 0) {
14722
        return lastComparison;
14723
      }
14724
      return 0;
14725
    }
14726
 
14727
    public void read(TProtocol iprot) throws TException {
14728
      TField field;
14729
      iprot.readStructBegin();
14730
      while (true)
14731
      {
14732
        field = iprot.readFieldBegin();
14733
        if (field.type == TType.STOP) { 
14734
          break;
14735
        }
14736
        _Fields fieldId = _Fields.findByThriftId(field.id);
14737
        if (fieldId == null) {
14738
          TProtocolUtil.skip(iprot, field.type);
14739
        } else {
14740
          switch (fieldId) {
483 rajveer 14741
            case ORDER_ID:
305 ashish 14742
              if (field.type == TType.I64) {
483 rajveer 14743
                this.orderId = iprot.readI64();
14744
                setOrderIdIsSet(true);
305 ashish 14745
              } else { 
14746
                TProtocolUtil.skip(iprot, field.type);
14747
              }
14748
              break;
14749
            case VALID:
14750
              if (field.type == TType.BOOL) {
14751
                this.valid = iprot.readBool();
14752
                setValidIsSet(true);
14753
              } else { 
14754
                TProtocolUtil.skip(iprot, field.type);
14755
              }
14756
              break;
14757
          }
14758
          iprot.readFieldEnd();
14759
        }
14760
      }
14761
      iprot.readStructEnd();
14762
      validate();
14763
    }
14764
 
14765
    public void write(TProtocol oprot) throws TException {
14766
      validate();
14767
 
14768
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14769
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14770
      oprot.writeI64(this.orderId);
305 ashish 14771
      oprot.writeFieldEnd();
14772
      oprot.writeFieldBegin(VALID_FIELD_DESC);
14773
      oprot.writeBool(this.valid);
14774
      oprot.writeFieldEnd();
14775
      oprot.writeFieldStop();
14776
      oprot.writeStructEnd();
14777
    }
14778
 
14779
    @Override
14780
    public String toString() {
14781
      StringBuilder sb = new StringBuilder("getAlerts_args(");
14782
      boolean first = true;
14783
 
483 rajveer 14784
      sb.append("orderId:");
14785
      sb.append(this.orderId);
305 ashish 14786
      first = false;
14787
      if (!first) sb.append(", ");
14788
      sb.append("valid:");
14789
      sb.append(this.valid);
14790
      first = false;
14791
      sb.append(")");
14792
      return sb.toString();
14793
    }
14794
 
14795
    public void validate() throws TException {
14796
      // check for required fields
14797
    }
14798
 
14799
  }
14800
 
14801
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
14802
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
14803
 
14804
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14805
 
14806
    private List<Alert> success;
14807
 
14808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14809
    public enum _Fields implements TFieldIdEnum {
14810
      SUCCESS((short)0, "success");
14811
 
14812
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14813
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14814
 
14815
      static {
14816
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14817
          byId.put((int)field._thriftId, field);
14818
          byName.put(field.getFieldName(), field);
14819
        }
14820
      }
14821
 
14822
      /**
14823
       * Find the _Fields constant that matches fieldId, or null if its not found.
14824
       */
14825
      public static _Fields findByThriftId(int fieldId) {
14826
        return byId.get(fieldId);
14827
      }
14828
 
14829
      /**
14830
       * Find the _Fields constant that matches fieldId, throwing an exception
14831
       * if it is not found.
14832
       */
14833
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14834
        _Fields fields = findByThriftId(fieldId);
14835
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14836
        return fields;
14837
      }
14838
 
14839
      /**
14840
       * Find the _Fields constant that matches name, or null if its not found.
14841
       */
14842
      public static _Fields findByName(String name) {
14843
        return byName.get(name);
14844
      }
14845
 
14846
      private final short _thriftId;
14847
      private final String _fieldName;
14848
 
14849
      _Fields(short thriftId, String fieldName) {
14850
        _thriftId = thriftId;
14851
        _fieldName = fieldName;
14852
      }
14853
 
14854
      public short getThriftFieldId() {
14855
        return _thriftId;
14856
      }
14857
 
14858
      public String getFieldName() {
14859
        return _fieldName;
14860
      }
14861
    }
14862
 
14863
    // isset id assignments
14864
 
14865
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14866
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14867
          new ListMetaData(TType.LIST, 
14868
              new StructMetaData(TType.STRUCT, Alert.class))));
14869
    }});
14870
 
14871
    static {
14872
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
14873
    }
14874
 
14875
    public getAlerts_result() {
14876
    }
14877
 
14878
    public getAlerts_result(
14879
      List<Alert> success)
14880
    {
14881
      this();
14882
      this.success = success;
14883
    }
14884
 
14885
    /**
14886
     * Performs a deep copy on <i>other</i>.
14887
     */
14888
    public getAlerts_result(getAlerts_result other) {
14889
      if (other.isSetSuccess()) {
14890
        List<Alert> __this__success = new ArrayList<Alert>();
14891
        for (Alert other_element : other.success) {
14892
          __this__success.add(new Alert(other_element));
14893
        }
14894
        this.success = __this__success;
14895
      }
14896
    }
14897
 
14898
    public getAlerts_result deepCopy() {
14899
      return new getAlerts_result(this);
14900
    }
14901
 
14902
    @Deprecated
14903
    public getAlerts_result clone() {
14904
      return new getAlerts_result(this);
14905
    }
14906
 
14907
    public int getSuccessSize() {
14908
      return (this.success == null) ? 0 : this.success.size();
14909
    }
14910
 
14911
    public java.util.Iterator<Alert> getSuccessIterator() {
14912
      return (this.success == null) ? null : this.success.iterator();
14913
    }
14914
 
14915
    public void addToSuccess(Alert elem) {
14916
      if (this.success == null) {
14917
        this.success = new ArrayList<Alert>();
14918
      }
14919
      this.success.add(elem);
14920
    }
14921
 
14922
    public List<Alert> getSuccess() {
14923
      return this.success;
14924
    }
14925
 
14926
    public getAlerts_result setSuccess(List<Alert> success) {
14927
      this.success = success;
14928
      return this;
14929
    }
14930
 
14931
    public void unsetSuccess() {
14932
      this.success = null;
14933
    }
14934
 
14935
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14936
    public boolean isSetSuccess() {
14937
      return this.success != null;
14938
    }
14939
 
14940
    public void setSuccessIsSet(boolean value) {
14941
      if (!value) {
14942
        this.success = null;
14943
      }
14944
    }
14945
 
14946
    public void setFieldValue(_Fields field, Object value) {
14947
      switch (field) {
14948
      case SUCCESS:
14949
        if (value == null) {
14950
          unsetSuccess();
14951
        } else {
14952
          setSuccess((List<Alert>)value);
14953
        }
14954
        break;
14955
 
14956
      }
14957
    }
14958
 
14959
    public void setFieldValue(int fieldID, Object value) {
14960
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14961
    }
14962
 
14963
    public Object getFieldValue(_Fields field) {
14964
      switch (field) {
14965
      case SUCCESS:
14966
        return getSuccess();
14967
 
14968
      }
14969
      throw new IllegalStateException();
14970
    }
14971
 
14972
    public Object getFieldValue(int fieldId) {
14973
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14974
    }
14975
 
14976
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14977
    public boolean isSet(_Fields field) {
14978
      switch (field) {
14979
      case SUCCESS:
14980
        return isSetSuccess();
14981
      }
14982
      throw new IllegalStateException();
14983
    }
14984
 
14985
    public boolean isSet(int fieldID) {
14986
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14987
    }
14988
 
14989
    @Override
14990
    public boolean equals(Object that) {
14991
      if (that == null)
14992
        return false;
14993
      if (that instanceof getAlerts_result)
14994
        return this.equals((getAlerts_result)that);
14995
      return false;
14996
    }
14997
 
14998
    public boolean equals(getAlerts_result that) {
14999
      if (that == null)
15000
        return false;
15001
 
15002
      boolean this_present_success = true && this.isSetSuccess();
15003
      boolean that_present_success = true && that.isSetSuccess();
15004
      if (this_present_success || that_present_success) {
15005
        if (!(this_present_success && that_present_success))
15006
          return false;
15007
        if (!this.success.equals(that.success))
15008
          return false;
15009
      }
15010
 
15011
      return true;
15012
    }
15013
 
15014
    @Override
15015
    public int hashCode() {
15016
      return 0;
15017
    }
15018
 
15019
    public int compareTo(getAlerts_result other) {
15020
      if (!getClass().equals(other.getClass())) {
15021
        return getClass().getName().compareTo(other.getClass().getName());
15022
      }
15023
 
15024
      int lastComparison = 0;
15025
      getAlerts_result typedOther = (getAlerts_result)other;
15026
 
15027
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15028
      if (lastComparison != 0) {
15029
        return lastComparison;
15030
      }
15031
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15032
      if (lastComparison != 0) {
15033
        return lastComparison;
15034
      }
15035
      return 0;
15036
    }
15037
 
15038
    public void read(TProtocol iprot) throws TException {
15039
      TField field;
15040
      iprot.readStructBegin();
15041
      while (true)
15042
      {
15043
        field = iprot.readFieldBegin();
15044
        if (field.type == TType.STOP) { 
15045
          break;
15046
        }
15047
        _Fields fieldId = _Fields.findByThriftId(field.id);
15048
        if (fieldId == null) {
15049
          TProtocolUtil.skip(iprot, field.type);
15050
        } else {
15051
          switch (fieldId) {
15052
            case SUCCESS:
15053
              if (field.type == TType.LIST) {
15054
                {
684 chandransh 15055
                  TList _list32 = iprot.readListBegin();
15056
                  this.success = new ArrayList<Alert>(_list32.size);
15057
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
305 ashish 15058
                  {
684 chandransh 15059
                    Alert _elem34;
15060
                    _elem34 = new Alert();
15061
                    _elem34.read(iprot);
15062
                    this.success.add(_elem34);
305 ashish 15063
                  }
15064
                  iprot.readListEnd();
15065
                }
15066
              } else { 
15067
                TProtocolUtil.skip(iprot, field.type);
15068
              }
15069
              break;
15070
          }
15071
          iprot.readFieldEnd();
15072
        }
15073
      }
15074
      iprot.readStructEnd();
15075
      validate();
15076
    }
15077
 
15078
    public void write(TProtocol oprot) throws TException {
15079
      oprot.writeStructBegin(STRUCT_DESC);
15080
 
15081
      if (this.isSetSuccess()) {
15082
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15083
        {
15084
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 15085
          for (Alert _iter35 : this.success)
305 ashish 15086
          {
684 chandransh 15087
            _iter35.write(oprot);
305 ashish 15088
          }
15089
          oprot.writeListEnd();
15090
        }
15091
        oprot.writeFieldEnd();
15092
      }
15093
      oprot.writeFieldStop();
15094
      oprot.writeStructEnd();
15095
    }
15096
 
15097
    @Override
15098
    public String toString() {
15099
      StringBuilder sb = new StringBuilder("getAlerts_result(");
15100
      boolean first = true;
15101
 
15102
      sb.append("success:");
15103
      if (this.success == null) {
15104
        sb.append("null");
15105
      } else {
15106
        sb.append(this.success);
15107
      }
15108
      first = false;
15109
      sb.append(")");
15110
      return sb.toString();
15111
    }
15112
 
15113
    public void validate() throws TException {
15114
      // check for required fields
15115
    }
15116
 
15117
  }
15118
 
15119
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
15120
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
15121
 
483 rajveer 15122
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 15123
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
15124
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
15125
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
15126
 
483 rajveer 15127
    private long orderId;
305 ashish 15128
    private boolean unset;
15129
    private long type;
15130
    private String comment;
15131
 
15132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15133
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15134
      ORDER_ID((short)1, "orderId"),
305 ashish 15135
      UNSET((short)2, "unset"),
15136
      TYPE((short)3, "type"),
15137
      COMMENT((short)4, "comment");
15138
 
15139
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15140
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15141
 
15142
      static {
15143
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15144
          byId.put((int)field._thriftId, field);
15145
          byName.put(field.getFieldName(), field);
15146
        }
15147
      }
15148
 
15149
      /**
15150
       * Find the _Fields constant that matches fieldId, or null if its not found.
15151
       */
15152
      public static _Fields findByThriftId(int fieldId) {
15153
        return byId.get(fieldId);
15154
      }
15155
 
15156
      /**
15157
       * Find the _Fields constant that matches fieldId, throwing an exception
15158
       * if it is not found.
15159
       */
15160
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15161
        _Fields fields = findByThriftId(fieldId);
15162
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15163
        return fields;
15164
      }
15165
 
15166
      /**
15167
       * Find the _Fields constant that matches name, or null if its not found.
15168
       */
15169
      public static _Fields findByName(String name) {
15170
        return byName.get(name);
15171
      }
15172
 
15173
      private final short _thriftId;
15174
      private final String _fieldName;
15175
 
15176
      _Fields(short thriftId, String fieldName) {
15177
        _thriftId = thriftId;
15178
        _fieldName = fieldName;
15179
      }
15180
 
15181
      public short getThriftFieldId() {
15182
        return _thriftId;
15183
      }
15184
 
15185
      public String getFieldName() {
15186
        return _fieldName;
15187
      }
15188
    }
15189
 
15190
    // isset id assignments
483 rajveer 15191
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 15192
    private static final int __UNSET_ISSET_ID = 1;
15193
    private static final int __TYPE_ISSET_ID = 2;
15194
    private BitSet __isset_bit_vector = new BitSet(3);
15195
 
15196
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15197
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 15198
          new FieldValueMetaData(TType.I64)));
15199
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
15200
          new FieldValueMetaData(TType.BOOL)));
15201
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
15202
          new FieldValueMetaData(TType.I64)));
15203
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
15204
          new FieldValueMetaData(TType.STRING)));
15205
    }});
15206
 
15207
    static {
15208
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
15209
    }
15210
 
15211
    public setAlert_args() {
15212
    }
15213
 
15214
    public setAlert_args(
483 rajveer 15215
      long orderId,
305 ashish 15216
      boolean unset,
15217
      long type,
15218
      String comment)
15219
    {
15220
      this();
483 rajveer 15221
      this.orderId = orderId;
15222
      setOrderIdIsSet(true);
305 ashish 15223
      this.unset = unset;
15224
      setUnsetIsSet(true);
15225
      this.type = type;
15226
      setTypeIsSet(true);
15227
      this.comment = comment;
15228
    }
15229
 
15230
    /**
15231
     * Performs a deep copy on <i>other</i>.
15232
     */
15233
    public setAlert_args(setAlert_args other) {
15234
      __isset_bit_vector.clear();
15235
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15236
      this.orderId = other.orderId;
305 ashish 15237
      this.unset = other.unset;
15238
      this.type = other.type;
15239
      if (other.isSetComment()) {
15240
        this.comment = other.comment;
15241
      }
15242
    }
15243
 
15244
    public setAlert_args deepCopy() {
15245
      return new setAlert_args(this);
15246
    }
15247
 
15248
    @Deprecated
15249
    public setAlert_args clone() {
15250
      return new setAlert_args(this);
15251
    }
15252
 
483 rajveer 15253
    public long getOrderId() {
15254
      return this.orderId;
305 ashish 15255
    }
15256
 
483 rajveer 15257
    public setAlert_args setOrderId(long orderId) {
15258
      this.orderId = orderId;
15259
      setOrderIdIsSet(true);
305 ashish 15260
      return this;
15261
    }
15262
 
483 rajveer 15263
    public void unsetOrderId() {
15264
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 15265
    }
15266
 
483 rajveer 15267
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15268
    public boolean isSetOrderId() {
15269
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 15270
    }
15271
 
483 rajveer 15272
    public void setOrderIdIsSet(boolean value) {
15273
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 15274
    }
15275
 
15276
    public boolean isUnset() {
15277
      return this.unset;
15278
    }
15279
 
15280
    public setAlert_args setUnset(boolean unset) {
15281
      this.unset = unset;
15282
      setUnsetIsSet(true);
15283
      return this;
15284
    }
15285
 
15286
    public void unsetUnset() {
15287
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
15288
    }
15289
 
15290
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
15291
    public boolean isSetUnset() {
15292
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
15293
    }
15294
 
15295
    public void setUnsetIsSet(boolean value) {
15296
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
15297
    }
15298
 
15299
    public long getType() {
15300
      return this.type;
15301
    }
15302
 
15303
    public setAlert_args setType(long type) {
15304
      this.type = type;
15305
      setTypeIsSet(true);
15306
      return this;
15307
    }
15308
 
15309
    public void unsetType() {
15310
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
15311
    }
15312
 
15313
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
15314
    public boolean isSetType() {
15315
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
15316
    }
15317
 
15318
    public void setTypeIsSet(boolean value) {
15319
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
15320
    }
15321
 
15322
    public String getComment() {
15323
      return this.comment;
15324
    }
15325
 
15326
    public setAlert_args setComment(String comment) {
15327
      this.comment = comment;
15328
      return this;
15329
    }
15330
 
15331
    public void unsetComment() {
15332
      this.comment = null;
15333
    }
15334
 
15335
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
15336
    public boolean isSetComment() {
15337
      return this.comment != null;
15338
    }
15339
 
15340
    public void setCommentIsSet(boolean value) {
15341
      if (!value) {
15342
        this.comment = null;
15343
      }
15344
    }
15345
 
15346
    public void setFieldValue(_Fields field, Object value) {
15347
      switch (field) {
483 rajveer 15348
      case ORDER_ID:
305 ashish 15349
        if (value == null) {
483 rajveer 15350
          unsetOrderId();
305 ashish 15351
        } else {
483 rajveer 15352
          setOrderId((Long)value);
305 ashish 15353
        }
15354
        break;
15355
 
15356
      case UNSET:
15357
        if (value == null) {
15358
          unsetUnset();
15359
        } else {
15360
          setUnset((Boolean)value);
15361
        }
15362
        break;
15363
 
15364
      case TYPE:
15365
        if (value == null) {
15366
          unsetType();
15367
        } else {
15368
          setType((Long)value);
15369
        }
15370
        break;
15371
 
15372
      case COMMENT:
15373
        if (value == null) {
15374
          unsetComment();
15375
        } else {
15376
          setComment((String)value);
15377
        }
15378
        break;
15379
 
15380
      }
15381
    }
15382
 
15383
    public void setFieldValue(int fieldID, Object value) {
15384
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15385
    }
15386
 
15387
    public Object getFieldValue(_Fields field) {
15388
      switch (field) {
483 rajveer 15389
      case ORDER_ID:
15390
        return new Long(getOrderId());
305 ashish 15391
 
15392
      case UNSET:
15393
        return new Boolean(isUnset());
15394
 
15395
      case TYPE:
15396
        return new Long(getType());
15397
 
15398
      case COMMENT:
15399
        return getComment();
15400
 
15401
      }
15402
      throw new IllegalStateException();
15403
    }
15404
 
15405
    public Object getFieldValue(int fieldId) {
15406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15407
    }
15408
 
15409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15410
    public boolean isSet(_Fields field) {
15411
      switch (field) {
483 rajveer 15412
      case ORDER_ID:
15413
        return isSetOrderId();
305 ashish 15414
      case UNSET:
15415
        return isSetUnset();
15416
      case TYPE:
15417
        return isSetType();
15418
      case COMMENT:
15419
        return isSetComment();
15420
      }
15421
      throw new IllegalStateException();
15422
    }
15423
 
15424
    public boolean isSet(int fieldID) {
15425
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15426
    }
15427
 
15428
    @Override
15429
    public boolean equals(Object that) {
15430
      if (that == null)
15431
        return false;
15432
      if (that instanceof setAlert_args)
15433
        return this.equals((setAlert_args)that);
15434
      return false;
15435
    }
15436
 
15437
    public boolean equals(setAlert_args that) {
15438
      if (that == null)
15439
        return false;
15440
 
483 rajveer 15441
      boolean this_present_orderId = true;
15442
      boolean that_present_orderId = true;
15443
      if (this_present_orderId || that_present_orderId) {
15444
        if (!(this_present_orderId && that_present_orderId))
305 ashish 15445
          return false;
483 rajveer 15446
        if (this.orderId != that.orderId)
305 ashish 15447
          return false;
15448
      }
15449
 
15450
      boolean this_present_unset = true;
15451
      boolean that_present_unset = true;
15452
      if (this_present_unset || that_present_unset) {
15453
        if (!(this_present_unset && that_present_unset))
15454
          return false;
15455
        if (this.unset != that.unset)
15456
          return false;
15457
      }
15458
 
15459
      boolean this_present_type = true;
15460
      boolean that_present_type = true;
15461
      if (this_present_type || that_present_type) {
15462
        if (!(this_present_type && that_present_type))
15463
          return false;
15464
        if (this.type != that.type)
15465
          return false;
15466
      }
15467
 
15468
      boolean this_present_comment = true && this.isSetComment();
15469
      boolean that_present_comment = true && that.isSetComment();
15470
      if (this_present_comment || that_present_comment) {
15471
        if (!(this_present_comment && that_present_comment))
15472
          return false;
15473
        if (!this.comment.equals(that.comment))
15474
          return false;
15475
      }
15476
 
15477
      return true;
15478
    }
15479
 
15480
    @Override
15481
    public int hashCode() {
15482
      return 0;
15483
    }
15484
 
15485
    public int compareTo(setAlert_args other) {
15486
      if (!getClass().equals(other.getClass())) {
15487
        return getClass().getName().compareTo(other.getClass().getName());
15488
      }
15489
 
15490
      int lastComparison = 0;
15491
      setAlert_args typedOther = (setAlert_args)other;
15492
 
483 rajveer 15493
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 15494
      if (lastComparison != 0) {
15495
        return lastComparison;
15496
      }
483 rajveer 15497
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 15498
      if (lastComparison != 0) {
15499
        return lastComparison;
15500
      }
15501
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
15502
      if (lastComparison != 0) {
15503
        return lastComparison;
15504
      }
15505
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
15506
      if (lastComparison != 0) {
15507
        return lastComparison;
15508
      }
15509
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
15510
      if (lastComparison != 0) {
15511
        return lastComparison;
15512
      }
15513
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
15514
      if (lastComparison != 0) {
15515
        return lastComparison;
15516
      }
15517
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
15518
      if (lastComparison != 0) {
15519
        return lastComparison;
15520
      }
15521
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
15522
      if (lastComparison != 0) {
15523
        return lastComparison;
15524
      }
15525
      return 0;
15526
    }
15527
 
15528
    public void read(TProtocol iprot) throws TException {
15529
      TField field;
15530
      iprot.readStructBegin();
15531
      while (true)
15532
      {
15533
        field = iprot.readFieldBegin();
15534
        if (field.type == TType.STOP) { 
15535
          break;
15536
        }
15537
        _Fields fieldId = _Fields.findByThriftId(field.id);
15538
        if (fieldId == null) {
15539
          TProtocolUtil.skip(iprot, field.type);
15540
        } else {
15541
          switch (fieldId) {
483 rajveer 15542
            case ORDER_ID:
305 ashish 15543
              if (field.type == TType.I64) {
483 rajveer 15544
                this.orderId = iprot.readI64();
15545
                setOrderIdIsSet(true);
305 ashish 15546
              } else { 
15547
                TProtocolUtil.skip(iprot, field.type);
15548
              }
15549
              break;
15550
            case UNSET:
15551
              if (field.type == TType.BOOL) {
15552
                this.unset = iprot.readBool();
15553
                setUnsetIsSet(true);
15554
              } else { 
15555
                TProtocolUtil.skip(iprot, field.type);
15556
              }
15557
              break;
15558
            case TYPE:
15559
              if (field.type == TType.I64) {
15560
                this.type = iprot.readI64();
15561
                setTypeIsSet(true);
15562
              } else { 
15563
                TProtocolUtil.skip(iprot, field.type);
15564
              }
15565
              break;
15566
            case COMMENT:
15567
              if (field.type == TType.STRING) {
15568
                this.comment = iprot.readString();
15569
              } else { 
15570
                TProtocolUtil.skip(iprot, field.type);
15571
              }
15572
              break;
15573
          }
15574
          iprot.readFieldEnd();
15575
        }
15576
      }
15577
      iprot.readStructEnd();
15578
      validate();
15579
    }
15580
 
15581
    public void write(TProtocol oprot) throws TException {
15582
      validate();
15583
 
15584
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15585
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15586
      oprot.writeI64(this.orderId);
305 ashish 15587
      oprot.writeFieldEnd();
15588
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
15589
      oprot.writeBool(this.unset);
15590
      oprot.writeFieldEnd();
15591
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
15592
      oprot.writeI64(this.type);
15593
      oprot.writeFieldEnd();
15594
      if (this.comment != null) {
15595
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
15596
        oprot.writeString(this.comment);
15597
        oprot.writeFieldEnd();
15598
      }
15599
      oprot.writeFieldStop();
15600
      oprot.writeStructEnd();
15601
    }
15602
 
15603
    @Override
15604
    public String toString() {
15605
      StringBuilder sb = new StringBuilder("setAlert_args(");
15606
      boolean first = true;
15607
 
483 rajveer 15608
      sb.append("orderId:");
15609
      sb.append(this.orderId);
305 ashish 15610
      first = false;
15611
      if (!first) sb.append(", ");
15612
      sb.append("unset:");
15613
      sb.append(this.unset);
15614
      first = false;
15615
      if (!first) sb.append(", ");
15616
      sb.append("type:");
15617
      sb.append(this.type);
15618
      first = false;
15619
      if (!first) sb.append(", ");
15620
      sb.append("comment:");
15621
      if (this.comment == null) {
15622
        sb.append("null");
15623
      } else {
15624
        sb.append(this.comment);
15625
      }
15626
      first = false;
15627
      sb.append(")");
15628
      return sb.toString();
15629
    }
15630
 
15631
    public void validate() throws TException {
15632
      // check for required fields
15633
    }
15634
 
15635
  }
15636
 
15637
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
15638
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
15639
 
15640
 
15641
 
15642
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15643
    public enum _Fields implements TFieldIdEnum {
15644
;
15645
 
15646
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15648
 
15649
      static {
15650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15651
          byId.put((int)field._thriftId, field);
15652
          byName.put(field.getFieldName(), field);
15653
        }
15654
      }
15655
 
15656
      /**
15657
       * Find the _Fields constant that matches fieldId, or null if its not found.
15658
       */
15659
      public static _Fields findByThriftId(int fieldId) {
15660
        return byId.get(fieldId);
15661
      }
15662
 
15663
      /**
15664
       * Find the _Fields constant that matches fieldId, throwing an exception
15665
       * if it is not found.
15666
       */
15667
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15668
        _Fields fields = findByThriftId(fieldId);
15669
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15670
        return fields;
15671
      }
15672
 
15673
      /**
15674
       * Find the _Fields constant that matches name, or null if its not found.
15675
       */
15676
      public static _Fields findByName(String name) {
15677
        return byName.get(name);
15678
      }
15679
 
15680
      private final short _thriftId;
15681
      private final String _fieldName;
15682
 
15683
      _Fields(short thriftId, String fieldName) {
15684
        _thriftId = thriftId;
15685
        _fieldName = fieldName;
15686
      }
15687
 
15688
      public short getThriftFieldId() {
15689
        return _thriftId;
15690
      }
15691
 
15692
      public String getFieldName() {
15693
        return _fieldName;
15694
      }
15695
    }
15696
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15697
    }});
15698
 
15699
    static {
15700
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
15701
    }
15702
 
15703
    public setAlert_result() {
15704
    }
15705
 
15706
    /**
15707
     * Performs a deep copy on <i>other</i>.
15708
     */
15709
    public setAlert_result(setAlert_result other) {
15710
    }
15711
 
15712
    public setAlert_result deepCopy() {
15713
      return new setAlert_result(this);
15714
    }
15715
 
15716
    @Deprecated
15717
    public setAlert_result clone() {
15718
      return new setAlert_result(this);
15719
    }
15720
 
15721
    public void setFieldValue(_Fields field, Object value) {
15722
      switch (field) {
15723
      }
15724
    }
15725
 
15726
    public void setFieldValue(int fieldID, Object value) {
15727
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15728
    }
15729
 
15730
    public Object getFieldValue(_Fields field) {
15731
      switch (field) {
15732
      }
15733
      throw new IllegalStateException();
15734
    }
15735
 
15736
    public Object getFieldValue(int fieldId) {
15737
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15738
    }
15739
 
15740
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15741
    public boolean isSet(_Fields field) {
15742
      switch (field) {
15743
      }
15744
      throw new IllegalStateException();
15745
    }
15746
 
15747
    public boolean isSet(int fieldID) {
15748
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15749
    }
15750
 
15751
    @Override
15752
    public boolean equals(Object that) {
15753
      if (that == null)
15754
        return false;
15755
      if (that instanceof setAlert_result)
15756
        return this.equals((setAlert_result)that);
15757
      return false;
15758
    }
15759
 
15760
    public boolean equals(setAlert_result that) {
15761
      if (that == null)
15762
        return false;
15763
 
15764
      return true;
15765
    }
15766
 
15767
    @Override
15768
    public int hashCode() {
15769
      return 0;
15770
    }
15771
 
15772
    public int compareTo(setAlert_result other) {
15773
      if (!getClass().equals(other.getClass())) {
15774
        return getClass().getName().compareTo(other.getClass().getName());
15775
      }
15776
 
15777
      int lastComparison = 0;
15778
      setAlert_result typedOther = (setAlert_result)other;
15779
 
15780
      return 0;
15781
    }
15782
 
15783
    public void read(TProtocol iprot) throws TException {
15784
      TField field;
15785
      iprot.readStructBegin();
15786
      while (true)
15787
      {
15788
        field = iprot.readFieldBegin();
15789
        if (field.type == TType.STOP) { 
15790
          break;
15791
        }
15792
        _Fields fieldId = _Fields.findByThriftId(field.id);
15793
        if (fieldId == null) {
15794
          TProtocolUtil.skip(iprot, field.type);
15795
        } else {
15796
          switch (fieldId) {
15797
          }
15798
          iprot.readFieldEnd();
15799
        }
15800
      }
15801
      iprot.readStructEnd();
15802
      validate();
15803
    }
15804
 
15805
    public void write(TProtocol oprot) throws TException {
15806
      oprot.writeStructBegin(STRUCT_DESC);
15807
 
15808
      oprot.writeFieldStop();
15809
      oprot.writeStructEnd();
15810
    }
15811
 
15812
    @Override
15813
    public String toString() {
15814
      StringBuilder sb = new StringBuilder("setAlert_result(");
15815
      boolean first = true;
15816
 
15817
      sb.append(")");
15818
      return sb.toString();
15819
    }
15820
 
15821
    public void validate() throws TException {
15822
      // check for required fields
15823
    }
15824
 
15825
  }
15826
 
68 ashish 15827
}