Subversion Repositories SmartDukaan

Rev

Rev 1013 | Rev 1114 | 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
 
1022 varun.gupt 49
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
50
 
483 rajveer 51
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 52
 
640 chandransh 53
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 54
 
923 rajveer 55
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
56
 
57
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
58
 
483 rajveer 59
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 60
 
483 rajveer 61
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 62
 
483 rajveer 63
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 64
 
483 rajveer 65
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 66
 
483 rajveer 67
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 68
 
758 chandransh 69
    /**
70
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
71
     * 
72
     * @param warehouseId
73
     * @param providerId
74
     */
75
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 78
 
483 rajveer 79
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 80
 
81
  }
82
 
83
  public static class Client implements Iface {
84
    public Client(TProtocol prot)
85
    {
86
      this(prot, prot);
87
    }
88
 
89
    public Client(TProtocol iprot, TProtocol oprot)
90
    {
91
      iprot_ = iprot;
92
      oprot_ = oprot;
93
    }
94
 
95
    protected TProtocol iprot_;
96
    protected TProtocol oprot_;
97
 
98
    protected int seqid_;
99
 
100
    public TProtocol getInputProtocol()
101
    {
102
      return this.iprot_;
103
    }
104
 
105
    public TProtocol getOutputProtocol()
106
    {
107
      return this.oprot_;
108
    }
109
 
764 rajveer 110
    public void closeSession() throws TException
111
    {
112
      send_closeSession();
113
      recv_closeSession();
114
    }
115
 
116
    public void send_closeSession() throws TException
117
    {
118
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
119
      closeSession_args args = new closeSession_args();
120
      args.write(oprot_);
121
      oprot_.writeMessageEnd();
122
      oprot_.getTransport().flush();
123
    }
124
 
125
    public void recv_closeSession() throws TException
126
    {
127
      TMessage msg = iprot_.readMessageBegin();
128
      if (msg.type == TMessageType.EXCEPTION) {
129
        TApplicationException x = TApplicationException.read(iprot_);
130
        iprot_.readMessageEnd();
131
        throw x;
132
      }
133
      closeSession_result result = new closeSession_result();
134
      result.read(iprot_);
135
      iprot_.readMessageEnd();
136
      return;
137
    }
138
 
132 ashish 139
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 140
    {
141
      send_createTransaction(transaction);
132 ashish 142
      return recv_createTransaction();
68 ashish 143
    }
144
 
145
    public void send_createTransaction(Transaction transaction) throws TException
146
    {
147
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
148
      createTransaction_args args = new createTransaction_args();
149
      args.transaction = transaction;
150
      args.write(oprot_);
151
      oprot_.writeMessageEnd();
152
      oprot_.getTransport().flush();
153
    }
154
 
132 ashish 155
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 156
    {
157
      TMessage msg = iprot_.readMessageBegin();
158
      if (msg.type == TMessageType.EXCEPTION) {
159
        TApplicationException x = TApplicationException.read(iprot_);
160
        iprot_.readMessageEnd();
161
        throw x;
162
      }
163
      createTransaction_result result = new createTransaction_result();
164
      result.read(iprot_);
165
      iprot_.readMessageEnd();
132 ashish 166
      if (result.isSetSuccess()) {
167
        return result.success;
168
      }
68 ashish 169
      if (result.ex != null) {
170
        throw result.ex;
171
      }
132 ashish 172
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 173
    }
174
 
175
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
176
    {
177
      send_getTransaction(id);
178
      return recv_getTransaction();
179
    }
180
 
181
    public void send_getTransaction(long id) throws TException
182
    {
183
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
184
      getTransaction_args args = new getTransaction_args();
185
      args.id = id;
186
      args.write(oprot_);
187
      oprot_.writeMessageEnd();
188
      oprot_.getTransport().flush();
189
    }
190
 
191
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
192
    {
193
      TMessage msg = iprot_.readMessageBegin();
194
      if (msg.type == TMessageType.EXCEPTION) {
195
        TApplicationException x = TApplicationException.read(iprot_);
196
        iprot_.readMessageEnd();
197
        throw x;
198
      }
199
      getTransaction_result result = new getTransaction_result();
200
      result.read(iprot_);
201
      iprot_.readMessageEnd();
202
      if (result.isSetSuccess()) {
203
        return result.success;
204
      }
205
      if (result.ex != null) {
206
        throw result.ex;
207
      }
208
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
209
    }
210
 
132 ashish 211
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 212
    {
132 ashish 213
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 214
      return recv_getTransactionsForCustomer();
215
    }
216
 
132 ashish 217
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 218
    {
219
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
220
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
221
      args.customerId = customerId;
132 ashish 222
      args.from_date = from_date;
223
      args.to_date = to_date;
68 ashish 224
      args.status = status;
225
      args.write(oprot_);
226
      oprot_.writeMessageEnd();
227
      oprot_.getTransport().flush();
228
    }
229
 
230
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
231
    {
232
      TMessage msg = iprot_.readMessageBegin();
233
      if (msg.type == TMessageType.EXCEPTION) {
234
        TApplicationException x = TApplicationException.read(iprot_);
235
        iprot_.readMessageEnd();
236
        throw x;
237
      }
238
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
239
      result.read(iprot_);
240
      iprot_.readMessageEnd();
241
      if (result.isSetSuccess()) {
242
        return result.success;
243
      }
244
      if (result.ex != null) {
245
        throw result.ex;
246
      }
247
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
248
    }
249
 
132 ashish 250
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
251
    {
252
      send_getTransactionsForShoppingCartId(shoppingCartId);
253
      return recv_getTransactionsForShoppingCartId();
254
    }
255
 
256
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
257
    {
258
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
259
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
260
      args.shoppingCartId = shoppingCartId;
261
      args.write(oprot_);
262
      oprot_.writeMessageEnd();
263
      oprot_.getTransport().flush();
264
    }
265
 
266
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
267
    {
268
      TMessage msg = iprot_.readMessageBegin();
269
      if (msg.type == TMessageType.EXCEPTION) {
270
        TApplicationException x = TApplicationException.read(iprot_);
271
        iprot_.readMessageEnd();
272
        throw x;
273
      }
274
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
275
      result.read(iprot_);
276
      iprot_.readMessageEnd();
277
      if (result.isSetSuccess()) {
278
        return result.success;
279
      }
280
      if (result.ex != null) {
281
        throw result.ex;
282
      }
283
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
284
    }
285
 
68 ashish 286
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
287
    {
288
      send_getTransactionStatus(transactionId);
289
      return recv_getTransactionStatus();
290
    }
291
 
292
    public void send_getTransactionStatus(long transactionId) throws TException
293
    {
294
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
295
      getTransactionStatus_args args = new getTransactionStatus_args();
296
      args.transactionId = transactionId;
297
      args.write(oprot_);
298
      oprot_.writeMessageEnd();
299
      oprot_.getTransport().flush();
300
    }
301
 
302
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
303
    {
304
      TMessage msg = iprot_.readMessageBegin();
305
      if (msg.type == TMessageType.EXCEPTION) {
306
        TApplicationException x = TApplicationException.read(iprot_);
307
        iprot_.readMessageEnd();
308
        throw x;
309
      }
310
      getTransactionStatus_result result = new getTransactionStatus_result();
311
      result.read(iprot_);
312
      iprot_.readMessageEnd();
313
      if (result.isSetSuccess()) {
314
        return result.success;
315
      }
316
      if (result.ex != null) {
317
        throw result.ex;
318
      }
319
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
320
    }
321
 
322
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
323
    {
324
      send_changeTransactionStatus(transactionId, status, description);
325
      return recv_changeTransactionStatus();
326
    }
327
 
328
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
329
    {
330
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
331
      changeTransactionStatus_args args = new changeTransactionStatus_args();
332
      args.transactionId = transactionId;
333
      args.status = status;
334
      args.description = description;
335
      args.write(oprot_);
336
      oprot_.writeMessageEnd();
337
      oprot_.getTransport().flush();
338
    }
339
 
340
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
341
    {
342
      TMessage msg = iprot_.readMessageBegin();
343
      if (msg.type == TMessageType.EXCEPTION) {
344
        TApplicationException x = TApplicationException.read(iprot_);
345
        iprot_.readMessageEnd();
346
        throw x;
347
      }
348
      changeTransactionStatus_result result = new changeTransactionStatus_result();
349
      result.read(iprot_);
350
      iprot_.readMessageEnd();
351
      if (result.isSetSuccess()) {
352
        return result.success;
353
      }
354
      if (result.ex != null) {
355
        throw result.ex;
356
      }
357
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
358
    }
359
 
483 rajveer 360
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 361
    {
483 rajveer 362
      send_getAllOrders(status, from_date, to_date, warehouse_id);
363
      return recv_getAllOrders();
68 ashish 364
    }
365
 
483 rajveer 366
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 367
    {
483 rajveer 368
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
369
      getAllOrders_args args = new getAllOrders_args();
370
      args.status = status;
371
      args.from_date = from_date;
372
      args.to_date = to_date;
373
      args.warehouse_id = warehouse_id;
68 ashish 374
      args.write(oprot_);
375
      oprot_.writeMessageEnd();
376
      oprot_.getTransport().flush();
377
    }
378
 
483 rajveer 379
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 380
    {
381
      TMessage msg = iprot_.readMessageBegin();
382
      if (msg.type == TMessageType.EXCEPTION) {
383
        TApplicationException x = TApplicationException.read(iprot_);
384
        iprot_.readMessageEnd();
385
        throw x;
386
      }
483 rajveer 387
      getAllOrders_result result = new getAllOrders_result();
68 ashish 388
      result.read(iprot_);
389
      iprot_.readMessageEnd();
390
      if (result.isSetSuccess()) {
391
        return result.success;
392
      }
393
      if (result.ex != null) {
394
        throw result.ex;
395
      }
483 rajveer 396
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 397
    }
398
 
1022 varun.gupt 399
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
400
    {
401
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
402
      return recv_getOrdersByBillingDate();
403
    }
404
 
405
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
406
    {
407
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
408
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
409
      args.status = status;
410
      args.start_billing_date = start_billing_date;
411
      args.end_billing_date = end_billing_date;
412
      args.warehouse_id = warehouse_id;
413
      args.write(oprot_);
414
      oprot_.writeMessageEnd();
415
      oprot_.getTransport().flush();
416
    }
417
 
418
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
419
    {
420
      TMessage msg = iprot_.readMessageBegin();
421
      if (msg.type == TMessageType.EXCEPTION) {
422
        TApplicationException x = TApplicationException.read(iprot_);
423
        iprot_.readMessageEnd();
424
        throw x;
425
      }
426
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
427
      result.read(iprot_);
428
      iprot_.readMessageEnd();
429
      if (result.isSetSuccess()) {
430
        return result.success;
431
      }
432
      if (result.ex != null) {
433
        throw result.ex;
434
      }
435
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
436
    }
437
 
483 rajveer 438
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 439
    {
483 rajveer 440
      send_changeOrderStatus(orderId, status, description);
441
      return recv_changeOrderStatus();
68 ashish 442
    }
443
 
483 rajveer 444
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 445
    {
483 rajveer 446
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
447
      changeOrderStatus_args args = new changeOrderStatus_args();
448
      args.orderId = orderId;
449
      args.status = status;
450
      args.description = description;
68 ashish 451
      args.write(oprot_);
452
      oprot_.writeMessageEnd();
453
      oprot_.getTransport().flush();
454
    }
455
 
483 rajveer 456
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 457
    {
458
      TMessage msg = iprot_.readMessageBegin();
459
      if (msg.type == TMessageType.EXCEPTION) {
460
        TApplicationException x = TApplicationException.read(iprot_);
461
        iprot_.readMessageEnd();
462
        throw x;
463
      }
483 rajveer 464
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 465
      result.read(iprot_);
466
      iprot_.readMessageEnd();
467
      if (result.isSetSuccess()) {
468
        return result.success;
469
      }
470
      if (result.ex != null) {
471
        throw result.ex;
472
      }
483 rajveer 473
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 474
    }
475
 
640 chandransh 476
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 477
    {
640 chandransh 478
      send_addBillingDetails(orderId, invoice_number, jacket_number, billed_by);
495 rajveer 479
      return recv_addBillingDetails();
480
    }
481
 
640 chandransh 482
    public void send_addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TException
495 rajveer 483
    {
484
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
485
      addBillingDetails_args args = new addBillingDetails_args();
486
      args.orderId = orderId;
487
      args.invoice_number = invoice_number;
640 chandransh 488
      args.jacket_number = jacket_number;
495 rajveer 489
      args.billed_by = billed_by;
490
      args.write(oprot_);
491
      oprot_.writeMessageEnd();
492
      oprot_.getTransport().flush();
493
    }
494
 
495
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
496
    {
497
      TMessage msg = iprot_.readMessageBegin();
498
      if (msg.type == TMessageType.EXCEPTION) {
499
        TApplicationException x = TApplicationException.read(iprot_);
500
        iprot_.readMessageEnd();
501
        throw x;
502
      }
503
      addBillingDetails_result result = new addBillingDetails_result();
504
      result.read(iprot_);
505
      iprot_.readMessageEnd();
506
      if (result.isSetSuccess()) {
507
        return result.success;
508
      }
509
      if (result.ex != null) {
510
        throw result.ex;
511
      }
512
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
513
    }
514
 
923 rajveer 515
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
516
    {
517
      send_acceptOrder(orderId);
518
      return recv_acceptOrder();
519
    }
520
 
521
    public void send_acceptOrder(long orderId) throws TException
522
    {
523
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
524
      acceptOrder_args args = new acceptOrder_args();
525
      args.orderId = orderId;
526
      args.write(oprot_);
527
      oprot_.writeMessageEnd();
528
      oprot_.getTransport().flush();
529
    }
530
 
531
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
532
    {
533
      TMessage msg = iprot_.readMessageBegin();
534
      if (msg.type == TMessageType.EXCEPTION) {
535
        TApplicationException x = TApplicationException.read(iprot_);
536
        iprot_.readMessageEnd();
537
        throw x;
538
      }
539
      acceptOrder_result result = new acceptOrder_result();
540
      result.read(iprot_);
541
      iprot_.readMessageEnd();
542
      if (result.isSetSuccess()) {
543
        return result.success;
544
      }
545
      if (result.ex != null) {
546
        throw result.ex;
547
      }
548
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
549
    }
550
 
551
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
552
    {
553
      send_billOrder(orderId);
554
      return recv_billOrder();
555
    }
556
 
557
    public void send_billOrder(long orderId) throws TException
558
    {
559
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
560
      billOrder_args args = new billOrder_args();
561
      args.orderId = orderId;
562
      args.write(oprot_);
563
      oprot_.writeMessageEnd();
564
      oprot_.getTransport().flush();
565
    }
566
 
567
    public boolean recv_billOrder() throws TransactionServiceException, TException
568
    {
569
      TMessage msg = iprot_.readMessageBegin();
570
      if (msg.type == TMessageType.EXCEPTION) {
571
        TApplicationException x = TApplicationException.read(iprot_);
572
        iprot_.readMessageEnd();
573
        throw x;
574
      }
575
      billOrder_result result = new billOrder_result();
576
      result.read(iprot_);
577
      iprot_.readMessageEnd();
578
      if (result.isSetSuccess()) {
579
        return result.success;
580
      }
581
      if (result.ex != null) {
582
        throw result.ex;
583
      }
584
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
585
    }
586
 
483 rajveer 587
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 588
    {
483 rajveer 589
      send_getOrdersForTransaction(transactionId);
590
      return recv_getOrdersForTransaction();
68 ashish 591
    }
592
 
483 rajveer 593
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 594
    {
483 rajveer 595
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
596
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 597
      args.transactionId = transactionId;
598
      args.write(oprot_);
599
      oprot_.writeMessageEnd();
600
      oprot_.getTransport().flush();
601
    }
602
 
483 rajveer 603
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 604
    {
605
      TMessage msg = iprot_.readMessageBegin();
606
      if (msg.type == TMessageType.EXCEPTION) {
607
        TApplicationException x = TApplicationException.read(iprot_);
608
        iprot_.readMessageEnd();
609
        throw x;
610
      }
483 rajveer 611
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 612
      result.read(iprot_);
613
      iprot_.readMessageEnd();
614
      if (result.isSetSuccess()) {
615
        return result.success;
616
      }
617
      if (result.ex != null) {
618
        throw result.ex;
619
      }
483 rajveer 620
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 621
    }
622
 
483 rajveer 623
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 624
    {
483 rajveer 625
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
626
      return recv_getOrdersForCustomer();
68 ashish 627
    }
628
 
483 rajveer 629
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 630
    {
483 rajveer 631
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
632
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
633
      args.customerId = customerId;
634
      args.from_date = from_date;
635
      args.to_date = to_date;
636
      args.status = status;
68 ashish 637
      args.write(oprot_);
638
      oprot_.writeMessageEnd();
639
      oprot_.getTransport().flush();
640
    }
641
 
483 rajveer 642
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 643
    {
644
      TMessage msg = iprot_.readMessageBegin();
645
      if (msg.type == TMessageType.EXCEPTION) {
646
        TApplicationException x = TApplicationException.read(iprot_);
647
        iprot_.readMessageEnd();
648
        throw x;
649
      }
483 rajveer 650
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 651
      result.read(iprot_);
652
      iprot_.readMessageEnd();
653
      if (result.isSetSuccess()) {
654
        return result.success;
655
      }
656
      if (result.ex != null) {
657
        throw result.ex;
658
      }
483 rajveer 659
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 660
    }
661
 
483 rajveer 662
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 663
    {
483 rajveer 664
      send_createOrder(order);
665
      return recv_createOrder();
68 ashish 666
    }
667
 
483 rajveer 668
    public void send_createOrder(Order order) throws TException
68 ashish 669
    {
483 rajveer 670
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
671
      createOrder_args args = new createOrder_args();
672
      args.order = order;
68 ashish 673
      args.write(oprot_);
674
      oprot_.writeMessageEnd();
675
      oprot_.getTransport().flush();
676
    }
677
 
483 rajveer 678
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 679
    {
680
      TMessage msg = iprot_.readMessageBegin();
681
      if (msg.type == TMessageType.EXCEPTION) {
682
        TApplicationException x = TApplicationException.read(iprot_);
683
        iprot_.readMessageEnd();
684
        throw x;
685
      }
483 rajveer 686
      createOrder_result result = new createOrder_result();
68 ashish 687
      result.read(iprot_);
688
      iprot_.readMessageEnd();
689
      if (result.isSetSuccess()) {
690
        return result.success;
691
      }
692
      if (result.ex != null) {
693
        throw result.ex;
694
      }
483 rajveer 695
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 696
    }
697
 
483 rajveer 698
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 699
    {
483 rajveer 700
      send_getOrder(id);
701
      return recv_getOrder();
68 ashish 702
    }
703
 
483 rajveer 704
    public void send_getOrder(long id) throws TException
68 ashish 705
    {
483 rajveer 706
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
707
      getOrder_args args = new getOrder_args();
708
      args.id = id;
68 ashish 709
      args.write(oprot_);
710
      oprot_.writeMessageEnd();
711
      oprot_.getTransport().flush();
712
    }
713
 
483 rajveer 714
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 715
    {
716
      TMessage msg = iprot_.readMessageBegin();
717
      if (msg.type == TMessageType.EXCEPTION) {
718
        TApplicationException x = TApplicationException.read(iprot_);
719
        iprot_.readMessageEnd();
720
        throw x;
721
      }
483 rajveer 722
      getOrder_result result = new getOrder_result();
68 ashish 723
      result.read(iprot_);
724
      iprot_.readMessageEnd();
725
      if (result.isSetSuccess()) {
726
        return result.success;
727
      }
728
      if (result.ex != null) {
729
        throw result.ex;
730
      }
483 rajveer 731
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 732
    }
733
 
483 rajveer 734
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 735
    {
483 rajveer 736
      send_getLineItemsForOrder(orderId);
737
      return recv_getLineItemsForOrder();
68 ashish 738
    }
739
 
483 rajveer 740
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 741
    {
483 rajveer 742
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
743
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
744
      args.orderId = orderId;
68 ashish 745
      args.write(oprot_);
746
      oprot_.writeMessageEnd();
747
      oprot_.getTransport().flush();
748
    }
749
 
483 rajveer 750
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 751
    {
752
      TMessage msg = iprot_.readMessageBegin();
753
      if (msg.type == TMessageType.EXCEPTION) {
754
        TApplicationException x = TApplicationException.read(iprot_);
755
        iprot_.readMessageEnd();
756
        throw x;
757
      }
483 rajveer 758
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 759
      result.read(iprot_);
760
      iprot_.readMessageEnd();
761
      if (result.isSetSuccess()) {
762
        return result.success;
763
      }
764
      if (result.ex != null) {
765
        throw result.ex;
766
      }
483 rajveer 767
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 768
    }
769
 
758 chandransh 770
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
771
    {
772
      send_markOrdersAsManifested(warehouseId, providerId);
773
      return recv_markOrdersAsManifested();
774
    }
775
 
776
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
777
    {
778
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
779
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
780
      args.warehouseId = warehouseId;
781
      args.providerId = providerId;
782
      args.write(oprot_);
783
      oprot_.writeMessageEnd();
784
      oprot_.getTransport().flush();
785
    }
786
 
787
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
788
    {
789
      TMessage msg = iprot_.readMessageBegin();
790
      if (msg.type == TMessageType.EXCEPTION) {
791
        TApplicationException x = TApplicationException.read(iprot_);
792
        iprot_.readMessageEnd();
793
        throw x;
794
      }
795
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
796
      result.read(iprot_);
797
      iprot_.readMessageEnd();
798
      if (result.isSetSuccess()) {
799
        return result.success;
800
      }
801
      if (result.ex != null) {
802
        throw result.ex;
803
      }
804
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
805
    }
806
 
483 rajveer 807
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 808
    {
483 rajveer 809
      send_getAlerts(orderId, valid);
305 ashish 810
      return recv_getAlerts();
811
    }
812
 
483 rajveer 813
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 814
    {
815
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
816
      getAlerts_args args = new getAlerts_args();
483 rajveer 817
      args.orderId = orderId;
305 ashish 818
      args.valid = valid;
819
      args.write(oprot_);
820
      oprot_.writeMessageEnd();
821
      oprot_.getTransport().flush();
822
    }
823
 
824
    public List<Alert> recv_getAlerts() throws TException
825
    {
826
      TMessage msg = iprot_.readMessageBegin();
827
      if (msg.type == TMessageType.EXCEPTION) {
828
        TApplicationException x = TApplicationException.read(iprot_);
829
        iprot_.readMessageEnd();
830
        throw x;
831
      }
832
      getAlerts_result result = new getAlerts_result();
833
      result.read(iprot_);
834
      iprot_.readMessageEnd();
835
      if (result.isSetSuccess()) {
836
        return result.success;
837
      }
838
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
839
    }
840
 
483 rajveer 841
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 842
    {
483 rajveer 843
      send_setAlert(orderId, unset, type, comment);
305 ashish 844
      recv_setAlert();
845
    }
846
 
483 rajveer 847
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 848
    {
849
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
850
      setAlert_args args = new setAlert_args();
483 rajveer 851
      args.orderId = orderId;
305 ashish 852
      args.unset = unset;
853
      args.type = type;
854
      args.comment = comment;
855
      args.write(oprot_);
856
      oprot_.writeMessageEnd();
857
      oprot_.getTransport().flush();
858
    }
859
 
860
    public void recv_setAlert() throws TException
861
    {
862
      TMessage msg = iprot_.readMessageBegin();
863
      if (msg.type == TMessageType.EXCEPTION) {
864
        TApplicationException x = TApplicationException.read(iprot_);
865
        iprot_.readMessageEnd();
866
        throw x;
867
      }
868
      setAlert_result result = new setAlert_result();
869
      result.read(iprot_);
870
      iprot_.readMessageEnd();
871
      return;
872
    }
873
 
68 ashish 874
  }
875
  public static class Processor implements TProcessor {
876
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
877
    public Processor(Iface iface)
878
    {
879
      iface_ = iface;
764 rajveer 880
      processMap_.put("closeSession", new closeSession());
68 ashish 881
      processMap_.put("createTransaction", new createTransaction());
882
      processMap_.put("getTransaction", new getTransaction());
883
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 884
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 885
      processMap_.put("getTransactionStatus", new getTransactionStatus());
886
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 887
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 888
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 889
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 890
      processMap_.put("addBillingDetails", new addBillingDetails());
923 rajveer 891
      processMap_.put("acceptOrder", new acceptOrder());
892
      processMap_.put("billOrder", new billOrder());
483 rajveer 893
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
894
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
895
      processMap_.put("createOrder", new createOrder());
896
      processMap_.put("getOrder", new getOrder());
897
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
758 chandransh 898
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
305 ashish 899
      processMap_.put("getAlerts", new getAlerts());
900
      processMap_.put("setAlert", new setAlert());
68 ashish 901
    }
902
 
903
    protected static interface ProcessFunction {
904
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
905
    }
906
 
907
    private Iface iface_;
908
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
909
 
910
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
911
    {
912
      TMessage msg = iprot.readMessageBegin();
913
      ProcessFunction fn = processMap_.get(msg.name);
914
      if (fn == null) {
915
        TProtocolUtil.skip(iprot, TType.STRUCT);
916
        iprot.readMessageEnd();
917
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
918
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
919
        x.write(oprot);
920
        oprot.writeMessageEnd();
921
        oprot.getTransport().flush();
922
        return true;
923
      }
924
      fn.process(msg.seqid, iprot, oprot);
925
      return true;
926
    }
927
 
764 rajveer 928
    private class closeSession implements ProcessFunction {
929
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
930
      {
931
        closeSession_args args = new closeSession_args();
932
        args.read(iprot);
933
        iprot.readMessageEnd();
934
        closeSession_result result = new closeSession_result();
935
        iface_.closeSession();
936
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
937
        result.write(oprot);
938
        oprot.writeMessageEnd();
939
        oprot.getTransport().flush();
940
      }
941
 
942
    }
943
 
68 ashish 944
    private class createTransaction implements ProcessFunction {
945
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
946
      {
947
        createTransaction_args args = new createTransaction_args();
948
        args.read(iprot);
949
        iprot.readMessageEnd();
950
        createTransaction_result result = new createTransaction_result();
951
        try {
132 ashish 952
          result.success = iface_.createTransaction(args.transaction);
953
          result.setSuccessIsSet(true);
68 ashish 954
        } catch (TransactionServiceException ex) {
955
          result.ex = ex;
956
        } catch (Throwable th) {
957
          LOGGER.error("Internal error processing createTransaction", th);
958
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
959
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
960
          x.write(oprot);
961
          oprot.writeMessageEnd();
962
          oprot.getTransport().flush();
963
          return;
964
        }
965
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
966
        result.write(oprot);
967
        oprot.writeMessageEnd();
968
        oprot.getTransport().flush();
969
      }
970
 
971
    }
972
 
973
    private class getTransaction implements ProcessFunction {
974
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
975
      {
976
        getTransaction_args args = new getTransaction_args();
977
        args.read(iprot);
978
        iprot.readMessageEnd();
979
        getTransaction_result result = new getTransaction_result();
980
        try {
981
          result.success = iface_.getTransaction(args.id);
982
        } catch (TransactionServiceException ex) {
983
          result.ex = ex;
984
        } catch (Throwable th) {
985
          LOGGER.error("Internal error processing getTransaction", th);
986
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
987
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
988
          x.write(oprot);
989
          oprot.writeMessageEnd();
990
          oprot.getTransport().flush();
991
          return;
992
        }
993
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
994
        result.write(oprot);
995
        oprot.writeMessageEnd();
996
        oprot.getTransport().flush();
997
      }
998
 
999
    }
1000
 
1001
    private class getTransactionsForCustomer implements ProcessFunction {
1002
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1003
      {
1004
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1005
        args.read(iprot);
1006
        iprot.readMessageEnd();
1007
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1008
        try {
132 ashish 1009
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1010
        } catch (TransactionServiceException ex) {
1011
          result.ex = ex;
1012
        } catch (Throwable th) {
1013
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1014
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1015
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1016
          x.write(oprot);
1017
          oprot.writeMessageEnd();
1018
          oprot.getTransport().flush();
1019
          return;
1020
        }
1021
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1022
        result.write(oprot);
1023
        oprot.writeMessageEnd();
1024
        oprot.getTransport().flush();
1025
      }
1026
 
1027
    }
1028
 
132 ashish 1029
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1030
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1031
      {
1032
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1033
        args.read(iprot);
1034
        iprot.readMessageEnd();
1035
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1036
        try {
1037
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1038
        } catch (TransactionServiceException ex) {
1039
          result.ex = ex;
1040
        } catch (Throwable th) {
1041
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1042
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1043
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1044
          x.write(oprot);
1045
          oprot.writeMessageEnd();
1046
          oprot.getTransport().flush();
1047
          return;
1048
        }
1049
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1050
        result.write(oprot);
1051
        oprot.writeMessageEnd();
1052
        oprot.getTransport().flush();
1053
      }
1054
 
1055
    }
1056
 
68 ashish 1057
    private class getTransactionStatus implements ProcessFunction {
1058
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1059
      {
1060
        getTransactionStatus_args args = new getTransactionStatus_args();
1061
        args.read(iprot);
1062
        iprot.readMessageEnd();
1063
        getTransactionStatus_result result = new getTransactionStatus_result();
1064
        try {
1065
          result.success = iface_.getTransactionStatus(args.transactionId);
1066
        } catch (TransactionServiceException ex) {
1067
          result.ex = ex;
1068
        } catch (Throwable th) {
1069
          LOGGER.error("Internal error processing getTransactionStatus", th);
1070
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1071
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1072
          x.write(oprot);
1073
          oprot.writeMessageEnd();
1074
          oprot.getTransport().flush();
1075
          return;
1076
        }
1077
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1078
        result.write(oprot);
1079
        oprot.writeMessageEnd();
1080
        oprot.getTransport().flush();
1081
      }
1082
 
1083
    }
1084
 
1085
    private class changeTransactionStatus implements ProcessFunction {
1086
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1087
      {
1088
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1089
        args.read(iprot);
1090
        iprot.readMessageEnd();
1091
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1092
        try {
1093
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1094
          result.setSuccessIsSet(true);
1095
        } catch (TransactionServiceException ex) {
1096
          result.ex = ex;
1097
        } catch (Throwable th) {
1098
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1099
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1100
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1101
          x.write(oprot);
1102
          oprot.writeMessageEnd();
1103
          oprot.getTransport().flush();
1104
          return;
1105
        }
1106
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1107
        result.write(oprot);
1108
        oprot.writeMessageEnd();
1109
        oprot.getTransport().flush();
1110
      }
1111
 
1112
    }
1113
 
483 rajveer 1114
    private class getAllOrders implements ProcessFunction {
68 ashish 1115
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1116
      {
483 rajveer 1117
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1118
        args.read(iprot);
1119
        iprot.readMessageEnd();
483 rajveer 1120
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1121
        try {
483 rajveer 1122
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1123
        } catch (TransactionServiceException ex) {
1124
          result.ex = ex;
1125
        } catch (Throwable th) {
483 rajveer 1126
          LOGGER.error("Internal error processing getAllOrders", th);
1127
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1128
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1129
          x.write(oprot);
1130
          oprot.writeMessageEnd();
1131
          oprot.getTransport().flush();
1132
          return;
1133
        }
483 rajveer 1134
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1135
        result.write(oprot);
1136
        oprot.writeMessageEnd();
1137
        oprot.getTransport().flush();
1138
      }
1139
 
1140
    }
1141
 
1022 varun.gupt 1142
    private class getOrdersByBillingDate implements ProcessFunction {
1143
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1144
      {
1145
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1146
        args.read(iprot);
1147
        iprot.readMessageEnd();
1148
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1149
        try {
1150
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1151
        } catch (TransactionServiceException ex) {
1152
          result.ex = ex;
1153
        } catch (Throwable th) {
1154
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1155
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1156
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1157
          x.write(oprot);
1158
          oprot.writeMessageEnd();
1159
          oprot.getTransport().flush();
1160
          return;
1161
        }
1162
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1163
        result.write(oprot);
1164
        oprot.writeMessageEnd();
1165
        oprot.getTransport().flush();
1166
      }
1167
 
1168
    }
1169
 
483 rajveer 1170
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1171
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1172
      {
483 rajveer 1173
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1174
        args.read(iprot);
1175
        iprot.readMessageEnd();
483 rajveer 1176
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1177
        try {
483 rajveer 1178
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1179
          result.setSuccessIsSet(true);
1180
        } catch (TransactionServiceException ex) {
1181
          result.ex = ex;
1182
        } catch (Throwable th) {
483 rajveer 1183
          LOGGER.error("Internal error processing changeOrderStatus", th);
1184
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1185
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1186
          x.write(oprot);
1187
          oprot.writeMessageEnd();
1188
          oprot.getTransport().flush();
1189
          return;
1190
        }
483 rajveer 1191
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1192
        result.write(oprot);
1193
        oprot.writeMessageEnd();
1194
        oprot.getTransport().flush();
1195
      }
1196
 
1197
    }
1198
 
495 rajveer 1199
    private class addBillingDetails implements ProcessFunction {
1200
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1201
      {
1202
        addBillingDetails_args args = new addBillingDetails_args();
1203
        args.read(iprot);
1204
        iprot.readMessageEnd();
1205
        addBillingDetails_result result = new addBillingDetails_result();
1206
        try {
640 chandransh 1207
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.jacket_number, args.billed_by);
495 rajveer 1208
          result.setSuccessIsSet(true);
1209
        } catch (TransactionServiceException ex) {
1210
          result.ex = ex;
1211
        } catch (Throwable th) {
1212
          LOGGER.error("Internal error processing addBillingDetails", th);
1213
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1214
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1215
          x.write(oprot);
1216
          oprot.writeMessageEnd();
1217
          oprot.getTransport().flush();
1218
          return;
1219
        }
1220
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1221
        result.write(oprot);
1222
        oprot.writeMessageEnd();
1223
        oprot.getTransport().flush();
1224
      }
1225
 
1226
    }
1227
 
923 rajveer 1228
    private class acceptOrder implements ProcessFunction {
1229
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1230
      {
1231
        acceptOrder_args args = new acceptOrder_args();
1232
        args.read(iprot);
1233
        iprot.readMessageEnd();
1234
        acceptOrder_result result = new acceptOrder_result();
1235
        try {
1236
          result.success = iface_.acceptOrder(args.orderId);
1237
          result.setSuccessIsSet(true);
1238
        } catch (TransactionServiceException ex) {
1239
          result.ex = ex;
1240
        } catch (Throwable th) {
1241
          LOGGER.error("Internal error processing acceptOrder", th);
1242
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1243
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1244
          x.write(oprot);
1245
          oprot.writeMessageEnd();
1246
          oprot.getTransport().flush();
1247
          return;
1248
        }
1249
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1250
        result.write(oprot);
1251
        oprot.writeMessageEnd();
1252
        oprot.getTransport().flush();
1253
      }
1254
 
1255
    }
1256
 
1257
    private class billOrder implements ProcessFunction {
1258
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1259
      {
1260
        billOrder_args args = new billOrder_args();
1261
        args.read(iprot);
1262
        iprot.readMessageEnd();
1263
        billOrder_result result = new billOrder_result();
1264
        try {
1265
          result.success = iface_.billOrder(args.orderId);
1266
          result.setSuccessIsSet(true);
1267
        } catch (TransactionServiceException ex) {
1268
          result.ex = ex;
1269
        } catch (Throwable th) {
1270
          LOGGER.error("Internal error processing billOrder", th);
1271
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1272
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1273
          x.write(oprot);
1274
          oprot.writeMessageEnd();
1275
          oprot.getTransport().flush();
1276
          return;
1277
        }
1278
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1279
        result.write(oprot);
1280
        oprot.writeMessageEnd();
1281
        oprot.getTransport().flush();
1282
      }
1283
 
1284
    }
1285
 
483 rajveer 1286
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1287
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1288
      {
483 rajveer 1289
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1290
        args.read(iprot);
1291
        iprot.readMessageEnd();
483 rajveer 1292
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1293
        try {
483 rajveer 1294
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1295
        } catch (TransactionServiceException ex) {
1296
          result.ex = ex;
1297
        } catch (Throwable th) {
483 rajveer 1298
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1299
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1300
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1301
          x.write(oprot);
1302
          oprot.writeMessageEnd();
1303
          oprot.getTransport().flush();
1304
          return;
1305
        }
483 rajveer 1306
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1307
        result.write(oprot);
1308
        oprot.writeMessageEnd();
1309
        oprot.getTransport().flush();
1310
      }
1311
 
1312
    }
1313
 
483 rajveer 1314
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1315
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1316
      {
483 rajveer 1317
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1318
        args.read(iprot);
1319
        iprot.readMessageEnd();
483 rajveer 1320
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1321
        try {
483 rajveer 1322
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1323
        } catch (TransactionServiceException ex) {
1324
          result.ex = ex;
1325
        } catch (Throwable th) {
483 rajveer 1326
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1327
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1328
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1329
          x.write(oprot);
1330
          oprot.writeMessageEnd();
1331
          oprot.getTransport().flush();
1332
          return;
1333
        }
483 rajveer 1334
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1335
        result.write(oprot);
1336
        oprot.writeMessageEnd();
1337
        oprot.getTransport().flush();
1338
      }
1339
 
1340
    }
1341
 
483 rajveer 1342
    private class createOrder implements ProcessFunction {
68 ashish 1343
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1344
      {
483 rajveer 1345
        createOrder_args args = new createOrder_args();
68 ashish 1346
        args.read(iprot);
1347
        iprot.readMessageEnd();
483 rajveer 1348
        createOrder_result result = new createOrder_result();
68 ashish 1349
        try {
483 rajveer 1350
          result.success = iface_.createOrder(args.order);
68 ashish 1351
          result.setSuccessIsSet(true);
1352
        } catch (TransactionServiceException ex) {
1353
          result.ex = ex;
1354
        } catch (Throwable th) {
483 rajveer 1355
          LOGGER.error("Internal error processing createOrder", th);
1356
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1357
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1358
          x.write(oprot);
1359
          oprot.writeMessageEnd();
1360
          oprot.getTransport().flush();
1361
          return;
1362
        }
483 rajveer 1363
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1364
        result.write(oprot);
1365
        oprot.writeMessageEnd();
1366
        oprot.getTransport().flush();
1367
      }
1368
 
1369
    }
1370
 
483 rajveer 1371
    private class getOrder implements ProcessFunction {
68 ashish 1372
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1373
      {
483 rajveer 1374
        getOrder_args args = new getOrder_args();
68 ashish 1375
        args.read(iprot);
1376
        iprot.readMessageEnd();
483 rajveer 1377
        getOrder_result result = new getOrder_result();
68 ashish 1378
        try {
483 rajveer 1379
          result.success = iface_.getOrder(args.id);
68 ashish 1380
        } catch (TransactionServiceException ex) {
1381
          result.ex = ex;
1382
        } catch (Throwable th) {
483 rajveer 1383
          LOGGER.error("Internal error processing getOrder", th);
1384
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1385
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1386
          x.write(oprot);
1387
          oprot.writeMessageEnd();
1388
          oprot.getTransport().flush();
1389
          return;
1390
        }
483 rajveer 1391
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1392
        result.write(oprot);
1393
        oprot.writeMessageEnd();
1394
        oprot.getTransport().flush();
1395
      }
1396
 
1397
    }
1398
 
483 rajveer 1399
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1400
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1401
      {
483 rajveer 1402
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1403
        args.read(iprot);
1404
        iprot.readMessageEnd();
483 rajveer 1405
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1406
        try {
483 rajveer 1407
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1408
        } catch (TransactionServiceException ex) {
1409
          result.ex = ex;
1410
        } catch (Throwable th) {
483 rajveer 1411
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1412
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1413
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1414
          x.write(oprot);
1415
          oprot.writeMessageEnd();
1416
          oprot.getTransport().flush();
1417
          return;
1418
        }
483 rajveer 1419
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1420
        result.write(oprot);
1421
        oprot.writeMessageEnd();
1422
        oprot.getTransport().flush();
1423
      }
1424
 
1425
    }
1426
 
758 chandransh 1427
    private class markOrdersAsManifested implements ProcessFunction {
1428
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1429
      {
1430
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1431
        args.read(iprot);
1432
        iprot.readMessageEnd();
1433
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1434
        try {
1435
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1436
          result.setSuccessIsSet(true);
1437
        } catch (TransactionServiceException ex) {
1438
          result.ex = ex;
1439
        } catch (Throwable th) {
1440
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1441
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1442
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1443
          x.write(oprot);
1444
          oprot.writeMessageEnd();
1445
          oprot.getTransport().flush();
1446
          return;
1447
        }
1448
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1449
        result.write(oprot);
1450
        oprot.writeMessageEnd();
1451
        oprot.getTransport().flush();
1452
      }
1453
 
1454
    }
1455
 
305 ashish 1456
    private class getAlerts implements ProcessFunction {
1457
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1458
      {
1459
        getAlerts_args args = new getAlerts_args();
1460
        args.read(iprot);
1461
        iprot.readMessageEnd();
1462
        getAlerts_result result = new getAlerts_result();
483 rajveer 1463
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1464
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1465
        result.write(oprot);
1466
        oprot.writeMessageEnd();
1467
        oprot.getTransport().flush();
1468
      }
1469
 
1470
    }
1471
 
1472
    private class setAlert implements ProcessFunction {
1473
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1474
      {
1475
        setAlert_args args = new setAlert_args();
1476
        args.read(iprot);
1477
        iprot.readMessageEnd();
1478
        setAlert_result result = new setAlert_result();
483 rajveer 1479
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1480
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1481
        result.write(oprot);
1482
        oprot.writeMessageEnd();
1483
        oprot.getTransport().flush();
1484
      }
1485
 
1486
    }
1487
 
68 ashish 1488
  }
1489
 
764 rajveer 1490
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1491
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1492
 
1493
 
1494
 
1495
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1496
    public enum _Fields implements TFieldIdEnum {
1497
;
1498
 
1499
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1501
 
1502
      static {
1503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1504
          byId.put((int)field._thriftId, field);
1505
          byName.put(field.getFieldName(), field);
1506
        }
1507
      }
1508
 
1509
      /**
1510
       * Find the _Fields constant that matches fieldId, or null if its not found.
1511
       */
1512
      public static _Fields findByThriftId(int fieldId) {
1513
        return byId.get(fieldId);
1514
      }
1515
 
1516
      /**
1517
       * Find the _Fields constant that matches fieldId, throwing an exception
1518
       * if it is not found.
1519
       */
1520
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1521
        _Fields fields = findByThriftId(fieldId);
1522
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1523
        return fields;
1524
      }
1525
 
1526
      /**
1527
       * Find the _Fields constant that matches name, or null if its not found.
1528
       */
1529
      public static _Fields findByName(String name) {
1530
        return byName.get(name);
1531
      }
1532
 
1533
      private final short _thriftId;
1534
      private final String _fieldName;
1535
 
1536
      _Fields(short thriftId, String fieldName) {
1537
        _thriftId = thriftId;
1538
        _fieldName = fieldName;
1539
      }
1540
 
1541
      public short getThriftFieldId() {
1542
        return _thriftId;
1543
      }
1544
 
1545
      public String getFieldName() {
1546
        return _fieldName;
1547
      }
1548
    }
1549
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1550
    }});
1551
 
1552
    static {
1553
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1554
    }
1555
 
1556
    public closeSession_args() {
1557
    }
1558
 
1559
    /**
1560
     * Performs a deep copy on <i>other</i>.
1561
     */
1562
    public closeSession_args(closeSession_args other) {
1563
    }
1564
 
1565
    public closeSession_args deepCopy() {
1566
      return new closeSession_args(this);
1567
    }
1568
 
1569
    @Deprecated
1570
    public closeSession_args clone() {
1571
      return new closeSession_args(this);
1572
    }
1573
 
1574
    public void setFieldValue(_Fields field, Object value) {
1575
      switch (field) {
1576
      }
1577
    }
1578
 
1579
    public void setFieldValue(int fieldID, Object value) {
1580
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1581
    }
1582
 
1583
    public Object getFieldValue(_Fields field) {
1584
      switch (field) {
1585
      }
1586
      throw new IllegalStateException();
1587
    }
1588
 
1589
    public Object getFieldValue(int fieldId) {
1590
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1591
    }
1592
 
1593
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1594
    public boolean isSet(_Fields field) {
1595
      switch (field) {
1596
      }
1597
      throw new IllegalStateException();
1598
    }
1599
 
1600
    public boolean isSet(int fieldID) {
1601
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1602
    }
1603
 
1604
    @Override
1605
    public boolean equals(Object that) {
1606
      if (that == null)
1607
        return false;
1608
      if (that instanceof closeSession_args)
1609
        return this.equals((closeSession_args)that);
1610
      return false;
1611
    }
1612
 
1613
    public boolean equals(closeSession_args that) {
1614
      if (that == null)
1615
        return false;
1616
 
1617
      return true;
1618
    }
1619
 
1620
    @Override
1621
    public int hashCode() {
1622
      return 0;
1623
    }
1624
 
1625
    public int compareTo(closeSession_args other) {
1626
      if (!getClass().equals(other.getClass())) {
1627
        return getClass().getName().compareTo(other.getClass().getName());
1628
      }
1629
 
1630
      int lastComparison = 0;
1631
      closeSession_args typedOther = (closeSession_args)other;
1632
 
1633
      return 0;
1634
    }
1635
 
1636
    public void read(TProtocol iprot) throws TException {
1637
      TField field;
1638
      iprot.readStructBegin();
1639
      while (true)
1640
      {
1641
        field = iprot.readFieldBegin();
1642
        if (field.type == TType.STOP) { 
1643
          break;
1644
        }
1645
        _Fields fieldId = _Fields.findByThriftId(field.id);
1646
        if (fieldId == null) {
1647
          TProtocolUtil.skip(iprot, field.type);
1648
        } else {
1649
          switch (fieldId) {
1650
          }
1651
          iprot.readFieldEnd();
1652
        }
1653
      }
1654
      iprot.readStructEnd();
1655
      validate();
1656
    }
1657
 
1658
    public void write(TProtocol oprot) throws TException {
1659
      validate();
1660
 
1661
      oprot.writeStructBegin(STRUCT_DESC);
1662
      oprot.writeFieldStop();
1663
      oprot.writeStructEnd();
1664
    }
1665
 
1666
    @Override
1667
    public String toString() {
1668
      StringBuilder sb = new StringBuilder("closeSession_args(");
1669
      boolean first = true;
1670
 
1671
      sb.append(")");
1672
      return sb.toString();
1673
    }
1674
 
1675
    public void validate() throws TException {
1676
      // check for required fields
1677
    }
1678
 
1679
  }
1680
 
1681
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1682
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1683
 
1684
 
1685
 
1686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1687
    public enum _Fields implements TFieldIdEnum {
1688
;
1689
 
1690
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1691
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1692
 
1693
      static {
1694
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1695
          byId.put((int)field._thriftId, field);
1696
          byName.put(field.getFieldName(), field);
1697
        }
1698
      }
1699
 
1700
      /**
1701
       * Find the _Fields constant that matches fieldId, or null if its not found.
1702
       */
1703
      public static _Fields findByThriftId(int fieldId) {
1704
        return byId.get(fieldId);
1705
      }
1706
 
1707
      /**
1708
       * Find the _Fields constant that matches fieldId, throwing an exception
1709
       * if it is not found.
1710
       */
1711
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1712
        _Fields fields = findByThriftId(fieldId);
1713
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1714
        return fields;
1715
      }
1716
 
1717
      /**
1718
       * Find the _Fields constant that matches name, or null if its not found.
1719
       */
1720
      public static _Fields findByName(String name) {
1721
        return byName.get(name);
1722
      }
1723
 
1724
      private final short _thriftId;
1725
      private final String _fieldName;
1726
 
1727
      _Fields(short thriftId, String fieldName) {
1728
        _thriftId = thriftId;
1729
        _fieldName = fieldName;
1730
      }
1731
 
1732
      public short getThriftFieldId() {
1733
        return _thriftId;
1734
      }
1735
 
1736
      public String getFieldName() {
1737
        return _fieldName;
1738
      }
1739
    }
1740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1741
    }});
1742
 
1743
    static {
1744
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1745
    }
1746
 
1747
    public closeSession_result() {
1748
    }
1749
 
1750
    /**
1751
     * Performs a deep copy on <i>other</i>.
1752
     */
1753
    public closeSession_result(closeSession_result other) {
1754
    }
1755
 
1756
    public closeSession_result deepCopy() {
1757
      return new closeSession_result(this);
1758
    }
1759
 
1760
    @Deprecated
1761
    public closeSession_result clone() {
1762
      return new closeSession_result(this);
1763
    }
1764
 
1765
    public void setFieldValue(_Fields field, Object value) {
1766
      switch (field) {
1767
      }
1768
    }
1769
 
1770
    public void setFieldValue(int fieldID, Object value) {
1771
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1772
    }
1773
 
1774
    public Object getFieldValue(_Fields field) {
1775
      switch (field) {
1776
      }
1777
      throw new IllegalStateException();
1778
    }
1779
 
1780
    public Object getFieldValue(int fieldId) {
1781
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1782
    }
1783
 
1784
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1785
    public boolean isSet(_Fields field) {
1786
      switch (field) {
1787
      }
1788
      throw new IllegalStateException();
1789
    }
1790
 
1791
    public boolean isSet(int fieldID) {
1792
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1793
    }
1794
 
1795
    @Override
1796
    public boolean equals(Object that) {
1797
      if (that == null)
1798
        return false;
1799
      if (that instanceof closeSession_result)
1800
        return this.equals((closeSession_result)that);
1801
      return false;
1802
    }
1803
 
1804
    public boolean equals(closeSession_result that) {
1805
      if (that == null)
1806
        return false;
1807
 
1808
      return true;
1809
    }
1810
 
1811
    @Override
1812
    public int hashCode() {
1813
      return 0;
1814
    }
1815
 
1816
    public int compareTo(closeSession_result other) {
1817
      if (!getClass().equals(other.getClass())) {
1818
        return getClass().getName().compareTo(other.getClass().getName());
1819
      }
1820
 
1821
      int lastComparison = 0;
1822
      closeSession_result typedOther = (closeSession_result)other;
1823
 
1824
      return 0;
1825
    }
1826
 
1827
    public void read(TProtocol iprot) throws TException {
1828
      TField field;
1829
      iprot.readStructBegin();
1830
      while (true)
1831
      {
1832
        field = iprot.readFieldBegin();
1833
        if (field.type == TType.STOP) { 
1834
          break;
1835
        }
1836
        _Fields fieldId = _Fields.findByThriftId(field.id);
1837
        if (fieldId == null) {
1838
          TProtocolUtil.skip(iprot, field.type);
1839
        } else {
1840
          switch (fieldId) {
1841
          }
1842
          iprot.readFieldEnd();
1843
        }
1844
      }
1845
      iprot.readStructEnd();
1846
      validate();
1847
    }
1848
 
1849
    public void write(TProtocol oprot) throws TException {
1850
      oprot.writeStructBegin(STRUCT_DESC);
1851
 
1852
      oprot.writeFieldStop();
1853
      oprot.writeStructEnd();
1854
    }
1855
 
1856
    @Override
1857
    public String toString() {
1858
      StringBuilder sb = new StringBuilder("closeSession_result(");
1859
      boolean first = true;
1860
 
1861
      sb.append(")");
1862
      return sb.toString();
1863
    }
1864
 
1865
    public void validate() throws TException {
1866
      // check for required fields
1867
    }
1868
 
1869
  }
1870
 
684 chandransh 1871
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 1872
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
1873
 
1874
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
1875
 
1876
    private Transaction transaction;
1877
 
1878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1879
    public enum _Fields implements TFieldIdEnum {
1880
      TRANSACTION((short)1, "transaction");
1881
 
1882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1884
 
1885
      static {
1886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1887
          byId.put((int)field._thriftId, field);
1888
          byName.put(field.getFieldName(), field);
1889
        }
1890
      }
1891
 
1892
      /**
1893
       * Find the _Fields constant that matches fieldId, or null if its not found.
1894
       */
1895
      public static _Fields findByThriftId(int fieldId) {
1896
        return byId.get(fieldId);
1897
      }
1898
 
1899
      /**
1900
       * Find the _Fields constant that matches fieldId, throwing an exception
1901
       * if it is not found.
1902
       */
1903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1904
        _Fields fields = findByThriftId(fieldId);
1905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1906
        return fields;
1907
      }
1908
 
1909
      /**
1910
       * Find the _Fields constant that matches name, or null if its not found.
1911
       */
1912
      public static _Fields findByName(String name) {
1913
        return byName.get(name);
1914
      }
1915
 
1916
      private final short _thriftId;
1917
      private final String _fieldName;
1918
 
1919
      _Fields(short thriftId, String fieldName) {
1920
        _thriftId = thriftId;
1921
        _fieldName = fieldName;
1922
      }
1923
 
1924
      public short getThriftFieldId() {
1925
        return _thriftId;
1926
      }
1927
 
1928
      public String getFieldName() {
1929
        return _fieldName;
1930
      }
1931
    }
1932
 
1933
    // isset id assignments
1934
 
1935
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1936
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
1937
          new StructMetaData(TType.STRUCT, Transaction.class)));
1938
    }});
1939
 
1940
    static {
1941
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
1942
    }
1943
 
1944
    public createTransaction_args() {
1945
    }
1946
 
1947
    public createTransaction_args(
1948
      Transaction transaction)
1949
    {
1950
      this();
1951
      this.transaction = transaction;
1952
    }
1953
 
1954
    /**
1955
     * Performs a deep copy on <i>other</i>.
1956
     */
1957
    public createTransaction_args(createTransaction_args other) {
1958
      if (other.isSetTransaction()) {
1959
        this.transaction = new Transaction(other.transaction);
1960
      }
1961
    }
1962
 
1963
    public createTransaction_args deepCopy() {
1964
      return new createTransaction_args(this);
1965
    }
1966
 
1967
    @Deprecated
1968
    public createTransaction_args clone() {
1969
      return new createTransaction_args(this);
1970
    }
1971
 
1972
    public Transaction getTransaction() {
1973
      return this.transaction;
1974
    }
1975
 
1976
    public createTransaction_args setTransaction(Transaction transaction) {
1977
      this.transaction = transaction;
1978
      return this;
1979
    }
1980
 
1981
    public void unsetTransaction() {
1982
      this.transaction = null;
1983
    }
1984
 
1985
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
1986
    public boolean isSetTransaction() {
1987
      return this.transaction != null;
1988
    }
1989
 
1990
    public void setTransactionIsSet(boolean value) {
1991
      if (!value) {
1992
        this.transaction = null;
1993
      }
1994
    }
1995
 
1996
    public void setFieldValue(_Fields field, Object value) {
1997
      switch (field) {
1998
      case TRANSACTION:
1999
        if (value == null) {
2000
          unsetTransaction();
2001
        } else {
2002
          setTransaction((Transaction)value);
2003
        }
2004
        break;
2005
 
2006
      }
2007
    }
2008
 
2009
    public void setFieldValue(int fieldID, Object value) {
2010
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2011
    }
2012
 
2013
    public Object getFieldValue(_Fields field) {
2014
      switch (field) {
2015
      case TRANSACTION:
2016
        return getTransaction();
2017
 
2018
      }
2019
      throw new IllegalStateException();
2020
    }
2021
 
2022
    public Object getFieldValue(int fieldId) {
2023
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2024
    }
2025
 
2026
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2027
    public boolean isSet(_Fields field) {
2028
      switch (field) {
2029
      case TRANSACTION:
2030
        return isSetTransaction();
2031
      }
2032
      throw new IllegalStateException();
2033
    }
2034
 
2035
    public boolean isSet(int fieldID) {
2036
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2037
    }
2038
 
2039
    @Override
2040
    public boolean equals(Object that) {
2041
      if (that == null)
2042
        return false;
2043
      if (that instanceof createTransaction_args)
2044
        return this.equals((createTransaction_args)that);
2045
      return false;
2046
    }
2047
 
2048
    public boolean equals(createTransaction_args that) {
2049
      if (that == null)
2050
        return false;
2051
 
2052
      boolean this_present_transaction = true && this.isSetTransaction();
2053
      boolean that_present_transaction = true && that.isSetTransaction();
2054
      if (this_present_transaction || that_present_transaction) {
2055
        if (!(this_present_transaction && that_present_transaction))
2056
          return false;
2057
        if (!this.transaction.equals(that.transaction))
2058
          return false;
2059
      }
2060
 
2061
      return true;
2062
    }
2063
 
2064
    @Override
2065
    public int hashCode() {
2066
      return 0;
2067
    }
2068
 
684 chandransh 2069
    public int compareTo(createTransaction_args other) {
2070
      if (!getClass().equals(other.getClass())) {
2071
        return getClass().getName().compareTo(other.getClass().getName());
2072
      }
2073
 
2074
      int lastComparison = 0;
2075
      createTransaction_args typedOther = (createTransaction_args)other;
2076
 
2077
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2078
      if (lastComparison != 0) {
2079
        return lastComparison;
2080
      }
2081
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2082
      if (lastComparison != 0) {
2083
        return lastComparison;
2084
      }
2085
      return 0;
2086
    }
2087
 
68 ashish 2088
    public void read(TProtocol iprot) throws TException {
2089
      TField field;
2090
      iprot.readStructBegin();
2091
      while (true)
2092
      {
2093
        field = iprot.readFieldBegin();
2094
        if (field.type == TType.STOP) { 
2095
          break;
2096
        }
2097
        _Fields fieldId = _Fields.findByThriftId(field.id);
2098
        if (fieldId == null) {
2099
          TProtocolUtil.skip(iprot, field.type);
2100
        } else {
2101
          switch (fieldId) {
2102
            case TRANSACTION:
2103
              if (field.type == TType.STRUCT) {
2104
                this.transaction = new Transaction();
2105
                this.transaction.read(iprot);
2106
              } else { 
2107
                TProtocolUtil.skip(iprot, field.type);
2108
              }
2109
              break;
2110
          }
2111
          iprot.readFieldEnd();
2112
        }
2113
      }
2114
      iprot.readStructEnd();
2115
      validate();
2116
    }
2117
 
2118
    public void write(TProtocol oprot) throws TException {
2119
      validate();
2120
 
2121
      oprot.writeStructBegin(STRUCT_DESC);
2122
      if (this.transaction != null) {
2123
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2124
        this.transaction.write(oprot);
2125
        oprot.writeFieldEnd();
2126
      }
2127
      oprot.writeFieldStop();
2128
      oprot.writeStructEnd();
2129
    }
2130
 
2131
    @Override
2132
    public String toString() {
2133
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2134
      boolean first = true;
2135
 
2136
      sb.append("transaction:");
2137
      if (this.transaction == null) {
2138
        sb.append("null");
2139
      } else {
2140
        sb.append(this.transaction);
2141
      }
2142
      first = false;
2143
      sb.append(")");
2144
      return sb.toString();
2145
    }
2146
 
2147
    public void validate() throws TException {
2148
      // check for required fields
2149
    }
2150
 
2151
  }
2152
 
2153
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2154
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2155
 
132 ashish 2156
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2157
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2158
 
132 ashish 2159
    private long success;
68 ashish 2160
    private TransactionServiceException ex;
2161
 
2162
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2163
    public enum _Fields implements TFieldIdEnum {
132 ashish 2164
      SUCCESS((short)0, "success"),
68 ashish 2165
      EX((short)1, "ex");
2166
 
2167
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2168
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2169
 
2170
      static {
2171
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2172
          byId.put((int)field._thriftId, field);
2173
          byName.put(field.getFieldName(), field);
2174
        }
2175
      }
2176
 
2177
      /**
2178
       * Find the _Fields constant that matches fieldId, or null if its not found.
2179
       */
2180
      public static _Fields findByThriftId(int fieldId) {
2181
        return byId.get(fieldId);
2182
      }
2183
 
2184
      /**
2185
       * Find the _Fields constant that matches fieldId, throwing an exception
2186
       * if it is not found.
2187
       */
2188
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2189
        _Fields fields = findByThriftId(fieldId);
2190
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2191
        return fields;
2192
      }
2193
 
2194
      /**
2195
       * Find the _Fields constant that matches name, or null if its not found.
2196
       */
2197
      public static _Fields findByName(String name) {
2198
        return byName.get(name);
2199
      }
2200
 
2201
      private final short _thriftId;
2202
      private final String _fieldName;
2203
 
2204
      _Fields(short thriftId, String fieldName) {
2205
        _thriftId = thriftId;
2206
        _fieldName = fieldName;
2207
      }
2208
 
2209
      public short getThriftFieldId() {
2210
        return _thriftId;
2211
      }
2212
 
2213
      public String getFieldName() {
2214
        return _fieldName;
2215
      }
2216
    }
2217
 
2218
    // isset id assignments
132 ashish 2219
    private static final int __SUCCESS_ISSET_ID = 0;
2220
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2221
 
2222
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2223
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2224
          new FieldValueMetaData(TType.I64)));
68 ashish 2225
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2226
          new FieldValueMetaData(TType.STRUCT)));
2227
    }});
2228
 
2229
    static {
2230
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2231
    }
2232
 
2233
    public createTransaction_result() {
2234
    }
2235
 
2236
    public createTransaction_result(
132 ashish 2237
      long success,
68 ashish 2238
      TransactionServiceException ex)
2239
    {
2240
      this();
132 ashish 2241
      this.success = success;
2242
      setSuccessIsSet(true);
68 ashish 2243
      this.ex = ex;
2244
    }
2245
 
2246
    /**
2247
     * Performs a deep copy on <i>other</i>.
2248
     */
2249
    public createTransaction_result(createTransaction_result other) {
132 ashish 2250
      __isset_bit_vector.clear();
2251
      __isset_bit_vector.or(other.__isset_bit_vector);
2252
      this.success = other.success;
68 ashish 2253
      if (other.isSetEx()) {
2254
        this.ex = new TransactionServiceException(other.ex);
2255
      }
2256
    }
2257
 
2258
    public createTransaction_result deepCopy() {
2259
      return new createTransaction_result(this);
2260
    }
2261
 
2262
    @Deprecated
2263
    public createTransaction_result clone() {
2264
      return new createTransaction_result(this);
2265
    }
2266
 
132 ashish 2267
    public long getSuccess() {
2268
      return this.success;
2269
    }
2270
 
2271
    public createTransaction_result setSuccess(long success) {
2272
      this.success = success;
2273
      setSuccessIsSet(true);
2274
      return this;
2275
    }
2276
 
2277
    public void unsetSuccess() {
2278
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2279
    }
2280
 
2281
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2282
    public boolean isSetSuccess() {
2283
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2284
    }
2285
 
2286
    public void setSuccessIsSet(boolean value) {
2287
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2288
    }
2289
 
68 ashish 2290
    public TransactionServiceException getEx() {
2291
      return this.ex;
2292
    }
2293
 
2294
    public createTransaction_result setEx(TransactionServiceException ex) {
2295
      this.ex = ex;
2296
      return this;
2297
    }
2298
 
2299
    public void unsetEx() {
2300
      this.ex = null;
2301
    }
2302
 
2303
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2304
    public boolean isSetEx() {
2305
      return this.ex != null;
2306
    }
2307
 
2308
    public void setExIsSet(boolean value) {
2309
      if (!value) {
2310
        this.ex = null;
2311
      }
2312
    }
2313
 
2314
    public void setFieldValue(_Fields field, Object value) {
2315
      switch (field) {
132 ashish 2316
      case SUCCESS:
2317
        if (value == null) {
2318
          unsetSuccess();
2319
        } else {
2320
          setSuccess((Long)value);
2321
        }
2322
        break;
2323
 
68 ashish 2324
      case EX:
2325
        if (value == null) {
2326
          unsetEx();
2327
        } else {
2328
          setEx((TransactionServiceException)value);
2329
        }
2330
        break;
2331
 
2332
      }
2333
    }
2334
 
2335
    public void setFieldValue(int fieldID, Object value) {
2336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2337
    }
2338
 
2339
    public Object getFieldValue(_Fields field) {
2340
      switch (field) {
132 ashish 2341
      case SUCCESS:
2342
        return new Long(getSuccess());
2343
 
68 ashish 2344
      case EX:
2345
        return getEx();
2346
 
2347
      }
2348
      throw new IllegalStateException();
2349
    }
2350
 
2351
    public Object getFieldValue(int fieldId) {
2352
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2353
    }
2354
 
2355
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2356
    public boolean isSet(_Fields field) {
2357
      switch (field) {
132 ashish 2358
      case SUCCESS:
2359
        return isSetSuccess();
68 ashish 2360
      case EX:
2361
        return isSetEx();
2362
      }
2363
      throw new IllegalStateException();
2364
    }
2365
 
2366
    public boolean isSet(int fieldID) {
2367
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2368
    }
2369
 
2370
    @Override
2371
    public boolean equals(Object that) {
2372
      if (that == null)
2373
        return false;
2374
      if (that instanceof createTransaction_result)
2375
        return this.equals((createTransaction_result)that);
2376
      return false;
2377
    }
2378
 
2379
    public boolean equals(createTransaction_result that) {
2380
      if (that == null)
2381
        return false;
2382
 
132 ashish 2383
      boolean this_present_success = true;
2384
      boolean that_present_success = true;
2385
      if (this_present_success || that_present_success) {
2386
        if (!(this_present_success && that_present_success))
2387
          return false;
2388
        if (this.success != that.success)
2389
          return false;
2390
      }
2391
 
68 ashish 2392
      boolean this_present_ex = true && this.isSetEx();
2393
      boolean that_present_ex = true && that.isSetEx();
2394
      if (this_present_ex || that_present_ex) {
2395
        if (!(this_present_ex && that_present_ex))
2396
          return false;
2397
        if (!this.ex.equals(that.ex))
2398
          return false;
2399
      }
2400
 
2401
      return true;
2402
    }
2403
 
2404
    @Override
2405
    public int hashCode() {
2406
      return 0;
2407
    }
2408
 
2409
    public int compareTo(createTransaction_result other) {
2410
      if (!getClass().equals(other.getClass())) {
2411
        return getClass().getName().compareTo(other.getClass().getName());
2412
      }
2413
 
2414
      int lastComparison = 0;
2415
      createTransaction_result typedOther = (createTransaction_result)other;
2416
 
132 ashish 2417
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2418
      if (lastComparison != 0) {
2419
        return lastComparison;
2420
      }
2421
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2422
      if (lastComparison != 0) {
2423
        return lastComparison;
2424
      }
68 ashish 2425
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2426
      if (lastComparison != 0) {
2427
        return lastComparison;
2428
      }
2429
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2430
      if (lastComparison != 0) {
2431
        return lastComparison;
2432
      }
2433
      return 0;
2434
    }
2435
 
2436
    public void read(TProtocol iprot) throws TException {
2437
      TField field;
2438
      iprot.readStructBegin();
2439
      while (true)
2440
      {
2441
        field = iprot.readFieldBegin();
2442
        if (field.type == TType.STOP) { 
2443
          break;
2444
        }
2445
        _Fields fieldId = _Fields.findByThriftId(field.id);
2446
        if (fieldId == null) {
2447
          TProtocolUtil.skip(iprot, field.type);
2448
        } else {
2449
          switch (fieldId) {
132 ashish 2450
            case SUCCESS:
2451
              if (field.type == TType.I64) {
2452
                this.success = iprot.readI64();
2453
                setSuccessIsSet(true);
2454
              } else { 
2455
                TProtocolUtil.skip(iprot, field.type);
2456
              }
2457
              break;
68 ashish 2458
            case EX:
2459
              if (field.type == TType.STRUCT) {
2460
                this.ex = new TransactionServiceException();
2461
                this.ex.read(iprot);
2462
              } else { 
2463
                TProtocolUtil.skip(iprot, field.type);
2464
              }
2465
              break;
2466
          }
2467
          iprot.readFieldEnd();
2468
        }
2469
      }
2470
      iprot.readStructEnd();
2471
      validate();
2472
    }
2473
 
2474
    public void write(TProtocol oprot) throws TException {
2475
      oprot.writeStructBegin(STRUCT_DESC);
2476
 
132 ashish 2477
      if (this.isSetSuccess()) {
2478
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2479
        oprot.writeI64(this.success);
2480
        oprot.writeFieldEnd();
2481
      } else if (this.isSetEx()) {
68 ashish 2482
        oprot.writeFieldBegin(EX_FIELD_DESC);
2483
        this.ex.write(oprot);
2484
        oprot.writeFieldEnd();
2485
      }
2486
      oprot.writeFieldStop();
2487
      oprot.writeStructEnd();
2488
    }
2489
 
2490
    @Override
2491
    public String toString() {
2492
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2493
      boolean first = true;
2494
 
132 ashish 2495
      sb.append("success:");
2496
      sb.append(this.success);
2497
      first = false;
2498
      if (!first) sb.append(", ");
68 ashish 2499
      sb.append("ex:");
2500
      if (this.ex == null) {
2501
        sb.append("null");
2502
      } else {
2503
        sb.append(this.ex);
2504
      }
2505
      first = false;
2506
      sb.append(")");
2507
      return sb.toString();
2508
    }
2509
 
2510
    public void validate() throws TException {
2511
      // check for required fields
2512
    }
2513
 
2514
  }
2515
 
2516
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2517
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2518
 
2519
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2520
 
2521
    private long id;
2522
 
2523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2524
    public enum _Fields implements TFieldIdEnum {
2525
      ID((short)1, "id");
2526
 
2527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2529
 
2530
      static {
2531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2532
          byId.put((int)field._thriftId, field);
2533
          byName.put(field.getFieldName(), field);
2534
        }
2535
      }
2536
 
2537
      /**
2538
       * Find the _Fields constant that matches fieldId, or null if its not found.
2539
       */
2540
      public static _Fields findByThriftId(int fieldId) {
2541
        return byId.get(fieldId);
2542
      }
2543
 
2544
      /**
2545
       * Find the _Fields constant that matches fieldId, throwing an exception
2546
       * if it is not found.
2547
       */
2548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2549
        _Fields fields = findByThriftId(fieldId);
2550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2551
        return fields;
2552
      }
2553
 
2554
      /**
2555
       * Find the _Fields constant that matches name, or null if its not found.
2556
       */
2557
      public static _Fields findByName(String name) {
2558
        return byName.get(name);
2559
      }
2560
 
2561
      private final short _thriftId;
2562
      private final String _fieldName;
2563
 
2564
      _Fields(short thriftId, String fieldName) {
2565
        _thriftId = thriftId;
2566
        _fieldName = fieldName;
2567
      }
2568
 
2569
      public short getThriftFieldId() {
2570
        return _thriftId;
2571
      }
2572
 
2573
      public String getFieldName() {
2574
        return _fieldName;
2575
      }
2576
    }
2577
 
2578
    // isset id assignments
2579
    private static final int __ID_ISSET_ID = 0;
2580
    private BitSet __isset_bit_vector = new BitSet(1);
2581
 
2582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2583
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2584
          new FieldValueMetaData(TType.I64)));
2585
    }});
2586
 
2587
    static {
2588
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2589
    }
2590
 
2591
    public getTransaction_args() {
2592
    }
2593
 
2594
    public getTransaction_args(
2595
      long id)
2596
    {
2597
      this();
2598
      this.id = id;
2599
      setIdIsSet(true);
2600
    }
2601
 
2602
    /**
2603
     * Performs a deep copy on <i>other</i>.
2604
     */
2605
    public getTransaction_args(getTransaction_args other) {
2606
      __isset_bit_vector.clear();
2607
      __isset_bit_vector.or(other.__isset_bit_vector);
2608
      this.id = other.id;
2609
    }
2610
 
2611
    public getTransaction_args deepCopy() {
2612
      return new getTransaction_args(this);
2613
    }
2614
 
2615
    @Deprecated
2616
    public getTransaction_args clone() {
2617
      return new getTransaction_args(this);
2618
    }
2619
 
2620
    public long getId() {
2621
      return this.id;
2622
    }
2623
 
2624
    public getTransaction_args setId(long id) {
2625
      this.id = id;
2626
      setIdIsSet(true);
2627
      return this;
2628
    }
2629
 
2630
    public void unsetId() {
2631
      __isset_bit_vector.clear(__ID_ISSET_ID);
2632
    }
2633
 
2634
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2635
    public boolean isSetId() {
2636
      return __isset_bit_vector.get(__ID_ISSET_ID);
2637
    }
2638
 
2639
    public void setIdIsSet(boolean value) {
2640
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2641
    }
2642
 
2643
    public void setFieldValue(_Fields field, Object value) {
2644
      switch (field) {
2645
      case ID:
2646
        if (value == null) {
2647
          unsetId();
2648
        } else {
2649
          setId((Long)value);
2650
        }
2651
        break;
2652
 
2653
      }
2654
    }
2655
 
2656
    public void setFieldValue(int fieldID, Object value) {
2657
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2658
    }
2659
 
2660
    public Object getFieldValue(_Fields field) {
2661
      switch (field) {
2662
      case ID:
2663
        return new Long(getId());
2664
 
2665
      }
2666
      throw new IllegalStateException();
2667
    }
2668
 
2669
    public Object getFieldValue(int fieldId) {
2670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2671
    }
2672
 
2673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2674
    public boolean isSet(_Fields field) {
2675
      switch (field) {
2676
      case ID:
2677
        return isSetId();
2678
      }
2679
      throw new IllegalStateException();
2680
    }
2681
 
2682
    public boolean isSet(int fieldID) {
2683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2684
    }
2685
 
2686
    @Override
2687
    public boolean equals(Object that) {
2688
      if (that == null)
2689
        return false;
2690
      if (that instanceof getTransaction_args)
2691
        return this.equals((getTransaction_args)that);
2692
      return false;
2693
    }
2694
 
2695
    public boolean equals(getTransaction_args that) {
2696
      if (that == null)
2697
        return false;
2698
 
2699
      boolean this_present_id = true;
2700
      boolean that_present_id = true;
2701
      if (this_present_id || that_present_id) {
2702
        if (!(this_present_id && that_present_id))
2703
          return false;
2704
        if (this.id != that.id)
2705
          return false;
2706
      }
2707
 
2708
      return true;
2709
    }
2710
 
2711
    @Override
2712
    public int hashCode() {
2713
      return 0;
2714
    }
2715
 
2716
    public int compareTo(getTransaction_args other) {
2717
      if (!getClass().equals(other.getClass())) {
2718
        return getClass().getName().compareTo(other.getClass().getName());
2719
      }
2720
 
2721
      int lastComparison = 0;
2722
      getTransaction_args typedOther = (getTransaction_args)other;
2723
 
2724
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2725
      if (lastComparison != 0) {
2726
        return lastComparison;
2727
      }
2728
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2729
      if (lastComparison != 0) {
2730
        return lastComparison;
2731
      }
2732
      return 0;
2733
    }
2734
 
2735
    public void read(TProtocol iprot) throws TException {
2736
      TField field;
2737
      iprot.readStructBegin();
2738
      while (true)
2739
      {
2740
        field = iprot.readFieldBegin();
2741
        if (field.type == TType.STOP) { 
2742
          break;
2743
        }
2744
        _Fields fieldId = _Fields.findByThriftId(field.id);
2745
        if (fieldId == null) {
2746
          TProtocolUtil.skip(iprot, field.type);
2747
        } else {
2748
          switch (fieldId) {
2749
            case ID:
2750
              if (field.type == TType.I64) {
2751
                this.id = iprot.readI64();
2752
                setIdIsSet(true);
2753
              } else { 
2754
                TProtocolUtil.skip(iprot, field.type);
2755
              }
2756
              break;
2757
          }
2758
          iprot.readFieldEnd();
2759
        }
2760
      }
2761
      iprot.readStructEnd();
2762
      validate();
2763
    }
2764
 
2765
    public void write(TProtocol oprot) throws TException {
2766
      validate();
2767
 
2768
      oprot.writeStructBegin(STRUCT_DESC);
2769
      oprot.writeFieldBegin(ID_FIELD_DESC);
2770
      oprot.writeI64(this.id);
2771
      oprot.writeFieldEnd();
2772
      oprot.writeFieldStop();
2773
      oprot.writeStructEnd();
2774
    }
2775
 
2776
    @Override
2777
    public String toString() {
2778
      StringBuilder sb = new StringBuilder("getTransaction_args(");
2779
      boolean first = true;
2780
 
2781
      sb.append("id:");
2782
      sb.append(this.id);
2783
      first = false;
2784
      sb.append(")");
2785
      return sb.toString();
2786
    }
2787
 
2788
    public void validate() throws TException {
2789
      // check for required fields
2790
    }
2791
 
2792
  }
2793
 
684 chandransh 2794
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 2795
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
2796
 
2797
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2798
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2799
 
2800
    private Transaction success;
2801
    private TransactionServiceException ex;
2802
 
2803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2804
    public enum _Fields implements TFieldIdEnum {
2805
      SUCCESS((short)0, "success"),
2806
      EX((short)1, "ex");
2807
 
2808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2810
 
2811
      static {
2812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2813
          byId.put((int)field._thriftId, field);
2814
          byName.put(field.getFieldName(), field);
2815
        }
2816
      }
2817
 
2818
      /**
2819
       * Find the _Fields constant that matches fieldId, or null if its not found.
2820
       */
2821
      public static _Fields findByThriftId(int fieldId) {
2822
        return byId.get(fieldId);
2823
      }
2824
 
2825
      /**
2826
       * Find the _Fields constant that matches fieldId, throwing an exception
2827
       * if it is not found.
2828
       */
2829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2830
        _Fields fields = findByThriftId(fieldId);
2831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2832
        return fields;
2833
      }
2834
 
2835
      /**
2836
       * Find the _Fields constant that matches name, or null if its not found.
2837
       */
2838
      public static _Fields findByName(String name) {
2839
        return byName.get(name);
2840
      }
2841
 
2842
      private final short _thriftId;
2843
      private final String _fieldName;
2844
 
2845
      _Fields(short thriftId, String fieldName) {
2846
        _thriftId = thriftId;
2847
        _fieldName = fieldName;
2848
      }
2849
 
2850
      public short getThriftFieldId() {
2851
        return _thriftId;
2852
      }
2853
 
2854
      public String getFieldName() {
2855
        return _fieldName;
2856
      }
2857
    }
2858
 
2859
    // isset id assignments
2860
 
2861
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2862
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2863
          new StructMetaData(TType.STRUCT, Transaction.class)));
2864
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2865
          new FieldValueMetaData(TType.STRUCT)));
2866
    }});
2867
 
2868
    static {
2869
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
2870
    }
2871
 
2872
    public getTransaction_result() {
2873
    }
2874
 
2875
    public getTransaction_result(
2876
      Transaction success,
2877
      TransactionServiceException ex)
2878
    {
2879
      this();
2880
      this.success = success;
2881
      this.ex = ex;
2882
    }
2883
 
2884
    /**
2885
     * Performs a deep copy on <i>other</i>.
2886
     */
2887
    public getTransaction_result(getTransaction_result other) {
2888
      if (other.isSetSuccess()) {
2889
        this.success = new Transaction(other.success);
2890
      }
2891
      if (other.isSetEx()) {
2892
        this.ex = new TransactionServiceException(other.ex);
2893
      }
2894
    }
2895
 
2896
    public getTransaction_result deepCopy() {
2897
      return new getTransaction_result(this);
2898
    }
2899
 
2900
    @Deprecated
2901
    public getTransaction_result clone() {
2902
      return new getTransaction_result(this);
2903
    }
2904
 
2905
    public Transaction getSuccess() {
2906
      return this.success;
2907
    }
2908
 
2909
    public getTransaction_result setSuccess(Transaction success) {
2910
      this.success = success;
2911
      return this;
2912
    }
2913
 
2914
    public void unsetSuccess() {
2915
      this.success = null;
2916
    }
2917
 
2918
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2919
    public boolean isSetSuccess() {
2920
      return this.success != null;
2921
    }
2922
 
2923
    public void setSuccessIsSet(boolean value) {
2924
      if (!value) {
2925
        this.success = null;
2926
      }
2927
    }
2928
 
2929
    public TransactionServiceException getEx() {
2930
      return this.ex;
2931
    }
2932
 
2933
    public getTransaction_result setEx(TransactionServiceException ex) {
2934
      this.ex = ex;
2935
      return this;
2936
    }
2937
 
2938
    public void unsetEx() {
2939
      this.ex = null;
2940
    }
2941
 
2942
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2943
    public boolean isSetEx() {
2944
      return this.ex != null;
2945
    }
2946
 
2947
    public void setExIsSet(boolean value) {
2948
      if (!value) {
2949
        this.ex = null;
2950
      }
2951
    }
2952
 
2953
    public void setFieldValue(_Fields field, Object value) {
2954
      switch (field) {
2955
      case SUCCESS:
2956
        if (value == null) {
2957
          unsetSuccess();
2958
        } else {
2959
          setSuccess((Transaction)value);
2960
        }
2961
        break;
2962
 
2963
      case EX:
2964
        if (value == null) {
2965
          unsetEx();
2966
        } else {
2967
          setEx((TransactionServiceException)value);
2968
        }
2969
        break;
2970
 
2971
      }
2972
    }
2973
 
2974
    public void setFieldValue(int fieldID, Object value) {
2975
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2976
    }
2977
 
2978
    public Object getFieldValue(_Fields field) {
2979
      switch (field) {
2980
      case SUCCESS:
2981
        return getSuccess();
2982
 
2983
      case EX:
2984
        return getEx();
2985
 
2986
      }
2987
      throw new IllegalStateException();
2988
    }
2989
 
2990
    public Object getFieldValue(int fieldId) {
2991
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2992
    }
2993
 
2994
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2995
    public boolean isSet(_Fields field) {
2996
      switch (field) {
2997
      case SUCCESS:
2998
        return isSetSuccess();
2999
      case EX:
3000
        return isSetEx();
3001
      }
3002
      throw new IllegalStateException();
3003
    }
3004
 
3005
    public boolean isSet(int fieldID) {
3006
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3007
    }
3008
 
3009
    @Override
3010
    public boolean equals(Object that) {
3011
      if (that == null)
3012
        return false;
3013
      if (that instanceof getTransaction_result)
3014
        return this.equals((getTransaction_result)that);
3015
      return false;
3016
    }
3017
 
3018
    public boolean equals(getTransaction_result that) {
3019
      if (that == null)
3020
        return false;
3021
 
3022
      boolean this_present_success = true && this.isSetSuccess();
3023
      boolean that_present_success = true && that.isSetSuccess();
3024
      if (this_present_success || that_present_success) {
3025
        if (!(this_present_success && that_present_success))
3026
          return false;
3027
        if (!this.success.equals(that.success))
3028
          return false;
3029
      }
3030
 
3031
      boolean this_present_ex = true && this.isSetEx();
3032
      boolean that_present_ex = true && that.isSetEx();
3033
      if (this_present_ex || that_present_ex) {
3034
        if (!(this_present_ex && that_present_ex))
3035
          return false;
3036
        if (!this.ex.equals(that.ex))
3037
          return false;
3038
      }
3039
 
3040
      return true;
3041
    }
3042
 
3043
    @Override
3044
    public int hashCode() {
3045
      return 0;
3046
    }
3047
 
684 chandransh 3048
    public int compareTo(getTransaction_result other) {
3049
      if (!getClass().equals(other.getClass())) {
3050
        return getClass().getName().compareTo(other.getClass().getName());
3051
      }
3052
 
3053
      int lastComparison = 0;
3054
      getTransaction_result typedOther = (getTransaction_result)other;
3055
 
3056
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3057
      if (lastComparison != 0) {
3058
        return lastComparison;
3059
      }
3060
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3061
      if (lastComparison != 0) {
3062
        return lastComparison;
3063
      }
3064
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3065
      if (lastComparison != 0) {
3066
        return lastComparison;
3067
      }
3068
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3069
      if (lastComparison != 0) {
3070
        return lastComparison;
3071
      }
3072
      return 0;
3073
    }
3074
 
68 ashish 3075
    public void read(TProtocol iprot) throws TException {
3076
      TField field;
3077
      iprot.readStructBegin();
3078
      while (true)
3079
      {
3080
        field = iprot.readFieldBegin();
3081
        if (field.type == TType.STOP) { 
3082
          break;
3083
        }
3084
        _Fields fieldId = _Fields.findByThriftId(field.id);
3085
        if (fieldId == null) {
3086
          TProtocolUtil.skip(iprot, field.type);
3087
        } else {
3088
          switch (fieldId) {
3089
            case SUCCESS:
3090
              if (field.type == TType.STRUCT) {
3091
                this.success = new Transaction();
3092
                this.success.read(iprot);
3093
              } else { 
3094
                TProtocolUtil.skip(iprot, field.type);
3095
              }
3096
              break;
3097
            case EX:
3098
              if (field.type == TType.STRUCT) {
3099
                this.ex = new TransactionServiceException();
3100
                this.ex.read(iprot);
3101
              } else { 
3102
                TProtocolUtil.skip(iprot, field.type);
3103
              }
3104
              break;
3105
          }
3106
          iprot.readFieldEnd();
3107
        }
3108
      }
3109
      iprot.readStructEnd();
3110
      validate();
3111
    }
3112
 
3113
    public void write(TProtocol oprot) throws TException {
3114
      oprot.writeStructBegin(STRUCT_DESC);
3115
 
3116
      if (this.isSetSuccess()) {
3117
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3118
        this.success.write(oprot);
3119
        oprot.writeFieldEnd();
3120
      } else if (this.isSetEx()) {
3121
        oprot.writeFieldBegin(EX_FIELD_DESC);
3122
        this.ex.write(oprot);
3123
        oprot.writeFieldEnd();
3124
      }
3125
      oprot.writeFieldStop();
3126
      oprot.writeStructEnd();
3127
    }
3128
 
3129
    @Override
3130
    public String toString() {
3131
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3132
      boolean first = true;
3133
 
3134
      sb.append("success:");
3135
      if (this.success == null) {
3136
        sb.append("null");
3137
      } else {
3138
        sb.append(this.success);
3139
      }
3140
      first = false;
3141
      if (!first) sb.append(", ");
3142
      sb.append("ex:");
3143
      if (this.ex == null) {
3144
        sb.append("null");
3145
      } else {
3146
        sb.append(this.ex);
3147
      }
3148
      first = false;
3149
      sb.append(")");
3150
      return sb.toString();
3151
    }
3152
 
3153
    public void validate() throws TException {
3154
      // check for required fields
3155
    }
3156
 
3157
  }
3158
 
3159
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3160
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3161
 
3162
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3163
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3164
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3165
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3166
 
3167
    private long customerId;
132 ashish 3168
    private long from_date;
3169
    private long to_date;
68 ashish 3170
    private TransactionStatus status;
3171
 
3172
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3173
    public enum _Fields implements TFieldIdEnum {
3174
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3175
      FROM_DATE((short)2, "from_date"),
3176
      TO_DATE((short)3, "to_date"),
68 ashish 3177
      /**
3178
       * 
3179
       * @see TransactionStatus
3180
       */
3181
      STATUS((short)4, "status");
3182
 
3183
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3184
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3185
 
3186
      static {
3187
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3188
          byId.put((int)field._thriftId, field);
3189
          byName.put(field.getFieldName(), field);
3190
        }
3191
      }
3192
 
3193
      /**
3194
       * Find the _Fields constant that matches fieldId, or null if its not found.
3195
       */
3196
      public static _Fields findByThriftId(int fieldId) {
3197
        return byId.get(fieldId);
3198
      }
3199
 
3200
      /**
3201
       * Find the _Fields constant that matches fieldId, throwing an exception
3202
       * if it is not found.
3203
       */
3204
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3205
        _Fields fields = findByThriftId(fieldId);
3206
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3207
        return fields;
3208
      }
3209
 
3210
      /**
3211
       * Find the _Fields constant that matches name, or null if its not found.
3212
       */
3213
      public static _Fields findByName(String name) {
3214
        return byName.get(name);
3215
      }
3216
 
3217
      private final short _thriftId;
3218
      private final String _fieldName;
3219
 
3220
      _Fields(short thriftId, String fieldName) {
3221
        _thriftId = thriftId;
3222
        _fieldName = fieldName;
3223
      }
3224
 
3225
      public short getThriftFieldId() {
3226
        return _thriftId;
3227
      }
3228
 
3229
      public String getFieldName() {
3230
        return _fieldName;
3231
      }
3232
    }
3233
 
3234
    // isset id assignments
3235
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3236
    private static final int __FROM_DATE_ISSET_ID = 1;
3237
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3238
    private BitSet __isset_bit_vector = new BitSet(3);
3239
 
3240
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3241
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3242
          new FieldValueMetaData(TType.I64)));
132 ashish 3243
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3244
          new FieldValueMetaData(TType.I64)));
132 ashish 3245
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3246
          new FieldValueMetaData(TType.I64)));
3247
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3248
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3249
    }});
3250
 
3251
    static {
3252
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3253
    }
3254
 
3255
    public getTransactionsForCustomer_args() {
3256
    }
3257
 
3258
    public getTransactionsForCustomer_args(
3259
      long customerId,
132 ashish 3260
      long from_date,
3261
      long to_date,
68 ashish 3262
      TransactionStatus status)
3263
    {
3264
      this();
3265
      this.customerId = customerId;
3266
      setCustomerIdIsSet(true);
132 ashish 3267
      this.from_date = from_date;
3268
      setFrom_dateIsSet(true);
3269
      this.to_date = to_date;
3270
      setTo_dateIsSet(true);
68 ashish 3271
      this.status = status;
3272
    }
3273
 
3274
    /**
3275
     * Performs a deep copy on <i>other</i>.
3276
     */
3277
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3278
      __isset_bit_vector.clear();
3279
      __isset_bit_vector.or(other.__isset_bit_vector);
3280
      this.customerId = other.customerId;
132 ashish 3281
      this.from_date = other.from_date;
3282
      this.to_date = other.to_date;
68 ashish 3283
      if (other.isSetStatus()) {
3284
        this.status = other.status;
3285
      }
3286
    }
3287
 
3288
    public getTransactionsForCustomer_args deepCopy() {
3289
      return new getTransactionsForCustomer_args(this);
3290
    }
3291
 
3292
    @Deprecated
3293
    public getTransactionsForCustomer_args clone() {
3294
      return new getTransactionsForCustomer_args(this);
3295
    }
3296
 
3297
    public long getCustomerId() {
3298
      return this.customerId;
3299
    }
3300
 
3301
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3302
      this.customerId = customerId;
3303
      setCustomerIdIsSet(true);
3304
      return this;
3305
    }
3306
 
3307
    public void unsetCustomerId() {
3308
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3309
    }
3310
 
3311
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3312
    public boolean isSetCustomerId() {
3313
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3314
    }
3315
 
3316
    public void setCustomerIdIsSet(boolean value) {
3317
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3318
    }
3319
 
132 ashish 3320
    public long getFrom_date() {
3321
      return this.from_date;
68 ashish 3322
    }
3323
 
132 ashish 3324
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3325
      this.from_date = from_date;
3326
      setFrom_dateIsSet(true);
68 ashish 3327
      return this;
3328
    }
3329
 
132 ashish 3330
    public void unsetFrom_date() {
3331
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3332
    }
3333
 
132 ashish 3334
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3335
    public boolean isSetFrom_date() {
3336
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3337
    }
3338
 
132 ashish 3339
    public void setFrom_dateIsSet(boolean value) {
3340
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3341
    }
3342
 
132 ashish 3343
    public long getTo_date() {
3344
      return this.to_date;
68 ashish 3345
    }
3346
 
132 ashish 3347
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3348
      this.to_date = to_date;
3349
      setTo_dateIsSet(true);
68 ashish 3350
      return this;
3351
    }
3352
 
132 ashish 3353
    public void unsetTo_date() {
3354
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3355
    }
3356
 
132 ashish 3357
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3358
    public boolean isSetTo_date() {
3359
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3360
    }
3361
 
132 ashish 3362
    public void setTo_dateIsSet(boolean value) {
3363
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3364
    }
3365
 
3366
    /**
3367
     * 
3368
     * @see TransactionStatus
3369
     */
3370
    public TransactionStatus getStatus() {
3371
      return this.status;
3372
    }
3373
 
3374
    /**
3375
     * 
3376
     * @see TransactionStatus
3377
     */
3378
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3379
      this.status = status;
3380
      return this;
3381
    }
3382
 
3383
    public void unsetStatus() {
3384
      this.status = null;
3385
    }
3386
 
3387
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3388
    public boolean isSetStatus() {
3389
      return this.status != null;
3390
    }
3391
 
3392
    public void setStatusIsSet(boolean value) {
3393
      if (!value) {
3394
        this.status = null;
3395
      }
3396
    }
3397
 
3398
    public void setFieldValue(_Fields field, Object value) {
3399
      switch (field) {
3400
      case CUSTOMER_ID:
3401
        if (value == null) {
3402
          unsetCustomerId();
3403
        } else {
3404
          setCustomerId((Long)value);
3405
        }
3406
        break;
3407
 
132 ashish 3408
      case FROM_DATE:
68 ashish 3409
        if (value == null) {
132 ashish 3410
          unsetFrom_date();
68 ashish 3411
        } else {
132 ashish 3412
          setFrom_date((Long)value);
68 ashish 3413
        }
3414
        break;
3415
 
132 ashish 3416
      case TO_DATE:
68 ashish 3417
        if (value == null) {
132 ashish 3418
          unsetTo_date();
68 ashish 3419
        } else {
132 ashish 3420
          setTo_date((Long)value);
68 ashish 3421
        }
3422
        break;
3423
 
3424
      case STATUS:
3425
        if (value == null) {
3426
          unsetStatus();
3427
        } else {
3428
          setStatus((TransactionStatus)value);
3429
        }
3430
        break;
3431
 
3432
      }
3433
    }
3434
 
3435
    public void setFieldValue(int fieldID, Object value) {
3436
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3437
    }
3438
 
3439
    public Object getFieldValue(_Fields field) {
3440
      switch (field) {
3441
      case CUSTOMER_ID:
3442
        return new Long(getCustomerId());
3443
 
132 ashish 3444
      case FROM_DATE:
3445
        return new Long(getFrom_date());
68 ashish 3446
 
132 ashish 3447
      case TO_DATE:
3448
        return new Long(getTo_date());
68 ashish 3449
 
3450
      case STATUS:
3451
        return getStatus();
3452
 
3453
      }
3454
      throw new IllegalStateException();
3455
    }
3456
 
3457
    public Object getFieldValue(int fieldId) {
3458
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3459
    }
3460
 
3461
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3462
    public boolean isSet(_Fields field) {
3463
      switch (field) {
3464
      case CUSTOMER_ID:
3465
        return isSetCustomerId();
132 ashish 3466
      case FROM_DATE:
3467
        return isSetFrom_date();
3468
      case TO_DATE:
3469
        return isSetTo_date();
68 ashish 3470
      case STATUS:
3471
        return isSetStatus();
3472
      }
3473
      throw new IllegalStateException();
3474
    }
3475
 
3476
    public boolean isSet(int fieldID) {
3477
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3478
    }
3479
 
3480
    @Override
3481
    public boolean equals(Object that) {
3482
      if (that == null)
3483
        return false;
3484
      if (that instanceof getTransactionsForCustomer_args)
3485
        return this.equals((getTransactionsForCustomer_args)that);
3486
      return false;
3487
    }
3488
 
3489
    public boolean equals(getTransactionsForCustomer_args that) {
3490
      if (that == null)
3491
        return false;
3492
 
3493
      boolean this_present_customerId = true;
3494
      boolean that_present_customerId = true;
3495
      if (this_present_customerId || that_present_customerId) {
3496
        if (!(this_present_customerId && that_present_customerId))
3497
          return false;
3498
        if (this.customerId != that.customerId)
3499
          return false;
3500
      }
3501
 
132 ashish 3502
      boolean this_present_from_date = true;
3503
      boolean that_present_from_date = true;
3504
      if (this_present_from_date || that_present_from_date) {
3505
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3506
          return false;
132 ashish 3507
        if (this.from_date != that.from_date)
68 ashish 3508
          return false;
3509
      }
3510
 
132 ashish 3511
      boolean this_present_to_date = true;
3512
      boolean that_present_to_date = true;
3513
      if (this_present_to_date || that_present_to_date) {
3514
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3515
          return false;
132 ashish 3516
        if (this.to_date != that.to_date)
68 ashish 3517
          return false;
3518
      }
3519
 
3520
      boolean this_present_status = true && this.isSetStatus();
3521
      boolean that_present_status = true && that.isSetStatus();
3522
      if (this_present_status || that_present_status) {
3523
        if (!(this_present_status && that_present_status))
3524
          return false;
3525
        if (!this.status.equals(that.status))
3526
          return false;
3527
      }
3528
 
3529
      return true;
3530
    }
3531
 
3532
    @Override
3533
    public int hashCode() {
3534
      return 0;
3535
    }
3536
 
3537
    public int compareTo(getTransactionsForCustomer_args other) {
3538
      if (!getClass().equals(other.getClass())) {
3539
        return getClass().getName().compareTo(other.getClass().getName());
3540
      }
3541
 
3542
      int lastComparison = 0;
3543
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
3544
 
3545
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
3546
      if (lastComparison != 0) {
3547
        return lastComparison;
3548
      }
3549
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
3550
      if (lastComparison != 0) {
3551
        return lastComparison;
3552
      }
132 ashish 3553
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3554
      if (lastComparison != 0) {
3555
        return lastComparison;
3556
      }
132 ashish 3557
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3558
      if (lastComparison != 0) {
3559
        return lastComparison;
3560
      }
132 ashish 3561
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3562
      if (lastComparison != 0) {
3563
        return lastComparison;
3564
      }
132 ashish 3565
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3566
      if (lastComparison != 0) {
3567
        return lastComparison;
3568
      }
3569
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3570
      if (lastComparison != 0) {
3571
        return lastComparison;
3572
      }
3573
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3574
      if (lastComparison != 0) {
3575
        return lastComparison;
3576
      }
3577
      return 0;
3578
    }
3579
 
3580
    public void read(TProtocol iprot) throws TException {
3581
      TField field;
3582
      iprot.readStructBegin();
3583
      while (true)
3584
      {
3585
        field = iprot.readFieldBegin();
3586
        if (field.type == TType.STOP) { 
3587
          break;
3588
        }
3589
        _Fields fieldId = _Fields.findByThriftId(field.id);
3590
        if (fieldId == null) {
3591
          TProtocolUtil.skip(iprot, field.type);
3592
        } else {
3593
          switch (fieldId) {
3594
            case CUSTOMER_ID:
3595
              if (field.type == TType.I64) {
3596
                this.customerId = iprot.readI64();
3597
                setCustomerIdIsSet(true);
3598
              } else { 
3599
                TProtocolUtil.skip(iprot, field.type);
3600
              }
3601
              break;
132 ashish 3602
            case FROM_DATE:
68 ashish 3603
              if (field.type == TType.I64) {
132 ashish 3604
                this.from_date = iprot.readI64();
3605
                setFrom_dateIsSet(true);
68 ashish 3606
              } else { 
3607
                TProtocolUtil.skip(iprot, field.type);
3608
              }
3609
              break;
132 ashish 3610
            case TO_DATE:
68 ashish 3611
              if (field.type == TType.I64) {
132 ashish 3612
                this.to_date = iprot.readI64();
3613
                setTo_dateIsSet(true);
68 ashish 3614
              } else { 
3615
                TProtocolUtil.skip(iprot, field.type);
3616
              }
3617
              break;
3618
            case STATUS:
3619
              if (field.type == TType.I32) {
3620
                this.status = TransactionStatus.findByValue(iprot.readI32());
3621
              } else { 
3622
                TProtocolUtil.skip(iprot, field.type);
3623
              }
3624
              break;
3625
          }
3626
          iprot.readFieldEnd();
3627
        }
3628
      }
3629
      iprot.readStructEnd();
3630
      validate();
3631
    }
3632
 
3633
    public void write(TProtocol oprot) throws TException {
3634
      validate();
3635
 
3636
      oprot.writeStructBegin(STRUCT_DESC);
3637
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
3638
      oprot.writeI64(this.customerId);
3639
      oprot.writeFieldEnd();
132 ashish 3640
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3641
      oprot.writeI64(this.from_date);
68 ashish 3642
      oprot.writeFieldEnd();
132 ashish 3643
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3644
      oprot.writeI64(this.to_date);
68 ashish 3645
      oprot.writeFieldEnd();
3646
      if (this.status != null) {
3647
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3648
        oprot.writeI32(this.status.getValue());
3649
        oprot.writeFieldEnd();
3650
      }
3651
      oprot.writeFieldStop();
3652
      oprot.writeStructEnd();
3653
    }
3654
 
3655
    @Override
3656
    public String toString() {
3657
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
3658
      boolean first = true;
3659
 
3660
      sb.append("customerId:");
3661
      sb.append(this.customerId);
3662
      first = false;
3663
      if (!first) sb.append(", ");
132 ashish 3664
      sb.append("from_date:");
3665
      sb.append(this.from_date);
68 ashish 3666
      first = false;
3667
      if (!first) sb.append(", ");
132 ashish 3668
      sb.append("to_date:");
3669
      sb.append(this.to_date);
68 ashish 3670
      first = false;
3671
      if (!first) sb.append(", ");
3672
      sb.append("status:");
3673
      if (this.status == null) {
3674
        sb.append("null");
3675
      } else {
3676
        String status_name = status.name();
3677
        if (status_name != null) {
3678
          sb.append(status_name);
3679
          sb.append(" (");
3680
        }
3681
        sb.append(this.status);
3682
        if (status_name != null) {
3683
          sb.append(")");
3684
        }
3685
      }
3686
      first = false;
3687
      sb.append(")");
3688
      return sb.toString();
3689
    }
3690
 
3691
    public void validate() throws TException {
3692
      // check for required fields
3693
    }
3694
 
3695
  }
3696
 
684 chandransh 3697
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 3698
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
3699
 
3700
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3701
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3702
 
3703
    private List<Transaction> success;
3704
    private TransactionServiceException ex;
3705
 
3706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3707
    public enum _Fields implements TFieldIdEnum {
3708
      SUCCESS((short)0, "success"),
3709
      EX((short)1, "ex");
3710
 
3711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3713
 
3714
      static {
3715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3716
          byId.put((int)field._thriftId, field);
3717
          byName.put(field.getFieldName(), field);
3718
        }
3719
      }
3720
 
3721
      /**
3722
       * Find the _Fields constant that matches fieldId, or null if its not found.
3723
       */
3724
      public static _Fields findByThriftId(int fieldId) {
3725
        return byId.get(fieldId);
3726
      }
3727
 
3728
      /**
3729
       * Find the _Fields constant that matches fieldId, throwing an exception
3730
       * if it is not found.
3731
       */
3732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3733
        _Fields fields = findByThriftId(fieldId);
3734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3735
        return fields;
3736
      }
3737
 
3738
      /**
3739
       * Find the _Fields constant that matches name, or null if its not found.
3740
       */
3741
      public static _Fields findByName(String name) {
3742
        return byName.get(name);
3743
      }
3744
 
3745
      private final short _thriftId;
3746
      private final String _fieldName;
3747
 
3748
      _Fields(short thriftId, String fieldName) {
3749
        _thriftId = thriftId;
3750
        _fieldName = fieldName;
3751
      }
3752
 
3753
      public short getThriftFieldId() {
3754
        return _thriftId;
3755
      }
3756
 
3757
      public String getFieldName() {
3758
        return _fieldName;
3759
      }
3760
    }
3761
 
3762
    // isset id assignments
3763
 
3764
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3765
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3766
          new ListMetaData(TType.LIST, 
3767
              new StructMetaData(TType.STRUCT, Transaction.class))));
3768
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3769
          new FieldValueMetaData(TType.STRUCT)));
3770
    }});
3771
 
3772
    static {
3773
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
3774
    }
3775
 
3776
    public getTransactionsForCustomer_result() {
3777
    }
3778
 
3779
    public getTransactionsForCustomer_result(
3780
      List<Transaction> success,
3781
      TransactionServiceException ex)
3782
    {
3783
      this();
3784
      this.success = success;
3785
      this.ex = ex;
3786
    }
3787
 
3788
    /**
3789
     * Performs a deep copy on <i>other</i>.
3790
     */
3791
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
3792
      if (other.isSetSuccess()) {
3793
        List<Transaction> __this__success = new ArrayList<Transaction>();
3794
        for (Transaction other_element : other.success) {
3795
          __this__success.add(new Transaction(other_element));
3796
        }
3797
        this.success = __this__success;
3798
      }
3799
      if (other.isSetEx()) {
3800
        this.ex = new TransactionServiceException(other.ex);
3801
      }
3802
    }
3803
 
3804
    public getTransactionsForCustomer_result deepCopy() {
3805
      return new getTransactionsForCustomer_result(this);
3806
    }
3807
 
3808
    @Deprecated
3809
    public getTransactionsForCustomer_result clone() {
3810
      return new getTransactionsForCustomer_result(this);
3811
    }
3812
 
3813
    public int getSuccessSize() {
3814
      return (this.success == null) ? 0 : this.success.size();
3815
    }
3816
 
3817
    public java.util.Iterator<Transaction> getSuccessIterator() {
3818
      return (this.success == null) ? null : this.success.iterator();
3819
    }
3820
 
3821
    public void addToSuccess(Transaction elem) {
3822
      if (this.success == null) {
3823
        this.success = new ArrayList<Transaction>();
3824
      }
3825
      this.success.add(elem);
3826
    }
3827
 
3828
    public List<Transaction> getSuccess() {
3829
      return this.success;
3830
    }
3831
 
3832
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
3833
      this.success = success;
3834
      return this;
3835
    }
3836
 
3837
    public void unsetSuccess() {
3838
      this.success = null;
3839
    }
3840
 
3841
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3842
    public boolean isSetSuccess() {
3843
      return this.success != null;
3844
    }
3845
 
3846
    public void setSuccessIsSet(boolean value) {
3847
      if (!value) {
3848
        this.success = null;
3849
      }
3850
    }
3851
 
3852
    public TransactionServiceException getEx() {
3853
      return this.ex;
3854
    }
3855
 
3856
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
3857
      this.ex = ex;
3858
      return this;
3859
    }
3860
 
3861
    public void unsetEx() {
3862
      this.ex = null;
3863
    }
3864
 
3865
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3866
    public boolean isSetEx() {
3867
      return this.ex != null;
3868
    }
3869
 
3870
    public void setExIsSet(boolean value) {
3871
      if (!value) {
3872
        this.ex = null;
3873
      }
3874
    }
3875
 
3876
    public void setFieldValue(_Fields field, Object value) {
3877
      switch (field) {
3878
      case SUCCESS:
3879
        if (value == null) {
3880
          unsetSuccess();
3881
        } else {
3882
          setSuccess((List<Transaction>)value);
3883
        }
3884
        break;
3885
 
3886
      case EX:
3887
        if (value == null) {
3888
          unsetEx();
3889
        } else {
3890
          setEx((TransactionServiceException)value);
3891
        }
3892
        break;
3893
 
3894
      }
3895
    }
3896
 
3897
    public void setFieldValue(int fieldID, Object value) {
3898
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3899
    }
3900
 
3901
    public Object getFieldValue(_Fields field) {
3902
      switch (field) {
3903
      case SUCCESS:
3904
        return getSuccess();
3905
 
3906
      case EX:
3907
        return getEx();
3908
 
3909
      }
3910
      throw new IllegalStateException();
3911
    }
3912
 
3913
    public Object getFieldValue(int fieldId) {
3914
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3915
    }
3916
 
3917
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3918
    public boolean isSet(_Fields field) {
3919
      switch (field) {
3920
      case SUCCESS:
3921
        return isSetSuccess();
3922
      case EX:
3923
        return isSetEx();
3924
      }
3925
      throw new IllegalStateException();
3926
    }
3927
 
3928
    public boolean isSet(int fieldID) {
3929
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3930
    }
3931
 
3932
    @Override
3933
    public boolean equals(Object that) {
3934
      if (that == null)
3935
        return false;
3936
      if (that instanceof getTransactionsForCustomer_result)
3937
        return this.equals((getTransactionsForCustomer_result)that);
3938
      return false;
3939
    }
3940
 
3941
    public boolean equals(getTransactionsForCustomer_result that) {
3942
      if (that == null)
3943
        return false;
3944
 
3945
      boolean this_present_success = true && this.isSetSuccess();
3946
      boolean that_present_success = true && that.isSetSuccess();
3947
      if (this_present_success || that_present_success) {
3948
        if (!(this_present_success && that_present_success))
3949
          return false;
3950
        if (!this.success.equals(that.success))
3951
          return false;
3952
      }
3953
 
3954
      boolean this_present_ex = true && this.isSetEx();
3955
      boolean that_present_ex = true && that.isSetEx();
3956
      if (this_present_ex || that_present_ex) {
3957
        if (!(this_present_ex && that_present_ex))
3958
          return false;
3959
        if (!this.ex.equals(that.ex))
3960
          return false;
3961
      }
3962
 
3963
      return true;
3964
    }
3965
 
3966
    @Override
3967
    public int hashCode() {
3968
      return 0;
3969
    }
3970
 
684 chandransh 3971
    public int compareTo(getTransactionsForCustomer_result other) {
3972
      if (!getClass().equals(other.getClass())) {
3973
        return getClass().getName().compareTo(other.getClass().getName());
3974
      }
3975
 
3976
      int lastComparison = 0;
3977
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
3978
 
3979
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3980
      if (lastComparison != 0) {
3981
        return lastComparison;
3982
      }
3983
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3984
      if (lastComparison != 0) {
3985
        return lastComparison;
3986
      }
3987
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3988
      if (lastComparison != 0) {
3989
        return lastComparison;
3990
      }
3991
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3992
      if (lastComparison != 0) {
3993
        return lastComparison;
3994
      }
3995
      return 0;
3996
    }
3997
 
68 ashish 3998
    public void read(TProtocol iprot) throws TException {
3999
      TField field;
4000
      iprot.readStructBegin();
4001
      while (true)
4002
      {
4003
        field = iprot.readFieldBegin();
4004
        if (field.type == TType.STOP) { 
4005
          break;
4006
        }
4007
        _Fields fieldId = _Fields.findByThriftId(field.id);
4008
        if (fieldId == null) {
4009
          TProtocolUtil.skip(iprot, field.type);
4010
        } else {
4011
          switch (fieldId) {
4012
            case SUCCESS:
4013
              if (field.type == TType.LIST) {
4014
                {
684 chandransh 4015
                  TList _list8 = iprot.readListBegin();
4016
                  this.success = new ArrayList<Transaction>(_list8.size);
4017
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4018
                  {
684 chandransh 4019
                    Transaction _elem10;
4020
                    _elem10 = new Transaction();
4021
                    _elem10.read(iprot);
4022
                    this.success.add(_elem10);
68 ashish 4023
                  }
4024
                  iprot.readListEnd();
4025
                }
4026
              } else { 
4027
                TProtocolUtil.skip(iprot, field.type);
4028
              }
4029
              break;
4030
            case EX:
4031
              if (field.type == TType.STRUCT) {
4032
                this.ex = new TransactionServiceException();
4033
                this.ex.read(iprot);
4034
              } else { 
4035
                TProtocolUtil.skip(iprot, field.type);
4036
              }
4037
              break;
4038
          }
4039
          iprot.readFieldEnd();
4040
        }
4041
      }
4042
      iprot.readStructEnd();
4043
      validate();
4044
    }
4045
 
4046
    public void write(TProtocol oprot) throws TException {
4047
      oprot.writeStructBegin(STRUCT_DESC);
4048
 
4049
      if (this.isSetSuccess()) {
4050
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4051
        {
4052
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4053
          for (Transaction _iter11 : this.success)
68 ashish 4054
          {
684 chandransh 4055
            _iter11.write(oprot);
68 ashish 4056
          }
4057
          oprot.writeListEnd();
4058
        }
4059
        oprot.writeFieldEnd();
4060
      } else if (this.isSetEx()) {
4061
        oprot.writeFieldBegin(EX_FIELD_DESC);
4062
        this.ex.write(oprot);
4063
        oprot.writeFieldEnd();
4064
      }
4065
      oprot.writeFieldStop();
4066
      oprot.writeStructEnd();
4067
    }
4068
 
4069
    @Override
4070
    public String toString() {
4071
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4072
      boolean first = true;
4073
 
4074
      sb.append("success:");
4075
      if (this.success == null) {
4076
        sb.append("null");
4077
      } else {
4078
        sb.append(this.success);
4079
      }
4080
      first = false;
4081
      if (!first) sb.append(", ");
4082
      sb.append("ex:");
4083
      if (this.ex == null) {
4084
        sb.append("null");
4085
      } else {
4086
        sb.append(this.ex);
4087
      }
4088
      first = false;
4089
      sb.append(")");
4090
      return sb.toString();
4091
    }
4092
 
4093
    public void validate() throws TException {
4094
      // check for required fields
4095
    }
4096
 
4097
  }
4098
 
132 ashish 4099
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4100
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4101
 
4102
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4103
 
4104
    private long shoppingCartId;
4105
 
4106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4107
    public enum _Fields implements TFieldIdEnum {
4108
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4109
 
4110
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4112
 
4113
      static {
4114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4115
          byId.put((int)field._thriftId, field);
4116
          byName.put(field.getFieldName(), field);
4117
        }
4118
      }
4119
 
4120
      /**
4121
       * Find the _Fields constant that matches fieldId, or null if its not found.
4122
       */
4123
      public static _Fields findByThriftId(int fieldId) {
4124
        return byId.get(fieldId);
4125
      }
4126
 
4127
      /**
4128
       * Find the _Fields constant that matches fieldId, throwing an exception
4129
       * if it is not found.
4130
       */
4131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4132
        _Fields fields = findByThriftId(fieldId);
4133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4134
        return fields;
4135
      }
4136
 
4137
      /**
4138
       * Find the _Fields constant that matches name, or null if its not found.
4139
       */
4140
      public static _Fields findByName(String name) {
4141
        return byName.get(name);
4142
      }
4143
 
4144
      private final short _thriftId;
4145
      private final String _fieldName;
4146
 
4147
      _Fields(short thriftId, String fieldName) {
4148
        _thriftId = thriftId;
4149
        _fieldName = fieldName;
4150
      }
4151
 
4152
      public short getThriftFieldId() {
4153
        return _thriftId;
4154
      }
4155
 
4156
      public String getFieldName() {
4157
        return _fieldName;
4158
      }
4159
    }
4160
 
4161
    // isset id assignments
4162
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4163
    private BitSet __isset_bit_vector = new BitSet(1);
4164
 
4165
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4166
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4167
          new FieldValueMetaData(TType.I64)));
4168
    }});
4169
 
4170
    static {
4171
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4172
    }
4173
 
4174
    public getTransactionsForShoppingCartId_args() {
4175
    }
4176
 
4177
    public getTransactionsForShoppingCartId_args(
4178
      long shoppingCartId)
4179
    {
4180
      this();
4181
      this.shoppingCartId = shoppingCartId;
4182
      setShoppingCartIdIsSet(true);
4183
    }
4184
 
4185
    /**
4186
     * Performs a deep copy on <i>other</i>.
4187
     */
4188
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4189
      __isset_bit_vector.clear();
4190
      __isset_bit_vector.or(other.__isset_bit_vector);
4191
      this.shoppingCartId = other.shoppingCartId;
4192
    }
4193
 
4194
    public getTransactionsForShoppingCartId_args deepCopy() {
4195
      return new getTransactionsForShoppingCartId_args(this);
4196
    }
4197
 
4198
    @Deprecated
4199
    public getTransactionsForShoppingCartId_args clone() {
4200
      return new getTransactionsForShoppingCartId_args(this);
4201
    }
4202
 
4203
    public long getShoppingCartId() {
4204
      return this.shoppingCartId;
4205
    }
4206
 
4207
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4208
      this.shoppingCartId = shoppingCartId;
4209
      setShoppingCartIdIsSet(true);
4210
      return this;
4211
    }
4212
 
4213
    public void unsetShoppingCartId() {
4214
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4215
    }
4216
 
4217
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4218
    public boolean isSetShoppingCartId() {
4219
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4220
    }
4221
 
4222
    public void setShoppingCartIdIsSet(boolean value) {
4223
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4224
    }
4225
 
4226
    public void setFieldValue(_Fields field, Object value) {
4227
      switch (field) {
4228
      case SHOPPING_CART_ID:
4229
        if (value == null) {
4230
          unsetShoppingCartId();
4231
        } else {
4232
          setShoppingCartId((Long)value);
4233
        }
4234
        break;
4235
 
4236
      }
4237
    }
4238
 
4239
    public void setFieldValue(int fieldID, Object value) {
4240
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4241
    }
4242
 
4243
    public Object getFieldValue(_Fields field) {
4244
      switch (field) {
4245
      case SHOPPING_CART_ID:
4246
        return new Long(getShoppingCartId());
4247
 
4248
      }
4249
      throw new IllegalStateException();
4250
    }
4251
 
4252
    public Object getFieldValue(int fieldId) {
4253
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4254
    }
4255
 
4256
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4257
    public boolean isSet(_Fields field) {
4258
      switch (field) {
4259
      case SHOPPING_CART_ID:
4260
        return isSetShoppingCartId();
4261
      }
4262
      throw new IllegalStateException();
4263
    }
4264
 
4265
    public boolean isSet(int fieldID) {
4266
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4267
    }
4268
 
4269
    @Override
4270
    public boolean equals(Object that) {
4271
      if (that == null)
4272
        return false;
4273
      if (that instanceof getTransactionsForShoppingCartId_args)
4274
        return this.equals((getTransactionsForShoppingCartId_args)that);
4275
      return false;
4276
    }
4277
 
4278
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4279
      if (that == null)
4280
        return false;
4281
 
4282
      boolean this_present_shoppingCartId = true;
4283
      boolean that_present_shoppingCartId = true;
4284
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4285
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4286
          return false;
4287
        if (this.shoppingCartId != that.shoppingCartId)
4288
          return false;
4289
      }
4290
 
4291
      return true;
4292
    }
4293
 
4294
    @Override
4295
    public int hashCode() {
4296
      return 0;
4297
    }
4298
 
4299
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4300
      if (!getClass().equals(other.getClass())) {
4301
        return getClass().getName().compareTo(other.getClass().getName());
4302
      }
4303
 
4304
      int lastComparison = 0;
4305
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4306
 
4307
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4308
      if (lastComparison != 0) {
4309
        return lastComparison;
4310
      }
4311
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4312
      if (lastComparison != 0) {
4313
        return lastComparison;
4314
      }
4315
      return 0;
4316
    }
4317
 
4318
    public void read(TProtocol iprot) throws TException {
4319
      TField field;
4320
      iprot.readStructBegin();
4321
      while (true)
4322
      {
4323
        field = iprot.readFieldBegin();
4324
        if (field.type == TType.STOP) { 
4325
          break;
4326
        }
4327
        _Fields fieldId = _Fields.findByThriftId(field.id);
4328
        if (fieldId == null) {
4329
          TProtocolUtil.skip(iprot, field.type);
4330
        } else {
4331
          switch (fieldId) {
4332
            case SHOPPING_CART_ID:
4333
              if (field.type == TType.I64) {
4334
                this.shoppingCartId = iprot.readI64();
4335
                setShoppingCartIdIsSet(true);
4336
              } else { 
4337
                TProtocolUtil.skip(iprot, field.type);
4338
              }
4339
              break;
4340
          }
4341
          iprot.readFieldEnd();
4342
        }
4343
      }
4344
      iprot.readStructEnd();
4345
      validate();
4346
    }
4347
 
4348
    public void write(TProtocol oprot) throws TException {
4349
      validate();
4350
 
4351
      oprot.writeStructBegin(STRUCT_DESC);
4352
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4353
      oprot.writeI64(this.shoppingCartId);
4354
      oprot.writeFieldEnd();
4355
      oprot.writeFieldStop();
4356
      oprot.writeStructEnd();
4357
    }
4358
 
4359
    @Override
4360
    public String toString() {
4361
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4362
      boolean first = true;
4363
 
4364
      sb.append("shoppingCartId:");
4365
      sb.append(this.shoppingCartId);
4366
      first = false;
4367
      sb.append(")");
4368
      return sb.toString();
4369
    }
4370
 
4371
    public void validate() throws TException {
4372
      // check for required fields
4373
    }
4374
 
4375
  }
4376
 
684 chandransh 4377
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4378
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4379
 
4380
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4381
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4382
 
4383
    private List<Transaction> success;
4384
    private TransactionServiceException ex;
4385
 
4386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4387
    public enum _Fields implements TFieldIdEnum {
4388
      SUCCESS((short)0, "success"),
4389
      EX((short)1, "ex");
4390
 
4391
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4392
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4393
 
4394
      static {
4395
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4396
          byId.put((int)field._thriftId, field);
4397
          byName.put(field.getFieldName(), field);
4398
        }
4399
      }
4400
 
4401
      /**
4402
       * Find the _Fields constant that matches fieldId, or null if its not found.
4403
       */
4404
      public static _Fields findByThriftId(int fieldId) {
4405
        return byId.get(fieldId);
4406
      }
4407
 
4408
      /**
4409
       * Find the _Fields constant that matches fieldId, throwing an exception
4410
       * if it is not found.
4411
       */
4412
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4413
        _Fields fields = findByThriftId(fieldId);
4414
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4415
        return fields;
4416
      }
4417
 
4418
      /**
4419
       * Find the _Fields constant that matches name, or null if its not found.
4420
       */
4421
      public static _Fields findByName(String name) {
4422
        return byName.get(name);
4423
      }
4424
 
4425
      private final short _thriftId;
4426
      private final String _fieldName;
4427
 
4428
      _Fields(short thriftId, String fieldName) {
4429
        _thriftId = thriftId;
4430
        _fieldName = fieldName;
4431
      }
4432
 
4433
      public short getThriftFieldId() {
4434
        return _thriftId;
4435
      }
4436
 
4437
      public String getFieldName() {
4438
        return _fieldName;
4439
      }
4440
    }
4441
 
4442
    // isset id assignments
4443
 
4444
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4445
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4446
          new ListMetaData(TType.LIST, 
4447
              new StructMetaData(TType.STRUCT, Transaction.class))));
4448
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4449
          new FieldValueMetaData(TType.STRUCT)));
4450
    }});
4451
 
4452
    static {
4453
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4454
    }
4455
 
4456
    public getTransactionsForShoppingCartId_result() {
4457
    }
4458
 
4459
    public getTransactionsForShoppingCartId_result(
4460
      List<Transaction> success,
4461
      TransactionServiceException ex)
4462
    {
4463
      this();
4464
      this.success = success;
4465
      this.ex = ex;
4466
    }
4467
 
4468
    /**
4469
     * Performs a deep copy on <i>other</i>.
4470
     */
4471
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4472
      if (other.isSetSuccess()) {
4473
        List<Transaction> __this__success = new ArrayList<Transaction>();
4474
        for (Transaction other_element : other.success) {
4475
          __this__success.add(new Transaction(other_element));
4476
        }
4477
        this.success = __this__success;
4478
      }
4479
      if (other.isSetEx()) {
4480
        this.ex = new TransactionServiceException(other.ex);
4481
      }
4482
    }
4483
 
4484
    public getTransactionsForShoppingCartId_result deepCopy() {
4485
      return new getTransactionsForShoppingCartId_result(this);
4486
    }
4487
 
4488
    @Deprecated
4489
    public getTransactionsForShoppingCartId_result clone() {
4490
      return new getTransactionsForShoppingCartId_result(this);
4491
    }
4492
 
4493
    public int getSuccessSize() {
4494
      return (this.success == null) ? 0 : this.success.size();
4495
    }
4496
 
4497
    public java.util.Iterator<Transaction> getSuccessIterator() {
4498
      return (this.success == null) ? null : this.success.iterator();
4499
    }
4500
 
4501
    public void addToSuccess(Transaction elem) {
4502
      if (this.success == null) {
4503
        this.success = new ArrayList<Transaction>();
4504
      }
4505
      this.success.add(elem);
4506
    }
4507
 
4508
    public List<Transaction> getSuccess() {
4509
      return this.success;
4510
    }
4511
 
4512
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4513
      this.success = success;
4514
      return this;
4515
    }
4516
 
4517
    public void unsetSuccess() {
4518
      this.success = null;
4519
    }
4520
 
4521
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4522
    public boolean isSetSuccess() {
4523
      return this.success != null;
4524
    }
4525
 
4526
    public void setSuccessIsSet(boolean value) {
4527
      if (!value) {
4528
        this.success = null;
4529
      }
4530
    }
4531
 
4532
    public TransactionServiceException getEx() {
4533
      return this.ex;
4534
    }
4535
 
4536
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4537
      this.ex = ex;
4538
      return this;
4539
    }
4540
 
4541
    public void unsetEx() {
4542
      this.ex = null;
4543
    }
4544
 
4545
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4546
    public boolean isSetEx() {
4547
      return this.ex != null;
4548
    }
4549
 
4550
    public void setExIsSet(boolean value) {
4551
      if (!value) {
4552
        this.ex = null;
4553
      }
4554
    }
4555
 
4556
    public void setFieldValue(_Fields field, Object value) {
4557
      switch (field) {
4558
      case SUCCESS:
4559
        if (value == null) {
4560
          unsetSuccess();
4561
        } else {
4562
          setSuccess((List<Transaction>)value);
4563
        }
4564
        break;
4565
 
4566
      case EX:
4567
        if (value == null) {
4568
          unsetEx();
4569
        } else {
4570
          setEx((TransactionServiceException)value);
4571
        }
4572
        break;
4573
 
4574
      }
4575
    }
4576
 
4577
    public void setFieldValue(int fieldID, Object value) {
4578
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4579
    }
4580
 
4581
    public Object getFieldValue(_Fields field) {
4582
      switch (field) {
4583
      case SUCCESS:
4584
        return getSuccess();
4585
 
4586
      case EX:
4587
        return getEx();
4588
 
4589
      }
4590
      throw new IllegalStateException();
4591
    }
4592
 
4593
    public Object getFieldValue(int fieldId) {
4594
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4595
    }
4596
 
4597
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4598
    public boolean isSet(_Fields field) {
4599
      switch (field) {
4600
      case SUCCESS:
4601
        return isSetSuccess();
4602
      case EX:
4603
        return isSetEx();
4604
      }
4605
      throw new IllegalStateException();
4606
    }
4607
 
4608
    public boolean isSet(int fieldID) {
4609
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4610
    }
4611
 
4612
    @Override
4613
    public boolean equals(Object that) {
4614
      if (that == null)
4615
        return false;
4616
      if (that instanceof getTransactionsForShoppingCartId_result)
4617
        return this.equals((getTransactionsForShoppingCartId_result)that);
4618
      return false;
4619
    }
4620
 
4621
    public boolean equals(getTransactionsForShoppingCartId_result that) {
4622
      if (that == null)
4623
        return false;
4624
 
4625
      boolean this_present_success = true && this.isSetSuccess();
4626
      boolean that_present_success = true && that.isSetSuccess();
4627
      if (this_present_success || that_present_success) {
4628
        if (!(this_present_success && that_present_success))
4629
          return false;
4630
        if (!this.success.equals(that.success))
4631
          return false;
4632
      }
4633
 
4634
      boolean this_present_ex = true && this.isSetEx();
4635
      boolean that_present_ex = true && that.isSetEx();
4636
      if (this_present_ex || that_present_ex) {
4637
        if (!(this_present_ex && that_present_ex))
4638
          return false;
4639
        if (!this.ex.equals(that.ex))
4640
          return false;
4641
      }
4642
 
4643
      return true;
4644
    }
4645
 
4646
    @Override
4647
    public int hashCode() {
4648
      return 0;
4649
    }
4650
 
684 chandransh 4651
    public int compareTo(getTransactionsForShoppingCartId_result other) {
4652
      if (!getClass().equals(other.getClass())) {
4653
        return getClass().getName().compareTo(other.getClass().getName());
4654
      }
4655
 
4656
      int lastComparison = 0;
4657
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
4658
 
4659
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4660
      if (lastComparison != 0) {
4661
        return lastComparison;
4662
      }
4663
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4664
      if (lastComparison != 0) {
4665
        return lastComparison;
4666
      }
4667
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4668
      if (lastComparison != 0) {
4669
        return lastComparison;
4670
      }
4671
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4672
      if (lastComparison != 0) {
4673
        return lastComparison;
4674
      }
4675
      return 0;
4676
    }
4677
 
132 ashish 4678
    public void read(TProtocol iprot) throws TException {
4679
      TField field;
4680
      iprot.readStructBegin();
4681
      while (true)
4682
      {
4683
        field = iprot.readFieldBegin();
4684
        if (field.type == TType.STOP) { 
4685
          break;
4686
        }
4687
        _Fields fieldId = _Fields.findByThriftId(field.id);
4688
        if (fieldId == null) {
4689
          TProtocolUtil.skip(iprot, field.type);
4690
        } else {
4691
          switch (fieldId) {
4692
            case SUCCESS:
4693
              if (field.type == TType.LIST) {
4694
                {
684 chandransh 4695
                  TList _list12 = iprot.readListBegin();
4696
                  this.success = new ArrayList<Transaction>(_list12.size);
4697
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 4698
                  {
684 chandransh 4699
                    Transaction _elem14;
4700
                    _elem14 = new Transaction();
4701
                    _elem14.read(iprot);
4702
                    this.success.add(_elem14);
132 ashish 4703
                  }
4704
                  iprot.readListEnd();
4705
                }
4706
              } else { 
4707
                TProtocolUtil.skip(iprot, field.type);
4708
              }
4709
              break;
4710
            case EX:
4711
              if (field.type == TType.STRUCT) {
4712
                this.ex = new TransactionServiceException();
4713
                this.ex.read(iprot);
4714
              } else { 
4715
                TProtocolUtil.skip(iprot, field.type);
4716
              }
4717
              break;
4718
          }
4719
          iprot.readFieldEnd();
4720
        }
4721
      }
4722
      iprot.readStructEnd();
4723
      validate();
4724
    }
4725
 
4726
    public void write(TProtocol oprot) throws TException {
4727
      oprot.writeStructBegin(STRUCT_DESC);
4728
 
4729
      if (this.isSetSuccess()) {
4730
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4731
        {
4732
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4733
          for (Transaction _iter15 : this.success)
132 ashish 4734
          {
684 chandransh 4735
            _iter15.write(oprot);
132 ashish 4736
          }
4737
          oprot.writeListEnd();
4738
        }
4739
        oprot.writeFieldEnd();
4740
      } else if (this.isSetEx()) {
4741
        oprot.writeFieldBegin(EX_FIELD_DESC);
4742
        this.ex.write(oprot);
4743
        oprot.writeFieldEnd();
4744
      }
4745
      oprot.writeFieldStop();
4746
      oprot.writeStructEnd();
4747
    }
4748
 
4749
    @Override
4750
    public String toString() {
4751
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
4752
      boolean first = true;
4753
 
4754
      sb.append("success:");
4755
      if (this.success == null) {
4756
        sb.append("null");
4757
      } else {
4758
        sb.append(this.success);
4759
      }
4760
      first = false;
4761
      if (!first) sb.append(", ");
4762
      sb.append("ex:");
4763
      if (this.ex == null) {
4764
        sb.append("null");
4765
      } else {
4766
        sb.append(this.ex);
4767
      }
4768
      first = false;
4769
      sb.append(")");
4770
      return sb.toString();
4771
    }
4772
 
4773
    public void validate() throws TException {
4774
      // check for required fields
4775
    }
4776
 
4777
  }
4778
 
68 ashish 4779
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
4780
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
4781
 
4782
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
4783
 
4784
    private long transactionId;
4785
 
4786
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4787
    public enum _Fields implements TFieldIdEnum {
4788
      TRANSACTION_ID((short)1, "transactionId");
4789
 
4790
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4791
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4792
 
4793
      static {
4794
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4795
          byId.put((int)field._thriftId, field);
4796
          byName.put(field.getFieldName(), field);
4797
        }
4798
      }
4799
 
4800
      /**
4801
       * Find the _Fields constant that matches fieldId, or null if its not found.
4802
       */
4803
      public static _Fields findByThriftId(int fieldId) {
4804
        return byId.get(fieldId);
4805
      }
4806
 
4807
      /**
4808
       * Find the _Fields constant that matches fieldId, throwing an exception
4809
       * if it is not found.
4810
       */
4811
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4812
        _Fields fields = findByThriftId(fieldId);
4813
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4814
        return fields;
4815
      }
4816
 
4817
      /**
4818
       * Find the _Fields constant that matches name, or null if its not found.
4819
       */
4820
      public static _Fields findByName(String name) {
4821
        return byName.get(name);
4822
      }
4823
 
4824
      private final short _thriftId;
4825
      private final String _fieldName;
4826
 
4827
      _Fields(short thriftId, String fieldName) {
4828
        _thriftId = thriftId;
4829
        _fieldName = fieldName;
4830
      }
4831
 
4832
      public short getThriftFieldId() {
4833
        return _thriftId;
4834
      }
4835
 
4836
      public String getFieldName() {
4837
        return _fieldName;
4838
      }
4839
    }
4840
 
4841
    // isset id assignments
4842
    private static final int __TRANSACTIONID_ISSET_ID = 0;
4843
    private BitSet __isset_bit_vector = new BitSet(1);
4844
 
4845
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4846
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
4847
          new FieldValueMetaData(TType.I64)));
4848
    }});
4849
 
4850
    static {
4851
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
4852
    }
4853
 
4854
    public getTransactionStatus_args() {
4855
    }
4856
 
4857
    public getTransactionStatus_args(
4858
      long transactionId)
4859
    {
4860
      this();
4861
      this.transactionId = transactionId;
4862
      setTransactionIdIsSet(true);
4863
    }
4864
 
4865
    /**
4866
     * Performs a deep copy on <i>other</i>.
4867
     */
4868
    public getTransactionStatus_args(getTransactionStatus_args other) {
4869
      __isset_bit_vector.clear();
4870
      __isset_bit_vector.or(other.__isset_bit_vector);
4871
      this.transactionId = other.transactionId;
4872
    }
4873
 
4874
    public getTransactionStatus_args deepCopy() {
4875
      return new getTransactionStatus_args(this);
4876
    }
4877
 
4878
    @Deprecated
4879
    public getTransactionStatus_args clone() {
4880
      return new getTransactionStatus_args(this);
4881
    }
4882
 
4883
    public long getTransactionId() {
4884
      return this.transactionId;
4885
    }
4886
 
4887
    public getTransactionStatus_args setTransactionId(long transactionId) {
4888
      this.transactionId = transactionId;
4889
      setTransactionIdIsSet(true);
4890
      return this;
4891
    }
4892
 
4893
    public void unsetTransactionId() {
4894
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
4895
    }
4896
 
4897
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
4898
    public boolean isSetTransactionId() {
4899
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
4900
    }
4901
 
4902
    public void setTransactionIdIsSet(boolean value) {
4903
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
4904
    }
4905
 
4906
    public void setFieldValue(_Fields field, Object value) {
4907
      switch (field) {
4908
      case TRANSACTION_ID:
4909
        if (value == null) {
4910
          unsetTransactionId();
4911
        } else {
4912
          setTransactionId((Long)value);
4913
        }
4914
        break;
4915
 
4916
      }
4917
    }
4918
 
4919
    public void setFieldValue(int fieldID, Object value) {
4920
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4921
    }
4922
 
4923
    public Object getFieldValue(_Fields field) {
4924
      switch (field) {
4925
      case TRANSACTION_ID:
4926
        return new Long(getTransactionId());
4927
 
4928
      }
4929
      throw new IllegalStateException();
4930
    }
4931
 
4932
    public Object getFieldValue(int fieldId) {
4933
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4934
    }
4935
 
4936
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4937
    public boolean isSet(_Fields field) {
4938
      switch (field) {
4939
      case TRANSACTION_ID:
4940
        return isSetTransactionId();
4941
      }
4942
      throw new IllegalStateException();
4943
    }
4944
 
4945
    public boolean isSet(int fieldID) {
4946
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4947
    }
4948
 
4949
    @Override
4950
    public boolean equals(Object that) {
4951
      if (that == null)
4952
        return false;
4953
      if (that instanceof getTransactionStatus_args)
4954
        return this.equals((getTransactionStatus_args)that);
4955
      return false;
4956
    }
4957
 
4958
    public boolean equals(getTransactionStatus_args that) {
4959
      if (that == null)
4960
        return false;
4961
 
4962
      boolean this_present_transactionId = true;
4963
      boolean that_present_transactionId = true;
4964
      if (this_present_transactionId || that_present_transactionId) {
4965
        if (!(this_present_transactionId && that_present_transactionId))
4966
          return false;
4967
        if (this.transactionId != that.transactionId)
4968
          return false;
4969
      }
4970
 
4971
      return true;
4972
    }
4973
 
4974
    @Override
4975
    public int hashCode() {
4976
      return 0;
4977
    }
4978
 
4979
    public int compareTo(getTransactionStatus_args other) {
4980
      if (!getClass().equals(other.getClass())) {
4981
        return getClass().getName().compareTo(other.getClass().getName());
4982
      }
4983
 
4984
      int lastComparison = 0;
4985
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
4986
 
4987
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
4988
      if (lastComparison != 0) {
4989
        return lastComparison;
4990
      }
4991
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
4992
      if (lastComparison != 0) {
4993
        return lastComparison;
4994
      }
4995
      return 0;
4996
    }
4997
 
4998
    public void read(TProtocol iprot) throws TException {
4999
      TField field;
5000
      iprot.readStructBegin();
5001
      while (true)
5002
      {
5003
        field = iprot.readFieldBegin();
5004
        if (field.type == TType.STOP) { 
5005
          break;
5006
        }
5007
        _Fields fieldId = _Fields.findByThriftId(field.id);
5008
        if (fieldId == null) {
5009
          TProtocolUtil.skip(iprot, field.type);
5010
        } else {
5011
          switch (fieldId) {
5012
            case TRANSACTION_ID:
5013
              if (field.type == TType.I64) {
5014
                this.transactionId = iprot.readI64();
5015
                setTransactionIdIsSet(true);
5016
              } else { 
5017
                TProtocolUtil.skip(iprot, field.type);
5018
              }
5019
              break;
5020
          }
5021
          iprot.readFieldEnd();
5022
        }
5023
      }
5024
      iprot.readStructEnd();
5025
      validate();
5026
    }
5027
 
5028
    public void write(TProtocol oprot) throws TException {
5029
      validate();
5030
 
5031
      oprot.writeStructBegin(STRUCT_DESC);
5032
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5033
      oprot.writeI64(this.transactionId);
5034
      oprot.writeFieldEnd();
5035
      oprot.writeFieldStop();
5036
      oprot.writeStructEnd();
5037
    }
5038
 
5039
    @Override
5040
    public String toString() {
5041
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5042
      boolean first = true;
5043
 
5044
      sb.append("transactionId:");
5045
      sb.append(this.transactionId);
5046
      first = false;
5047
      sb.append(")");
5048
      return sb.toString();
5049
    }
5050
 
5051
    public void validate() throws TException {
5052
      // check for required fields
5053
    }
5054
 
5055
  }
5056
 
5057
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5058
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5059
 
5060
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5061
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5062
 
5063
    private TransactionStatus success;
5064
    private TransactionServiceException ex;
5065
 
5066
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5067
    public enum _Fields implements TFieldIdEnum {
5068
      /**
5069
       * 
5070
       * @see TransactionStatus
5071
       */
5072
      SUCCESS((short)0, "success"),
5073
      EX((short)1, "ex");
5074
 
5075
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5076
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5077
 
5078
      static {
5079
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5080
          byId.put((int)field._thriftId, field);
5081
          byName.put(field.getFieldName(), field);
5082
        }
5083
      }
5084
 
5085
      /**
5086
       * Find the _Fields constant that matches fieldId, or null if its not found.
5087
       */
5088
      public static _Fields findByThriftId(int fieldId) {
5089
        return byId.get(fieldId);
5090
      }
5091
 
5092
      /**
5093
       * Find the _Fields constant that matches fieldId, throwing an exception
5094
       * if it is not found.
5095
       */
5096
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5097
        _Fields fields = findByThriftId(fieldId);
5098
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5099
        return fields;
5100
      }
5101
 
5102
      /**
5103
       * Find the _Fields constant that matches name, or null if its not found.
5104
       */
5105
      public static _Fields findByName(String name) {
5106
        return byName.get(name);
5107
      }
5108
 
5109
      private final short _thriftId;
5110
      private final String _fieldName;
5111
 
5112
      _Fields(short thriftId, String fieldName) {
5113
        _thriftId = thriftId;
5114
        _fieldName = fieldName;
5115
      }
5116
 
5117
      public short getThriftFieldId() {
5118
        return _thriftId;
5119
      }
5120
 
5121
      public String getFieldName() {
5122
        return _fieldName;
5123
      }
5124
    }
5125
 
5126
    // isset id assignments
5127
 
5128
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5129
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5130
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5131
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5132
          new FieldValueMetaData(TType.STRUCT)));
5133
    }});
5134
 
5135
    static {
5136
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5137
    }
5138
 
5139
    public getTransactionStatus_result() {
5140
    }
5141
 
5142
    public getTransactionStatus_result(
5143
      TransactionStatus success,
5144
      TransactionServiceException ex)
5145
    {
5146
      this();
5147
      this.success = success;
5148
      this.ex = ex;
5149
    }
5150
 
5151
    /**
5152
     * Performs a deep copy on <i>other</i>.
5153
     */
5154
    public getTransactionStatus_result(getTransactionStatus_result other) {
5155
      if (other.isSetSuccess()) {
5156
        this.success = other.success;
5157
      }
5158
      if (other.isSetEx()) {
5159
        this.ex = new TransactionServiceException(other.ex);
5160
      }
5161
    }
5162
 
5163
    public getTransactionStatus_result deepCopy() {
5164
      return new getTransactionStatus_result(this);
5165
    }
5166
 
5167
    @Deprecated
5168
    public getTransactionStatus_result clone() {
5169
      return new getTransactionStatus_result(this);
5170
    }
5171
 
5172
    /**
5173
     * 
5174
     * @see TransactionStatus
5175
     */
5176
    public TransactionStatus getSuccess() {
5177
      return this.success;
5178
    }
5179
 
5180
    /**
5181
     * 
5182
     * @see TransactionStatus
5183
     */
5184
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5185
      this.success = success;
5186
      return this;
5187
    }
5188
 
5189
    public void unsetSuccess() {
5190
      this.success = null;
5191
    }
5192
 
5193
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5194
    public boolean isSetSuccess() {
5195
      return this.success != null;
5196
    }
5197
 
5198
    public void setSuccessIsSet(boolean value) {
5199
      if (!value) {
5200
        this.success = null;
5201
      }
5202
    }
5203
 
5204
    public TransactionServiceException getEx() {
5205
      return this.ex;
5206
    }
5207
 
5208
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5209
      this.ex = ex;
5210
      return this;
5211
    }
5212
 
5213
    public void unsetEx() {
5214
      this.ex = null;
5215
    }
5216
 
5217
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5218
    public boolean isSetEx() {
5219
      return this.ex != null;
5220
    }
5221
 
5222
    public void setExIsSet(boolean value) {
5223
      if (!value) {
5224
        this.ex = null;
5225
      }
5226
    }
5227
 
5228
    public void setFieldValue(_Fields field, Object value) {
5229
      switch (field) {
5230
      case SUCCESS:
5231
        if (value == null) {
5232
          unsetSuccess();
5233
        } else {
5234
          setSuccess((TransactionStatus)value);
5235
        }
5236
        break;
5237
 
5238
      case EX:
5239
        if (value == null) {
5240
          unsetEx();
5241
        } else {
5242
          setEx((TransactionServiceException)value);
5243
        }
5244
        break;
5245
 
5246
      }
5247
    }
5248
 
5249
    public void setFieldValue(int fieldID, Object value) {
5250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5251
    }
5252
 
5253
    public Object getFieldValue(_Fields field) {
5254
      switch (field) {
5255
      case SUCCESS:
5256
        return getSuccess();
5257
 
5258
      case EX:
5259
        return getEx();
5260
 
5261
      }
5262
      throw new IllegalStateException();
5263
    }
5264
 
5265
    public Object getFieldValue(int fieldId) {
5266
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5267
    }
5268
 
5269
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5270
    public boolean isSet(_Fields field) {
5271
      switch (field) {
5272
      case SUCCESS:
5273
        return isSetSuccess();
5274
      case EX:
5275
        return isSetEx();
5276
      }
5277
      throw new IllegalStateException();
5278
    }
5279
 
5280
    public boolean isSet(int fieldID) {
5281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5282
    }
5283
 
5284
    @Override
5285
    public boolean equals(Object that) {
5286
      if (that == null)
5287
        return false;
5288
      if (that instanceof getTransactionStatus_result)
5289
        return this.equals((getTransactionStatus_result)that);
5290
      return false;
5291
    }
5292
 
5293
    public boolean equals(getTransactionStatus_result that) {
5294
      if (that == null)
5295
        return false;
5296
 
5297
      boolean this_present_success = true && this.isSetSuccess();
5298
      boolean that_present_success = true && that.isSetSuccess();
5299
      if (this_present_success || that_present_success) {
5300
        if (!(this_present_success && that_present_success))
5301
          return false;
5302
        if (!this.success.equals(that.success))
5303
          return false;
5304
      }
5305
 
5306
      boolean this_present_ex = true && this.isSetEx();
5307
      boolean that_present_ex = true && that.isSetEx();
5308
      if (this_present_ex || that_present_ex) {
5309
        if (!(this_present_ex && that_present_ex))
5310
          return false;
5311
        if (!this.ex.equals(that.ex))
5312
          return false;
5313
      }
5314
 
5315
      return true;
5316
    }
5317
 
5318
    @Override
5319
    public int hashCode() {
5320
      return 0;
5321
    }
5322
 
5323
    public int compareTo(getTransactionStatus_result other) {
5324
      if (!getClass().equals(other.getClass())) {
5325
        return getClass().getName().compareTo(other.getClass().getName());
5326
      }
5327
 
5328
      int lastComparison = 0;
5329
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5330
 
5331
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5332
      if (lastComparison != 0) {
5333
        return lastComparison;
5334
      }
5335
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5336
      if (lastComparison != 0) {
5337
        return lastComparison;
5338
      }
5339
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5340
      if (lastComparison != 0) {
5341
        return lastComparison;
5342
      }
5343
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5344
      if (lastComparison != 0) {
5345
        return lastComparison;
5346
      }
5347
      return 0;
5348
    }
5349
 
5350
    public void read(TProtocol iprot) throws TException {
5351
      TField field;
5352
      iprot.readStructBegin();
5353
      while (true)
5354
      {
5355
        field = iprot.readFieldBegin();
5356
        if (field.type == TType.STOP) { 
5357
          break;
5358
        }
5359
        _Fields fieldId = _Fields.findByThriftId(field.id);
5360
        if (fieldId == null) {
5361
          TProtocolUtil.skip(iprot, field.type);
5362
        } else {
5363
          switch (fieldId) {
5364
            case SUCCESS:
5365
              if (field.type == TType.I32) {
5366
                this.success = TransactionStatus.findByValue(iprot.readI32());
5367
              } else { 
5368
                TProtocolUtil.skip(iprot, field.type);
5369
              }
5370
              break;
5371
            case EX:
5372
              if (field.type == TType.STRUCT) {
5373
                this.ex = new TransactionServiceException();
5374
                this.ex.read(iprot);
5375
              } else { 
5376
                TProtocolUtil.skip(iprot, field.type);
5377
              }
5378
              break;
5379
          }
5380
          iprot.readFieldEnd();
5381
        }
5382
      }
5383
      iprot.readStructEnd();
5384
      validate();
5385
    }
5386
 
5387
    public void write(TProtocol oprot) throws TException {
5388
      oprot.writeStructBegin(STRUCT_DESC);
5389
 
5390
      if (this.isSetSuccess()) {
5391
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5392
        oprot.writeI32(this.success.getValue());
5393
        oprot.writeFieldEnd();
5394
      } else if (this.isSetEx()) {
5395
        oprot.writeFieldBegin(EX_FIELD_DESC);
5396
        this.ex.write(oprot);
5397
        oprot.writeFieldEnd();
5398
      }
5399
      oprot.writeFieldStop();
5400
      oprot.writeStructEnd();
5401
    }
5402
 
5403
    @Override
5404
    public String toString() {
5405
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5406
      boolean first = true;
5407
 
5408
      sb.append("success:");
5409
      if (this.success == null) {
5410
        sb.append("null");
5411
      } else {
5412
        String success_name = success.name();
5413
        if (success_name != null) {
5414
          sb.append(success_name);
5415
          sb.append(" (");
5416
        }
5417
        sb.append(this.success);
5418
        if (success_name != null) {
5419
          sb.append(")");
5420
        }
5421
      }
5422
      first = false;
5423
      if (!first) sb.append(", ");
5424
      sb.append("ex:");
5425
      if (this.ex == null) {
5426
        sb.append("null");
5427
      } else {
5428
        sb.append(this.ex);
5429
      }
5430
      first = false;
5431
      sb.append(")");
5432
      return sb.toString();
5433
    }
5434
 
5435
    public void validate() throws TException {
5436
      // check for required fields
5437
    }
5438
 
5439
  }
5440
 
5441
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5442
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5443
 
5444
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5445
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5446
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5447
 
5448
    private long transactionId;
5449
    private TransactionStatus status;
5450
    private String description;
5451
 
5452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5453
    public enum _Fields implements TFieldIdEnum {
5454
      TRANSACTION_ID((short)1, "transactionId"),
5455
      /**
5456
       * 
5457
       * @see TransactionStatus
5458
       */
5459
      STATUS((short)2, "status"),
5460
      DESCRIPTION((short)3, "description");
5461
 
5462
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5463
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5464
 
5465
      static {
5466
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5467
          byId.put((int)field._thriftId, field);
5468
          byName.put(field.getFieldName(), field);
5469
        }
5470
      }
5471
 
5472
      /**
5473
       * Find the _Fields constant that matches fieldId, or null if its not found.
5474
       */
5475
      public static _Fields findByThriftId(int fieldId) {
5476
        return byId.get(fieldId);
5477
      }
5478
 
5479
      /**
5480
       * Find the _Fields constant that matches fieldId, throwing an exception
5481
       * if it is not found.
5482
       */
5483
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5484
        _Fields fields = findByThriftId(fieldId);
5485
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5486
        return fields;
5487
      }
5488
 
5489
      /**
5490
       * Find the _Fields constant that matches name, or null if its not found.
5491
       */
5492
      public static _Fields findByName(String name) {
5493
        return byName.get(name);
5494
      }
5495
 
5496
      private final short _thriftId;
5497
      private final String _fieldName;
5498
 
5499
      _Fields(short thriftId, String fieldName) {
5500
        _thriftId = thriftId;
5501
        _fieldName = fieldName;
5502
      }
5503
 
5504
      public short getThriftFieldId() {
5505
        return _thriftId;
5506
      }
5507
 
5508
      public String getFieldName() {
5509
        return _fieldName;
5510
      }
5511
    }
5512
 
5513
    // isset id assignments
5514
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5515
    private BitSet __isset_bit_vector = new BitSet(1);
5516
 
5517
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5518
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5519
          new FieldValueMetaData(TType.I64)));
5520
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5521
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5522
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5523
          new FieldValueMetaData(TType.STRING)));
5524
    }});
5525
 
5526
    static {
5527
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5528
    }
5529
 
5530
    public changeTransactionStatus_args() {
5531
    }
5532
 
5533
    public changeTransactionStatus_args(
5534
      long transactionId,
5535
      TransactionStatus status,
5536
      String description)
5537
    {
5538
      this();
5539
      this.transactionId = transactionId;
5540
      setTransactionIdIsSet(true);
5541
      this.status = status;
5542
      this.description = description;
5543
    }
5544
 
5545
    /**
5546
     * Performs a deep copy on <i>other</i>.
5547
     */
5548
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
5549
      __isset_bit_vector.clear();
5550
      __isset_bit_vector.or(other.__isset_bit_vector);
5551
      this.transactionId = other.transactionId;
5552
      if (other.isSetStatus()) {
5553
        this.status = other.status;
5554
      }
5555
      if (other.isSetDescription()) {
5556
        this.description = other.description;
5557
      }
5558
    }
5559
 
5560
    public changeTransactionStatus_args deepCopy() {
5561
      return new changeTransactionStatus_args(this);
5562
    }
5563
 
5564
    @Deprecated
5565
    public changeTransactionStatus_args clone() {
5566
      return new changeTransactionStatus_args(this);
5567
    }
5568
 
5569
    public long getTransactionId() {
5570
      return this.transactionId;
5571
    }
5572
 
5573
    public changeTransactionStatus_args setTransactionId(long transactionId) {
5574
      this.transactionId = transactionId;
5575
      setTransactionIdIsSet(true);
5576
      return this;
5577
    }
5578
 
5579
    public void unsetTransactionId() {
5580
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5581
    }
5582
 
5583
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5584
    public boolean isSetTransactionId() {
5585
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5586
    }
5587
 
5588
    public void setTransactionIdIsSet(boolean value) {
5589
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5590
    }
5591
 
5592
    /**
5593
     * 
5594
     * @see TransactionStatus
5595
     */
5596
    public TransactionStatus getStatus() {
5597
      return this.status;
5598
    }
5599
 
5600
    /**
5601
     * 
5602
     * @see TransactionStatus
5603
     */
5604
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
5605
      this.status = status;
5606
      return this;
5607
    }
5608
 
5609
    public void unsetStatus() {
5610
      this.status = null;
5611
    }
5612
 
5613
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5614
    public boolean isSetStatus() {
5615
      return this.status != null;
5616
    }
5617
 
5618
    public void setStatusIsSet(boolean value) {
5619
      if (!value) {
5620
        this.status = null;
5621
      }
5622
    }
5623
 
5624
    public String getDescription() {
5625
      return this.description;
5626
    }
5627
 
5628
    public changeTransactionStatus_args setDescription(String description) {
5629
      this.description = description;
5630
      return this;
5631
    }
5632
 
5633
    public void unsetDescription() {
5634
      this.description = null;
5635
    }
5636
 
5637
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
5638
    public boolean isSetDescription() {
5639
      return this.description != null;
5640
    }
5641
 
5642
    public void setDescriptionIsSet(boolean value) {
5643
      if (!value) {
5644
        this.description = null;
5645
      }
5646
    }
5647
 
5648
    public void setFieldValue(_Fields field, Object value) {
5649
      switch (field) {
5650
      case TRANSACTION_ID:
5651
        if (value == null) {
5652
          unsetTransactionId();
5653
        } else {
5654
          setTransactionId((Long)value);
5655
        }
5656
        break;
5657
 
5658
      case STATUS:
5659
        if (value == null) {
5660
          unsetStatus();
5661
        } else {
5662
          setStatus((TransactionStatus)value);
5663
        }
5664
        break;
5665
 
5666
      case DESCRIPTION:
5667
        if (value == null) {
5668
          unsetDescription();
5669
        } else {
5670
          setDescription((String)value);
5671
        }
5672
        break;
5673
 
5674
      }
5675
    }
5676
 
5677
    public void setFieldValue(int fieldID, Object value) {
5678
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5679
    }
5680
 
5681
    public Object getFieldValue(_Fields field) {
5682
      switch (field) {
5683
      case TRANSACTION_ID:
5684
        return new Long(getTransactionId());
5685
 
5686
      case STATUS:
5687
        return getStatus();
5688
 
5689
      case DESCRIPTION:
5690
        return getDescription();
5691
 
5692
      }
5693
      throw new IllegalStateException();
5694
    }
5695
 
5696
    public Object getFieldValue(int fieldId) {
5697
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5698
    }
5699
 
5700
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5701
    public boolean isSet(_Fields field) {
5702
      switch (field) {
5703
      case TRANSACTION_ID:
5704
        return isSetTransactionId();
5705
      case STATUS:
5706
        return isSetStatus();
5707
      case DESCRIPTION:
5708
        return isSetDescription();
5709
      }
5710
      throw new IllegalStateException();
5711
    }
5712
 
5713
    public boolean isSet(int fieldID) {
5714
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5715
    }
5716
 
5717
    @Override
5718
    public boolean equals(Object that) {
5719
      if (that == null)
5720
        return false;
5721
      if (that instanceof changeTransactionStatus_args)
5722
        return this.equals((changeTransactionStatus_args)that);
5723
      return false;
5724
    }
5725
 
5726
    public boolean equals(changeTransactionStatus_args that) {
5727
      if (that == null)
5728
        return false;
5729
 
5730
      boolean this_present_transactionId = true;
5731
      boolean that_present_transactionId = true;
5732
      if (this_present_transactionId || that_present_transactionId) {
5733
        if (!(this_present_transactionId && that_present_transactionId))
5734
          return false;
5735
        if (this.transactionId != that.transactionId)
5736
          return false;
5737
      }
5738
 
5739
      boolean this_present_status = true && this.isSetStatus();
5740
      boolean that_present_status = true && that.isSetStatus();
5741
      if (this_present_status || that_present_status) {
5742
        if (!(this_present_status && that_present_status))
5743
          return false;
5744
        if (!this.status.equals(that.status))
5745
          return false;
5746
      }
5747
 
5748
      boolean this_present_description = true && this.isSetDescription();
5749
      boolean that_present_description = true && that.isSetDescription();
5750
      if (this_present_description || that_present_description) {
5751
        if (!(this_present_description && that_present_description))
5752
          return false;
5753
        if (!this.description.equals(that.description))
5754
          return false;
5755
      }
5756
 
5757
      return true;
5758
    }
5759
 
5760
    @Override
5761
    public int hashCode() {
5762
      return 0;
5763
    }
5764
 
5765
    public int compareTo(changeTransactionStatus_args other) {
5766
      if (!getClass().equals(other.getClass())) {
5767
        return getClass().getName().compareTo(other.getClass().getName());
5768
      }
5769
 
5770
      int lastComparison = 0;
5771
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
5772
 
5773
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5774
      if (lastComparison != 0) {
5775
        return lastComparison;
5776
      }
5777
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5778
      if (lastComparison != 0) {
5779
        return lastComparison;
5780
      }
5781
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5782
      if (lastComparison != 0) {
5783
        return lastComparison;
5784
      }
5785
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5786
      if (lastComparison != 0) {
5787
        return lastComparison;
5788
      }
5789
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
5790
      if (lastComparison != 0) {
5791
        return lastComparison;
5792
      }
5793
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
5794
      if (lastComparison != 0) {
5795
        return lastComparison;
5796
      }
5797
      return 0;
5798
    }
5799
 
5800
    public void read(TProtocol iprot) throws TException {
5801
      TField field;
5802
      iprot.readStructBegin();
5803
      while (true)
5804
      {
5805
        field = iprot.readFieldBegin();
5806
        if (field.type == TType.STOP) { 
5807
          break;
5808
        }
5809
        _Fields fieldId = _Fields.findByThriftId(field.id);
5810
        if (fieldId == null) {
5811
          TProtocolUtil.skip(iprot, field.type);
5812
        } else {
5813
          switch (fieldId) {
5814
            case TRANSACTION_ID:
5815
              if (field.type == TType.I64) {
5816
                this.transactionId = iprot.readI64();
5817
                setTransactionIdIsSet(true);
5818
              } else { 
5819
                TProtocolUtil.skip(iprot, field.type);
5820
              }
5821
              break;
5822
            case STATUS:
5823
              if (field.type == TType.I32) {
5824
                this.status = TransactionStatus.findByValue(iprot.readI32());
5825
              } else { 
5826
                TProtocolUtil.skip(iprot, field.type);
5827
              }
5828
              break;
5829
            case DESCRIPTION:
5830
              if (field.type == TType.STRING) {
5831
                this.description = iprot.readString();
5832
              } else { 
5833
                TProtocolUtil.skip(iprot, field.type);
5834
              }
5835
              break;
5836
          }
5837
          iprot.readFieldEnd();
5838
        }
5839
      }
5840
      iprot.readStructEnd();
5841
      validate();
5842
    }
5843
 
5844
    public void write(TProtocol oprot) throws TException {
5845
      validate();
5846
 
5847
      oprot.writeStructBegin(STRUCT_DESC);
5848
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5849
      oprot.writeI64(this.transactionId);
5850
      oprot.writeFieldEnd();
5851
      if (this.status != null) {
5852
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5853
        oprot.writeI32(this.status.getValue());
5854
        oprot.writeFieldEnd();
5855
      }
5856
      if (this.description != null) {
5857
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
5858
        oprot.writeString(this.description);
5859
        oprot.writeFieldEnd();
5860
      }
5861
      oprot.writeFieldStop();
5862
      oprot.writeStructEnd();
5863
    }
5864
 
5865
    @Override
5866
    public String toString() {
5867
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
5868
      boolean first = true;
5869
 
5870
      sb.append("transactionId:");
5871
      sb.append(this.transactionId);
5872
      first = false;
5873
      if (!first) sb.append(", ");
5874
      sb.append("status:");
5875
      if (this.status == null) {
5876
        sb.append("null");
5877
      } else {
5878
        String status_name = status.name();
5879
        if (status_name != null) {
5880
          sb.append(status_name);
5881
          sb.append(" (");
5882
        }
5883
        sb.append(this.status);
5884
        if (status_name != null) {
5885
          sb.append(")");
5886
        }
5887
      }
5888
      first = false;
5889
      if (!first) sb.append(", ");
5890
      sb.append("description:");
5891
      if (this.description == null) {
5892
        sb.append("null");
5893
      } else {
5894
        sb.append(this.description);
5895
      }
5896
      first = false;
5897
      sb.append(")");
5898
      return sb.toString();
5899
    }
5900
 
5901
    public void validate() throws TException {
5902
      // check for required fields
5903
    }
5904
 
5905
  }
5906
 
5907
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
5908
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
5909
 
5910
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
5911
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5912
 
5913
    private boolean success;
5914
    private TransactionServiceException ex;
5915
 
5916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5917
    public enum _Fields implements TFieldIdEnum {
5918
      SUCCESS((short)0, "success"),
5919
      EX((short)1, "ex");
5920
 
5921
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5922
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5923
 
5924
      static {
5925
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5926
          byId.put((int)field._thriftId, field);
5927
          byName.put(field.getFieldName(), field);
5928
        }
5929
      }
5930
 
5931
      /**
5932
       * Find the _Fields constant that matches fieldId, or null if its not found.
5933
       */
5934
      public static _Fields findByThriftId(int fieldId) {
5935
        return byId.get(fieldId);
5936
      }
5937
 
5938
      /**
5939
       * Find the _Fields constant that matches fieldId, throwing an exception
5940
       * if it is not found.
5941
       */
5942
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5943
        _Fields fields = findByThriftId(fieldId);
5944
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5945
        return fields;
5946
      }
5947
 
5948
      /**
5949
       * Find the _Fields constant that matches name, or null if its not found.
5950
       */
5951
      public static _Fields findByName(String name) {
5952
        return byName.get(name);
5953
      }
5954
 
5955
      private final short _thriftId;
5956
      private final String _fieldName;
5957
 
5958
      _Fields(short thriftId, String fieldName) {
5959
        _thriftId = thriftId;
5960
        _fieldName = fieldName;
5961
      }
5962
 
5963
      public short getThriftFieldId() {
5964
        return _thriftId;
5965
      }
5966
 
5967
      public String getFieldName() {
5968
        return _fieldName;
5969
      }
5970
    }
5971
 
5972
    // isset id assignments
5973
    private static final int __SUCCESS_ISSET_ID = 0;
5974
    private BitSet __isset_bit_vector = new BitSet(1);
5975
 
5976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5977
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5978
          new FieldValueMetaData(TType.BOOL)));
5979
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5980
          new FieldValueMetaData(TType.STRUCT)));
5981
    }});
5982
 
5983
    static {
5984
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
5985
    }
5986
 
5987
    public changeTransactionStatus_result() {
5988
    }
5989
 
5990
    public changeTransactionStatus_result(
5991
      boolean success,
5992
      TransactionServiceException ex)
5993
    {
5994
      this();
5995
      this.success = success;
5996
      setSuccessIsSet(true);
5997
      this.ex = ex;
5998
    }
5999
 
6000
    /**
6001
     * Performs a deep copy on <i>other</i>.
6002
     */
6003
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6004
      __isset_bit_vector.clear();
6005
      __isset_bit_vector.or(other.__isset_bit_vector);
6006
      this.success = other.success;
6007
      if (other.isSetEx()) {
6008
        this.ex = new TransactionServiceException(other.ex);
6009
      }
6010
    }
6011
 
6012
    public changeTransactionStatus_result deepCopy() {
6013
      return new changeTransactionStatus_result(this);
6014
    }
6015
 
6016
    @Deprecated
6017
    public changeTransactionStatus_result clone() {
6018
      return new changeTransactionStatus_result(this);
6019
    }
6020
 
6021
    public boolean isSuccess() {
6022
      return this.success;
6023
    }
6024
 
6025
    public changeTransactionStatus_result setSuccess(boolean success) {
6026
      this.success = success;
6027
      setSuccessIsSet(true);
6028
      return this;
6029
    }
6030
 
6031
    public void unsetSuccess() {
6032
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6033
    }
6034
 
6035
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6036
    public boolean isSetSuccess() {
6037
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6038
    }
6039
 
6040
    public void setSuccessIsSet(boolean value) {
6041
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6042
    }
6043
 
6044
    public TransactionServiceException getEx() {
6045
      return this.ex;
6046
    }
6047
 
6048
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6049
      this.ex = ex;
6050
      return this;
6051
    }
6052
 
6053
    public void unsetEx() {
6054
      this.ex = null;
6055
    }
6056
 
6057
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6058
    public boolean isSetEx() {
6059
      return this.ex != null;
6060
    }
6061
 
6062
    public void setExIsSet(boolean value) {
6063
      if (!value) {
6064
        this.ex = null;
6065
      }
6066
    }
6067
 
6068
    public void setFieldValue(_Fields field, Object value) {
6069
      switch (field) {
6070
      case SUCCESS:
6071
        if (value == null) {
6072
          unsetSuccess();
6073
        } else {
6074
          setSuccess((Boolean)value);
6075
        }
6076
        break;
6077
 
6078
      case EX:
6079
        if (value == null) {
6080
          unsetEx();
6081
        } else {
6082
          setEx((TransactionServiceException)value);
6083
        }
6084
        break;
6085
 
6086
      }
6087
    }
6088
 
6089
    public void setFieldValue(int fieldID, Object value) {
6090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6091
    }
6092
 
6093
    public Object getFieldValue(_Fields field) {
6094
      switch (field) {
6095
      case SUCCESS:
6096
        return new Boolean(isSuccess());
6097
 
6098
      case EX:
6099
        return getEx();
6100
 
6101
      }
6102
      throw new IllegalStateException();
6103
    }
6104
 
6105
    public Object getFieldValue(int fieldId) {
6106
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6107
    }
6108
 
6109
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6110
    public boolean isSet(_Fields field) {
6111
      switch (field) {
6112
      case SUCCESS:
6113
        return isSetSuccess();
6114
      case EX:
6115
        return isSetEx();
6116
      }
6117
      throw new IllegalStateException();
6118
    }
6119
 
6120
    public boolean isSet(int fieldID) {
6121
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6122
    }
6123
 
6124
    @Override
6125
    public boolean equals(Object that) {
6126
      if (that == null)
6127
        return false;
6128
      if (that instanceof changeTransactionStatus_result)
6129
        return this.equals((changeTransactionStatus_result)that);
6130
      return false;
6131
    }
6132
 
6133
    public boolean equals(changeTransactionStatus_result that) {
6134
      if (that == null)
6135
        return false;
6136
 
6137
      boolean this_present_success = true;
6138
      boolean that_present_success = true;
6139
      if (this_present_success || that_present_success) {
6140
        if (!(this_present_success && that_present_success))
6141
          return false;
6142
        if (this.success != that.success)
6143
          return false;
6144
      }
6145
 
6146
      boolean this_present_ex = true && this.isSetEx();
6147
      boolean that_present_ex = true && that.isSetEx();
6148
      if (this_present_ex || that_present_ex) {
6149
        if (!(this_present_ex && that_present_ex))
6150
          return false;
6151
        if (!this.ex.equals(that.ex))
6152
          return false;
6153
      }
6154
 
6155
      return true;
6156
    }
6157
 
6158
    @Override
6159
    public int hashCode() {
6160
      return 0;
6161
    }
6162
 
6163
    public int compareTo(changeTransactionStatus_result other) {
6164
      if (!getClass().equals(other.getClass())) {
6165
        return getClass().getName().compareTo(other.getClass().getName());
6166
      }
6167
 
6168
      int lastComparison = 0;
6169
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6170
 
6171
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6172
      if (lastComparison != 0) {
6173
        return lastComparison;
6174
      }
6175
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6176
      if (lastComparison != 0) {
6177
        return lastComparison;
6178
      }
6179
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6180
      if (lastComparison != 0) {
6181
        return lastComparison;
6182
      }
6183
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6184
      if (lastComparison != 0) {
6185
        return lastComparison;
6186
      }
6187
      return 0;
6188
    }
6189
 
6190
    public void read(TProtocol iprot) throws TException {
6191
      TField field;
6192
      iprot.readStructBegin();
6193
      while (true)
6194
      {
6195
        field = iprot.readFieldBegin();
6196
        if (field.type == TType.STOP) { 
6197
          break;
6198
        }
6199
        _Fields fieldId = _Fields.findByThriftId(field.id);
6200
        if (fieldId == null) {
6201
          TProtocolUtil.skip(iprot, field.type);
6202
        } else {
6203
          switch (fieldId) {
6204
            case SUCCESS:
6205
              if (field.type == TType.BOOL) {
6206
                this.success = iprot.readBool();
6207
                setSuccessIsSet(true);
6208
              } else { 
6209
                TProtocolUtil.skip(iprot, field.type);
6210
              }
6211
              break;
6212
            case EX:
6213
              if (field.type == TType.STRUCT) {
6214
                this.ex = new TransactionServiceException();
6215
                this.ex.read(iprot);
6216
              } else { 
6217
                TProtocolUtil.skip(iprot, field.type);
6218
              }
6219
              break;
6220
          }
6221
          iprot.readFieldEnd();
6222
        }
6223
      }
6224
      iprot.readStructEnd();
6225
      validate();
6226
    }
6227
 
6228
    public void write(TProtocol oprot) throws TException {
6229
      oprot.writeStructBegin(STRUCT_DESC);
6230
 
6231
      if (this.isSetSuccess()) {
6232
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6233
        oprot.writeBool(this.success);
6234
        oprot.writeFieldEnd();
6235
      } else if (this.isSetEx()) {
6236
        oprot.writeFieldBegin(EX_FIELD_DESC);
6237
        this.ex.write(oprot);
6238
        oprot.writeFieldEnd();
6239
      }
6240
      oprot.writeFieldStop();
6241
      oprot.writeStructEnd();
6242
    }
6243
 
6244
    @Override
6245
    public String toString() {
6246
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6247
      boolean first = true;
6248
 
6249
      sb.append("success:");
6250
      sb.append(this.success);
6251
      first = false;
6252
      if (!first) sb.append(", ");
6253
      sb.append("ex:");
6254
      if (this.ex == null) {
6255
        sb.append("null");
6256
      } else {
6257
        sb.append(this.ex);
6258
      }
6259
      first = false;
6260
      sb.append(")");
6261
      return sb.toString();
6262
    }
6263
 
6264
    public void validate() throws TException {
6265
      // check for required fields
6266
    }
6267
 
6268
  }
6269
 
483 rajveer 6270
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6271
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6272
 
483 rajveer 6273
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6274
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6275
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6276
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6277
 
483 rajveer 6278
    private OrderStatus status;
6279
    private long from_date;
6280
    private long to_date;
6281
    private long warehouse_id;
68 ashish 6282
 
6283
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6284
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6285
      /**
6286
       * 
6287
       * @see OrderStatus
6288
       */
6289
      STATUS((short)1, "status"),
6290
      FROM_DATE((short)2, "from_date"),
6291
      TO_DATE((short)3, "to_date"),
6292
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6293
 
6294
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6296
 
6297
      static {
6298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6299
          byId.put((int)field._thriftId, field);
6300
          byName.put(field.getFieldName(), field);
6301
        }
6302
      }
6303
 
6304
      /**
6305
       * Find the _Fields constant that matches fieldId, or null if its not found.
6306
       */
6307
      public static _Fields findByThriftId(int fieldId) {
6308
        return byId.get(fieldId);
6309
      }
6310
 
6311
      /**
6312
       * Find the _Fields constant that matches fieldId, throwing an exception
6313
       * if it is not found.
6314
       */
6315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6316
        _Fields fields = findByThriftId(fieldId);
6317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6318
        return fields;
6319
      }
6320
 
6321
      /**
6322
       * Find the _Fields constant that matches name, or null if its not found.
6323
       */
6324
      public static _Fields findByName(String name) {
6325
        return byName.get(name);
6326
      }
6327
 
6328
      private final short _thriftId;
6329
      private final String _fieldName;
6330
 
6331
      _Fields(short thriftId, String fieldName) {
6332
        _thriftId = thriftId;
6333
        _fieldName = fieldName;
6334
      }
6335
 
6336
      public short getThriftFieldId() {
6337
        return _thriftId;
6338
      }
6339
 
6340
      public String getFieldName() {
6341
        return _fieldName;
6342
      }
6343
    }
6344
 
6345
    // isset id assignments
483 rajveer 6346
    private static final int __FROM_DATE_ISSET_ID = 0;
6347
    private static final int __TO_DATE_ISSET_ID = 1;
6348
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6349
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6350
 
6351
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6352
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6353
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6354
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6355
          new FieldValueMetaData(TType.I64)));
483 rajveer 6356
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6357
          new FieldValueMetaData(TType.I64)));
6358
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6359
          new FieldValueMetaData(TType.I64)));
68 ashish 6360
    }});
6361
 
6362
    static {
483 rajveer 6363
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6364
    }
6365
 
483 rajveer 6366
    public getAllOrders_args() {
68 ashish 6367
    }
6368
 
483 rajveer 6369
    public getAllOrders_args(
6370
      OrderStatus status,
6371
      long from_date,
6372
      long to_date,
6373
      long warehouse_id)
68 ashish 6374
    {
6375
      this();
483 rajveer 6376
      this.status = status;
6377
      this.from_date = from_date;
6378
      setFrom_dateIsSet(true);
6379
      this.to_date = to_date;
6380
      setTo_dateIsSet(true);
6381
      this.warehouse_id = warehouse_id;
6382
      setWarehouse_idIsSet(true);
68 ashish 6383
    }
6384
 
6385
    /**
6386
     * Performs a deep copy on <i>other</i>.
6387
     */
483 rajveer 6388
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6389
      __isset_bit_vector.clear();
6390
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6391
      if (other.isSetStatus()) {
6392
        this.status = other.status;
6393
      }
6394
      this.from_date = other.from_date;
6395
      this.to_date = other.to_date;
6396
      this.warehouse_id = other.warehouse_id;
68 ashish 6397
    }
6398
 
483 rajveer 6399
    public getAllOrders_args deepCopy() {
6400
      return new getAllOrders_args(this);
68 ashish 6401
    }
6402
 
6403
    @Deprecated
483 rajveer 6404
    public getAllOrders_args clone() {
6405
      return new getAllOrders_args(this);
68 ashish 6406
    }
6407
 
483 rajveer 6408
    /**
6409
     * 
6410
     * @see OrderStatus
6411
     */
6412
    public OrderStatus getStatus() {
6413
      return this.status;
68 ashish 6414
    }
6415
 
483 rajveer 6416
    /**
6417
     * 
6418
     * @see OrderStatus
6419
     */
6420
    public getAllOrders_args setStatus(OrderStatus status) {
6421
      this.status = status;
68 ashish 6422
      return this;
6423
    }
6424
 
483 rajveer 6425
    public void unsetStatus() {
6426
      this.status = null;
68 ashish 6427
    }
6428
 
483 rajveer 6429
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6430
    public boolean isSetStatus() {
6431
      return this.status != null;
68 ashish 6432
    }
6433
 
483 rajveer 6434
    public void setStatusIsSet(boolean value) {
6435
      if (!value) {
6436
        this.status = null;
68 ashish 6437
      }
6438
    }
6439
 
483 rajveer 6440
    public long getFrom_date() {
6441
      return this.from_date;
68 ashish 6442
    }
6443
 
483 rajveer 6444
    public getAllOrders_args setFrom_date(long from_date) {
6445
      this.from_date = from_date;
6446
      setFrom_dateIsSet(true);
6447
      return this;
68 ashish 6448
    }
6449
 
483 rajveer 6450
    public void unsetFrom_date() {
6451
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6452
    }
6453
 
483 rajveer 6454
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6455
    public boolean isSetFrom_date() {
6456
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6457
    }
6458
 
483 rajveer 6459
    public void setFrom_dateIsSet(boolean value) {
6460
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6461
    }
6462
 
483 rajveer 6463
    public long getTo_date() {
6464
      return this.to_date;
68 ashish 6465
    }
6466
 
483 rajveer 6467
    public getAllOrders_args setTo_date(long to_date) {
6468
      this.to_date = to_date;
6469
      setTo_dateIsSet(true);
68 ashish 6470
      return this;
6471
    }
6472
 
483 rajveer 6473
    public void unsetTo_date() {
6474
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6475
    }
6476
 
483 rajveer 6477
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6478
    public boolean isSetTo_date() {
6479
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6480
    }
6481
 
483 rajveer 6482
    public void setTo_dateIsSet(boolean value) {
6483
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6484
    }
6485
 
483 rajveer 6486
    public long getWarehouse_id() {
6487
      return this.warehouse_id;
68 ashish 6488
    }
6489
 
483 rajveer 6490
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6491
      this.warehouse_id = warehouse_id;
6492
      setWarehouse_idIsSet(true);
68 ashish 6493
      return this;
6494
    }
6495
 
483 rajveer 6496
    public void unsetWarehouse_id() {
6497
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6498
    }
6499
 
483 rajveer 6500
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6501
    public boolean isSetWarehouse_id() {
6502
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6503
    }
6504
 
483 rajveer 6505
    public void setWarehouse_idIsSet(boolean value) {
6506
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6507
    }
6508
 
6509
    public void setFieldValue(_Fields field, Object value) {
6510
      switch (field) {
483 rajveer 6511
      case STATUS:
68 ashish 6512
        if (value == null) {
483 rajveer 6513
          unsetStatus();
68 ashish 6514
        } else {
483 rajveer 6515
          setStatus((OrderStatus)value);
68 ashish 6516
        }
6517
        break;
6518
 
483 rajveer 6519
      case FROM_DATE:
68 ashish 6520
        if (value == null) {
483 rajveer 6521
          unsetFrom_date();
68 ashish 6522
        } else {
483 rajveer 6523
          setFrom_date((Long)value);
68 ashish 6524
        }
6525
        break;
6526
 
483 rajveer 6527
      case TO_DATE:
6528
        if (value == null) {
6529
          unsetTo_date();
6530
        } else {
6531
          setTo_date((Long)value);
6532
        }
6533
        break;
6534
 
6535
      case WAREHOUSE_ID:
6536
        if (value == null) {
6537
          unsetWarehouse_id();
6538
        } else {
6539
          setWarehouse_id((Long)value);
6540
        }
6541
        break;
6542
 
68 ashish 6543
      }
6544
    }
6545
 
6546
    public void setFieldValue(int fieldID, Object value) {
6547
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6548
    }
6549
 
6550
    public Object getFieldValue(_Fields field) {
6551
      switch (field) {
483 rajveer 6552
      case STATUS:
6553
        return getStatus();
68 ashish 6554
 
483 rajveer 6555
      case FROM_DATE:
6556
        return new Long(getFrom_date());
68 ashish 6557
 
483 rajveer 6558
      case TO_DATE:
6559
        return new Long(getTo_date());
6560
 
6561
      case WAREHOUSE_ID:
6562
        return new Long(getWarehouse_id());
6563
 
68 ashish 6564
      }
6565
      throw new IllegalStateException();
6566
    }
6567
 
6568
    public Object getFieldValue(int fieldId) {
6569
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6570
    }
6571
 
6572
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6573
    public boolean isSet(_Fields field) {
6574
      switch (field) {
483 rajveer 6575
      case STATUS:
6576
        return isSetStatus();
6577
      case FROM_DATE:
6578
        return isSetFrom_date();
6579
      case TO_DATE:
6580
        return isSetTo_date();
6581
      case WAREHOUSE_ID:
6582
        return isSetWarehouse_id();
68 ashish 6583
      }
6584
      throw new IllegalStateException();
6585
    }
6586
 
6587
    public boolean isSet(int fieldID) {
6588
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6589
    }
6590
 
6591
    @Override
6592
    public boolean equals(Object that) {
6593
      if (that == null)
6594
        return false;
483 rajveer 6595
      if (that instanceof getAllOrders_args)
6596
        return this.equals((getAllOrders_args)that);
68 ashish 6597
      return false;
6598
    }
6599
 
483 rajveer 6600
    public boolean equals(getAllOrders_args that) {
68 ashish 6601
      if (that == null)
6602
        return false;
6603
 
483 rajveer 6604
      boolean this_present_status = true && this.isSetStatus();
6605
      boolean that_present_status = true && that.isSetStatus();
6606
      if (this_present_status || that_present_status) {
6607
        if (!(this_present_status && that_present_status))
68 ashish 6608
          return false;
483 rajveer 6609
        if (!this.status.equals(that.status))
68 ashish 6610
          return false;
6611
      }
6612
 
483 rajveer 6613
      boolean this_present_from_date = true;
6614
      boolean that_present_from_date = true;
6615
      if (this_present_from_date || that_present_from_date) {
6616
        if (!(this_present_from_date && that_present_from_date))
68 ashish 6617
          return false;
483 rajveer 6618
        if (this.from_date != that.from_date)
68 ashish 6619
          return false;
6620
      }
6621
 
483 rajveer 6622
      boolean this_present_to_date = true;
6623
      boolean that_present_to_date = true;
6624
      if (this_present_to_date || that_present_to_date) {
6625
        if (!(this_present_to_date && that_present_to_date))
6626
          return false;
6627
        if (this.to_date != that.to_date)
6628
          return false;
68 ashish 6629
      }
6630
 
483 rajveer 6631
      boolean this_present_warehouse_id = true;
6632
      boolean that_present_warehouse_id = true;
6633
      if (this_present_warehouse_id || that_present_warehouse_id) {
6634
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 6635
          return false;
483 rajveer 6636
        if (this.warehouse_id != that.warehouse_id)
68 ashish 6637
          return false;
6638
      }
6639
 
6640
      return true;
6641
    }
6642
 
6643
    @Override
6644
    public int hashCode() {
6645
      return 0;
6646
    }
6647
 
483 rajveer 6648
    public int compareTo(getAllOrders_args other) {
68 ashish 6649
      if (!getClass().equals(other.getClass())) {
6650
        return getClass().getName().compareTo(other.getClass().getName());
6651
      }
6652
 
6653
      int lastComparison = 0;
483 rajveer 6654
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 6655
 
483 rajveer 6656
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 6657
      if (lastComparison != 0) {
6658
        return lastComparison;
6659
      }
483 rajveer 6660
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 6661
      if (lastComparison != 0) {
6662
        return lastComparison;
6663
      }
483 rajveer 6664
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
6665
      if (lastComparison != 0) {
6666
        return lastComparison;
6667
      }
6668
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
6669
      if (lastComparison != 0) {
6670
        return lastComparison;
6671
      }
6672
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
6673
      if (lastComparison != 0) {
6674
        return lastComparison;
6675
      }
6676
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
6677
      if (lastComparison != 0) {
6678
        return lastComparison;
6679
      }
6680
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
6681
      if (lastComparison != 0) {
6682
        return lastComparison;
6683
      }
6684
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
6685
      if (lastComparison != 0) {
6686
        return lastComparison;
6687
      }
68 ashish 6688
      return 0;
6689
    }
6690
 
6691
    public void read(TProtocol iprot) throws TException {
6692
      TField field;
6693
      iprot.readStructBegin();
6694
      while (true)
6695
      {
6696
        field = iprot.readFieldBegin();
6697
        if (field.type == TType.STOP) { 
6698
          break;
6699
        }
6700
        _Fields fieldId = _Fields.findByThriftId(field.id);
6701
        if (fieldId == null) {
6702
          TProtocolUtil.skip(iprot, field.type);
6703
        } else {
6704
          switch (fieldId) {
483 rajveer 6705
            case STATUS:
6706
              if (field.type == TType.I32) {
6707
                this.status = OrderStatus.findByValue(iprot.readI32());
6708
              } else { 
6709
                TProtocolUtil.skip(iprot, field.type);
6710
              }
6711
              break;
6712
            case FROM_DATE:
68 ashish 6713
              if (field.type == TType.I64) {
483 rajveer 6714
                this.from_date = iprot.readI64();
6715
                setFrom_dateIsSet(true);
68 ashish 6716
              } else { 
6717
                TProtocolUtil.skip(iprot, field.type);
6718
              }
6719
              break;
483 rajveer 6720
            case TO_DATE:
6721
              if (field.type == TType.I64) {
6722
                this.to_date = iprot.readI64();
6723
                setTo_dateIsSet(true);
6724
              } else { 
6725
                TProtocolUtil.skip(iprot, field.type);
6726
              }
6727
              break;
6728
            case WAREHOUSE_ID:
6729
              if (field.type == TType.I64) {
6730
                this.warehouse_id = iprot.readI64();
6731
                setWarehouse_idIsSet(true);
6732
              } else { 
6733
                TProtocolUtil.skip(iprot, field.type);
6734
              }
6735
              break;
68 ashish 6736
          }
6737
          iprot.readFieldEnd();
6738
        }
6739
      }
6740
      iprot.readStructEnd();
6741
      validate();
6742
    }
6743
 
6744
    public void write(TProtocol oprot) throws TException {
6745
      validate();
6746
 
6747
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 6748
      if (this.status != null) {
6749
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6750
        oprot.writeI32(this.status.getValue());
6751
        oprot.writeFieldEnd();
6752
      }
6753
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
6754
      oprot.writeI64(this.from_date);
68 ashish 6755
      oprot.writeFieldEnd();
483 rajveer 6756
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
6757
      oprot.writeI64(this.to_date);
6758
      oprot.writeFieldEnd();
6759
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
6760
      oprot.writeI64(this.warehouse_id);
6761
      oprot.writeFieldEnd();
68 ashish 6762
      oprot.writeFieldStop();
6763
      oprot.writeStructEnd();
6764
    }
6765
 
6766
    @Override
6767
    public String toString() {
483 rajveer 6768
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 6769
      boolean first = true;
6770
 
483 rajveer 6771
      sb.append("status:");
6772
      if (this.status == null) {
6773
        sb.append("null");
6774
      } else {
6775
        String status_name = status.name();
6776
        if (status_name != null) {
6777
          sb.append(status_name);
6778
          sb.append(" (");
6779
        }
6780
        sb.append(this.status);
6781
        if (status_name != null) {
6782
          sb.append(")");
6783
        }
6784
      }
68 ashish 6785
      first = false;
483 rajveer 6786
      if (!first) sb.append(", ");
6787
      sb.append("from_date:");
6788
      sb.append(this.from_date);
6789
      first = false;
6790
      if (!first) sb.append(", ");
6791
      sb.append("to_date:");
6792
      sb.append(this.to_date);
6793
      first = false;
6794
      if (!first) sb.append(", ");
6795
      sb.append("warehouse_id:");
6796
      sb.append(this.warehouse_id);
6797
      first = false;
68 ashish 6798
      sb.append(")");
6799
      return sb.toString();
6800
    }
6801
 
6802
    public void validate() throws TException {
6803
      // check for required fields
6804
    }
6805
 
6806
  }
6807
 
483 rajveer 6808
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
6809
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 6810
 
483 rajveer 6811
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 6812
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6813
 
483 rajveer 6814
    private List<Order> success;
68 ashish 6815
    private TransactionServiceException ex;
6816
 
6817
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6818
    public enum _Fields implements TFieldIdEnum {
6819
      SUCCESS((short)0, "success"),
6820
      EX((short)1, "ex");
6821
 
6822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6824
 
6825
      static {
6826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6827
          byId.put((int)field._thriftId, field);
6828
          byName.put(field.getFieldName(), field);
6829
        }
6830
      }
6831
 
6832
      /**
6833
       * Find the _Fields constant that matches fieldId, or null if its not found.
6834
       */
6835
      public static _Fields findByThriftId(int fieldId) {
6836
        return byId.get(fieldId);
6837
      }
6838
 
6839
      /**
6840
       * Find the _Fields constant that matches fieldId, throwing an exception
6841
       * if it is not found.
6842
       */
6843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6844
        _Fields fields = findByThriftId(fieldId);
6845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6846
        return fields;
6847
      }
6848
 
6849
      /**
6850
       * Find the _Fields constant that matches name, or null if its not found.
6851
       */
6852
      public static _Fields findByName(String name) {
6853
        return byName.get(name);
6854
      }
6855
 
6856
      private final short _thriftId;
6857
      private final String _fieldName;
6858
 
6859
      _Fields(short thriftId, String fieldName) {
6860
        _thriftId = thriftId;
6861
        _fieldName = fieldName;
6862
      }
6863
 
6864
      public short getThriftFieldId() {
6865
        return _thriftId;
6866
      }
6867
 
6868
      public String getFieldName() {
6869
        return _fieldName;
6870
      }
6871
    }
6872
 
6873
    // isset id assignments
6874
 
6875
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6876
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 6877
          new ListMetaData(TType.LIST, 
6878
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 6879
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6880
          new FieldValueMetaData(TType.STRUCT)));
6881
    }});
6882
 
6883
    static {
483 rajveer 6884
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 6885
    }
6886
 
483 rajveer 6887
    public getAllOrders_result() {
68 ashish 6888
    }
6889
 
483 rajveer 6890
    public getAllOrders_result(
6891
      List<Order> success,
68 ashish 6892
      TransactionServiceException ex)
6893
    {
6894
      this();
6895
      this.success = success;
6896
      this.ex = ex;
6897
    }
6898
 
6899
    /**
6900
     * Performs a deep copy on <i>other</i>.
6901
     */
483 rajveer 6902
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 6903
      if (other.isSetSuccess()) {
483 rajveer 6904
        List<Order> __this__success = new ArrayList<Order>();
6905
        for (Order other_element : other.success) {
6906
          __this__success.add(new Order(other_element));
6907
        }
6908
        this.success = __this__success;
68 ashish 6909
      }
6910
      if (other.isSetEx()) {
6911
        this.ex = new TransactionServiceException(other.ex);
6912
      }
6913
    }
6914
 
483 rajveer 6915
    public getAllOrders_result deepCopy() {
6916
      return new getAllOrders_result(this);
68 ashish 6917
    }
6918
 
6919
    @Deprecated
483 rajveer 6920
    public getAllOrders_result clone() {
6921
      return new getAllOrders_result(this);
68 ashish 6922
    }
6923
 
483 rajveer 6924
    public int getSuccessSize() {
6925
      return (this.success == null) ? 0 : this.success.size();
6926
    }
6927
 
6928
    public java.util.Iterator<Order> getSuccessIterator() {
6929
      return (this.success == null) ? null : this.success.iterator();
6930
    }
6931
 
6932
    public void addToSuccess(Order elem) {
6933
      if (this.success == null) {
6934
        this.success = new ArrayList<Order>();
6935
      }
6936
      this.success.add(elem);
6937
    }
6938
 
6939
    public List<Order> getSuccess() {
68 ashish 6940
      return this.success;
6941
    }
6942
 
483 rajveer 6943
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 6944
      this.success = success;
6945
      return this;
6946
    }
6947
 
6948
    public void unsetSuccess() {
6949
      this.success = null;
6950
    }
6951
 
6952
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6953
    public boolean isSetSuccess() {
6954
      return this.success != null;
6955
    }
6956
 
6957
    public void setSuccessIsSet(boolean value) {
6958
      if (!value) {
6959
        this.success = null;
6960
      }
6961
    }
6962
 
6963
    public TransactionServiceException getEx() {
6964
      return this.ex;
6965
    }
6966
 
483 rajveer 6967
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 6968
      this.ex = ex;
6969
      return this;
6970
    }
6971
 
6972
    public void unsetEx() {
6973
      this.ex = null;
6974
    }
6975
 
6976
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6977
    public boolean isSetEx() {
6978
      return this.ex != null;
6979
    }
6980
 
6981
    public void setExIsSet(boolean value) {
6982
      if (!value) {
6983
        this.ex = null;
6984
      }
6985
    }
6986
 
6987
    public void setFieldValue(_Fields field, Object value) {
6988
      switch (field) {
6989
      case SUCCESS:
6990
        if (value == null) {
6991
          unsetSuccess();
6992
        } else {
483 rajveer 6993
          setSuccess((List<Order>)value);
68 ashish 6994
        }
6995
        break;
6996
 
6997
      case EX:
6998
        if (value == null) {
6999
          unsetEx();
7000
        } else {
7001
          setEx((TransactionServiceException)value);
7002
        }
7003
        break;
7004
 
7005
      }
7006
    }
7007
 
7008
    public void setFieldValue(int fieldID, Object value) {
7009
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7010
    }
7011
 
7012
    public Object getFieldValue(_Fields field) {
7013
      switch (field) {
7014
      case SUCCESS:
7015
        return getSuccess();
7016
 
7017
      case EX:
7018
        return getEx();
7019
 
7020
      }
7021
      throw new IllegalStateException();
7022
    }
7023
 
7024
    public Object getFieldValue(int fieldId) {
7025
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7026
    }
7027
 
7028
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7029
    public boolean isSet(_Fields field) {
7030
      switch (field) {
7031
      case SUCCESS:
7032
        return isSetSuccess();
7033
      case EX:
7034
        return isSetEx();
7035
      }
7036
      throw new IllegalStateException();
7037
    }
7038
 
7039
    public boolean isSet(int fieldID) {
7040
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7041
    }
7042
 
7043
    @Override
7044
    public boolean equals(Object that) {
7045
      if (that == null)
7046
        return false;
483 rajveer 7047
      if (that instanceof getAllOrders_result)
7048
        return this.equals((getAllOrders_result)that);
68 ashish 7049
      return false;
7050
    }
7051
 
483 rajveer 7052
    public boolean equals(getAllOrders_result that) {
68 ashish 7053
      if (that == null)
7054
        return false;
7055
 
7056
      boolean this_present_success = true && this.isSetSuccess();
7057
      boolean that_present_success = true && that.isSetSuccess();
7058
      if (this_present_success || that_present_success) {
7059
        if (!(this_present_success && that_present_success))
7060
          return false;
7061
        if (!this.success.equals(that.success))
7062
          return false;
7063
      }
7064
 
7065
      boolean this_present_ex = true && this.isSetEx();
7066
      boolean that_present_ex = true && that.isSetEx();
7067
      if (this_present_ex || that_present_ex) {
7068
        if (!(this_present_ex && that_present_ex))
7069
          return false;
7070
        if (!this.ex.equals(that.ex))
7071
          return false;
7072
      }
7073
 
7074
      return true;
7075
    }
7076
 
7077
    @Override
7078
    public int hashCode() {
7079
      return 0;
7080
    }
7081
 
483 rajveer 7082
    public int compareTo(getAllOrders_result other) {
7083
      if (!getClass().equals(other.getClass())) {
7084
        return getClass().getName().compareTo(other.getClass().getName());
7085
      }
7086
 
7087
      int lastComparison = 0;
7088
      getAllOrders_result typedOther = (getAllOrders_result)other;
7089
 
7090
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7091
      if (lastComparison != 0) {
7092
        return lastComparison;
7093
      }
7094
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7095
      if (lastComparison != 0) {
7096
        return lastComparison;
7097
      }
7098
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7099
      if (lastComparison != 0) {
7100
        return lastComparison;
7101
      }
7102
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7103
      if (lastComparison != 0) {
7104
        return lastComparison;
7105
      }
7106
      return 0;
7107
    }
7108
 
68 ashish 7109
    public void read(TProtocol iprot) throws TException {
7110
      TField field;
7111
      iprot.readStructBegin();
7112
      while (true)
7113
      {
7114
        field = iprot.readFieldBegin();
7115
        if (field.type == TType.STOP) { 
7116
          break;
7117
        }
7118
        _Fields fieldId = _Fields.findByThriftId(field.id);
7119
        if (fieldId == null) {
7120
          TProtocolUtil.skip(iprot, field.type);
7121
        } else {
7122
          switch (fieldId) {
7123
            case SUCCESS:
483 rajveer 7124
              if (field.type == TType.LIST) {
7125
                {
684 chandransh 7126
                  TList _list16 = iprot.readListBegin();
7127
                  this.success = new ArrayList<Order>(_list16.size);
7128
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7129
                  {
684 chandransh 7130
                    Order _elem18;
7131
                    _elem18 = new Order();
7132
                    _elem18.read(iprot);
7133
                    this.success.add(_elem18);
483 rajveer 7134
                  }
7135
                  iprot.readListEnd();
7136
                }
68 ashish 7137
              } else { 
7138
                TProtocolUtil.skip(iprot, field.type);
7139
              }
7140
              break;
7141
            case EX:
7142
              if (field.type == TType.STRUCT) {
7143
                this.ex = new TransactionServiceException();
7144
                this.ex.read(iprot);
7145
              } else { 
7146
                TProtocolUtil.skip(iprot, field.type);
7147
              }
7148
              break;
7149
          }
7150
          iprot.readFieldEnd();
7151
        }
7152
      }
7153
      iprot.readStructEnd();
7154
      validate();
7155
    }
7156
 
7157
    public void write(TProtocol oprot) throws TException {
7158
      oprot.writeStructBegin(STRUCT_DESC);
7159
 
7160
      if (this.isSetSuccess()) {
7161
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7162
        {
7163
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7164
          for (Order _iter19 : this.success)
483 rajveer 7165
          {
684 chandransh 7166
            _iter19.write(oprot);
483 rajveer 7167
          }
7168
          oprot.writeListEnd();
7169
        }
68 ashish 7170
        oprot.writeFieldEnd();
7171
      } else if (this.isSetEx()) {
7172
        oprot.writeFieldBegin(EX_FIELD_DESC);
7173
        this.ex.write(oprot);
7174
        oprot.writeFieldEnd();
7175
      }
7176
      oprot.writeFieldStop();
7177
      oprot.writeStructEnd();
7178
    }
7179
 
7180
    @Override
7181
    public String toString() {
483 rajveer 7182
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7183
      boolean first = true;
7184
 
7185
      sb.append("success:");
7186
      if (this.success == null) {
7187
        sb.append("null");
7188
      } else {
7189
        sb.append(this.success);
7190
      }
7191
      first = false;
7192
      if (!first) sb.append(", ");
7193
      sb.append("ex:");
7194
      if (this.ex == null) {
7195
        sb.append("null");
7196
      } else {
7197
        sb.append(this.ex);
7198
      }
7199
      first = false;
7200
      sb.append(")");
7201
      return sb.toString();
7202
    }
7203
 
7204
    public void validate() throws TException {
7205
      // check for required fields
7206
    }
7207
 
7208
  }
7209
 
1022 varun.gupt 7210
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7211
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7212
 
7213
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7214
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7215
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7216
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7217
 
7218
    private OrderStatus status;
7219
    private long start_billing_date;
7220
    private long end_billing_date;
7221
    private long warehouse_id;
7222
 
7223
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7224
    public enum _Fields implements TFieldIdEnum {
7225
      /**
7226
       * 
7227
       * @see OrderStatus
7228
       */
7229
      STATUS((short)1, "status"),
7230
      START_BILLING_DATE((short)2, "start_billing_date"),
7231
      END_BILLING_DATE((short)3, "end_billing_date"),
7232
      WAREHOUSE_ID((short)4, "warehouse_id");
7233
 
7234
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7236
 
7237
      static {
7238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7239
          byId.put((int)field._thriftId, field);
7240
          byName.put(field.getFieldName(), field);
7241
        }
7242
      }
7243
 
7244
      /**
7245
       * Find the _Fields constant that matches fieldId, or null if its not found.
7246
       */
7247
      public static _Fields findByThriftId(int fieldId) {
7248
        return byId.get(fieldId);
7249
      }
7250
 
7251
      /**
7252
       * Find the _Fields constant that matches fieldId, throwing an exception
7253
       * if it is not found.
7254
       */
7255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7256
        _Fields fields = findByThriftId(fieldId);
7257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7258
        return fields;
7259
      }
7260
 
7261
      /**
7262
       * Find the _Fields constant that matches name, or null if its not found.
7263
       */
7264
      public static _Fields findByName(String name) {
7265
        return byName.get(name);
7266
      }
7267
 
7268
      private final short _thriftId;
7269
      private final String _fieldName;
7270
 
7271
      _Fields(short thriftId, String fieldName) {
7272
        _thriftId = thriftId;
7273
        _fieldName = fieldName;
7274
      }
7275
 
7276
      public short getThriftFieldId() {
7277
        return _thriftId;
7278
      }
7279
 
7280
      public String getFieldName() {
7281
        return _fieldName;
7282
      }
7283
    }
7284
 
7285
    // isset id assignments
7286
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7287
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7288
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7289
    private BitSet __isset_bit_vector = new BitSet(3);
7290
 
7291
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7292
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7293
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7294
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7295
          new FieldValueMetaData(TType.I64)));
7296
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7297
          new FieldValueMetaData(TType.I64)));
7298
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7299
          new FieldValueMetaData(TType.I64)));
7300
    }});
7301
 
7302
    static {
7303
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7304
    }
7305
 
7306
    public getOrdersByBillingDate_args() {
7307
    }
7308
 
7309
    public getOrdersByBillingDate_args(
7310
      OrderStatus status,
7311
      long start_billing_date,
7312
      long end_billing_date,
7313
      long warehouse_id)
7314
    {
7315
      this();
7316
      this.status = status;
7317
      this.start_billing_date = start_billing_date;
7318
      setStart_billing_dateIsSet(true);
7319
      this.end_billing_date = end_billing_date;
7320
      setEnd_billing_dateIsSet(true);
7321
      this.warehouse_id = warehouse_id;
7322
      setWarehouse_idIsSet(true);
7323
    }
7324
 
7325
    /**
7326
     * Performs a deep copy on <i>other</i>.
7327
     */
7328
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7329
      __isset_bit_vector.clear();
7330
      __isset_bit_vector.or(other.__isset_bit_vector);
7331
      if (other.isSetStatus()) {
7332
        this.status = other.status;
7333
      }
7334
      this.start_billing_date = other.start_billing_date;
7335
      this.end_billing_date = other.end_billing_date;
7336
      this.warehouse_id = other.warehouse_id;
7337
    }
7338
 
7339
    public getOrdersByBillingDate_args deepCopy() {
7340
      return new getOrdersByBillingDate_args(this);
7341
    }
7342
 
7343
    @Deprecated
7344
    public getOrdersByBillingDate_args clone() {
7345
      return new getOrdersByBillingDate_args(this);
7346
    }
7347
 
7348
    /**
7349
     * 
7350
     * @see OrderStatus
7351
     */
7352
    public OrderStatus getStatus() {
7353
      return this.status;
7354
    }
7355
 
7356
    /**
7357
     * 
7358
     * @see OrderStatus
7359
     */
7360
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7361
      this.status = status;
7362
      return this;
7363
    }
7364
 
7365
    public void unsetStatus() {
7366
      this.status = null;
7367
    }
7368
 
7369
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7370
    public boolean isSetStatus() {
7371
      return this.status != null;
7372
    }
7373
 
7374
    public void setStatusIsSet(boolean value) {
7375
      if (!value) {
7376
        this.status = null;
7377
      }
7378
    }
7379
 
7380
    public long getStart_billing_date() {
7381
      return this.start_billing_date;
7382
    }
7383
 
7384
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7385
      this.start_billing_date = start_billing_date;
7386
      setStart_billing_dateIsSet(true);
7387
      return this;
7388
    }
7389
 
7390
    public void unsetStart_billing_date() {
7391
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7392
    }
7393
 
7394
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7395
    public boolean isSetStart_billing_date() {
7396
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7397
    }
7398
 
7399
    public void setStart_billing_dateIsSet(boolean value) {
7400
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7401
    }
7402
 
7403
    public long getEnd_billing_date() {
7404
      return this.end_billing_date;
7405
    }
7406
 
7407
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7408
      this.end_billing_date = end_billing_date;
7409
      setEnd_billing_dateIsSet(true);
7410
      return this;
7411
    }
7412
 
7413
    public void unsetEnd_billing_date() {
7414
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7415
    }
7416
 
7417
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7418
    public boolean isSetEnd_billing_date() {
7419
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7420
    }
7421
 
7422
    public void setEnd_billing_dateIsSet(boolean value) {
7423
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7424
    }
7425
 
7426
    public long getWarehouse_id() {
7427
      return this.warehouse_id;
7428
    }
7429
 
7430
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7431
      this.warehouse_id = warehouse_id;
7432
      setWarehouse_idIsSet(true);
7433
      return this;
7434
    }
7435
 
7436
    public void unsetWarehouse_id() {
7437
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7438
    }
7439
 
7440
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7441
    public boolean isSetWarehouse_id() {
7442
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7443
    }
7444
 
7445
    public void setWarehouse_idIsSet(boolean value) {
7446
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7447
    }
7448
 
7449
    public void setFieldValue(_Fields field, Object value) {
7450
      switch (field) {
7451
      case STATUS:
7452
        if (value == null) {
7453
          unsetStatus();
7454
        } else {
7455
          setStatus((OrderStatus)value);
7456
        }
7457
        break;
7458
 
7459
      case START_BILLING_DATE:
7460
        if (value == null) {
7461
          unsetStart_billing_date();
7462
        } else {
7463
          setStart_billing_date((Long)value);
7464
        }
7465
        break;
7466
 
7467
      case END_BILLING_DATE:
7468
        if (value == null) {
7469
          unsetEnd_billing_date();
7470
        } else {
7471
          setEnd_billing_date((Long)value);
7472
        }
7473
        break;
7474
 
7475
      case WAREHOUSE_ID:
7476
        if (value == null) {
7477
          unsetWarehouse_id();
7478
        } else {
7479
          setWarehouse_id((Long)value);
7480
        }
7481
        break;
7482
 
7483
      }
7484
    }
7485
 
7486
    public void setFieldValue(int fieldID, Object value) {
7487
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7488
    }
7489
 
7490
    public Object getFieldValue(_Fields field) {
7491
      switch (field) {
7492
      case STATUS:
7493
        return getStatus();
7494
 
7495
      case START_BILLING_DATE:
7496
        return new Long(getStart_billing_date());
7497
 
7498
      case END_BILLING_DATE:
7499
        return new Long(getEnd_billing_date());
7500
 
7501
      case WAREHOUSE_ID:
7502
        return new Long(getWarehouse_id());
7503
 
7504
      }
7505
      throw new IllegalStateException();
7506
    }
7507
 
7508
    public Object getFieldValue(int fieldId) {
7509
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7510
    }
7511
 
7512
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7513
    public boolean isSet(_Fields field) {
7514
      switch (field) {
7515
      case STATUS:
7516
        return isSetStatus();
7517
      case START_BILLING_DATE:
7518
        return isSetStart_billing_date();
7519
      case END_BILLING_DATE:
7520
        return isSetEnd_billing_date();
7521
      case WAREHOUSE_ID:
7522
        return isSetWarehouse_id();
7523
      }
7524
      throw new IllegalStateException();
7525
    }
7526
 
7527
    public boolean isSet(int fieldID) {
7528
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7529
    }
7530
 
7531
    @Override
7532
    public boolean equals(Object that) {
7533
      if (that == null)
7534
        return false;
7535
      if (that instanceof getOrdersByBillingDate_args)
7536
        return this.equals((getOrdersByBillingDate_args)that);
7537
      return false;
7538
    }
7539
 
7540
    public boolean equals(getOrdersByBillingDate_args that) {
7541
      if (that == null)
7542
        return false;
7543
 
7544
      boolean this_present_status = true && this.isSetStatus();
7545
      boolean that_present_status = true && that.isSetStatus();
7546
      if (this_present_status || that_present_status) {
7547
        if (!(this_present_status && that_present_status))
7548
          return false;
7549
        if (!this.status.equals(that.status))
7550
          return false;
7551
      }
7552
 
7553
      boolean this_present_start_billing_date = true;
7554
      boolean that_present_start_billing_date = true;
7555
      if (this_present_start_billing_date || that_present_start_billing_date) {
7556
        if (!(this_present_start_billing_date && that_present_start_billing_date))
7557
          return false;
7558
        if (this.start_billing_date != that.start_billing_date)
7559
          return false;
7560
      }
7561
 
7562
      boolean this_present_end_billing_date = true;
7563
      boolean that_present_end_billing_date = true;
7564
      if (this_present_end_billing_date || that_present_end_billing_date) {
7565
        if (!(this_present_end_billing_date && that_present_end_billing_date))
7566
          return false;
7567
        if (this.end_billing_date != that.end_billing_date)
7568
          return false;
7569
      }
7570
 
7571
      boolean this_present_warehouse_id = true;
7572
      boolean that_present_warehouse_id = true;
7573
      if (this_present_warehouse_id || that_present_warehouse_id) {
7574
        if (!(this_present_warehouse_id && that_present_warehouse_id))
7575
          return false;
7576
        if (this.warehouse_id != that.warehouse_id)
7577
          return false;
7578
      }
7579
 
7580
      return true;
7581
    }
7582
 
7583
    @Override
7584
    public int hashCode() {
7585
      return 0;
7586
    }
7587
 
7588
    public int compareTo(getOrdersByBillingDate_args other) {
7589
      if (!getClass().equals(other.getClass())) {
7590
        return getClass().getName().compareTo(other.getClass().getName());
7591
      }
7592
 
7593
      int lastComparison = 0;
7594
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
7595
 
7596
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7597
      if (lastComparison != 0) {
7598
        return lastComparison;
7599
      }
7600
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7601
      if (lastComparison != 0) {
7602
        return lastComparison;
7603
      }
7604
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
7605
      if (lastComparison != 0) {
7606
        return lastComparison;
7607
      }
7608
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
7609
      if (lastComparison != 0) {
7610
        return lastComparison;
7611
      }
7612
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
7613
      if (lastComparison != 0) {
7614
        return lastComparison;
7615
      }
7616
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
7617
      if (lastComparison != 0) {
7618
        return lastComparison;
7619
      }
7620
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7621
      if (lastComparison != 0) {
7622
        return lastComparison;
7623
      }
7624
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7625
      if (lastComparison != 0) {
7626
        return lastComparison;
7627
      }
7628
      return 0;
7629
    }
7630
 
7631
    public void read(TProtocol iprot) throws TException {
7632
      TField field;
7633
      iprot.readStructBegin();
7634
      while (true)
7635
      {
7636
        field = iprot.readFieldBegin();
7637
        if (field.type == TType.STOP) { 
7638
          break;
7639
        }
7640
        _Fields fieldId = _Fields.findByThriftId(field.id);
7641
        if (fieldId == null) {
7642
          TProtocolUtil.skip(iprot, field.type);
7643
        } else {
7644
          switch (fieldId) {
7645
            case STATUS:
7646
              if (field.type == TType.I32) {
7647
                this.status = OrderStatus.findByValue(iprot.readI32());
7648
              } else { 
7649
                TProtocolUtil.skip(iprot, field.type);
7650
              }
7651
              break;
7652
            case START_BILLING_DATE:
7653
              if (field.type == TType.I64) {
7654
                this.start_billing_date = iprot.readI64();
7655
                setStart_billing_dateIsSet(true);
7656
              } else { 
7657
                TProtocolUtil.skip(iprot, field.type);
7658
              }
7659
              break;
7660
            case END_BILLING_DATE:
7661
              if (field.type == TType.I64) {
7662
                this.end_billing_date = iprot.readI64();
7663
                setEnd_billing_dateIsSet(true);
7664
              } else { 
7665
                TProtocolUtil.skip(iprot, field.type);
7666
              }
7667
              break;
7668
            case WAREHOUSE_ID:
7669
              if (field.type == TType.I64) {
7670
                this.warehouse_id = iprot.readI64();
7671
                setWarehouse_idIsSet(true);
7672
              } else { 
7673
                TProtocolUtil.skip(iprot, field.type);
7674
              }
7675
              break;
7676
          }
7677
          iprot.readFieldEnd();
7678
        }
7679
      }
7680
      iprot.readStructEnd();
7681
      validate();
7682
    }
7683
 
7684
    public void write(TProtocol oprot) throws TException {
7685
      validate();
7686
 
7687
      oprot.writeStructBegin(STRUCT_DESC);
7688
      if (this.status != null) {
7689
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7690
        oprot.writeI32(this.status.getValue());
7691
        oprot.writeFieldEnd();
7692
      }
7693
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
7694
      oprot.writeI64(this.start_billing_date);
7695
      oprot.writeFieldEnd();
7696
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
7697
      oprot.writeI64(this.end_billing_date);
7698
      oprot.writeFieldEnd();
7699
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7700
      oprot.writeI64(this.warehouse_id);
7701
      oprot.writeFieldEnd();
7702
      oprot.writeFieldStop();
7703
      oprot.writeStructEnd();
7704
    }
7705
 
7706
    @Override
7707
    public String toString() {
7708
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
7709
      boolean first = true;
7710
 
7711
      sb.append("status:");
7712
      if (this.status == null) {
7713
        sb.append("null");
7714
      } else {
7715
        String status_name = status.name();
7716
        if (status_name != null) {
7717
          sb.append(status_name);
7718
          sb.append(" (");
7719
        }
7720
        sb.append(this.status);
7721
        if (status_name != null) {
7722
          sb.append(")");
7723
        }
7724
      }
7725
      first = false;
7726
      if (!first) sb.append(", ");
7727
      sb.append("start_billing_date:");
7728
      sb.append(this.start_billing_date);
7729
      first = false;
7730
      if (!first) sb.append(", ");
7731
      sb.append("end_billing_date:");
7732
      sb.append(this.end_billing_date);
7733
      first = false;
7734
      if (!first) sb.append(", ");
7735
      sb.append("warehouse_id:");
7736
      sb.append(this.warehouse_id);
7737
      first = false;
7738
      sb.append(")");
7739
      return sb.toString();
7740
    }
7741
 
7742
    public void validate() throws TException {
7743
      // check for required fields
7744
    }
7745
 
7746
  }
7747
 
7748
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
7749
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
7750
 
7751
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
7752
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7753
 
7754
    private List<Order> success;
7755
    private TransactionServiceException ex;
7756
 
7757
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7758
    public enum _Fields implements TFieldIdEnum {
7759
      SUCCESS((short)0, "success"),
7760
      EX((short)1, "ex");
7761
 
7762
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7763
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7764
 
7765
      static {
7766
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7767
          byId.put((int)field._thriftId, field);
7768
          byName.put(field.getFieldName(), field);
7769
        }
7770
      }
7771
 
7772
      /**
7773
       * Find the _Fields constant that matches fieldId, or null if its not found.
7774
       */
7775
      public static _Fields findByThriftId(int fieldId) {
7776
        return byId.get(fieldId);
7777
      }
7778
 
7779
      /**
7780
       * Find the _Fields constant that matches fieldId, throwing an exception
7781
       * if it is not found.
7782
       */
7783
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7784
        _Fields fields = findByThriftId(fieldId);
7785
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7786
        return fields;
7787
      }
7788
 
7789
      /**
7790
       * Find the _Fields constant that matches name, or null if its not found.
7791
       */
7792
      public static _Fields findByName(String name) {
7793
        return byName.get(name);
7794
      }
7795
 
7796
      private final short _thriftId;
7797
      private final String _fieldName;
7798
 
7799
      _Fields(short thriftId, String fieldName) {
7800
        _thriftId = thriftId;
7801
        _fieldName = fieldName;
7802
      }
7803
 
7804
      public short getThriftFieldId() {
7805
        return _thriftId;
7806
      }
7807
 
7808
      public String getFieldName() {
7809
        return _fieldName;
7810
      }
7811
    }
7812
 
7813
    // isset id assignments
7814
 
7815
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7816
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7817
          new ListMetaData(TType.LIST, 
7818
              new StructMetaData(TType.STRUCT, Order.class))));
7819
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7820
          new FieldValueMetaData(TType.STRUCT)));
7821
    }});
7822
 
7823
    static {
7824
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
7825
    }
7826
 
7827
    public getOrdersByBillingDate_result() {
7828
    }
7829
 
7830
    public getOrdersByBillingDate_result(
7831
      List<Order> success,
7832
      TransactionServiceException ex)
7833
    {
7834
      this();
7835
      this.success = success;
7836
      this.ex = ex;
7837
    }
7838
 
7839
    /**
7840
     * Performs a deep copy on <i>other</i>.
7841
     */
7842
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
7843
      if (other.isSetSuccess()) {
7844
        List<Order> __this__success = new ArrayList<Order>();
7845
        for (Order other_element : other.success) {
7846
          __this__success.add(new Order(other_element));
7847
        }
7848
        this.success = __this__success;
7849
      }
7850
      if (other.isSetEx()) {
7851
        this.ex = new TransactionServiceException(other.ex);
7852
      }
7853
    }
7854
 
7855
    public getOrdersByBillingDate_result deepCopy() {
7856
      return new getOrdersByBillingDate_result(this);
7857
    }
7858
 
7859
    @Deprecated
7860
    public getOrdersByBillingDate_result clone() {
7861
      return new getOrdersByBillingDate_result(this);
7862
    }
7863
 
7864
    public int getSuccessSize() {
7865
      return (this.success == null) ? 0 : this.success.size();
7866
    }
7867
 
7868
    public java.util.Iterator<Order> getSuccessIterator() {
7869
      return (this.success == null) ? null : this.success.iterator();
7870
    }
7871
 
7872
    public void addToSuccess(Order elem) {
7873
      if (this.success == null) {
7874
        this.success = new ArrayList<Order>();
7875
      }
7876
      this.success.add(elem);
7877
    }
7878
 
7879
    public List<Order> getSuccess() {
7880
      return this.success;
7881
    }
7882
 
7883
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
7884
      this.success = success;
7885
      return this;
7886
    }
7887
 
7888
    public void unsetSuccess() {
7889
      this.success = null;
7890
    }
7891
 
7892
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7893
    public boolean isSetSuccess() {
7894
      return this.success != null;
7895
    }
7896
 
7897
    public void setSuccessIsSet(boolean value) {
7898
      if (!value) {
7899
        this.success = null;
7900
      }
7901
    }
7902
 
7903
    public TransactionServiceException getEx() {
7904
      return this.ex;
7905
    }
7906
 
7907
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
7908
      this.ex = ex;
7909
      return this;
7910
    }
7911
 
7912
    public void unsetEx() {
7913
      this.ex = null;
7914
    }
7915
 
7916
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7917
    public boolean isSetEx() {
7918
      return this.ex != null;
7919
    }
7920
 
7921
    public void setExIsSet(boolean value) {
7922
      if (!value) {
7923
        this.ex = null;
7924
      }
7925
    }
7926
 
7927
    public void setFieldValue(_Fields field, Object value) {
7928
      switch (field) {
7929
      case SUCCESS:
7930
        if (value == null) {
7931
          unsetSuccess();
7932
        } else {
7933
          setSuccess((List<Order>)value);
7934
        }
7935
        break;
7936
 
7937
      case EX:
7938
        if (value == null) {
7939
          unsetEx();
7940
        } else {
7941
          setEx((TransactionServiceException)value);
7942
        }
7943
        break;
7944
 
7945
      }
7946
    }
7947
 
7948
    public void setFieldValue(int fieldID, Object value) {
7949
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7950
    }
7951
 
7952
    public Object getFieldValue(_Fields field) {
7953
      switch (field) {
7954
      case SUCCESS:
7955
        return getSuccess();
7956
 
7957
      case EX:
7958
        return getEx();
7959
 
7960
      }
7961
      throw new IllegalStateException();
7962
    }
7963
 
7964
    public Object getFieldValue(int fieldId) {
7965
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7966
    }
7967
 
7968
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7969
    public boolean isSet(_Fields field) {
7970
      switch (field) {
7971
      case SUCCESS:
7972
        return isSetSuccess();
7973
      case EX:
7974
        return isSetEx();
7975
      }
7976
      throw new IllegalStateException();
7977
    }
7978
 
7979
    public boolean isSet(int fieldID) {
7980
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7981
    }
7982
 
7983
    @Override
7984
    public boolean equals(Object that) {
7985
      if (that == null)
7986
        return false;
7987
      if (that instanceof getOrdersByBillingDate_result)
7988
        return this.equals((getOrdersByBillingDate_result)that);
7989
      return false;
7990
    }
7991
 
7992
    public boolean equals(getOrdersByBillingDate_result that) {
7993
      if (that == null)
7994
        return false;
7995
 
7996
      boolean this_present_success = true && this.isSetSuccess();
7997
      boolean that_present_success = true && that.isSetSuccess();
7998
      if (this_present_success || that_present_success) {
7999
        if (!(this_present_success && that_present_success))
8000
          return false;
8001
        if (!this.success.equals(that.success))
8002
          return false;
8003
      }
8004
 
8005
      boolean this_present_ex = true && this.isSetEx();
8006
      boolean that_present_ex = true && that.isSetEx();
8007
      if (this_present_ex || that_present_ex) {
8008
        if (!(this_present_ex && that_present_ex))
8009
          return false;
8010
        if (!this.ex.equals(that.ex))
8011
          return false;
8012
      }
8013
 
8014
      return true;
8015
    }
8016
 
8017
    @Override
8018
    public int hashCode() {
8019
      return 0;
8020
    }
8021
 
8022
    public int compareTo(getOrdersByBillingDate_result other) {
8023
      if (!getClass().equals(other.getClass())) {
8024
        return getClass().getName().compareTo(other.getClass().getName());
8025
      }
8026
 
8027
      int lastComparison = 0;
8028
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8029
 
8030
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8031
      if (lastComparison != 0) {
8032
        return lastComparison;
8033
      }
8034
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8035
      if (lastComparison != 0) {
8036
        return lastComparison;
8037
      }
8038
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8039
      if (lastComparison != 0) {
8040
        return lastComparison;
8041
      }
8042
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8043
      if (lastComparison != 0) {
8044
        return lastComparison;
8045
      }
8046
      return 0;
8047
    }
8048
 
8049
    public void read(TProtocol iprot) throws TException {
8050
      TField field;
8051
      iprot.readStructBegin();
8052
      while (true)
8053
      {
8054
        field = iprot.readFieldBegin();
8055
        if (field.type == TType.STOP) { 
8056
          break;
8057
        }
8058
        _Fields fieldId = _Fields.findByThriftId(field.id);
8059
        if (fieldId == null) {
8060
          TProtocolUtil.skip(iprot, field.type);
8061
        } else {
8062
          switch (fieldId) {
8063
            case SUCCESS:
8064
              if (field.type == TType.LIST) {
8065
                {
8066
                  TList _list20 = iprot.readListBegin();
8067
                  this.success = new ArrayList<Order>(_list20.size);
8068
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8069
                  {
8070
                    Order _elem22;
8071
                    _elem22 = new Order();
8072
                    _elem22.read(iprot);
8073
                    this.success.add(_elem22);
8074
                  }
8075
                  iprot.readListEnd();
8076
                }
8077
              } else { 
8078
                TProtocolUtil.skip(iprot, field.type);
8079
              }
8080
              break;
8081
            case EX:
8082
              if (field.type == TType.STRUCT) {
8083
                this.ex = new TransactionServiceException();
8084
                this.ex.read(iprot);
8085
              } else { 
8086
                TProtocolUtil.skip(iprot, field.type);
8087
              }
8088
              break;
8089
          }
8090
          iprot.readFieldEnd();
8091
        }
8092
      }
8093
      iprot.readStructEnd();
8094
      validate();
8095
    }
8096
 
8097
    public void write(TProtocol oprot) throws TException {
8098
      oprot.writeStructBegin(STRUCT_DESC);
8099
 
8100
      if (this.isSetSuccess()) {
8101
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8102
        {
8103
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8104
          for (Order _iter23 : this.success)
8105
          {
8106
            _iter23.write(oprot);
8107
          }
8108
          oprot.writeListEnd();
8109
        }
8110
        oprot.writeFieldEnd();
8111
      } else if (this.isSetEx()) {
8112
        oprot.writeFieldBegin(EX_FIELD_DESC);
8113
        this.ex.write(oprot);
8114
        oprot.writeFieldEnd();
8115
      }
8116
      oprot.writeFieldStop();
8117
      oprot.writeStructEnd();
8118
    }
8119
 
8120
    @Override
8121
    public String toString() {
8122
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8123
      boolean first = true;
8124
 
8125
      sb.append("success:");
8126
      if (this.success == null) {
8127
        sb.append("null");
8128
      } else {
8129
        sb.append(this.success);
8130
      }
8131
      first = false;
8132
      if (!first) sb.append(", ");
8133
      sb.append("ex:");
8134
      if (this.ex == null) {
8135
        sb.append("null");
8136
      } else {
8137
        sb.append(this.ex);
8138
      }
8139
      first = false;
8140
      sb.append(")");
8141
      return sb.toString();
8142
    }
8143
 
8144
    public void validate() throws TException {
8145
      // check for required fields
8146
    }
8147
 
8148
  }
8149
 
483 rajveer 8150
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8151
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8152
 
483 rajveer 8153
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8154
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8155
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8156
 
483 rajveer 8157
    private long orderId;
8158
    private OrderStatus status;
8159
    private String description;
68 ashish 8160
 
8161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8162
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8163
      ORDER_ID((short)1, "orderId"),
8164
      /**
8165
       * 
8166
       * @see OrderStatus
8167
       */
8168
      STATUS((short)2, "status"),
8169
      DESCRIPTION((short)3, "description");
68 ashish 8170
 
8171
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8172
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8173
 
8174
      static {
8175
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8176
          byId.put((int)field._thriftId, field);
8177
          byName.put(field.getFieldName(), field);
8178
        }
8179
      }
8180
 
8181
      /**
8182
       * Find the _Fields constant that matches fieldId, or null if its not found.
8183
       */
8184
      public static _Fields findByThriftId(int fieldId) {
8185
        return byId.get(fieldId);
8186
      }
8187
 
8188
      /**
8189
       * Find the _Fields constant that matches fieldId, throwing an exception
8190
       * if it is not found.
8191
       */
8192
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8193
        _Fields fields = findByThriftId(fieldId);
8194
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8195
        return fields;
8196
      }
8197
 
8198
      /**
8199
       * Find the _Fields constant that matches name, or null if its not found.
8200
       */
8201
      public static _Fields findByName(String name) {
8202
        return byName.get(name);
8203
      }
8204
 
8205
      private final short _thriftId;
8206
      private final String _fieldName;
8207
 
8208
      _Fields(short thriftId, String fieldName) {
8209
        _thriftId = thriftId;
8210
        _fieldName = fieldName;
8211
      }
8212
 
8213
      public short getThriftFieldId() {
8214
        return _thriftId;
8215
      }
8216
 
8217
      public String getFieldName() {
8218
        return _fieldName;
8219
      }
8220
    }
8221
 
8222
    // isset id assignments
483 rajveer 8223
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8224
    private BitSet __isset_bit_vector = new BitSet(1);
8225
 
8226
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8227
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8228
          new FieldValueMetaData(TType.I64)));
483 rajveer 8229
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8230
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8231
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8232
          new FieldValueMetaData(TType.STRING)));
68 ashish 8233
    }});
8234
 
8235
    static {
483 rajveer 8236
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8237
    }
8238
 
483 rajveer 8239
    public changeOrderStatus_args() {
68 ashish 8240
    }
8241
 
483 rajveer 8242
    public changeOrderStatus_args(
8243
      long orderId,
8244
      OrderStatus status,
8245
      String description)
68 ashish 8246
    {
8247
      this();
483 rajveer 8248
      this.orderId = orderId;
8249
      setOrderIdIsSet(true);
8250
      this.status = status;
8251
      this.description = description;
68 ashish 8252
    }
8253
 
8254
    /**
8255
     * Performs a deep copy on <i>other</i>.
8256
     */
483 rajveer 8257
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8258
      __isset_bit_vector.clear();
8259
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8260
      this.orderId = other.orderId;
8261
      if (other.isSetStatus()) {
8262
        this.status = other.status;
8263
      }
8264
      if (other.isSetDescription()) {
8265
        this.description = other.description;
8266
      }
68 ashish 8267
    }
8268
 
483 rajveer 8269
    public changeOrderStatus_args deepCopy() {
8270
      return new changeOrderStatus_args(this);
68 ashish 8271
    }
8272
 
8273
    @Deprecated
483 rajveer 8274
    public changeOrderStatus_args clone() {
8275
      return new changeOrderStatus_args(this);
68 ashish 8276
    }
8277
 
483 rajveer 8278
    public long getOrderId() {
8279
      return this.orderId;
68 ashish 8280
    }
8281
 
483 rajveer 8282
    public changeOrderStatus_args setOrderId(long orderId) {
8283
      this.orderId = orderId;
8284
      setOrderIdIsSet(true);
68 ashish 8285
      return this;
8286
    }
8287
 
483 rajveer 8288
    public void unsetOrderId() {
8289
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8290
    }
8291
 
483 rajveer 8292
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8293
    public boolean isSetOrderId() {
8294
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8295
    }
8296
 
483 rajveer 8297
    public void setOrderIdIsSet(boolean value) {
8298
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8299
    }
8300
 
483 rajveer 8301
    /**
8302
     * 
8303
     * @see OrderStatus
8304
     */
8305
    public OrderStatus getStatus() {
8306
      return this.status;
68 ashish 8307
    }
8308
 
8309
    /**
483 rajveer 8310
     * 
8311
     * @see OrderStatus
68 ashish 8312
     */
483 rajveer 8313
    public changeOrderStatus_args setStatus(OrderStatus status) {
8314
      this.status = status;
68 ashish 8315
      return this;
8316
    }
8317
 
483 rajveer 8318
    public void unsetStatus() {
8319
      this.status = null;
68 ashish 8320
    }
8321
 
483 rajveer 8322
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8323
    public boolean isSetStatus() {
8324
      return this.status != null;
68 ashish 8325
    }
8326
 
483 rajveer 8327
    public void setStatusIsSet(boolean value) {
68 ashish 8328
      if (!value) {
483 rajveer 8329
        this.status = null;
68 ashish 8330
      }
8331
    }
8332
 
483 rajveer 8333
    public String getDescription() {
8334
      return this.description;
68 ashish 8335
    }
8336
 
483 rajveer 8337
    public changeOrderStatus_args setDescription(String description) {
8338
      this.description = description;
68 ashish 8339
      return this;
8340
    }
8341
 
483 rajveer 8342
    public void unsetDescription() {
8343
      this.description = null;
68 ashish 8344
    }
8345
 
483 rajveer 8346
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8347
    public boolean isSetDescription() {
8348
      return this.description != null;
68 ashish 8349
    }
8350
 
483 rajveer 8351
    public void setDescriptionIsSet(boolean value) {
68 ashish 8352
      if (!value) {
483 rajveer 8353
        this.description = null;
68 ashish 8354
      }
8355
    }
8356
 
8357
    public void setFieldValue(_Fields field, Object value) {
8358
      switch (field) {
483 rajveer 8359
      case ORDER_ID:
68 ashish 8360
        if (value == null) {
483 rajveer 8361
          unsetOrderId();
68 ashish 8362
        } else {
483 rajveer 8363
          setOrderId((Long)value);
68 ashish 8364
        }
8365
        break;
8366
 
483 rajveer 8367
      case STATUS:
68 ashish 8368
        if (value == null) {
483 rajveer 8369
          unsetStatus();
68 ashish 8370
        } else {
483 rajveer 8371
          setStatus((OrderStatus)value);
68 ashish 8372
        }
8373
        break;
8374
 
483 rajveer 8375
      case DESCRIPTION:
8376
        if (value == null) {
8377
          unsetDescription();
8378
        } else {
8379
          setDescription((String)value);
8380
        }
8381
        break;
8382
 
68 ashish 8383
      }
8384
    }
8385
 
8386
    public void setFieldValue(int fieldID, Object value) {
8387
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8388
    }
8389
 
8390
    public Object getFieldValue(_Fields field) {
8391
      switch (field) {
483 rajveer 8392
      case ORDER_ID:
8393
        return new Long(getOrderId());
68 ashish 8394
 
483 rajveer 8395
      case STATUS:
8396
        return getStatus();
68 ashish 8397
 
483 rajveer 8398
      case DESCRIPTION:
8399
        return getDescription();
8400
 
68 ashish 8401
      }
8402
      throw new IllegalStateException();
8403
    }
8404
 
8405
    public Object getFieldValue(int fieldId) {
8406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8407
    }
8408
 
8409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8410
    public boolean isSet(_Fields field) {
8411
      switch (field) {
483 rajveer 8412
      case ORDER_ID:
8413
        return isSetOrderId();
8414
      case STATUS:
8415
        return isSetStatus();
8416
      case DESCRIPTION:
8417
        return isSetDescription();
68 ashish 8418
      }
8419
      throw new IllegalStateException();
8420
    }
8421
 
8422
    public boolean isSet(int fieldID) {
8423
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8424
    }
8425
 
8426
    @Override
8427
    public boolean equals(Object that) {
8428
      if (that == null)
8429
        return false;
483 rajveer 8430
      if (that instanceof changeOrderStatus_args)
8431
        return this.equals((changeOrderStatus_args)that);
68 ashish 8432
      return false;
8433
    }
8434
 
483 rajveer 8435
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8436
      if (that == null)
8437
        return false;
8438
 
483 rajveer 8439
      boolean this_present_orderId = true;
8440
      boolean that_present_orderId = true;
8441
      if (this_present_orderId || that_present_orderId) {
8442
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8443
          return false;
483 rajveer 8444
        if (this.orderId != that.orderId)
68 ashish 8445
          return false;
8446
      }
8447
 
483 rajveer 8448
      boolean this_present_status = true && this.isSetStatus();
8449
      boolean that_present_status = true && that.isSetStatus();
8450
      if (this_present_status || that_present_status) {
8451
        if (!(this_present_status && that_present_status))
68 ashish 8452
          return false;
483 rajveer 8453
        if (!this.status.equals(that.status))
68 ashish 8454
          return false;
8455
      }
8456
 
483 rajveer 8457
      boolean this_present_description = true && this.isSetDescription();
8458
      boolean that_present_description = true && that.isSetDescription();
8459
      if (this_present_description || that_present_description) {
8460
        if (!(this_present_description && that_present_description))
8461
          return false;
8462
        if (!this.description.equals(that.description))
8463
          return false;
8464
      }
8465
 
68 ashish 8466
      return true;
8467
    }
8468
 
8469
    @Override
8470
    public int hashCode() {
8471
      return 0;
8472
    }
8473
 
483 rajveer 8474
    public int compareTo(changeOrderStatus_args other) {
8475
      if (!getClass().equals(other.getClass())) {
8476
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 8477
      }
8478
 
483 rajveer 8479
      int lastComparison = 0;
8480
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 8481
 
483 rajveer 8482
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8483
      if (lastComparison != 0) {
8484
        return lastComparison;
68 ashish 8485
      }
483 rajveer 8486
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8487
      if (lastComparison != 0) {
8488
        return lastComparison;
68 ashish 8489
      }
483 rajveer 8490
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8491
      if (lastComparison != 0) {
8492
        return lastComparison;
68 ashish 8493
      }
483 rajveer 8494
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8495
      if (lastComparison != 0) {
8496
        return lastComparison;
68 ashish 8497
      }
483 rajveer 8498
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8499
      if (lastComparison != 0) {
8500
        return lastComparison;
68 ashish 8501
      }
483 rajveer 8502
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8503
      if (lastComparison != 0) {
8504
        return lastComparison;
68 ashish 8505
      }
8506
      return 0;
8507
    }
8508
 
8509
    public void read(TProtocol iprot) throws TException {
8510
      TField field;
8511
      iprot.readStructBegin();
8512
      while (true)
8513
      {
8514
        field = iprot.readFieldBegin();
8515
        if (field.type == TType.STOP) { 
8516
          break;
8517
        }
8518
        _Fields fieldId = _Fields.findByThriftId(field.id);
8519
        if (fieldId == null) {
8520
          TProtocolUtil.skip(iprot, field.type);
8521
        } else {
8522
          switch (fieldId) {
483 rajveer 8523
            case ORDER_ID:
68 ashish 8524
              if (field.type == TType.I64) {
483 rajveer 8525
                this.orderId = iprot.readI64();
8526
                setOrderIdIsSet(true);
68 ashish 8527
              } else { 
8528
                TProtocolUtil.skip(iprot, field.type);
8529
              }
8530
              break;
483 rajveer 8531
            case STATUS:
8532
              if (field.type == TType.I32) {
8533
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 8534
              } else { 
8535
                TProtocolUtil.skip(iprot, field.type);
8536
              }
8537
              break;
483 rajveer 8538
            case DESCRIPTION:
8539
              if (field.type == TType.STRING) {
8540
                this.description = iprot.readString();
8541
              } else { 
8542
                TProtocolUtil.skip(iprot, field.type);
8543
              }
8544
              break;
68 ashish 8545
          }
8546
          iprot.readFieldEnd();
8547
        }
8548
      }
8549
      iprot.readStructEnd();
8550
      validate();
8551
    }
8552
 
8553
    public void write(TProtocol oprot) throws TException {
8554
      validate();
8555
 
8556
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8557
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8558
      oprot.writeI64(this.orderId);
68 ashish 8559
      oprot.writeFieldEnd();
483 rajveer 8560
      if (this.status != null) {
8561
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8562
        oprot.writeI32(this.status.getValue());
68 ashish 8563
        oprot.writeFieldEnd();
8564
      }
483 rajveer 8565
      if (this.description != null) {
8566
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8567
        oprot.writeString(this.description);
8568
        oprot.writeFieldEnd();
8569
      }
68 ashish 8570
      oprot.writeFieldStop();
8571
      oprot.writeStructEnd();
8572
    }
8573
 
8574
    @Override
8575
    public String toString() {
483 rajveer 8576
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 8577
      boolean first = true;
8578
 
483 rajveer 8579
      sb.append("orderId:");
8580
      sb.append(this.orderId);
68 ashish 8581
      first = false;
8582
      if (!first) sb.append(", ");
483 rajveer 8583
      sb.append("status:");
8584
      if (this.status == null) {
68 ashish 8585
        sb.append("null");
8586
      } else {
483 rajveer 8587
        String status_name = status.name();
8588
        if (status_name != null) {
8589
          sb.append(status_name);
8590
          sb.append(" (");
8591
        }
8592
        sb.append(this.status);
8593
        if (status_name != null) {
8594
          sb.append(")");
8595
        }
68 ashish 8596
      }
8597
      first = false;
483 rajveer 8598
      if (!first) sb.append(", ");
8599
      sb.append("description:");
8600
      if (this.description == null) {
8601
        sb.append("null");
8602
      } else {
8603
        sb.append(this.description);
8604
      }
8605
      first = false;
68 ashish 8606
      sb.append(")");
8607
      return sb.toString();
8608
    }
8609
 
8610
    public void validate() throws TException {
8611
      // check for required fields
8612
    }
8613
 
8614
  }
8615
 
483 rajveer 8616
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
8617
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 8618
 
8619
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8620
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8621
 
8622
    private boolean success;
8623
    private TransactionServiceException ex;
8624
 
8625
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8626
    public enum _Fields implements TFieldIdEnum {
8627
      SUCCESS((short)0, "success"),
8628
      EX((short)1, "ex");
8629
 
8630
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8631
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8632
 
8633
      static {
8634
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8635
          byId.put((int)field._thriftId, field);
8636
          byName.put(field.getFieldName(), field);
8637
        }
8638
      }
8639
 
8640
      /**
8641
       * Find the _Fields constant that matches fieldId, or null if its not found.
8642
       */
8643
      public static _Fields findByThriftId(int fieldId) {
8644
        return byId.get(fieldId);
8645
      }
8646
 
8647
      /**
8648
       * Find the _Fields constant that matches fieldId, throwing an exception
8649
       * if it is not found.
8650
       */
8651
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8652
        _Fields fields = findByThriftId(fieldId);
8653
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8654
        return fields;
8655
      }
8656
 
8657
      /**
8658
       * Find the _Fields constant that matches name, or null if its not found.
8659
       */
8660
      public static _Fields findByName(String name) {
8661
        return byName.get(name);
8662
      }
8663
 
8664
      private final short _thriftId;
8665
      private final String _fieldName;
8666
 
8667
      _Fields(short thriftId, String fieldName) {
8668
        _thriftId = thriftId;
8669
        _fieldName = fieldName;
8670
      }
8671
 
8672
      public short getThriftFieldId() {
8673
        return _thriftId;
8674
      }
8675
 
8676
      public String getFieldName() {
8677
        return _fieldName;
8678
      }
8679
    }
8680
 
8681
    // isset id assignments
8682
    private static final int __SUCCESS_ISSET_ID = 0;
8683
    private BitSet __isset_bit_vector = new BitSet(1);
8684
 
8685
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8686
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8687
          new FieldValueMetaData(TType.BOOL)));
8688
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8689
          new FieldValueMetaData(TType.STRUCT)));
8690
    }});
8691
 
8692
    static {
483 rajveer 8693
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 8694
    }
8695
 
483 rajveer 8696
    public changeOrderStatus_result() {
68 ashish 8697
    }
8698
 
483 rajveer 8699
    public changeOrderStatus_result(
68 ashish 8700
      boolean success,
8701
      TransactionServiceException ex)
8702
    {
8703
      this();
8704
      this.success = success;
8705
      setSuccessIsSet(true);
8706
      this.ex = ex;
8707
    }
8708
 
8709
    /**
8710
     * Performs a deep copy on <i>other</i>.
8711
     */
483 rajveer 8712
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 8713
      __isset_bit_vector.clear();
8714
      __isset_bit_vector.or(other.__isset_bit_vector);
8715
      this.success = other.success;
8716
      if (other.isSetEx()) {
8717
        this.ex = new TransactionServiceException(other.ex);
8718
      }
8719
    }
8720
 
483 rajveer 8721
    public changeOrderStatus_result deepCopy() {
8722
      return new changeOrderStatus_result(this);
68 ashish 8723
    }
8724
 
8725
    @Deprecated
483 rajveer 8726
    public changeOrderStatus_result clone() {
8727
      return new changeOrderStatus_result(this);
68 ashish 8728
    }
8729
 
8730
    public boolean isSuccess() {
8731
      return this.success;
8732
    }
8733
 
483 rajveer 8734
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 8735
      this.success = success;
8736
      setSuccessIsSet(true);
8737
      return this;
8738
    }
8739
 
8740
    public void unsetSuccess() {
8741
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8742
    }
8743
 
8744
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8745
    public boolean isSetSuccess() {
8746
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8747
    }
8748
 
8749
    public void setSuccessIsSet(boolean value) {
8750
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8751
    }
8752
 
8753
    public TransactionServiceException getEx() {
8754
      return this.ex;
8755
    }
8756
 
483 rajveer 8757
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 8758
      this.ex = ex;
8759
      return this;
8760
    }
8761
 
8762
    public void unsetEx() {
8763
      this.ex = null;
8764
    }
8765
 
8766
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8767
    public boolean isSetEx() {
8768
      return this.ex != null;
8769
    }
8770
 
8771
    public void setExIsSet(boolean value) {
8772
      if (!value) {
8773
        this.ex = null;
8774
      }
8775
    }
8776
 
8777
    public void setFieldValue(_Fields field, Object value) {
8778
      switch (field) {
8779
      case SUCCESS:
8780
        if (value == null) {
8781
          unsetSuccess();
8782
        } else {
8783
          setSuccess((Boolean)value);
8784
        }
8785
        break;
8786
 
8787
      case EX:
8788
        if (value == null) {
8789
          unsetEx();
8790
        } else {
8791
          setEx((TransactionServiceException)value);
8792
        }
8793
        break;
8794
 
8795
      }
8796
    }
8797
 
8798
    public void setFieldValue(int fieldID, Object value) {
8799
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8800
    }
8801
 
8802
    public Object getFieldValue(_Fields field) {
8803
      switch (field) {
8804
      case SUCCESS:
8805
        return new Boolean(isSuccess());
8806
 
8807
      case EX:
8808
        return getEx();
8809
 
8810
      }
8811
      throw new IllegalStateException();
8812
    }
8813
 
8814
    public Object getFieldValue(int fieldId) {
8815
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8816
    }
8817
 
8818
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8819
    public boolean isSet(_Fields field) {
8820
      switch (field) {
8821
      case SUCCESS:
8822
        return isSetSuccess();
8823
      case EX:
8824
        return isSetEx();
8825
      }
8826
      throw new IllegalStateException();
8827
    }
8828
 
8829
    public boolean isSet(int fieldID) {
8830
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8831
    }
8832
 
8833
    @Override
8834
    public boolean equals(Object that) {
8835
      if (that == null)
8836
        return false;
483 rajveer 8837
      if (that instanceof changeOrderStatus_result)
8838
        return this.equals((changeOrderStatus_result)that);
68 ashish 8839
      return false;
8840
    }
8841
 
483 rajveer 8842
    public boolean equals(changeOrderStatus_result that) {
68 ashish 8843
      if (that == null)
8844
        return false;
8845
 
8846
      boolean this_present_success = true;
8847
      boolean that_present_success = true;
8848
      if (this_present_success || that_present_success) {
8849
        if (!(this_present_success && that_present_success))
8850
          return false;
8851
        if (this.success != that.success)
8852
          return false;
8853
      }
8854
 
8855
      boolean this_present_ex = true && this.isSetEx();
8856
      boolean that_present_ex = true && that.isSetEx();
8857
      if (this_present_ex || that_present_ex) {
8858
        if (!(this_present_ex && that_present_ex))
8859
          return false;
8860
        if (!this.ex.equals(that.ex))
8861
          return false;
8862
      }
8863
 
8864
      return true;
8865
    }
8866
 
8867
    @Override
8868
    public int hashCode() {
8869
      return 0;
8870
    }
8871
 
483 rajveer 8872
    public int compareTo(changeOrderStatus_result other) {
68 ashish 8873
      if (!getClass().equals(other.getClass())) {
8874
        return getClass().getName().compareTo(other.getClass().getName());
8875
      }
8876
 
8877
      int lastComparison = 0;
483 rajveer 8878
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 8879
 
8880
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8881
      if (lastComparison != 0) {
8882
        return lastComparison;
8883
      }
8884
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8885
      if (lastComparison != 0) {
8886
        return lastComparison;
8887
      }
8888
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8889
      if (lastComparison != 0) {
8890
        return lastComparison;
8891
      }
8892
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8893
      if (lastComparison != 0) {
8894
        return lastComparison;
8895
      }
8896
      return 0;
8897
    }
8898
 
8899
    public void read(TProtocol iprot) throws TException {
8900
      TField field;
8901
      iprot.readStructBegin();
8902
      while (true)
8903
      {
8904
        field = iprot.readFieldBegin();
8905
        if (field.type == TType.STOP) { 
8906
          break;
8907
        }
8908
        _Fields fieldId = _Fields.findByThriftId(field.id);
8909
        if (fieldId == null) {
8910
          TProtocolUtil.skip(iprot, field.type);
8911
        } else {
8912
          switch (fieldId) {
8913
            case SUCCESS:
8914
              if (field.type == TType.BOOL) {
8915
                this.success = iprot.readBool();
8916
                setSuccessIsSet(true);
8917
              } else { 
8918
                TProtocolUtil.skip(iprot, field.type);
8919
              }
8920
              break;
8921
            case EX:
8922
              if (field.type == TType.STRUCT) {
8923
                this.ex = new TransactionServiceException();
8924
                this.ex.read(iprot);
8925
              } else { 
8926
                TProtocolUtil.skip(iprot, field.type);
8927
              }
8928
              break;
8929
          }
8930
          iprot.readFieldEnd();
8931
        }
8932
      }
8933
      iprot.readStructEnd();
8934
      validate();
8935
    }
8936
 
8937
    public void write(TProtocol oprot) throws TException {
8938
      oprot.writeStructBegin(STRUCT_DESC);
8939
 
8940
      if (this.isSetSuccess()) {
8941
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8942
        oprot.writeBool(this.success);
8943
        oprot.writeFieldEnd();
8944
      } else if (this.isSetEx()) {
8945
        oprot.writeFieldBegin(EX_FIELD_DESC);
8946
        this.ex.write(oprot);
8947
        oprot.writeFieldEnd();
8948
      }
8949
      oprot.writeFieldStop();
8950
      oprot.writeStructEnd();
8951
    }
8952
 
8953
    @Override
8954
    public String toString() {
483 rajveer 8955
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 8956
      boolean first = true;
8957
 
8958
      sb.append("success:");
8959
      sb.append(this.success);
8960
      first = false;
8961
      if (!first) sb.append(", ");
8962
      sb.append("ex:");
8963
      if (this.ex == null) {
8964
        sb.append("null");
8965
      } else {
8966
        sb.append(this.ex);
8967
      }
8968
      first = false;
8969
      sb.append(")");
8970
      return sb.toString();
8971
    }
8972
 
8973
    public void validate() throws TException {
8974
      // check for required fields
8975
    }
8976
 
8977
  }
8978
 
495 rajveer 8979
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
8980
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
8981
 
8982
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8983
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
640 chandransh 8984
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)3);
8985
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)4);
495 rajveer 8986
 
8987
    private long orderId;
8988
    private String invoice_number;
640 chandransh 8989
    private long jacket_number;
495 rajveer 8990
    private String billed_by;
8991
 
8992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8993
    public enum _Fields implements TFieldIdEnum {
8994
      ORDER_ID((short)1, "orderId"),
8995
      INVOICE_NUMBER((short)2, "invoice_number"),
640 chandransh 8996
      JACKET_NUMBER((short)3, "jacket_number"),
8997
      BILLED_BY((short)4, "billed_by");
495 rajveer 8998
 
8999
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9001
 
9002
      static {
9003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9004
          byId.put((int)field._thriftId, field);
9005
          byName.put(field.getFieldName(), field);
9006
        }
9007
      }
9008
 
9009
      /**
9010
       * Find the _Fields constant that matches fieldId, or null if its not found.
9011
       */
9012
      public static _Fields findByThriftId(int fieldId) {
9013
        return byId.get(fieldId);
9014
      }
9015
 
9016
      /**
9017
       * Find the _Fields constant that matches fieldId, throwing an exception
9018
       * if it is not found.
9019
       */
9020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9021
        _Fields fields = findByThriftId(fieldId);
9022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9023
        return fields;
9024
      }
9025
 
9026
      /**
9027
       * Find the _Fields constant that matches name, or null if its not found.
9028
       */
9029
      public static _Fields findByName(String name) {
9030
        return byName.get(name);
9031
      }
9032
 
9033
      private final short _thriftId;
9034
      private final String _fieldName;
9035
 
9036
      _Fields(short thriftId, String fieldName) {
9037
        _thriftId = thriftId;
9038
        _fieldName = fieldName;
9039
      }
9040
 
9041
      public short getThriftFieldId() {
9042
        return _thriftId;
9043
      }
9044
 
9045
      public String getFieldName() {
9046
        return _fieldName;
9047
      }
9048
    }
9049
 
9050
    // isset id assignments
9051
    private static final int __ORDERID_ISSET_ID = 0;
640 chandransh 9052
    private static final int __JACKET_NUMBER_ISSET_ID = 1;
9053
    private BitSet __isset_bit_vector = new BitSet(2);
495 rajveer 9054
 
9055
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9056
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9057
          new FieldValueMetaData(TType.I64)));
9058
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9059
          new FieldValueMetaData(TType.STRING)));
640 chandransh 9060
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
9061
          new FieldValueMetaData(TType.I64)));
495 rajveer 9062
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9063
          new FieldValueMetaData(TType.STRING)));
9064
    }});
9065
 
9066
    static {
9067
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9068
    }
9069
 
9070
    public addBillingDetails_args() {
9071
    }
9072
 
9073
    public addBillingDetails_args(
9074
      long orderId,
9075
      String invoice_number,
640 chandransh 9076
      long jacket_number,
495 rajveer 9077
      String billed_by)
9078
    {
9079
      this();
9080
      this.orderId = orderId;
9081
      setOrderIdIsSet(true);
9082
      this.invoice_number = invoice_number;
640 chandransh 9083
      this.jacket_number = jacket_number;
9084
      setJacket_numberIsSet(true);
495 rajveer 9085
      this.billed_by = billed_by;
9086
    }
9087
 
9088
    /**
9089
     * Performs a deep copy on <i>other</i>.
9090
     */
9091
    public addBillingDetails_args(addBillingDetails_args other) {
9092
      __isset_bit_vector.clear();
9093
      __isset_bit_vector.or(other.__isset_bit_vector);
9094
      this.orderId = other.orderId;
9095
      if (other.isSetInvoice_number()) {
9096
        this.invoice_number = other.invoice_number;
9097
      }
640 chandransh 9098
      this.jacket_number = other.jacket_number;
495 rajveer 9099
      if (other.isSetBilled_by()) {
9100
        this.billed_by = other.billed_by;
9101
      }
9102
    }
9103
 
9104
    public addBillingDetails_args deepCopy() {
9105
      return new addBillingDetails_args(this);
9106
    }
9107
 
9108
    @Deprecated
9109
    public addBillingDetails_args clone() {
9110
      return new addBillingDetails_args(this);
9111
    }
9112
 
9113
    public long getOrderId() {
9114
      return this.orderId;
9115
    }
9116
 
9117
    public addBillingDetails_args setOrderId(long orderId) {
9118
      this.orderId = orderId;
9119
      setOrderIdIsSet(true);
9120
      return this;
9121
    }
9122
 
9123
    public void unsetOrderId() {
9124
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9125
    }
9126
 
9127
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9128
    public boolean isSetOrderId() {
9129
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9130
    }
9131
 
9132
    public void setOrderIdIsSet(boolean value) {
9133
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9134
    }
9135
 
9136
    public String getInvoice_number() {
9137
      return this.invoice_number;
9138
    }
9139
 
9140
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9141
      this.invoice_number = invoice_number;
9142
      return this;
9143
    }
9144
 
9145
    public void unsetInvoice_number() {
9146
      this.invoice_number = null;
9147
    }
9148
 
9149
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9150
    public boolean isSetInvoice_number() {
9151
      return this.invoice_number != null;
9152
    }
9153
 
9154
    public void setInvoice_numberIsSet(boolean value) {
9155
      if (!value) {
9156
        this.invoice_number = null;
9157
      }
9158
    }
9159
 
640 chandransh 9160
    public long getJacket_number() {
9161
      return this.jacket_number;
9162
    }
9163
 
9164
    public addBillingDetails_args setJacket_number(long jacket_number) {
9165
      this.jacket_number = jacket_number;
9166
      setJacket_numberIsSet(true);
9167
      return this;
9168
    }
9169
 
9170
    public void unsetJacket_number() {
9171
      __isset_bit_vector.clear(__JACKET_NUMBER_ISSET_ID);
9172
    }
9173
 
9174
    /** Returns true if field jacket_number is set (has been asigned a value) and false otherwise */
9175
    public boolean isSetJacket_number() {
9176
      return __isset_bit_vector.get(__JACKET_NUMBER_ISSET_ID);
9177
    }
9178
 
9179
    public void setJacket_numberIsSet(boolean value) {
9180
      __isset_bit_vector.set(__JACKET_NUMBER_ISSET_ID, value);
9181
    }
9182
 
495 rajveer 9183
    public String getBilled_by() {
9184
      return this.billed_by;
9185
    }
9186
 
9187
    public addBillingDetails_args setBilled_by(String billed_by) {
9188
      this.billed_by = billed_by;
9189
      return this;
9190
    }
9191
 
9192
    public void unsetBilled_by() {
9193
      this.billed_by = null;
9194
    }
9195
 
9196
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9197
    public boolean isSetBilled_by() {
9198
      return this.billed_by != null;
9199
    }
9200
 
9201
    public void setBilled_byIsSet(boolean value) {
9202
      if (!value) {
9203
        this.billed_by = null;
9204
      }
9205
    }
9206
 
9207
    public void setFieldValue(_Fields field, Object value) {
9208
      switch (field) {
9209
      case ORDER_ID:
9210
        if (value == null) {
9211
          unsetOrderId();
9212
        } else {
9213
          setOrderId((Long)value);
9214
        }
9215
        break;
9216
 
9217
      case INVOICE_NUMBER:
9218
        if (value == null) {
9219
          unsetInvoice_number();
9220
        } else {
9221
          setInvoice_number((String)value);
9222
        }
9223
        break;
9224
 
640 chandransh 9225
      case JACKET_NUMBER:
9226
        if (value == null) {
9227
          unsetJacket_number();
9228
        } else {
9229
          setJacket_number((Long)value);
9230
        }
9231
        break;
9232
 
495 rajveer 9233
      case BILLED_BY:
9234
        if (value == null) {
9235
          unsetBilled_by();
9236
        } else {
9237
          setBilled_by((String)value);
9238
        }
9239
        break;
9240
 
9241
      }
9242
    }
9243
 
9244
    public void setFieldValue(int fieldID, Object value) {
9245
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9246
    }
9247
 
9248
    public Object getFieldValue(_Fields field) {
9249
      switch (field) {
9250
      case ORDER_ID:
9251
        return new Long(getOrderId());
9252
 
9253
      case INVOICE_NUMBER:
9254
        return getInvoice_number();
9255
 
640 chandransh 9256
      case JACKET_NUMBER:
9257
        return new Long(getJacket_number());
9258
 
495 rajveer 9259
      case BILLED_BY:
9260
        return getBilled_by();
9261
 
9262
      }
9263
      throw new IllegalStateException();
9264
    }
9265
 
9266
    public Object getFieldValue(int fieldId) {
9267
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9268
    }
9269
 
9270
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9271
    public boolean isSet(_Fields field) {
9272
      switch (field) {
9273
      case ORDER_ID:
9274
        return isSetOrderId();
9275
      case INVOICE_NUMBER:
9276
        return isSetInvoice_number();
640 chandransh 9277
      case JACKET_NUMBER:
9278
        return isSetJacket_number();
495 rajveer 9279
      case BILLED_BY:
9280
        return isSetBilled_by();
9281
      }
9282
      throw new IllegalStateException();
9283
    }
9284
 
9285
    public boolean isSet(int fieldID) {
9286
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9287
    }
9288
 
9289
    @Override
9290
    public boolean equals(Object that) {
9291
      if (that == null)
9292
        return false;
9293
      if (that instanceof addBillingDetails_args)
9294
        return this.equals((addBillingDetails_args)that);
9295
      return false;
9296
    }
9297
 
9298
    public boolean equals(addBillingDetails_args that) {
9299
      if (that == null)
9300
        return false;
9301
 
9302
      boolean this_present_orderId = true;
9303
      boolean that_present_orderId = true;
9304
      if (this_present_orderId || that_present_orderId) {
9305
        if (!(this_present_orderId && that_present_orderId))
9306
          return false;
9307
        if (this.orderId != that.orderId)
9308
          return false;
9309
      }
9310
 
9311
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9312
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9313
      if (this_present_invoice_number || that_present_invoice_number) {
9314
        if (!(this_present_invoice_number && that_present_invoice_number))
9315
          return false;
9316
        if (!this.invoice_number.equals(that.invoice_number))
9317
          return false;
9318
      }
9319
 
640 chandransh 9320
      boolean this_present_jacket_number = true;
9321
      boolean that_present_jacket_number = true;
9322
      if (this_present_jacket_number || that_present_jacket_number) {
9323
        if (!(this_present_jacket_number && that_present_jacket_number))
9324
          return false;
9325
        if (this.jacket_number != that.jacket_number)
9326
          return false;
9327
      }
9328
 
495 rajveer 9329
      boolean this_present_billed_by = true && this.isSetBilled_by();
9330
      boolean that_present_billed_by = true && that.isSetBilled_by();
9331
      if (this_present_billed_by || that_present_billed_by) {
9332
        if (!(this_present_billed_by && that_present_billed_by))
9333
          return false;
9334
        if (!this.billed_by.equals(that.billed_by))
9335
          return false;
9336
      }
9337
 
9338
      return true;
9339
    }
9340
 
9341
    @Override
9342
    public int hashCode() {
9343
      return 0;
9344
    }
9345
 
9346
    public int compareTo(addBillingDetails_args other) {
9347
      if (!getClass().equals(other.getClass())) {
9348
        return getClass().getName().compareTo(other.getClass().getName());
9349
      }
9350
 
9351
      int lastComparison = 0;
9352
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9353
 
9354
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9355
      if (lastComparison != 0) {
9356
        return lastComparison;
9357
      }
9358
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9359
      if (lastComparison != 0) {
9360
        return lastComparison;
9361
      }
9362
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9363
      if (lastComparison != 0) {
9364
        return lastComparison;
9365
      }
9366
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9367
      if (lastComparison != 0) {
9368
        return lastComparison;
9369
      }
640 chandransh 9370
      lastComparison = Boolean.valueOf(isSetJacket_number()).compareTo(isSetJacket_number());
9371
      if (lastComparison != 0) {
9372
        return lastComparison;
9373
      }
9374
      lastComparison = TBaseHelper.compareTo(jacket_number, typedOther.jacket_number);
9375
      if (lastComparison != 0) {
9376
        return lastComparison;
9377
      }
495 rajveer 9378
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9379
      if (lastComparison != 0) {
9380
        return lastComparison;
9381
      }
9382
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9383
      if (lastComparison != 0) {
9384
        return lastComparison;
9385
      }
9386
      return 0;
9387
    }
9388
 
9389
    public void read(TProtocol iprot) throws TException {
9390
      TField field;
9391
      iprot.readStructBegin();
9392
      while (true)
9393
      {
9394
        field = iprot.readFieldBegin();
9395
        if (field.type == TType.STOP) { 
9396
          break;
9397
        }
9398
        _Fields fieldId = _Fields.findByThriftId(field.id);
9399
        if (fieldId == null) {
9400
          TProtocolUtil.skip(iprot, field.type);
9401
        } else {
9402
          switch (fieldId) {
9403
            case ORDER_ID:
9404
              if (field.type == TType.I64) {
9405
                this.orderId = iprot.readI64();
9406
                setOrderIdIsSet(true);
9407
              } else { 
9408
                TProtocolUtil.skip(iprot, field.type);
9409
              }
9410
              break;
9411
            case INVOICE_NUMBER:
9412
              if (field.type == TType.STRING) {
9413
                this.invoice_number = iprot.readString();
9414
              } else { 
9415
                TProtocolUtil.skip(iprot, field.type);
9416
              }
9417
              break;
640 chandransh 9418
            case JACKET_NUMBER:
9419
              if (field.type == TType.I64) {
9420
                this.jacket_number = iprot.readI64();
9421
                setJacket_numberIsSet(true);
9422
              } else { 
9423
                TProtocolUtil.skip(iprot, field.type);
9424
              }
9425
              break;
495 rajveer 9426
            case BILLED_BY:
9427
              if (field.type == TType.STRING) {
9428
                this.billed_by = iprot.readString();
9429
              } else { 
9430
                TProtocolUtil.skip(iprot, field.type);
9431
              }
9432
              break;
9433
          }
9434
          iprot.readFieldEnd();
9435
        }
9436
      }
9437
      iprot.readStructEnd();
9438
      validate();
9439
    }
9440
 
9441
    public void write(TProtocol oprot) throws TException {
9442
      validate();
9443
 
9444
      oprot.writeStructBegin(STRUCT_DESC);
9445
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9446
      oprot.writeI64(this.orderId);
9447
      oprot.writeFieldEnd();
9448
      if (this.invoice_number != null) {
9449
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9450
        oprot.writeString(this.invoice_number);
9451
        oprot.writeFieldEnd();
9452
      }
640 chandransh 9453
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
9454
      oprot.writeI64(this.jacket_number);
9455
      oprot.writeFieldEnd();
495 rajveer 9456
      if (this.billed_by != null) {
9457
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9458
        oprot.writeString(this.billed_by);
9459
        oprot.writeFieldEnd();
9460
      }
9461
      oprot.writeFieldStop();
9462
      oprot.writeStructEnd();
9463
    }
9464
 
9465
    @Override
9466
    public String toString() {
9467
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9468
      boolean first = true;
9469
 
9470
      sb.append("orderId:");
9471
      sb.append(this.orderId);
9472
      first = false;
9473
      if (!first) sb.append(", ");
9474
      sb.append("invoice_number:");
9475
      if (this.invoice_number == null) {
9476
        sb.append("null");
9477
      } else {
9478
        sb.append(this.invoice_number);
9479
      }
9480
      first = false;
9481
      if (!first) sb.append(", ");
640 chandransh 9482
      sb.append("jacket_number:");
9483
      sb.append(this.jacket_number);
9484
      first = false;
9485
      if (!first) sb.append(", ");
495 rajveer 9486
      sb.append("billed_by:");
9487
      if (this.billed_by == null) {
9488
        sb.append("null");
9489
      } else {
9490
        sb.append(this.billed_by);
9491
      }
9492
      first = false;
9493
      sb.append(")");
9494
      return sb.toString();
9495
    }
9496
 
9497
    public void validate() throws TException {
9498
      // check for required fields
9499
    }
9500
 
9501
  }
9502
 
9503
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9504
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9505
 
9506
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9507
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9508
 
9509
    private boolean success;
9510
    private TransactionServiceException ex;
9511
 
9512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9513
    public enum _Fields implements TFieldIdEnum {
9514
      SUCCESS((short)0, "success"),
9515
      EX((short)1, "ex");
9516
 
9517
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9518
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9519
 
9520
      static {
9521
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9522
          byId.put((int)field._thriftId, field);
9523
          byName.put(field.getFieldName(), field);
9524
        }
9525
      }
9526
 
9527
      /**
9528
       * Find the _Fields constant that matches fieldId, or null if its not found.
9529
       */
9530
      public static _Fields findByThriftId(int fieldId) {
9531
        return byId.get(fieldId);
9532
      }
9533
 
9534
      /**
9535
       * Find the _Fields constant that matches fieldId, throwing an exception
9536
       * if it is not found.
9537
       */
9538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9539
        _Fields fields = findByThriftId(fieldId);
9540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9541
        return fields;
9542
      }
9543
 
9544
      /**
9545
       * Find the _Fields constant that matches name, or null if its not found.
9546
       */
9547
      public static _Fields findByName(String name) {
9548
        return byName.get(name);
9549
      }
9550
 
9551
      private final short _thriftId;
9552
      private final String _fieldName;
9553
 
9554
      _Fields(short thriftId, String fieldName) {
9555
        _thriftId = thriftId;
9556
        _fieldName = fieldName;
9557
      }
9558
 
9559
      public short getThriftFieldId() {
9560
        return _thriftId;
9561
      }
9562
 
9563
      public String getFieldName() {
9564
        return _fieldName;
9565
      }
9566
    }
9567
 
9568
    // isset id assignments
9569
    private static final int __SUCCESS_ISSET_ID = 0;
9570
    private BitSet __isset_bit_vector = new BitSet(1);
9571
 
9572
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9573
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9574
          new FieldValueMetaData(TType.BOOL)));
9575
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9576
          new FieldValueMetaData(TType.STRUCT)));
9577
    }});
9578
 
9579
    static {
9580
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
9581
    }
9582
 
9583
    public addBillingDetails_result() {
9584
    }
9585
 
9586
    public addBillingDetails_result(
9587
      boolean success,
9588
      TransactionServiceException ex)
9589
    {
9590
      this();
9591
      this.success = success;
9592
      setSuccessIsSet(true);
9593
      this.ex = ex;
9594
    }
9595
 
9596
    /**
9597
     * Performs a deep copy on <i>other</i>.
9598
     */
9599
    public addBillingDetails_result(addBillingDetails_result other) {
9600
      __isset_bit_vector.clear();
9601
      __isset_bit_vector.or(other.__isset_bit_vector);
9602
      this.success = other.success;
9603
      if (other.isSetEx()) {
9604
        this.ex = new TransactionServiceException(other.ex);
9605
      }
9606
    }
9607
 
9608
    public addBillingDetails_result deepCopy() {
9609
      return new addBillingDetails_result(this);
9610
    }
9611
 
9612
    @Deprecated
9613
    public addBillingDetails_result clone() {
9614
      return new addBillingDetails_result(this);
9615
    }
9616
 
9617
    public boolean isSuccess() {
9618
      return this.success;
9619
    }
9620
 
9621
    public addBillingDetails_result setSuccess(boolean success) {
9622
      this.success = success;
9623
      setSuccessIsSet(true);
9624
      return this;
9625
    }
9626
 
9627
    public void unsetSuccess() {
9628
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9629
    }
9630
 
9631
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9632
    public boolean isSetSuccess() {
9633
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9634
    }
9635
 
9636
    public void setSuccessIsSet(boolean value) {
9637
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9638
    }
9639
 
9640
    public TransactionServiceException getEx() {
9641
      return this.ex;
9642
    }
9643
 
9644
    public addBillingDetails_result setEx(TransactionServiceException ex) {
9645
      this.ex = ex;
9646
      return this;
9647
    }
9648
 
9649
    public void unsetEx() {
9650
      this.ex = null;
9651
    }
9652
 
9653
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9654
    public boolean isSetEx() {
9655
      return this.ex != null;
9656
    }
9657
 
9658
    public void setExIsSet(boolean value) {
9659
      if (!value) {
9660
        this.ex = null;
9661
      }
9662
    }
9663
 
9664
    public void setFieldValue(_Fields field, Object value) {
9665
      switch (field) {
9666
      case SUCCESS:
9667
        if (value == null) {
9668
          unsetSuccess();
9669
        } else {
9670
          setSuccess((Boolean)value);
9671
        }
9672
        break;
9673
 
9674
      case EX:
9675
        if (value == null) {
9676
          unsetEx();
9677
        } else {
9678
          setEx((TransactionServiceException)value);
9679
        }
9680
        break;
9681
 
9682
      }
9683
    }
9684
 
9685
    public void setFieldValue(int fieldID, Object value) {
9686
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9687
    }
9688
 
9689
    public Object getFieldValue(_Fields field) {
9690
      switch (field) {
9691
      case SUCCESS:
9692
        return new Boolean(isSuccess());
9693
 
9694
      case EX:
9695
        return getEx();
9696
 
9697
      }
9698
      throw new IllegalStateException();
9699
    }
9700
 
9701
    public Object getFieldValue(int fieldId) {
9702
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9703
    }
9704
 
9705
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9706
    public boolean isSet(_Fields field) {
9707
      switch (field) {
9708
      case SUCCESS:
9709
        return isSetSuccess();
9710
      case EX:
9711
        return isSetEx();
9712
      }
9713
      throw new IllegalStateException();
9714
    }
9715
 
9716
    public boolean isSet(int fieldID) {
9717
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9718
    }
9719
 
9720
    @Override
9721
    public boolean equals(Object that) {
9722
      if (that == null)
9723
        return false;
9724
      if (that instanceof addBillingDetails_result)
9725
        return this.equals((addBillingDetails_result)that);
9726
      return false;
9727
    }
9728
 
9729
    public boolean equals(addBillingDetails_result that) {
9730
      if (that == null)
9731
        return false;
9732
 
9733
      boolean this_present_success = true;
9734
      boolean that_present_success = true;
9735
      if (this_present_success || that_present_success) {
9736
        if (!(this_present_success && that_present_success))
9737
          return false;
9738
        if (this.success != that.success)
9739
          return false;
9740
      }
9741
 
9742
      boolean this_present_ex = true && this.isSetEx();
9743
      boolean that_present_ex = true && that.isSetEx();
9744
      if (this_present_ex || that_present_ex) {
9745
        if (!(this_present_ex && that_present_ex))
9746
          return false;
9747
        if (!this.ex.equals(that.ex))
9748
          return false;
9749
      }
9750
 
9751
      return true;
9752
    }
9753
 
9754
    @Override
9755
    public int hashCode() {
9756
      return 0;
9757
    }
9758
 
9759
    public int compareTo(addBillingDetails_result other) {
9760
      if (!getClass().equals(other.getClass())) {
9761
        return getClass().getName().compareTo(other.getClass().getName());
9762
      }
9763
 
9764
      int lastComparison = 0;
9765
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
9766
 
9767
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9768
      if (lastComparison != 0) {
9769
        return lastComparison;
9770
      }
9771
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9772
      if (lastComparison != 0) {
9773
        return lastComparison;
9774
      }
9775
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9776
      if (lastComparison != 0) {
9777
        return lastComparison;
9778
      }
9779
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9780
      if (lastComparison != 0) {
9781
        return lastComparison;
9782
      }
9783
      return 0;
9784
    }
9785
 
9786
    public void read(TProtocol iprot) throws TException {
9787
      TField field;
9788
      iprot.readStructBegin();
9789
      while (true)
9790
      {
9791
        field = iprot.readFieldBegin();
9792
        if (field.type == TType.STOP) { 
9793
          break;
9794
        }
9795
        _Fields fieldId = _Fields.findByThriftId(field.id);
9796
        if (fieldId == null) {
9797
          TProtocolUtil.skip(iprot, field.type);
9798
        } else {
9799
          switch (fieldId) {
9800
            case SUCCESS:
9801
              if (field.type == TType.BOOL) {
9802
                this.success = iprot.readBool();
9803
                setSuccessIsSet(true);
9804
              } else { 
9805
                TProtocolUtil.skip(iprot, field.type);
9806
              }
9807
              break;
9808
            case EX:
9809
              if (field.type == TType.STRUCT) {
9810
                this.ex = new TransactionServiceException();
9811
                this.ex.read(iprot);
9812
              } else { 
9813
                TProtocolUtil.skip(iprot, field.type);
9814
              }
9815
              break;
9816
          }
9817
          iprot.readFieldEnd();
9818
        }
9819
      }
9820
      iprot.readStructEnd();
9821
      validate();
9822
    }
9823
 
9824
    public void write(TProtocol oprot) throws TException {
9825
      oprot.writeStructBegin(STRUCT_DESC);
9826
 
9827
      if (this.isSetSuccess()) {
9828
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9829
        oprot.writeBool(this.success);
9830
        oprot.writeFieldEnd();
9831
      } else if (this.isSetEx()) {
9832
        oprot.writeFieldBegin(EX_FIELD_DESC);
9833
        this.ex.write(oprot);
9834
        oprot.writeFieldEnd();
9835
      }
9836
      oprot.writeFieldStop();
9837
      oprot.writeStructEnd();
9838
    }
9839
 
9840
    @Override
9841
    public String toString() {
9842
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
9843
      boolean first = true;
9844
 
9845
      sb.append("success:");
9846
      sb.append(this.success);
9847
      first = false;
9848
      if (!first) sb.append(", ");
9849
      sb.append("ex:");
9850
      if (this.ex == null) {
9851
        sb.append("null");
9852
      } else {
9853
        sb.append(this.ex);
9854
      }
9855
      first = false;
9856
      sb.append(")");
9857
      return sb.toString();
9858
    }
9859
 
9860
    public void validate() throws TException {
9861
      // check for required fields
9862
    }
9863
 
9864
  }
9865
 
923 rajveer 9866
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
9867
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
9868
 
9869
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9870
 
9871
    private long orderId;
9872
 
9873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9874
    public enum _Fields implements TFieldIdEnum {
9875
      ORDER_ID((short)1, "orderId");
9876
 
9877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9879
 
9880
      static {
9881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9882
          byId.put((int)field._thriftId, field);
9883
          byName.put(field.getFieldName(), field);
9884
        }
9885
      }
9886
 
9887
      /**
9888
       * Find the _Fields constant that matches fieldId, or null if its not found.
9889
       */
9890
      public static _Fields findByThriftId(int fieldId) {
9891
        return byId.get(fieldId);
9892
      }
9893
 
9894
      /**
9895
       * Find the _Fields constant that matches fieldId, throwing an exception
9896
       * if it is not found.
9897
       */
9898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9899
        _Fields fields = findByThriftId(fieldId);
9900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9901
        return fields;
9902
      }
9903
 
9904
      /**
9905
       * Find the _Fields constant that matches name, or null if its not found.
9906
       */
9907
      public static _Fields findByName(String name) {
9908
        return byName.get(name);
9909
      }
9910
 
9911
      private final short _thriftId;
9912
      private final String _fieldName;
9913
 
9914
      _Fields(short thriftId, String fieldName) {
9915
        _thriftId = thriftId;
9916
        _fieldName = fieldName;
9917
      }
9918
 
9919
      public short getThriftFieldId() {
9920
        return _thriftId;
9921
      }
9922
 
9923
      public String getFieldName() {
9924
        return _fieldName;
9925
      }
9926
    }
9927
 
9928
    // isset id assignments
9929
    private static final int __ORDERID_ISSET_ID = 0;
9930
    private BitSet __isset_bit_vector = new BitSet(1);
9931
 
9932
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9933
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9934
          new FieldValueMetaData(TType.I64)));
9935
    }});
9936
 
9937
    static {
9938
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
9939
    }
9940
 
9941
    public acceptOrder_args() {
9942
    }
9943
 
9944
    public acceptOrder_args(
9945
      long orderId)
9946
    {
9947
      this();
9948
      this.orderId = orderId;
9949
      setOrderIdIsSet(true);
9950
    }
9951
 
9952
    /**
9953
     * Performs a deep copy on <i>other</i>.
9954
     */
9955
    public acceptOrder_args(acceptOrder_args other) {
9956
      __isset_bit_vector.clear();
9957
      __isset_bit_vector.or(other.__isset_bit_vector);
9958
      this.orderId = other.orderId;
9959
    }
9960
 
9961
    public acceptOrder_args deepCopy() {
9962
      return new acceptOrder_args(this);
9963
    }
9964
 
9965
    @Deprecated
9966
    public acceptOrder_args clone() {
9967
      return new acceptOrder_args(this);
9968
    }
9969
 
9970
    public long getOrderId() {
9971
      return this.orderId;
9972
    }
9973
 
9974
    public acceptOrder_args setOrderId(long orderId) {
9975
      this.orderId = orderId;
9976
      setOrderIdIsSet(true);
9977
      return this;
9978
    }
9979
 
9980
    public void unsetOrderId() {
9981
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9982
    }
9983
 
9984
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9985
    public boolean isSetOrderId() {
9986
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9987
    }
9988
 
9989
    public void setOrderIdIsSet(boolean value) {
9990
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9991
    }
9992
 
9993
    public void setFieldValue(_Fields field, Object value) {
9994
      switch (field) {
9995
      case ORDER_ID:
9996
        if (value == null) {
9997
          unsetOrderId();
9998
        } else {
9999
          setOrderId((Long)value);
10000
        }
10001
        break;
10002
 
10003
      }
10004
    }
10005
 
10006
    public void setFieldValue(int fieldID, Object value) {
10007
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10008
    }
10009
 
10010
    public Object getFieldValue(_Fields field) {
10011
      switch (field) {
10012
      case ORDER_ID:
10013
        return new Long(getOrderId());
10014
 
10015
      }
10016
      throw new IllegalStateException();
10017
    }
10018
 
10019
    public Object getFieldValue(int fieldId) {
10020
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10021
    }
10022
 
10023
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10024
    public boolean isSet(_Fields field) {
10025
      switch (field) {
10026
      case ORDER_ID:
10027
        return isSetOrderId();
10028
      }
10029
      throw new IllegalStateException();
10030
    }
10031
 
10032
    public boolean isSet(int fieldID) {
10033
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10034
    }
10035
 
10036
    @Override
10037
    public boolean equals(Object that) {
10038
      if (that == null)
10039
        return false;
10040
      if (that instanceof acceptOrder_args)
10041
        return this.equals((acceptOrder_args)that);
10042
      return false;
10043
    }
10044
 
10045
    public boolean equals(acceptOrder_args that) {
10046
      if (that == null)
10047
        return false;
10048
 
10049
      boolean this_present_orderId = true;
10050
      boolean that_present_orderId = true;
10051
      if (this_present_orderId || that_present_orderId) {
10052
        if (!(this_present_orderId && that_present_orderId))
10053
          return false;
10054
        if (this.orderId != that.orderId)
10055
          return false;
10056
      }
10057
 
10058
      return true;
10059
    }
10060
 
10061
    @Override
10062
    public int hashCode() {
10063
      return 0;
10064
    }
10065
 
10066
    public int compareTo(acceptOrder_args other) {
10067
      if (!getClass().equals(other.getClass())) {
10068
        return getClass().getName().compareTo(other.getClass().getName());
10069
      }
10070
 
10071
      int lastComparison = 0;
10072
      acceptOrder_args typedOther = (acceptOrder_args)other;
10073
 
10074
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10075
      if (lastComparison != 0) {
10076
        return lastComparison;
10077
      }
10078
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10079
      if (lastComparison != 0) {
10080
        return lastComparison;
10081
      }
10082
      return 0;
10083
    }
10084
 
10085
    public void read(TProtocol iprot) throws TException {
10086
      TField field;
10087
      iprot.readStructBegin();
10088
      while (true)
10089
      {
10090
        field = iprot.readFieldBegin();
10091
        if (field.type == TType.STOP) { 
10092
          break;
10093
        }
10094
        _Fields fieldId = _Fields.findByThriftId(field.id);
10095
        if (fieldId == null) {
10096
          TProtocolUtil.skip(iprot, field.type);
10097
        } else {
10098
          switch (fieldId) {
10099
            case ORDER_ID:
10100
              if (field.type == TType.I64) {
10101
                this.orderId = iprot.readI64();
10102
                setOrderIdIsSet(true);
10103
              } else { 
10104
                TProtocolUtil.skip(iprot, field.type);
10105
              }
10106
              break;
10107
          }
10108
          iprot.readFieldEnd();
10109
        }
10110
      }
10111
      iprot.readStructEnd();
10112
      validate();
10113
    }
10114
 
10115
    public void write(TProtocol oprot) throws TException {
10116
      validate();
10117
 
10118
      oprot.writeStructBegin(STRUCT_DESC);
10119
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10120
      oprot.writeI64(this.orderId);
10121
      oprot.writeFieldEnd();
10122
      oprot.writeFieldStop();
10123
      oprot.writeStructEnd();
10124
    }
10125
 
10126
    @Override
10127
    public String toString() {
10128
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
10129
      boolean first = true;
10130
 
10131
      sb.append("orderId:");
10132
      sb.append(this.orderId);
10133
      first = false;
10134
      sb.append(")");
10135
      return sb.toString();
10136
    }
10137
 
10138
    public void validate() throws TException {
10139
      // check for required fields
10140
    }
10141
 
10142
  }
10143
 
10144
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
10145
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
10146
 
10147
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10148
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10149
 
10150
    private boolean success;
10151
    private TransactionServiceException ex;
10152
 
10153
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10154
    public enum _Fields implements TFieldIdEnum {
10155
      SUCCESS((short)0, "success"),
10156
      EX((short)1, "ex");
10157
 
10158
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10159
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10160
 
10161
      static {
10162
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10163
          byId.put((int)field._thriftId, field);
10164
          byName.put(field.getFieldName(), field);
10165
        }
10166
      }
10167
 
10168
      /**
10169
       * Find the _Fields constant that matches fieldId, or null if its not found.
10170
       */
10171
      public static _Fields findByThriftId(int fieldId) {
10172
        return byId.get(fieldId);
10173
      }
10174
 
10175
      /**
10176
       * Find the _Fields constant that matches fieldId, throwing an exception
10177
       * if it is not found.
10178
       */
10179
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10180
        _Fields fields = findByThriftId(fieldId);
10181
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10182
        return fields;
10183
      }
10184
 
10185
      /**
10186
       * Find the _Fields constant that matches name, or null if its not found.
10187
       */
10188
      public static _Fields findByName(String name) {
10189
        return byName.get(name);
10190
      }
10191
 
10192
      private final short _thriftId;
10193
      private final String _fieldName;
10194
 
10195
      _Fields(short thriftId, String fieldName) {
10196
        _thriftId = thriftId;
10197
        _fieldName = fieldName;
10198
      }
10199
 
10200
      public short getThriftFieldId() {
10201
        return _thriftId;
10202
      }
10203
 
10204
      public String getFieldName() {
10205
        return _fieldName;
10206
      }
10207
    }
10208
 
10209
    // isset id assignments
10210
    private static final int __SUCCESS_ISSET_ID = 0;
10211
    private BitSet __isset_bit_vector = new BitSet(1);
10212
 
10213
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10214
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10215
          new FieldValueMetaData(TType.BOOL)));
10216
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10217
          new FieldValueMetaData(TType.STRUCT)));
10218
    }});
10219
 
10220
    static {
10221
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
10222
    }
10223
 
10224
    public acceptOrder_result() {
10225
    }
10226
 
10227
    public acceptOrder_result(
10228
      boolean success,
10229
      TransactionServiceException ex)
10230
    {
10231
      this();
10232
      this.success = success;
10233
      setSuccessIsSet(true);
10234
      this.ex = ex;
10235
    }
10236
 
10237
    /**
10238
     * Performs a deep copy on <i>other</i>.
10239
     */
10240
    public acceptOrder_result(acceptOrder_result other) {
10241
      __isset_bit_vector.clear();
10242
      __isset_bit_vector.or(other.__isset_bit_vector);
10243
      this.success = other.success;
10244
      if (other.isSetEx()) {
10245
        this.ex = new TransactionServiceException(other.ex);
10246
      }
10247
    }
10248
 
10249
    public acceptOrder_result deepCopy() {
10250
      return new acceptOrder_result(this);
10251
    }
10252
 
10253
    @Deprecated
10254
    public acceptOrder_result clone() {
10255
      return new acceptOrder_result(this);
10256
    }
10257
 
10258
    public boolean isSuccess() {
10259
      return this.success;
10260
    }
10261
 
10262
    public acceptOrder_result setSuccess(boolean success) {
10263
      this.success = success;
10264
      setSuccessIsSet(true);
10265
      return this;
10266
    }
10267
 
10268
    public void unsetSuccess() {
10269
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10270
    }
10271
 
10272
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10273
    public boolean isSetSuccess() {
10274
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10275
    }
10276
 
10277
    public void setSuccessIsSet(boolean value) {
10278
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10279
    }
10280
 
10281
    public TransactionServiceException getEx() {
10282
      return this.ex;
10283
    }
10284
 
10285
    public acceptOrder_result setEx(TransactionServiceException ex) {
10286
      this.ex = ex;
10287
      return this;
10288
    }
10289
 
10290
    public void unsetEx() {
10291
      this.ex = null;
10292
    }
10293
 
10294
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10295
    public boolean isSetEx() {
10296
      return this.ex != null;
10297
    }
10298
 
10299
    public void setExIsSet(boolean value) {
10300
      if (!value) {
10301
        this.ex = null;
10302
      }
10303
    }
10304
 
10305
    public void setFieldValue(_Fields field, Object value) {
10306
      switch (field) {
10307
      case SUCCESS:
10308
        if (value == null) {
10309
          unsetSuccess();
10310
        } else {
10311
          setSuccess((Boolean)value);
10312
        }
10313
        break;
10314
 
10315
      case EX:
10316
        if (value == null) {
10317
          unsetEx();
10318
        } else {
10319
          setEx((TransactionServiceException)value);
10320
        }
10321
        break;
10322
 
10323
      }
10324
    }
10325
 
10326
    public void setFieldValue(int fieldID, Object value) {
10327
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10328
    }
10329
 
10330
    public Object getFieldValue(_Fields field) {
10331
      switch (field) {
10332
      case SUCCESS:
10333
        return new Boolean(isSuccess());
10334
 
10335
      case EX:
10336
        return getEx();
10337
 
10338
      }
10339
      throw new IllegalStateException();
10340
    }
10341
 
10342
    public Object getFieldValue(int fieldId) {
10343
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10344
    }
10345
 
10346
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10347
    public boolean isSet(_Fields field) {
10348
      switch (field) {
10349
      case SUCCESS:
10350
        return isSetSuccess();
10351
      case EX:
10352
        return isSetEx();
10353
      }
10354
      throw new IllegalStateException();
10355
    }
10356
 
10357
    public boolean isSet(int fieldID) {
10358
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10359
    }
10360
 
10361
    @Override
10362
    public boolean equals(Object that) {
10363
      if (that == null)
10364
        return false;
10365
      if (that instanceof acceptOrder_result)
10366
        return this.equals((acceptOrder_result)that);
10367
      return false;
10368
    }
10369
 
10370
    public boolean equals(acceptOrder_result that) {
10371
      if (that == null)
10372
        return false;
10373
 
10374
      boolean this_present_success = true;
10375
      boolean that_present_success = true;
10376
      if (this_present_success || that_present_success) {
10377
        if (!(this_present_success && that_present_success))
10378
          return false;
10379
        if (this.success != that.success)
10380
          return false;
10381
      }
10382
 
10383
      boolean this_present_ex = true && this.isSetEx();
10384
      boolean that_present_ex = true && that.isSetEx();
10385
      if (this_present_ex || that_present_ex) {
10386
        if (!(this_present_ex && that_present_ex))
10387
          return false;
10388
        if (!this.ex.equals(that.ex))
10389
          return false;
10390
      }
10391
 
10392
      return true;
10393
    }
10394
 
10395
    @Override
10396
    public int hashCode() {
10397
      return 0;
10398
    }
10399
 
10400
    public int compareTo(acceptOrder_result other) {
10401
      if (!getClass().equals(other.getClass())) {
10402
        return getClass().getName().compareTo(other.getClass().getName());
10403
      }
10404
 
10405
      int lastComparison = 0;
10406
      acceptOrder_result typedOther = (acceptOrder_result)other;
10407
 
10408
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10409
      if (lastComparison != 0) {
10410
        return lastComparison;
10411
      }
10412
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10413
      if (lastComparison != 0) {
10414
        return lastComparison;
10415
      }
10416
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10417
      if (lastComparison != 0) {
10418
        return lastComparison;
10419
      }
10420
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10421
      if (lastComparison != 0) {
10422
        return lastComparison;
10423
      }
10424
      return 0;
10425
    }
10426
 
10427
    public void read(TProtocol iprot) throws TException {
10428
      TField field;
10429
      iprot.readStructBegin();
10430
      while (true)
10431
      {
10432
        field = iprot.readFieldBegin();
10433
        if (field.type == TType.STOP) { 
10434
          break;
10435
        }
10436
        _Fields fieldId = _Fields.findByThriftId(field.id);
10437
        if (fieldId == null) {
10438
          TProtocolUtil.skip(iprot, field.type);
10439
        } else {
10440
          switch (fieldId) {
10441
            case SUCCESS:
10442
              if (field.type == TType.BOOL) {
10443
                this.success = iprot.readBool();
10444
                setSuccessIsSet(true);
10445
              } else { 
10446
                TProtocolUtil.skip(iprot, field.type);
10447
              }
10448
              break;
10449
            case EX:
10450
              if (field.type == TType.STRUCT) {
10451
                this.ex = new TransactionServiceException();
10452
                this.ex.read(iprot);
10453
              } else { 
10454
                TProtocolUtil.skip(iprot, field.type);
10455
              }
10456
              break;
10457
          }
10458
          iprot.readFieldEnd();
10459
        }
10460
      }
10461
      iprot.readStructEnd();
10462
      validate();
10463
    }
10464
 
10465
    public void write(TProtocol oprot) throws TException {
10466
      oprot.writeStructBegin(STRUCT_DESC);
10467
 
10468
      if (this.isSetSuccess()) {
10469
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10470
        oprot.writeBool(this.success);
10471
        oprot.writeFieldEnd();
10472
      } else if (this.isSetEx()) {
10473
        oprot.writeFieldBegin(EX_FIELD_DESC);
10474
        this.ex.write(oprot);
10475
        oprot.writeFieldEnd();
10476
      }
10477
      oprot.writeFieldStop();
10478
      oprot.writeStructEnd();
10479
    }
10480
 
10481
    @Override
10482
    public String toString() {
10483
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
10484
      boolean first = true;
10485
 
10486
      sb.append("success:");
10487
      sb.append(this.success);
10488
      first = false;
10489
      if (!first) sb.append(", ");
10490
      sb.append("ex:");
10491
      if (this.ex == null) {
10492
        sb.append("null");
10493
      } else {
10494
        sb.append(this.ex);
10495
      }
10496
      first = false;
10497
      sb.append(")");
10498
      return sb.toString();
10499
    }
10500
 
10501
    public void validate() throws TException {
10502
      // check for required fields
10503
    }
10504
 
10505
  }
10506
 
10507
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
10508
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
10509
 
10510
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10511
 
10512
    private long orderId;
10513
 
10514
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10515
    public enum _Fields implements TFieldIdEnum {
10516
      ORDER_ID((short)1, "orderId");
10517
 
10518
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10519
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10520
 
10521
      static {
10522
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10523
          byId.put((int)field._thriftId, field);
10524
          byName.put(field.getFieldName(), field);
10525
        }
10526
      }
10527
 
10528
      /**
10529
       * Find the _Fields constant that matches fieldId, or null if its not found.
10530
       */
10531
      public static _Fields findByThriftId(int fieldId) {
10532
        return byId.get(fieldId);
10533
      }
10534
 
10535
      /**
10536
       * Find the _Fields constant that matches fieldId, throwing an exception
10537
       * if it is not found.
10538
       */
10539
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10540
        _Fields fields = findByThriftId(fieldId);
10541
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10542
        return fields;
10543
      }
10544
 
10545
      /**
10546
       * Find the _Fields constant that matches name, or null if its not found.
10547
       */
10548
      public static _Fields findByName(String name) {
10549
        return byName.get(name);
10550
      }
10551
 
10552
      private final short _thriftId;
10553
      private final String _fieldName;
10554
 
10555
      _Fields(short thriftId, String fieldName) {
10556
        _thriftId = thriftId;
10557
        _fieldName = fieldName;
10558
      }
10559
 
10560
      public short getThriftFieldId() {
10561
        return _thriftId;
10562
      }
10563
 
10564
      public String getFieldName() {
10565
        return _fieldName;
10566
      }
10567
    }
10568
 
10569
    // isset id assignments
10570
    private static final int __ORDERID_ISSET_ID = 0;
10571
    private BitSet __isset_bit_vector = new BitSet(1);
10572
 
10573
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10574
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10575
          new FieldValueMetaData(TType.I64)));
10576
    }});
10577
 
10578
    static {
10579
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
10580
    }
10581
 
10582
    public billOrder_args() {
10583
    }
10584
 
10585
    public billOrder_args(
10586
      long orderId)
10587
    {
10588
      this();
10589
      this.orderId = orderId;
10590
      setOrderIdIsSet(true);
10591
    }
10592
 
10593
    /**
10594
     * Performs a deep copy on <i>other</i>.
10595
     */
10596
    public billOrder_args(billOrder_args other) {
10597
      __isset_bit_vector.clear();
10598
      __isset_bit_vector.or(other.__isset_bit_vector);
10599
      this.orderId = other.orderId;
10600
    }
10601
 
10602
    public billOrder_args deepCopy() {
10603
      return new billOrder_args(this);
10604
    }
10605
 
10606
    @Deprecated
10607
    public billOrder_args clone() {
10608
      return new billOrder_args(this);
10609
    }
10610
 
10611
    public long getOrderId() {
10612
      return this.orderId;
10613
    }
10614
 
10615
    public billOrder_args setOrderId(long orderId) {
10616
      this.orderId = orderId;
10617
      setOrderIdIsSet(true);
10618
      return this;
10619
    }
10620
 
10621
    public void unsetOrderId() {
10622
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10623
    }
10624
 
10625
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10626
    public boolean isSetOrderId() {
10627
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10628
    }
10629
 
10630
    public void setOrderIdIsSet(boolean value) {
10631
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10632
    }
10633
 
10634
    public void setFieldValue(_Fields field, Object value) {
10635
      switch (field) {
10636
      case ORDER_ID:
10637
        if (value == null) {
10638
          unsetOrderId();
10639
        } else {
10640
          setOrderId((Long)value);
10641
        }
10642
        break;
10643
 
10644
      }
10645
    }
10646
 
10647
    public void setFieldValue(int fieldID, Object value) {
10648
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10649
    }
10650
 
10651
    public Object getFieldValue(_Fields field) {
10652
      switch (field) {
10653
      case ORDER_ID:
10654
        return new Long(getOrderId());
10655
 
10656
      }
10657
      throw new IllegalStateException();
10658
    }
10659
 
10660
    public Object getFieldValue(int fieldId) {
10661
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10662
    }
10663
 
10664
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10665
    public boolean isSet(_Fields field) {
10666
      switch (field) {
10667
      case ORDER_ID:
10668
        return isSetOrderId();
10669
      }
10670
      throw new IllegalStateException();
10671
    }
10672
 
10673
    public boolean isSet(int fieldID) {
10674
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10675
    }
10676
 
10677
    @Override
10678
    public boolean equals(Object that) {
10679
      if (that == null)
10680
        return false;
10681
      if (that instanceof billOrder_args)
10682
        return this.equals((billOrder_args)that);
10683
      return false;
10684
    }
10685
 
10686
    public boolean equals(billOrder_args that) {
10687
      if (that == null)
10688
        return false;
10689
 
10690
      boolean this_present_orderId = true;
10691
      boolean that_present_orderId = true;
10692
      if (this_present_orderId || that_present_orderId) {
10693
        if (!(this_present_orderId && that_present_orderId))
10694
          return false;
10695
        if (this.orderId != that.orderId)
10696
          return false;
10697
      }
10698
 
10699
      return true;
10700
    }
10701
 
10702
    @Override
10703
    public int hashCode() {
10704
      return 0;
10705
    }
10706
 
10707
    public int compareTo(billOrder_args other) {
10708
      if (!getClass().equals(other.getClass())) {
10709
        return getClass().getName().compareTo(other.getClass().getName());
10710
      }
10711
 
10712
      int lastComparison = 0;
10713
      billOrder_args typedOther = (billOrder_args)other;
10714
 
10715
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10716
      if (lastComparison != 0) {
10717
        return lastComparison;
10718
      }
10719
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10720
      if (lastComparison != 0) {
10721
        return lastComparison;
10722
      }
10723
      return 0;
10724
    }
10725
 
10726
    public void read(TProtocol iprot) throws TException {
10727
      TField field;
10728
      iprot.readStructBegin();
10729
      while (true)
10730
      {
10731
        field = iprot.readFieldBegin();
10732
        if (field.type == TType.STOP) { 
10733
          break;
10734
        }
10735
        _Fields fieldId = _Fields.findByThriftId(field.id);
10736
        if (fieldId == null) {
10737
          TProtocolUtil.skip(iprot, field.type);
10738
        } else {
10739
          switch (fieldId) {
10740
            case ORDER_ID:
10741
              if (field.type == TType.I64) {
10742
                this.orderId = iprot.readI64();
10743
                setOrderIdIsSet(true);
10744
              } else { 
10745
                TProtocolUtil.skip(iprot, field.type);
10746
              }
10747
              break;
10748
          }
10749
          iprot.readFieldEnd();
10750
        }
10751
      }
10752
      iprot.readStructEnd();
10753
      validate();
10754
    }
10755
 
10756
    public void write(TProtocol oprot) throws TException {
10757
      validate();
10758
 
10759
      oprot.writeStructBegin(STRUCT_DESC);
10760
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10761
      oprot.writeI64(this.orderId);
10762
      oprot.writeFieldEnd();
10763
      oprot.writeFieldStop();
10764
      oprot.writeStructEnd();
10765
    }
10766
 
10767
    @Override
10768
    public String toString() {
10769
      StringBuilder sb = new StringBuilder("billOrder_args(");
10770
      boolean first = true;
10771
 
10772
      sb.append("orderId:");
10773
      sb.append(this.orderId);
10774
      first = false;
10775
      sb.append(")");
10776
      return sb.toString();
10777
    }
10778
 
10779
    public void validate() throws TException {
10780
      // check for required fields
10781
    }
10782
 
10783
  }
10784
 
10785
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
10786
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
10787
 
10788
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10789
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10790
 
10791
    private boolean success;
10792
    private TransactionServiceException ex;
10793
 
10794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10795
    public enum _Fields implements TFieldIdEnum {
10796
      SUCCESS((short)0, "success"),
10797
      EX((short)1, "ex");
10798
 
10799
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10800
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10801
 
10802
      static {
10803
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10804
          byId.put((int)field._thriftId, field);
10805
          byName.put(field.getFieldName(), field);
10806
        }
10807
      }
10808
 
10809
      /**
10810
       * Find the _Fields constant that matches fieldId, or null if its not found.
10811
       */
10812
      public static _Fields findByThriftId(int fieldId) {
10813
        return byId.get(fieldId);
10814
      }
10815
 
10816
      /**
10817
       * Find the _Fields constant that matches fieldId, throwing an exception
10818
       * if it is not found.
10819
       */
10820
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10821
        _Fields fields = findByThriftId(fieldId);
10822
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10823
        return fields;
10824
      }
10825
 
10826
      /**
10827
       * Find the _Fields constant that matches name, or null if its not found.
10828
       */
10829
      public static _Fields findByName(String name) {
10830
        return byName.get(name);
10831
      }
10832
 
10833
      private final short _thriftId;
10834
      private final String _fieldName;
10835
 
10836
      _Fields(short thriftId, String fieldName) {
10837
        _thriftId = thriftId;
10838
        _fieldName = fieldName;
10839
      }
10840
 
10841
      public short getThriftFieldId() {
10842
        return _thriftId;
10843
      }
10844
 
10845
      public String getFieldName() {
10846
        return _fieldName;
10847
      }
10848
    }
10849
 
10850
    // isset id assignments
10851
    private static final int __SUCCESS_ISSET_ID = 0;
10852
    private BitSet __isset_bit_vector = new BitSet(1);
10853
 
10854
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10855
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10856
          new FieldValueMetaData(TType.BOOL)));
10857
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10858
          new FieldValueMetaData(TType.STRUCT)));
10859
    }});
10860
 
10861
    static {
10862
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
10863
    }
10864
 
10865
    public billOrder_result() {
10866
    }
10867
 
10868
    public billOrder_result(
10869
      boolean success,
10870
      TransactionServiceException ex)
10871
    {
10872
      this();
10873
      this.success = success;
10874
      setSuccessIsSet(true);
10875
      this.ex = ex;
10876
    }
10877
 
10878
    /**
10879
     * Performs a deep copy on <i>other</i>.
10880
     */
10881
    public billOrder_result(billOrder_result other) {
10882
      __isset_bit_vector.clear();
10883
      __isset_bit_vector.or(other.__isset_bit_vector);
10884
      this.success = other.success;
10885
      if (other.isSetEx()) {
10886
        this.ex = new TransactionServiceException(other.ex);
10887
      }
10888
    }
10889
 
10890
    public billOrder_result deepCopy() {
10891
      return new billOrder_result(this);
10892
    }
10893
 
10894
    @Deprecated
10895
    public billOrder_result clone() {
10896
      return new billOrder_result(this);
10897
    }
10898
 
10899
    public boolean isSuccess() {
10900
      return this.success;
10901
    }
10902
 
10903
    public billOrder_result setSuccess(boolean success) {
10904
      this.success = success;
10905
      setSuccessIsSet(true);
10906
      return this;
10907
    }
10908
 
10909
    public void unsetSuccess() {
10910
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10911
    }
10912
 
10913
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10914
    public boolean isSetSuccess() {
10915
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10916
    }
10917
 
10918
    public void setSuccessIsSet(boolean value) {
10919
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10920
    }
10921
 
10922
    public TransactionServiceException getEx() {
10923
      return this.ex;
10924
    }
10925
 
10926
    public billOrder_result setEx(TransactionServiceException ex) {
10927
      this.ex = ex;
10928
      return this;
10929
    }
10930
 
10931
    public void unsetEx() {
10932
      this.ex = null;
10933
    }
10934
 
10935
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10936
    public boolean isSetEx() {
10937
      return this.ex != null;
10938
    }
10939
 
10940
    public void setExIsSet(boolean value) {
10941
      if (!value) {
10942
        this.ex = null;
10943
      }
10944
    }
10945
 
10946
    public void setFieldValue(_Fields field, Object value) {
10947
      switch (field) {
10948
      case SUCCESS:
10949
        if (value == null) {
10950
          unsetSuccess();
10951
        } else {
10952
          setSuccess((Boolean)value);
10953
        }
10954
        break;
10955
 
10956
      case EX:
10957
        if (value == null) {
10958
          unsetEx();
10959
        } else {
10960
          setEx((TransactionServiceException)value);
10961
        }
10962
        break;
10963
 
10964
      }
10965
    }
10966
 
10967
    public void setFieldValue(int fieldID, Object value) {
10968
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10969
    }
10970
 
10971
    public Object getFieldValue(_Fields field) {
10972
      switch (field) {
10973
      case SUCCESS:
10974
        return new Boolean(isSuccess());
10975
 
10976
      case EX:
10977
        return getEx();
10978
 
10979
      }
10980
      throw new IllegalStateException();
10981
    }
10982
 
10983
    public Object getFieldValue(int fieldId) {
10984
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10985
    }
10986
 
10987
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10988
    public boolean isSet(_Fields field) {
10989
      switch (field) {
10990
      case SUCCESS:
10991
        return isSetSuccess();
10992
      case EX:
10993
        return isSetEx();
10994
      }
10995
      throw new IllegalStateException();
10996
    }
10997
 
10998
    public boolean isSet(int fieldID) {
10999
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11000
    }
11001
 
11002
    @Override
11003
    public boolean equals(Object that) {
11004
      if (that == null)
11005
        return false;
11006
      if (that instanceof billOrder_result)
11007
        return this.equals((billOrder_result)that);
11008
      return false;
11009
    }
11010
 
11011
    public boolean equals(billOrder_result that) {
11012
      if (that == null)
11013
        return false;
11014
 
11015
      boolean this_present_success = true;
11016
      boolean that_present_success = true;
11017
      if (this_present_success || that_present_success) {
11018
        if (!(this_present_success && that_present_success))
11019
          return false;
11020
        if (this.success != that.success)
11021
          return false;
11022
      }
11023
 
11024
      boolean this_present_ex = true && this.isSetEx();
11025
      boolean that_present_ex = true && that.isSetEx();
11026
      if (this_present_ex || that_present_ex) {
11027
        if (!(this_present_ex && that_present_ex))
11028
          return false;
11029
        if (!this.ex.equals(that.ex))
11030
          return false;
11031
      }
11032
 
11033
      return true;
11034
    }
11035
 
11036
    @Override
11037
    public int hashCode() {
11038
      return 0;
11039
    }
11040
 
11041
    public int compareTo(billOrder_result other) {
11042
      if (!getClass().equals(other.getClass())) {
11043
        return getClass().getName().compareTo(other.getClass().getName());
11044
      }
11045
 
11046
      int lastComparison = 0;
11047
      billOrder_result typedOther = (billOrder_result)other;
11048
 
11049
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11050
      if (lastComparison != 0) {
11051
        return lastComparison;
11052
      }
11053
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11054
      if (lastComparison != 0) {
11055
        return lastComparison;
11056
      }
11057
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11058
      if (lastComparison != 0) {
11059
        return lastComparison;
11060
      }
11061
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11062
      if (lastComparison != 0) {
11063
        return lastComparison;
11064
      }
11065
      return 0;
11066
    }
11067
 
11068
    public void read(TProtocol iprot) throws TException {
11069
      TField field;
11070
      iprot.readStructBegin();
11071
      while (true)
11072
      {
11073
        field = iprot.readFieldBegin();
11074
        if (field.type == TType.STOP) { 
11075
          break;
11076
        }
11077
        _Fields fieldId = _Fields.findByThriftId(field.id);
11078
        if (fieldId == null) {
11079
          TProtocolUtil.skip(iprot, field.type);
11080
        } else {
11081
          switch (fieldId) {
11082
            case SUCCESS:
11083
              if (field.type == TType.BOOL) {
11084
                this.success = iprot.readBool();
11085
                setSuccessIsSet(true);
11086
              } else { 
11087
                TProtocolUtil.skip(iprot, field.type);
11088
              }
11089
              break;
11090
            case EX:
11091
              if (field.type == TType.STRUCT) {
11092
                this.ex = new TransactionServiceException();
11093
                this.ex.read(iprot);
11094
              } else { 
11095
                TProtocolUtil.skip(iprot, field.type);
11096
              }
11097
              break;
11098
          }
11099
          iprot.readFieldEnd();
11100
        }
11101
      }
11102
      iprot.readStructEnd();
11103
      validate();
11104
    }
11105
 
11106
    public void write(TProtocol oprot) throws TException {
11107
      oprot.writeStructBegin(STRUCT_DESC);
11108
 
11109
      if (this.isSetSuccess()) {
11110
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11111
        oprot.writeBool(this.success);
11112
        oprot.writeFieldEnd();
11113
      } else if (this.isSetEx()) {
11114
        oprot.writeFieldBegin(EX_FIELD_DESC);
11115
        this.ex.write(oprot);
11116
        oprot.writeFieldEnd();
11117
      }
11118
      oprot.writeFieldStop();
11119
      oprot.writeStructEnd();
11120
    }
11121
 
11122
    @Override
11123
    public String toString() {
11124
      StringBuilder sb = new StringBuilder("billOrder_result(");
11125
      boolean first = true;
11126
 
11127
      sb.append("success:");
11128
      sb.append(this.success);
11129
      first = false;
11130
      if (!first) sb.append(", ");
11131
      sb.append("ex:");
11132
      if (this.ex == null) {
11133
        sb.append("null");
11134
      } else {
11135
        sb.append(this.ex);
11136
      }
11137
      first = false;
11138
      sb.append(")");
11139
      return sb.toString();
11140
    }
11141
 
11142
    public void validate() throws TException {
11143
      // check for required fields
11144
    }
11145
 
11146
  }
11147
 
483 rajveer 11148
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
11149
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 11150
 
11151
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
11152
 
11153
    private long transactionId;
11154
 
11155
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11156
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11157
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 11158
 
11159
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11160
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11161
 
11162
      static {
11163
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11164
          byId.put((int)field._thriftId, field);
11165
          byName.put(field.getFieldName(), field);
11166
        }
11167
      }
11168
 
11169
      /**
11170
       * Find the _Fields constant that matches fieldId, or null if its not found.
11171
       */
11172
      public static _Fields findByThriftId(int fieldId) {
11173
        return byId.get(fieldId);
11174
      }
11175
 
11176
      /**
11177
       * Find the _Fields constant that matches fieldId, throwing an exception
11178
       * if it is not found.
11179
       */
11180
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11181
        _Fields fields = findByThriftId(fieldId);
11182
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11183
        return fields;
11184
      }
11185
 
11186
      /**
11187
       * Find the _Fields constant that matches name, or null if its not found.
11188
       */
11189
      public static _Fields findByName(String name) {
11190
        return byName.get(name);
11191
      }
11192
 
11193
      private final short _thriftId;
11194
      private final String _fieldName;
11195
 
11196
      _Fields(short thriftId, String fieldName) {
11197
        _thriftId = thriftId;
11198
        _fieldName = fieldName;
11199
      }
11200
 
11201
      public short getThriftFieldId() {
11202
        return _thriftId;
11203
      }
11204
 
11205
      public String getFieldName() {
11206
        return _fieldName;
11207
      }
11208
    }
11209
 
11210
    // isset id assignments
11211
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 11212
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 11213
 
11214
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11215
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
11216
          new FieldValueMetaData(TType.I64)));
11217
    }});
11218
 
11219
    static {
483 rajveer 11220
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 11221
    }
11222
 
483 rajveer 11223
    public getOrdersForTransaction_args() {
68 ashish 11224
    }
11225
 
483 rajveer 11226
    public getOrdersForTransaction_args(
11227
      long transactionId)
68 ashish 11228
    {
11229
      this();
11230
      this.transactionId = transactionId;
11231
      setTransactionIdIsSet(true);
11232
    }
11233
 
11234
    /**
11235
     * Performs a deep copy on <i>other</i>.
11236
     */
483 rajveer 11237
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 11238
      __isset_bit_vector.clear();
11239
      __isset_bit_vector.or(other.__isset_bit_vector);
11240
      this.transactionId = other.transactionId;
11241
    }
11242
 
483 rajveer 11243
    public getOrdersForTransaction_args deepCopy() {
11244
      return new getOrdersForTransaction_args(this);
68 ashish 11245
    }
11246
 
11247
    @Deprecated
483 rajveer 11248
    public getOrdersForTransaction_args clone() {
11249
      return new getOrdersForTransaction_args(this);
68 ashish 11250
    }
11251
 
11252
    public long getTransactionId() {
11253
      return this.transactionId;
11254
    }
11255
 
483 rajveer 11256
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 11257
      this.transactionId = transactionId;
11258
      setTransactionIdIsSet(true);
11259
      return this;
11260
    }
11261
 
11262
    public void unsetTransactionId() {
11263
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
11264
    }
11265
 
11266
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
11267
    public boolean isSetTransactionId() {
11268
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
11269
    }
11270
 
11271
    public void setTransactionIdIsSet(boolean value) {
11272
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
11273
    }
11274
 
11275
    public void setFieldValue(_Fields field, Object value) {
11276
      switch (field) {
11277
      case TRANSACTION_ID:
11278
        if (value == null) {
11279
          unsetTransactionId();
11280
        } else {
11281
          setTransactionId((Long)value);
11282
        }
11283
        break;
11284
 
11285
      }
11286
    }
11287
 
11288
    public void setFieldValue(int fieldID, Object value) {
11289
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11290
    }
11291
 
11292
    public Object getFieldValue(_Fields field) {
11293
      switch (field) {
11294
      case TRANSACTION_ID:
11295
        return new Long(getTransactionId());
11296
 
11297
      }
11298
      throw new IllegalStateException();
11299
    }
11300
 
11301
    public Object getFieldValue(int fieldId) {
11302
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11303
    }
11304
 
11305
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11306
    public boolean isSet(_Fields field) {
11307
      switch (field) {
11308
      case TRANSACTION_ID:
11309
        return isSetTransactionId();
11310
      }
11311
      throw new IllegalStateException();
11312
    }
11313
 
11314
    public boolean isSet(int fieldID) {
11315
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11316
    }
11317
 
11318
    @Override
11319
    public boolean equals(Object that) {
11320
      if (that == null)
11321
        return false;
483 rajveer 11322
      if (that instanceof getOrdersForTransaction_args)
11323
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 11324
      return false;
11325
    }
11326
 
483 rajveer 11327
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 11328
      if (that == null)
11329
        return false;
11330
 
11331
      boolean this_present_transactionId = true;
11332
      boolean that_present_transactionId = true;
11333
      if (this_present_transactionId || that_present_transactionId) {
11334
        if (!(this_present_transactionId && that_present_transactionId))
11335
          return false;
11336
        if (this.transactionId != that.transactionId)
11337
          return false;
11338
      }
11339
 
11340
      return true;
11341
    }
11342
 
11343
    @Override
11344
    public int hashCode() {
11345
      return 0;
11346
    }
11347
 
483 rajveer 11348
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 11349
      if (!getClass().equals(other.getClass())) {
11350
        return getClass().getName().compareTo(other.getClass().getName());
11351
      }
11352
 
11353
      int lastComparison = 0;
483 rajveer 11354
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 11355
 
11356
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
11357
      if (lastComparison != 0) {
11358
        return lastComparison;
11359
      }
11360
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
11361
      if (lastComparison != 0) {
11362
        return lastComparison;
11363
      }
11364
      return 0;
11365
    }
11366
 
11367
    public void read(TProtocol iprot) throws TException {
11368
      TField field;
11369
      iprot.readStructBegin();
11370
      while (true)
11371
      {
11372
        field = iprot.readFieldBegin();
11373
        if (field.type == TType.STOP) { 
11374
          break;
11375
        }
11376
        _Fields fieldId = _Fields.findByThriftId(field.id);
11377
        if (fieldId == null) {
11378
          TProtocolUtil.skip(iprot, field.type);
11379
        } else {
11380
          switch (fieldId) {
11381
            case TRANSACTION_ID:
11382
              if (field.type == TType.I64) {
11383
                this.transactionId = iprot.readI64();
11384
                setTransactionIdIsSet(true);
11385
              } else { 
11386
                TProtocolUtil.skip(iprot, field.type);
11387
              }
11388
              break;
11389
          }
11390
          iprot.readFieldEnd();
11391
        }
11392
      }
11393
      iprot.readStructEnd();
11394
      validate();
11395
    }
11396
 
11397
    public void write(TProtocol oprot) throws TException {
11398
      validate();
11399
 
11400
      oprot.writeStructBegin(STRUCT_DESC);
11401
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
11402
      oprot.writeI64(this.transactionId);
11403
      oprot.writeFieldEnd();
11404
      oprot.writeFieldStop();
11405
      oprot.writeStructEnd();
11406
    }
11407
 
11408
    @Override
11409
    public String toString() {
483 rajveer 11410
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 11411
      boolean first = true;
11412
 
11413
      sb.append("transactionId:");
11414
      sb.append(this.transactionId);
11415
      first = false;
11416
      sb.append(")");
11417
      return sb.toString();
11418
    }
11419
 
11420
    public void validate() throws TException {
11421
      // check for required fields
11422
    }
11423
 
11424
  }
11425
 
483 rajveer 11426
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
11427
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 11428
 
483 rajveer 11429
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 11430
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11431
 
483 rajveer 11432
    private List<Order> success;
68 ashish 11433
    private TransactionServiceException ex;
11434
 
11435
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11436
    public enum _Fields implements TFieldIdEnum {
11437
      SUCCESS((short)0, "success"),
11438
      EX((short)1, "ex");
11439
 
11440
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11441
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11442
 
11443
      static {
11444
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11445
          byId.put((int)field._thriftId, field);
11446
          byName.put(field.getFieldName(), field);
11447
        }
11448
      }
11449
 
11450
      /**
11451
       * Find the _Fields constant that matches fieldId, or null if its not found.
11452
       */
11453
      public static _Fields findByThriftId(int fieldId) {
11454
        return byId.get(fieldId);
11455
      }
11456
 
11457
      /**
11458
       * Find the _Fields constant that matches fieldId, throwing an exception
11459
       * if it is not found.
11460
       */
11461
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11462
        _Fields fields = findByThriftId(fieldId);
11463
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11464
        return fields;
11465
      }
11466
 
11467
      /**
11468
       * Find the _Fields constant that matches name, or null if its not found.
11469
       */
11470
      public static _Fields findByName(String name) {
11471
        return byName.get(name);
11472
      }
11473
 
11474
      private final short _thriftId;
11475
      private final String _fieldName;
11476
 
11477
      _Fields(short thriftId, String fieldName) {
11478
        _thriftId = thriftId;
11479
        _fieldName = fieldName;
11480
      }
11481
 
11482
      public short getThriftFieldId() {
11483
        return _thriftId;
11484
      }
11485
 
11486
      public String getFieldName() {
11487
        return _fieldName;
11488
      }
11489
    }
11490
 
11491
    // isset id assignments
11492
 
11493
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11494
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 11495
          new ListMetaData(TType.LIST, 
11496
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 11497
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11498
          new FieldValueMetaData(TType.STRUCT)));
11499
    }});
11500
 
11501
    static {
483 rajveer 11502
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 11503
    }
11504
 
483 rajveer 11505
    public getOrdersForTransaction_result() {
68 ashish 11506
    }
11507
 
483 rajveer 11508
    public getOrdersForTransaction_result(
11509
      List<Order> success,
68 ashish 11510
      TransactionServiceException ex)
11511
    {
11512
      this();
11513
      this.success = success;
11514
      this.ex = ex;
11515
    }
11516
 
11517
    /**
11518
     * Performs a deep copy on <i>other</i>.
11519
     */
483 rajveer 11520
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
11521
      if (other.isSetSuccess()) {
11522
        List<Order> __this__success = new ArrayList<Order>();
11523
        for (Order other_element : other.success) {
11524
          __this__success.add(new Order(other_element));
11525
        }
11526
        this.success = __this__success;
11527
      }
68 ashish 11528
      if (other.isSetEx()) {
11529
        this.ex = new TransactionServiceException(other.ex);
11530
      }
11531
    }
11532
 
483 rajveer 11533
    public getOrdersForTransaction_result deepCopy() {
11534
      return new getOrdersForTransaction_result(this);
68 ashish 11535
    }
11536
 
11537
    @Deprecated
483 rajveer 11538
    public getOrdersForTransaction_result clone() {
11539
      return new getOrdersForTransaction_result(this);
68 ashish 11540
    }
11541
 
483 rajveer 11542
    public int getSuccessSize() {
11543
      return (this.success == null) ? 0 : this.success.size();
11544
    }
11545
 
11546
    public java.util.Iterator<Order> getSuccessIterator() {
11547
      return (this.success == null) ? null : this.success.iterator();
11548
    }
11549
 
11550
    public void addToSuccess(Order elem) {
11551
      if (this.success == null) {
11552
        this.success = new ArrayList<Order>();
11553
      }
11554
      this.success.add(elem);
11555
    }
11556
 
11557
    public List<Order> getSuccess() {
68 ashish 11558
      return this.success;
11559
    }
11560
 
483 rajveer 11561
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 11562
      this.success = success;
11563
      return this;
11564
    }
11565
 
11566
    public void unsetSuccess() {
483 rajveer 11567
      this.success = null;
68 ashish 11568
    }
11569
 
11570
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11571
    public boolean isSetSuccess() {
483 rajveer 11572
      return this.success != null;
68 ashish 11573
    }
11574
 
11575
    public void setSuccessIsSet(boolean value) {
483 rajveer 11576
      if (!value) {
11577
        this.success = null;
11578
      }
68 ashish 11579
    }
11580
 
11581
    public TransactionServiceException getEx() {
11582
      return this.ex;
11583
    }
11584
 
483 rajveer 11585
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 11586
      this.ex = ex;
11587
      return this;
11588
    }
11589
 
11590
    public void unsetEx() {
11591
      this.ex = null;
11592
    }
11593
 
11594
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11595
    public boolean isSetEx() {
11596
      return this.ex != null;
11597
    }
11598
 
11599
    public void setExIsSet(boolean value) {
11600
      if (!value) {
11601
        this.ex = null;
11602
      }
11603
    }
11604
 
11605
    public void setFieldValue(_Fields field, Object value) {
11606
      switch (field) {
11607
      case SUCCESS:
11608
        if (value == null) {
11609
          unsetSuccess();
11610
        } else {
483 rajveer 11611
          setSuccess((List<Order>)value);
68 ashish 11612
        }
11613
        break;
11614
 
11615
      case EX:
11616
        if (value == null) {
11617
          unsetEx();
11618
        } else {
11619
          setEx((TransactionServiceException)value);
11620
        }
11621
        break;
11622
 
11623
      }
11624
    }
11625
 
11626
    public void setFieldValue(int fieldID, Object value) {
11627
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11628
    }
11629
 
11630
    public Object getFieldValue(_Fields field) {
11631
      switch (field) {
11632
      case SUCCESS:
483 rajveer 11633
        return getSuccess();
68 ashish 11634
 
11635
      case EX:
11636
        return getEx();
11637
 
11638
      }
11639
      throw new IllegalStateException();
11640
    }
11641
 
11642
    public Object getFieldValue(int fieldId) {
11643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11644
    }
11645
 
11646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11647
    public boolean isSet(_Fields field) {
11648
      switch (field) {
11649
      case SUCCESS:
11650
        return isSetSuccess();
11651
      case EX:
11652
        return isSetEx();
11653
      }
11654
      throw new IllegalStateException();
11655
    }
11656
 
11657
    public boolean isSet(int fieldID) {
11658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11659
    }
11660
 
11661
    @Override
11662
    public boolean equals(Object that) {
11663
      if (that == null)
11664
        return false;
483 rajveer 11665
      if (that instanceof getOrdersForTransaction_result)
11666
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 11667
      return false;
11668
    }
11669
 
483 rajveer 11670
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 11671
      if (that == null)
11672
        return false;
11673
 
483 rajveer 11674
      boolean this_present_success = true && this.isSetSuccess();
11675
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 11676
      if (this_present_success || that_present_success) {
11677
        if (!(this_present_success && that_present_success))
11678
          return false;
483 rajveer 11679
        if (!this.success.equals(that.success))
68 ashish 11680
          return false;
11681
      }
11682
 
11683
      boolean this_present_ex = true && this.isSetEx();
11684
      boolean that_present_ex = true && that.isSetEx();
11685
      if (this_present_ex || that_present_ex) {
11686
        if (!(this_present_ex && that_present_ex))
11687
          return false;
11688
        if (!this.ex.equals(that.ex))
11689
          return false;
11690
      }
11691
 
11692
      return true;
11693
    }
11694
 
11695
    @Override
11696
    public int hashCode() {
11697
      return 0;
11698
    }
11699
 
483 rajveer 11700
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 11701
      if (!getClass().equals(other.getClass())) {
11702
        return getClass().getName().compareTo(other.getClass().getName());
11703
      }
11704
 
11705
      int lastComparison = 0;
483 rajveer 11706
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 11707
 
11708
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11709
      if (lastComparison != 0) {
11710
        return lastComparison;
11711
      }
11712
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11713
      if (lastComparison != 0) {
11714
        return lastComparison;
11715
      }
11716
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11717
      if (lastComparison != 0) {
11718
        return lastComparison;
11719
      }
11720
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11721
      if (lastComparison != 0) {
11722
        return lastComparison;
11723
      }
11724
      return 0;
11725
    }
11726
 
11727
    public void read(TProtocol iprot) throws TException {
11728
      TField field;
11729
      iprot.readStructBegin();
11730
      while (true)
11731
      {
11732
        field = iprot.readFieldBegin();
11733
        if (field.type == TType.STOP) { 
11734
          break;
11735
        }
11736
        _Fields fieldId = _Fields.findByThriftId(field.id);
11737
        if (fieldId == null) {
11738
          TProtocolUtil.skip(iprot, field.type);
11739
        } else {
11740
          switch (fieldId) {
11741
            case SUCCESS:
483 rajveer 11742
              if (field.type == TType.LIST) {
11743
                {
1022 varun.gupt 11744
                  TList _list24 = iprot.readListBegin();
11745
                  this.success = new ArrayList<Order>(_list24.size);
11746
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 11747
                  {
1022 varun.gupt 11748
                    Order _elem26;
11749
                    _elem26 = new Order();
11750
                    _elem26.read(iprot);
11751
                    this.success.add(_elem26);
483 rajveer 11752
                  }
11753
                  iprot.readListEnd();
11754
                }
68 ashish 11755
              } else { 
11756
                TProtocolUtil.skip(iprot, field.type);
11757
              }
11758
              break;
11759
            case EX:
11760
              if (field.type == TType.STRUCT) {
11761
                this.ex = new TransactionServiceException();
11762
                this.ex.read(iprot);
11763
              } else { 
11764
                TProtocolUtil.skip(iprot, field.type);
11765
              }
11766
              break;
11767
          }
11768
          iprot.readFieldEnd();
11769
        }
11770
      }
11771
      iprot.readStructEnd();
11772
      validate();
11773
    }
11774
 
11775
    public void write(TProtocol oprot) throws TException {
11776
      oprot.writeStructBegin(STRUCT_DESC);
11777
 
11778
      if (this.isSetSuccess()) {
11779
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 11780
        {
11781
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 11782
          for (Order _iter27 : this.success)
483 rajveer 11783
          {
1022 varun.gupt 11784
            _iter27.write(oprot);
483 rajveer 11785
          }
11786
          oprot.writeListEnd();
11787
        }
68 ashish 11788
        oprot.writeFieldEnd();
11789
      } else if (this.isSetEx()) {
11790
        oprot.writeFieldBegin(EX_FIELD_DESC);
11791
        this.ex.write(oprot);
11792
        oprot.writeFieldEnd();
11793
      }
11794
      oprot.writeFieldStop();
11795
      oprot.writeStructEnd();
11796
    }
11797
 
11798
    @Override
11799
    public String toString() {
483 rajveer 11800
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 11801
      boolean first = true;
11802
 
11803
      sb.append("success:");
483 rajveer 11804
      if (this.success == null) {
11805
        sb.append("null");
11806
      } else {
11807
        sb.append(this.success);
11808
      }
68 ashish 11809
      first = false;
11810
      if (!first) sb.append(", ");
11811
      sb.append("ex:");
11812
      if (this.ex == null) {
11813
        sb.append("null");
11814
      } else {
11815
        sb.append(this.ex);
11816
      }
11817
      first = false;
11818
      sb.append(")");
11819
      return sb.toString();
11820
    }
11821
 
11822
    public void validate() throws TException {
11823
      // check for required fields
11824
    }
11825
 
11826
  }
11827
 
483 rajveer 11828
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
11829
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 11830
 
483 rajveer 11831
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
11832
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
11833
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
11834
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 11835
 
483 rajveer 11836
    private long customerId;
11837
    private long from_date;
11838
    private long to_date;
11839
    private OrderStatus status;
68 ashish 11840
 
11841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11842
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11843
      CUSTOMER_ID((short)1, "customerId"),
11844
      FROM_DATE((short)2, "from_date"),
11845
      TO_DATE((short)3, "to_date"),
11846
      /**
11847
       * 
11848
       * @see OrderStatus
11849
       */
11850
      STATUS((short)4, "status");
68 ashish 11851
 
11852
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11853
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11854
 
11855
      static {
11856
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11857
          byId.put((int)field._thriftId, field);
11858
          byName.put(field.getFieldName(), field);
11859
        }
11860
      }
11861
 
11862
      /**
11863
       * Find the _Fields constant that matches fieldId, or null if its not found.
11864
       */
11865
      public static _Fields findByThriftId(int fieldId) {
11866
        return byId.get(fieldId);
11867
      }
11868
 
11869
      /**
11870
       * Find the _Fields constant that matches fieldId, throwing an exception
11871
       * if it is not found.
11872
       */
11873
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11874
        _Fields fields = findByThriftId(fieldId);
11875
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11876
        return fields;
11877
      }
11878
 
11879
      /**
11880
       * Find the _Fields constant that matches name, or null if its not found.
11881
       */
11882
      public static _Fields findByName(String name) {
11883
        return byName.get(name);
11884
      }
11885
 
11886
      private final short _thriftId;
11887
      private final String _fieldName;
11888
 
11889
      _Fields(short thriftId, String fieldName) {
11890
        _thriftId = thriftId;
11891
        _fieldName = fieldName;
11892
      }
11893
 
11894
      public short getThriftFieldId() {
11895
        return _thriftId;
11896
      }
11897
 
11898
      public String getFieldName() {
11899
        return _fieldName;
11900
      }
11901
    }
11902
 
11903
    // isset id assignments
483 rajveer 11904
    private static final int __CUSTOMERID_ISSET_ID = 0;
11905
    private static final int __FROM_DATE_ISSET_ID = 1;
11906
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 11907
    private BitSet __isset_bit_vector = new BitSet(3);
11908
 
11909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11910
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 11911
          new FieldValueMetaData(TType.I64)));
483 rajveer 11912
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 11913
          new FieldValueMetaData(TType.I64)));
483 rajveer 11914
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 11915
          new FieldValueMetaData(TType.I64)));
483 rajveer 11916
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11917
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 11918
    }});
11919
 
11920
    static {
483 rajveer 11921
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 11922
    }
11923
 
483 rajveer 11924
    public getOrdersForCustomer_args() {
68 ashish 11925
    }
11926
 
483 rajveer 11927
    public getOrdersForCustomer_args(
11928
      long customerId,
11929
      long from_date,
11930
      long to_date,
11931
      OrderStatus status)
68 ashish 11932
    {
11933
      this();
483 rajveer 11934
      this.customerId = customerId;
11935
      setCustomerIdIsSet(true);
11936
      this.from_date = from_date;
11937
      setFrom_dateIsSet(true);
11938
      this.to_date = to_date;
11939
      setTo_dateIsSet(true);
11940
      this.status = status;
68 ashish 11941
    }
11942
 
11943
    /**
11944
     * Performs a deep copy on <i>other</i>.
11945
     */
483 rajveer 11946
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 11947
      __isset_bit_vector.clear();
11948
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11949
      this.customerId = other.customerId;
11950
      this.from_date = other.from_date;
11951
      this.to_date = other.to_date;
11952
      if (other.isSetStatus()) {
11953
        this.status = other.status;
11954
      }
68 ashish 11955
    }
11956
 
483 rajveer 11957
    public getOrdersForCustomer_args deepCopy() {
11958
      return new getOrdersForCustomer_args(this);
68 ashish 11959
    }
11960
 
11961
    @Deprecated
483 rajveer 11962
    public getOrdersForCustomer_args clone() {
11963
      return new getOrdersForCustomer_args(this);
68 ashish 11964
    }
11965
 
483 rajveer 11966
    public long getCustomerId() {
11967
      return this.customerId;
68 ashish 11968
    }
11969
 
483 rajveer 11970
    public getOrdersForCustomer_args setCustomerId(long customerId) {
11971
      this.customerId = customerId;
11972
      setCustomerIdIsSet(true);
68 ashish 11973
      return this;
11974
    }
11975
 
483 rajveer 11976
    public void unsetCustomerId() {
11977
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 11978
    }
11979
 
483 rajveer 11980
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
11981
    public boolean isSetCustomerId() {
11982
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 11983
    }
11984
 
483 rajveer 11985
    public void setCustomerIdIsSet(boolean value) {
11986
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 11987
    }
11988
 
483 rajveer 11989
    public long getFrom_date() {
11990
      return this.from_date;
68 ashish 11991
    }
11992
 
483 rajveer 11993
    public getOrdersForCustomer_args setFrom_date(long from_date) {
11994
      this.from_date = from_date;
11995
      setFrom_dateIsSet(true);
68 ashish 11996
      return this;
11997
    }
11998
 
483 rajveer 11999
    public void unsetFrom_date() {
12000
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 12001
    }
12002
 
483 rajveer 12003
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
12004
    public boolean isSetFrom_date() {
12005
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 12006
    }
12007
 
483 rajveer 12008
    public void setFrom_dateIsSet(boolean value) {
12009
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 12010
    }
12011
 
483 rajveer 12012
    public long getTo_date() {
12013
      return this.to_date;
68 ashish 12014
    }
12015
 
483 rajveer 12016
    public getOrdersForCustomer_args setTo_date(long to_date) {
12017
      this.to_date = to_date;
12018
      setTo_dateIsSet(true);
68 ashish 12019
      return this;
12020
    }
12021
 
483 rajveer 12022
    public void unsetTo_date() {
12023
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 12024
    }
12025
 
483 rajveer 12026
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
12027
    public boolean isSetTo_date() {
12028
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 12029
    }
12030
 
483 rajveer 12031
    public void setTo_dateIsSet(boolean value) {
12032
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 12033
    }
12034
 
483 rajveer 12035
    /**
12036
     * 
12037
     * @see OrderStatus
12038
     */
12039
    public OrderStatus getStatus() {
12040
      return this.status;
12041
    }
12042
 
12043
    /**
12044
     * 
12045
     * @see OrderStatus
12046
     */
12047
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
12048
      this.status = status;
12049
      return this;
12050
    }
12051
 
12052
    public void unsetStatus() {
12053
      this.status = null;
12054
    }
12055
 
12056
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
12057
    public boolean isSetStatus() {
12058
      return this.status != null;
12059
    }
12060
 
12061
    public void setStatusIsSet(boolean value) {
12062
      if (!value) {
12063
        this.status = null;
12064
      }
12065
    }
12066
 
68 ashish 12067
    public void setFieldValue(_Fields field, Object value) {
12068
      switch (field) {
483 rajveer 12069
      case CUSTOMER_ID:
68 ashish 12070
        if (value == null) {
483 rajveer 12071
          unsetCustomerId();
68 ashish 12072
        } else {
483 rajveer 12073
          setCustomerId((Long)value);
68 ashish 12074
        }
12075
        break;
12076
 
483 rajveer 12077
      case FROM_DATE:
68 ashish 12078
        if (value == null) {
483 rajveer 12079
          unsetFrom_date();
68 ashish 12080
        } else {
483 rajveer 12081
          setFrom_date((Long)value);
68 ashish 12082
        }
12083
        break;
12084
 
483 rajveer 12085
      case TO_DATE:
68 ashish 12086
        if (value == null) {
483 rajveer 12087
          unsetTo_date();
68 ashish 12088
        } else {
483 rajveer 12089
          setTo_date((Long)value);
68 ashish 12090
        }
12091
        break;
12092
 
483 rajveer 12093
      case STATUS:
12094
        if (value == null) {
12095
          unsetStatus();
12096
        } else {
12097
          setStatus((OrderStatus)value);
12098
        }
12099
        break;
12100
 
68 ashish 12101
      }
12102
    }
12103
 
12104
    public void setFieldValue(int fieldID, Object value) {
12105
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12106
    }
12107
 
12108
    public Object getFieldValue(_Fields field) {
12109
      switch (field) {
483 rajveer 12110
      case CUSTOMER_ID:
12111
        return new Long(getCustomerId());
68 ashish 12112
 
483 rajveer 12113
      case FROM_DATE:
12114
        return new Long(getFrom_date());
68 ashish 12115
 
483 rajveer 12116
      case TO_DATE:
12117
        return new Long(getTo_date());
68 ashish 12118
 
483 rajveer 12119
      case STATUS:
12120
        return getStatus();
12121
 
68 ashish 12122
      }
12123
      throw new IllegalStateException();
12124
    }
12125
 
12126
    public Object getFieldValue(int fieldId) {
12127
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12128
    }
12129
 
12130
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12131
    public boolean isSet(_Fields field) {
12132
      switch (field) {
483 rajveer 12133
      case CUSTOMER_ID:
12134
        return isSetCustomerId();
12135
      case FROM_DATE:
12136
        return isSetFrom_date();
12137
      case TO_DATE:
12138
        return isSetTo_date();
12139
      case STATUS:
12140
        return isSetStatus();
68 ashish 12141
      }
12142
      throw new IllegalStateException();
12143
    }
12144
 
12145
    public boolean isSet(int fieldID) {
12146
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12147
    }
12148
 
12149
    @Override
12150
    public boolean equals(Object that) {
12151
      if (that == null)
12152
        return false;
483 rajveer 12153
      if (that instanceof getOrdersForCustomer_args)
12154
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 12155
      return false;
12156
    }
12157
 
483 rajveer 12158
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 12159
      if (that == null)
12160
        return false;
12161
 
483 rajveer 12162
      boolean this_present_customerId = true;
12163
      boolean that_present_customerId = true;
12164
      if (this_present_customerId || that_present_customerId) {
12165
        if (!(this_present_customerId && that_present_customerId))
68 ashish 12166
          return false;
483 rajveer 12167
        if (this.customerId != that.customerId)
68 ashish 12168
          return false;
12169
      }
12170
 
483 rajveer 12171
      boolean this_present_from_date = true;
12172
      boolean that_present_from_date = true;
12173
      if (this_present_from_date || that_present_from_date) {
12174
        if (!(this_present_from_date && that_present_from_date))
68 ashish 12175
          return false;
483 rajveer 12176
        if (this.from_date != that.from_date)
68 ashish 12177
          return false;
12178
      }
12179
 
483 rajveer 12180
      boolean this_present_to_date = true;
12181
      boolean that_present_to_date = true;
12182
      if (this_present_to_date || that_present_to_date) {
12183
        if (!(this_present_to_date && that_present_to_date))
68 ashish 12184
          return false;
483 rajveer 12185
        if (this.to_date != that.to_date)
68 ashish 12186
          return false;
12187
      }
12188
 
483 rajveer 12189
      boolean this_present_status = true && this.isSetStatus();
12190
      boolean that_present_status = true && that.isSetStatus();
12191
      if (this_present_status || that_present_status) {
12192
        if (!(this_present_status && that_present_status))
12193
          return false;
12194
        if (!this.status.equals(that.status))
12195
          return false;
12196
      }
12197
 
68 ashish 12198
      return true;
12199
    }
12200
 
12201
    @Override
12202
    public int hashCode() {
12203
      return 0;
12204
    }
12205
 
483 rajveer 12206
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 12207
      if (!getClass().equals(other.getClass())) {
12208
        return getClass().getName().compareTo(other.getClass().getName());
12209
      }
12210
 
12211
      int lastComparison = 0;
483 rajveer 12212
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 12213
 
483 rajveer 12214
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 12215
      if (lastComparison != 0) {
12216
        return lastComparison;
12217
      }
483 rajveer 12218
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 12219
      if (lastComparison != 0) {
12220
        return lastComparison;
12221
      }
483 rajveer 12222
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 12223
      if (lastComparison != 0) {
12224
        return lastComparison;
12225
      }
483 rajveer 12226
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 12227
      if (lastComparison != 0) {
12228
        return lastComparison;
12229
      }
483 rajveer 12230
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 12231
      if (lastComparison != 0) {
12232
        return lastComparison;
12233
      }
483 rajveer 12234
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 12235
      if (lastComparison != 0) {
12236
        return lastComparison;
12237
      }
483 rajveer 12238
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12239
      if (lastComparison != 0) {
12240
        return lastComparison;
12241
      }
12242
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12243
      if (lastComparison != 0) {
12244
        return lastComparison;
12245
      }
68 ashish 12246
      return 0;
12247
    }
12248
 
12249
    public void read(TProtocol iprot) throws TException {
12250
      TField field;
12251
      iprot.readStructBegin();
12252
      while (true)
12253
      {
12254
        field = iprot.readFieldBegin();
12255
        if (field.type == TType.STOP) { 
12256
          break;
12257
        }
12258
        _Fields fieldId = _Fields.findByThriftId(field.id);
12259
        if (fieldId == null) {
12260
          TProtocolUtil.skip(iprot, field.type);
12261
        } else {
12262
          switch (fieldId) {
483 rajveer 12263
            case CUSTOMER_ID:
68 ashish 12264
              if (field.type == TType.I64) {
483 rajveer 12265
                this.customerId = iprot.readI64();
12266
                setCustomerIdIsSet(true);
68 ashish 12267
              } else { 
12268
                TProtocolUtil.skip(iprot, field.type);
12269
              }
12270
              break;
483 rajveer 12271
            case FROM_DATE:
68 ashish 12272
              if (field.type == TType.I64) {
483 rajveer 12273
                this.from_date = iprot.readI64();
12274
                setFrom_dateIsSet(true);
68 ashish 12275
              } else { 
12276
                TProtocolUtil.skip(iprot, field.type);
12277
              }
12278
              break;
483 rajveer 12279
            case TO_DATE:
68 ashish 12280
              if (field.type == TType.I64) {
483 rajveer 12281
                this.to_date = iprot.readI64();
12282
                setTo_dateIsSet(true);
68 ashish 12283
              } else { 
12284
                TProtocolUtil.skip(iprot, field.type);
12285
              }
12286
              break;
483 rajveer 12287
            case STATUS:
12288
              if (field.type == TType.I32) {
12289
                this.status = OrderStatus.findByValue(iprot.readI32());
12290
              } else { 
12291
                TProtocolUtil.skip(iprot, field.type);
12292
              }
12293
              break;
68 ashish 12294
          }
12295
          iprot.readFieldEnd();
12296
        }
12297
      }
12298
      iprot.readStructEnd();
12299
      validate();
12300
    }
12301
 
12302
    public void write(TProtocol oprot) throws TException {
12303
      validate();
12304
 
12305
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12306
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
12307
      oprot.writeI64(this.customerId);
68 ashish 12308
      oprot.writeFieldEnd();
483 rajveer 12309
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
12310
      oprot.writeI64(this.from_date);
68 ashish 12311
      oprot.writeFieldEnd();
483 rajveer 12312
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
12313
      oprot.writeI64(this.to_date);
68 ashish 12314
      oprot.writeFieldEnd();
483 rajveer 12315
      if (this.status != null) {
12316
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12317
        oprot.writeI32(this.status.getValue());
12318
        oprot.writeFieldEnd();
12319
      }
68 ashish 12320
      oprot.writeFieldStop();
12321
      oprot.writeStructEnd();
12322
    }
12323
 
12324
    @Override
12325
    public String toString() {
483 rajveer 12326
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 12327
      boolean first = true;
12328
 
483 rajveer 12329
      sb.append("customerId:");
12330
      sb.append(this.customerId);
68 ashish 12331
      first = false;
12332
      if (!first) sb.append(", ");
483 rajveer 12333
      sb.append("from_date:");
12334
      sb.append(this.from_date);
68 ashish 12335
      first = false;
12336
      if (!first) sb.append(", ");
483 rajveer 12337
      sb.append("to_date:");
12338
      sb.append(this.to_date);
68 ashish 12339
      first = false;
483 rajveer 12340
      if (!first) sb.append(", ");
12341
      sb.append("status:");
12342
      if (this.status == null) {
12343
        sb.append("null");
12344
      } else {
12345
        String status_name = status.name();
12346
        if (status_name != null) {
12347
          sb.append(status_name);
12348
          sb.append(" (");
12349
        }
12350
        sb.append(this.status);
12351
        if (status_name != null) {
12352
          sb.append(")");
12353
        }
12354
      }
12355
      first = false;
68 ashish 12356
      sb.append(")");
12357
      return sb.toString();
12358
    }
12359
 
12360
    public void validate() throws TException {
12361
      // check for required fields
12362
    }
12363
 
12364
  }
12365
 
483 rajveer 12366
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
12367
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 12368
 
483 rajveer 12369
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12370
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12371
 
483 rajveer 12372
    private List<Order> success;
68 ashish 12373
    private TransactionServiceException ex;
12374
 
12375
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12376
    public enum _Fields implements TFieldIdEnum {
12377
      SUCCESS((short)0, "success"),
12378
      EX((short)1, "ex");
12379
 
12380
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12381
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12382
 
12383
      static {
12384
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12385
          byId.put((int)field._thriftId, field);
12386
          byName.put(field.getFieldName(), field);
12387
        }
12388
      }
12389
 
12390
      /**
12391
       * Find the _Fields constant that matches fieldId, or null if its not found.
12392
       */
12393
      public static _Fields findByThriftId(int fieldId) {
12394
        return byId.get(fieldId);
12395
      }
12396
 
12397
      /**
12398
       * Find the _Fields constant that matches fieldId, throwing an exception
12399
       * if it is not found.
12400
       */
12401
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12402
        _Fields fields = findByThriftId(fieldId);
12403
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12404
        return fields;
12405
      }
12406
 
12407
      /**
12408
       * Find the _Fields constant that matches name, or null if its not found.
12409
       */
12410
      public static _Fields findByName(String name) {
12411
        return byName.get(name);
12412
      }
12413
 
12414
      private final short _thriftId;
12415
      private final String _fieldName;
12416
 
12417
      _Fields(short thriftId, String fieldName) {
12418
        _thriftId = thriftId;
12419
        _fieldName = fieldName;
12420
      }
12421
 
12422
      public short getThriftFieldId() {
12423
        return _thriftId;
12424
      }
12425
 
12426
      public String getFieldName() {
12427
        return _fieldName;
12428
      }
12429
    }
12430
 
12431
    // isset id assignments
12432
 
12433
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12434
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12435
          new ListMetaData(TType.LIST, 
12436
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12437
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12438
          new FieldValueMetaData(TType.STRUCT)));
12439
    }});
12440
 
12441
    static {
483 rajveer 12442
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 12443
    }
12444
 
483 rajveer 12445
    public getOrdersForCustomer_result() {
68 ashish 12446
    }
12447
 
483 rajveer 12448
    public getOrdersForCustomer_result(
12449
      List<Order> success,
68 ashish 12450
      TransactionServiceException ex)
12451
    {
12452
      this();
12453
      this.success = success;
12454
      this.ex = ex;
12455
    }
12456
 
12457
    /**
12458
     * Performs a deep copy on <i>other</i>.
12459
     */
483 rajveer 12460
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
12461
      if (other.isSetSuccess()) {
12462
        List<Order> __this__success = new ArrayList<Order>();
12463
        for (Order other_element : other.success) {
12464
          __this__success.add(new Order(other_element));
12465
        }
12466
        this.success = __this__success;
12467
      }
68 ashish 12468
      if (other.isSetEx()) {
12469
        this.ex = new TransactionServiceException(other.ex);
12470
      }
12471
    }
12472
 
483 rajveer 12473
    public getOrdersForCustomer_result deepCopy() {
12474
      return new getOrdersForCustomer_result(this);
68 ashish 12475
    }
12476
 
12477
    @Deprecated
483 rajveer 12478
    public getOrdersForCustomer_result clone() {
12479
      return new getOrdersForCustomer_result(this);
68 ashish 12480
    }
12481
 
483 rajveer 12482
    public int getSuccessSize() {
12483
      return (this.success == null) ? 0 : this.success.size();
12484
    }
12485
 
12486
    public java.util.Iterator<Order> getSuccessIterator() {
12487
      return (this.success == null) ? null : this.success.iterator();
12488
    }
12489
 
12490
    public void addToSuccess(Order elem) {
12491
      if (this.success == null) {
12492
        this.success = new ArrayList<Order>();
12493
      }
12494
      this.success.add(elem);
12495
    }
12496
 
12497
    public List<Order> getSuccess() {
68 ashish 12498
      return this.success;
12499
    }
12500
 
483 rajveer 12501
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 12502
      this.success = success;
12503
      return this;
12504
    }
12505
 
12506
    public void unsetSuccess() {
483 rajveer 12507
      this.success = null;
68 ashish 12508
    }
12509
 
12510
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12511
    public boolean isSetSuccess() {
483 rajveer 12512
      return this.success != null;
68 ashish 12513
    }
12514
 
12515
    public void setSuccessIsSet(boolean value) {
483 rajveer 12516
      if (!value) {
12517
        this.success = null;
12518
      }
68 ashish 12519
    }
12520
 
12521
    public TransactionServiceException getEx() {
12522
      return this.ex;
12523
    }
12524
 
483 rajveer 12525
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 12526
      this.ex = ex;
12527
      return this;
12528
    }
12529
 
12530
    public void unsetEx() {
12531
      this.ex = null;
12532
    }
12533
 
12534
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12535
    public boolean isSetEx() {
12536
      return this.ex != null;
12537
    }
12538
 
12539
    public void setExIsSet(boolean value) {
12540
      if (!value) {
12541
        this.ex = null;
12542
      }
12543
    }
12544
 
12545
    public void setFieldValue(_Fields field, Object value) {
12546
      switch (field) {
12547
      case SUCCESS:
12548
        if (value == null) {
12549
          unsetSuccess();
12550
        } else {
483 rajveer 12551
          setSuccess((List<Order>)value);
68 ashish 12552
        }
12553
        break;
12554
 
12555
      case EX:
12556
        if (value == null) {
12557
          unsetEx();
12558
        } else {
12559
          setEx((TransactionServiceException)value);
12560
        }
12561
        break;
12562
 
12563
      }
12564
    }
12565
 
12566
    public void setFieldValue(int fieldID, Object value) {
12567
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12568
    }
12569
 
12570
    public Object getFieldValue(_Fields field) {
12571
      switch (field) {
12572
      case SUCCESS:
483 rajveer 12573
        return getSuccess();
68 ashish 12574
 
12575
      case EX:
12576
        return getEx();
12577
 
12578
      }
12579
      throw new IllegalStateException();
12580
    }
12581
 
12582
    public Object getFieldValue(int fieldId) {
12583
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12584
    }
12585
 
12586
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12587
    public boolean isSet(_Fields field) {
12588
      switch (field) {
12589
      case SUCCESS:
12590
        return isSetSuccess();
12591
      case EX:
12592
        return isSetEx();
12593
      }
12594
      throw new IllegalStateException();
12595
    }
12596
 
12597
    public boolean isSet(int fieldID) {
12598
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12599
    }
12600
 
12601
    @Override
12602
    public boolean equals(Object that) {
12603
      if (that == null)
12604
        return false;
483 rajveer 12605
      if (that instanceof getOrdersForCustomer_result)
12606
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 12607
      return false;
12608
    }
12609
 
483 rajveer 12610
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 12611
      if (that == null)
12612
        return false;
12613
 
483 rajveer 12614
      boolean this_present_success = true && this.isSetSuccess();
12615
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12616
      if (this_present_success || that_present_success) {
12617
        if (!(this_present_success && that_present_success))
12618
          return false;
483 rajveer 12619
        if (!this.success.equals(that.success))
68 ashish 12620
          return false;
12621
      }
12622
 
12623
      boolean this_present_ex = true && this.isSetEx();
12624
      boolean that_present_ex = true && that.isSetEx();
12625
      if (this_present_ex || that_present_ex) {
12626
        if (!(this_present_ex && that_present_ex))
12627
          return false;
12628
        if (!this.ex.equals(that.ex))
12629
          return false;
12630
      }
12631
 
12632
      return true;
12633
    }
12634
 
12635
    @Override
12636
    public int hashCode() {
12637
      return 0;
12638
    }
12639
 
483 rajveer 12640
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 12641
      if (!getClass().equals(other.getClass())) {
12642
        return getClass().getName().compareTo(other.getClass().getName());
12643
      }
12644
 
12645
      int lastComparison = 0;
483 rajveer 12646
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 12647
 
12648
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12649
      if (lastComparison != 0) {
12650
        return lastComparison;
12651
      }
12652
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12653
      if (lastComparison != 0) {
12654
        return lastComparison;
12655
      }
12656
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12657
      if (lastComparison != 0) {
12658
        return lastComparison;
12659
      }
12660
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12661
      if (lastComparison != 0) {
12662
        return lastComparison;
12663
      }
12664
      return 0;
12665
    }
12666
 
12667
    public void read(TProtocol iprot) throws TException {
12668
      TField field;
12669
      iprot.readStructBegin();
12670
      while (true)
12671
      {
12672
        field = iprot.readFieldBegin();
12673
        if (field.type == TType.STOP) { 
12674
          break;
12675
        }
12676
        _Fields fieldId = _Fields.findByThriftId(field.id);
12677
        if (fieldId == null) {
12678
          TProtocolUtil.skip(iprot, field.type);
12679
        } else {
12680
          switch (fieldId) {
12681
            case SUCCESS:
483 rajveer 12682
              if (field.type == TType.LIST) {
12683
                {
1022 varun.gupt 12684
                  TList _list28 = iprot.readListBegin();
12685
                  this.success = new ArrayList<Order>(_list28.size);
12686
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 12687
                  {
1022 varun.gupt 12688
                    Order _elem30;
12689
                    _elem30 = new Order();
12690
                    _elem30.read(iprot);
12691
                    this.success.add(_elem30);
483 rajveer 12692
                  }
12693
                  iprot.readListEnd();
12694
                }
68 ashish 12695
              } else { 
12696
                TProtocolUtil.skip(iprot, field.type);
12697
              }
12698
              break;
12699
            case EX:
12700
              if (field.type == TType.STRUCT) {
12701
                this.ex = new TransactionServiceException();
12702
                this.ex.read(iprot);
12703
              } else { 
12704
                TProtocolUtil.skip(iprot, field.type);
12705
              }
12706
              break;
12707
          }
12708
          iprot.readFieldEnd();
12709
        }
12710
      }
12711
      iprot.readStructEnd();
12712
      validate();
12713
    }
12714
 
12715
    public void write(TProtocol oprot) throws TException {
12716
      oprot.writeStructBegin(STRUCT_DESC);
12717
 
12718
      if (this.isSetSuccess()) {
12719
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12720
        {
12721
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12722
          for (Order _iter31 : this.success)
483 rajveer 12723
          {
1022 varun.gupt 12724
            _iter31.write(oprot);
483 rajveer 12725
          }
12726
          oprot.writeListEnd();
12727
        }
68 ashish 12728
        oprot.writeFieldEnd();
12729
      } else if (this.isSetEx()) {
12730
        oprot.writeFieldBegin(EX_FIELD_DESC);
12731
        this.ex.write(oprot);
12732
        oprot.writeFieldEnd();
12733
      }
12734
      oprot.writeFieldStop();
12735
      oprot.writeStructEnd();
12736
    }
12737
 
12738
    @Override
12739
    public String toString() {
483 rajveer 12740
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 12741
      boolean first = true;
12742
 
12743
      sb.append("success:");
483 rajveer 12744
      if (this.success == null) {
12745
        sb.append("null");
12746
      } else {
12747
        sb.append(this.success);
12748
      }
68 ashish 12749
      first = false;
12750
      if (!first) sb.append(", ");
12751
      sb.append("ex:");
12752
      if (this.ex == null) {
12753
        sb.append("null");
12754
      } else {
12755
        sb.append(this.ex);
12756
      }
12757
      first = false;
12758
      sb.append(")");
12759
      return sb.toString();
12760
    }
12761
 
12762
    public void validate() throws TException {
12763
      // check for required fields
12764
    }
12765
 
12766
  }
12767
 
483 rajveer 12768
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
12769
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 12770
 
483 rajveer 12771
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 12772
 
483 rajveer 12773
    private Order order;
68 ashish 12774
 
12775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12776
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12777
      ORDER((short)1, "order");
68 ashish 12778
 
12779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12781
 
12782
      static {
12783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12784
          byId.put((int)field._thriftId, field);
12785
          byName.put(field.getFieldName(), field);
12786
        }
12787
      }
12788
 
12789
      /**
12790
       * Find the _Fields constant that matches fieldId, or null if its not found.
12791
       */
12792
      public static _Fields findByThriftId(int fieldId) {
12793
        return byId.get(fieldId);
12794
      }
12795
 
12796
      /**
12797
       * Find the _Fields constant that matches fieldId, throwing an exception
12798
       * if it is not found.
12799
       */
12800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12801
        _Fields fields = findByThriftId(fieldId);
12802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12803
        return fields;
12804
      }
12805
 
12806
      /**
12807
       * Find the _Fields constant that matches name, or null if its not found.
12808
       */
12809
      public static _Fields findByName(String name) {
12810
        return byName.get(name);
12811
      }
12812
 
12813
      private final short _thriftId;
12814
      private final String _fieldName;
12815
 
12816
      _Fields(short thriftId, String fieldName) {
12817
        _thriftId = thriftId;
12818
        _fieldName = fieldName;
12819
      }
12820
 
12821
      public short getThriftFieldId() {
12822
        return _thriftId;
12823
      }
12824
 
12825
      public String getFieldName() {
12826
        return _fieldName;
12827
      }
12828
    }
12829
 
12830
    // isset id assignments
12831
 
12832
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12833
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
12834
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 12835
    }});
12836
 
12837
    static {
483 rajveer 12838
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 12839
    }
12840
 
483 rajveer 12841
    public createOrder_args() {
68 ashish 12842
    }
12843
 
483 rajveer 12844
    public createOrder_args(
12845
      Order order)
68 ashish 12846
    {
12847
      this();
483 rajveer 12848
      this.order = order;
68 ashish 12849
    }
12850
 
12851
    /**
12852
     * Performs a deep copy on <i>other</i>.
12853
     */
483 rajveer 12854
    public createOrder_args(createOrder_args other) {
12855
      if (other.isSetOrder()) {
12856
        this.order = new Order(other.order);
12857
      }
68 ashish 12858
    }
12859
 
483 rajveer 12860
    public createOrder_args deepCopy() {
12861
      return new createOrder_args(this);
68 ashish 12862
    }
12863
 
12864
    @Deprecated
483 rajveer 12865
    public createOrder_args clone() {
12866
      return new createOrder_args(this);
68 ashish 12867
    }
12868
 
483 rajveer 12869
    public Order getOrder() {
12870
      return this.order;
68 ashish 12871
    }
12872
 
483 rajveer 12873
    public createOrder_args setOrder(Order order) {
12874
      this.order = order;
68 ashish 12875
      return this;
12876
    }
12877
 
483 rajveer 12878
    public void unsetOrder() {
12879
      this.order = null;
68 ashish 12880
    }
12881
 
483 rajveer 12882
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
12883
    public boolean isSetOrder() {
12884
      return this.order != null;
68 ashish 12885
    }
12886
 
483 rajveer 12887
    public void setOrderIsSet(boolean value) {
12888
      if (!value) {
12889
        this.order = null;
12890
      }
68 ashish 12891
    }
12892
 
12893
    public void setFieldValue(_Fields field, Object value) {
12894
      switch (field) {
483 rajveer 12895
      case ORDER:
68 ashish 12896
        if (value == null) {
483 rajveer 12897
          unsetOrder();
68 ashish 12898
        } else {
483 rajveer 12899
          setOrder((Order)value);
68 ashish 12900
        }
12901
        break;
12902
 
12903
      }
12904
    }
12905
 
12906
    public void setFieldValue(int fieldID, Object value) {
12907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12908
    }
12909
 
12910
    public Object getFieldValue(_Fields field) {
12911
      switch (field) {
483 rajveer 12912
      case ORDER:
12913
        return getOrder();
68 ashish 12914
 
12915
      }
12916
      throw new IllegalStateException();
12917
    }
12918
 
12919
    public Object getFieldValue(int fieldId) {
12920
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12921
    }
12922
 
12923
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12924
    public boolean isSet(_Fields field) {
12925
      switch (field) {
483 rajveer 12926
      case ORDER:
12927
        return isSetOrder();
68 ashish 12928
      }
12929
      throw new IllegalStateException();
12930
    }
12931
 
12932
    public boolean isSet(int fieldID) {
12933
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12934
    }
12935
 
12936
    @Override
12937
    public boolean equals(Object that) {
12938
      if (that == null)
12939
        return false;
483 rajveer 12940
      if (that instanceof createOrder_args)
12941
        return this.equals((createOrder_args)that);
68 ashish 12942
      return false;
12943
    }
12944
 
483 rajveer 12945
    public boolean equals(createOrder_args that) {
68 ashish 12946
      if (that == null)
12947
        return false;
12948
 
483 rajveer 12949
      boolean this_present_order = true && this.isSetOrder();
12950
      boolean that_present_order = true && that.isSetOrder();
12951
      if (this_present_order || that_present_order) {
12952
        if (!(this_present_order && that_present_order))
68 ashish 12953
          return false;
483 rajveer 12954
        if (!this.order.equals(that.order))
68 ashish 12955
          return false;
12956
      }
12957
 
12958
      return true;
12959
    }
12960
 
12961
    @Override
12962
    public int hashCode() {
12963
      return 0;
12964
    }
12965
 
483 rajveer 12966
    public int compareTo(createOrder_args other) {
68 ashish 12967
      if (!getClass().equals(other.getClass())) {
12968
        return getClass().getName().compareTo(other.getClass().getName());
12969
      }
12970
 
12971
      int lastComparison = 0;
483 rajveer 12972
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 12973
 
483 rajveer 12974
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 12975
      if (lastComparison != 0) {
12976
        return lastComparison;
12977
      }
483 rajveer 12978
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 12979
      if (lastComparison != 0) {
12980
        return lastComparison;
12981
      }
12982
      return 0;
12983
    }
12984
 
12985
    public void read(TProtocol iprot) throws TException {
12986
      TField field;
12987
      iprot.readStructBegin();
12988
      while (true)
12989
      {
12990
        field = iprot.readFieldBegin();
12991
        if (field.type == TType.STOP) { 
12992
          break;
12993
        }
12994
        _Fields fieldId = _Fields.findByThriftId(field.id);
12995
        if (fieldId == null) {
12996
          TProtocolUtil.skip(iprot, field.type);
12997
        } else {
12998
          switch (fieldId) {
483 rajveer 12999
            case ORDER:
13000
              if (field.type == TType.STRUCT) {
13001
                this.order = new Order();
13002
                this.order.read(iprot);
68 ashish 13003
              } else { 
13004
                TProtocolUtil.skip(iprot, field.type);
13005
              }
13006
              break;
13007
          }
13008
          iprot.readFieldEnd();
13009
        }
13010
      }
13011
      iprot.readStructEnd();
13012
      validate();
13013
    }
13014
 
13015
    public void write(TProtocol oprot) throws TException {
13016
      validate();
13017
 
13018
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13019
      if (this.order != null) {
13020
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
13021
        this.order.write(oprot);
13022
        oprot.writeFieldEnd();
13023
      }
68 ashish 13024
      oprot.writeFieldStop();
13025
      oprot.writeStructEnd();
13026
    }
13027
 
13028
    @Override
13029
    public String toString() {
483 rajveer 13030
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 13031
      boolean first = true;
13032
 
483 rajveer 13033
      sb.append("order:");
13034
      if (this.order == null) {
13035
        sb.append("null");
13036
      } else {
13037
        sb.append(this.order);
13038
      }
68 ashish 13039
      first = false;
13040
      sb.append(")");
13041
      return sb.toString();
13042
    }
13043
 
13044
    public void validate() throws TException {
13045
      // check for required fields
13046
    }
13047
 
13048
  }
13049
 
483 rajveer 13050
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
13051
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 13052
 
483 rajveer 13053
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 13054
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13055
 
483 rajveer 13056
    private long success;
68 ashish 13057
    private TransactionServiceException ex;
13058
 
13059
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13060
    public enum _Fields implements TFieldIdEnum {
13061
      SUCCESS((short)0, "success"),
13062
      EX((short)1, "ex");
13063
 
13064
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13065
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13066
 
13067
      static {
13068
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13069
          byId.put((int)field._thriftId, field);
13070
          byName.put(field.getFieldName(), field);
13071
        }
13072
      }
13073
 
13074
      /**
13075
       * Find the _Fields constant that matches fieldId, or null if its not found.
13076
       */
13077
      public static _Fields findByThriftId(int fieldId) {
13078
        return byId.get(fieldId);
13079
      }
13080
 
13081
      /**
13082
       * Find the _Fields constant that matches fieldId, throwing an exception
13083
       * if it is not found.
13084
       */
13085
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13086
        _Fields fields = findByThriftId(fieldId);
13087
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13088
        return fields;
13089
      }
13090
 
13091
      /**
13092
       * Find the _Fields constant that matches name, or null if its not found.
13093
       */
13094
      public static _Fields findByName(String name) {
13095
        return byName.get(name);
13096
      }
13097
 
13098
      private final short _thriftId;
13099
      private final String _fieldName;
13100
 
13101
      _Fields(short thriftId, String fieldName) {
13102
        _thriftId = thriftId;
13103
        _fieldName = fieldName;
13104
      }
13105
 
13106
      public short getThriftFieldId() {
13107
        return _thriftId;
13108
      }
13109
 
13110
      public String getFieldName() {
13111
        return _fieldName;
13112
      }
13113
    }
13114
 
13115
    // isset id assignments
13116
    private static final int __SUCCESS_ISSET_ID = 0;
13117
    private BitSet __isset_bit_vector = new BitSet(1);
13118
 
13119
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13120
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13121
          new FieldValueMetaData(TType.I64)));
68 ashish 13122
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13123
          new FieldValueMetaData(TType.STRUCT)));
13124
    }});
13125
 
13126
    static {
483 rajveer 13127
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 13128
    }
13129
 
483 rajveer 13130
    public createOrder_result() {
68 ashish 13131
    }
13132
 
483 rajveer 13133
    public createOrder_result(
13134
      long success,
68 ashish 13135
      TransactionServiceException ex)
13136
    {
13137
      this();
13138
      this.success = success;
13139
      setSuccessIsSet(true);
13140
      this.ex = ex;
13141
    }
13142
 
13143
    /**
13144
     * Performs a deep copy on <i>other</i>.
13145
     */
483 rajveer 13146
    public createOrder_result(createOrder_result other) {
68 ashish 13147
      __isset_bit_vector.clear();
13148
      __isset_bit_vector.or(other.__isset_bit_vector);
13149
      this.success = other.success;
13150
      if (other.isSetEx()) {
13151
        this.ex = new TransactionServiceException(other.ex);
13152
      }
13153
    }
13154
 
483 rajveer 13155
    public createOrder_result deepCopy() {
13156
      return new createOrder_result(this);
68 ashish 13157
    }
13158
 
13159
    @Deprecated
483 rajveer 13160
    public createOrder_result clone() {
13161
      return new createOrder_result(this);
68 ashish 13162
    }
13163
 
483 rajveer 13164
    public long getSuccess() {
68 ashish 13165
      return this.success;
13166
    }
13167
 
483 rajveer 13168
    public createOrder_result setSuccess(long success) {
68 ashish 13169
      this.success = success;
13170
      setSuccessIsSet(true);
13171
      return this;
13172
    }
13173
 
13174
    public void unsetSuccess() {
13175
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13176
    }
13177
 
13178
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13179
    public boolean isSetSuccess() {
13180
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13181
    }
13182
 
13183
    public void setSuccessIsSet(boolean value) {
13184
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13185
    }
13186
 
13187
    public TransactionServiceException getEx() {
13188
      return this.ex;
13189
    }
13190
 
483 rajveer 13191
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 13192
      this.ex = ex;
13193
      return this;
13194
    }
13195
 
13196
    public void unsetEx() {
13197
      this.ex = null;
13198
    }
13199
 
13200
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13201
    public boolean isSetEx() {
13202
      return this.ex != null;
13203
    }
13204
 
13205
    public void setExIsSet(boolean value) {
13206
      if (!value) {
13207
        this.ex = null;
13208
      }
13209
    }
13210
 
13211
    public void setFieldValue(_Fields field, Object value) {
13212
      switch (field) {
13213
      case SUCCESS:
13214
        if (value == null) {
13215
          unsetSuccess();
13216
        } else {
483 rajveer 13217
          setSuccess((Long)value);
68 ashish 13218
        }
13219
        break;
13220
 
13221
      case EX:
13222
        if (value == null) {
13223
          unsetEx();
13224
        } else {
13225
          setEx((TransactionServiceException)value);
13226
        }
13227
        break;
13228
 
13229
      }
13230
    }
13231
 
13232
    public void setFieldValue(int fieldID, Object value) {
13233
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13234
    }
13235
 
13236
    public Object getFieldValue(_Fields field) {
13237
      switch (field) {
13238
      case SUCCESS:
483 rajveer 13239
        return new Long(getSuccess());
68 ashish 13240
 
13241
      case EX:
13242
        return getEx();
13243
 
13244
      }
13245
      throw new IllegalStateException();
13246
    }
13247
 
13248
    public Object getFieldValue(int fieldId) {
13249
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13250
    }
13251
 
13252
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13253
    public boolean isSet(_Fields field) {
13254
      switch (field) {
13255
      case SUCCESS:
13256
        return isSetSuccess();
13257
      case EX:
13258
        return isSetEx();
13259
      }
13260
      throw new IllegalStateException();
13261
    }
13262
 
13263
    public boolean isSet(int fieldID) {
13264
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13265
    }
13266
 
13267
    @Override
13268
    public boolean equals(Object that) {
13269
      if (that == null)
13270
        return false;
483 rajveer 13271
      if (that instanceof createOrder_result)
13272
        return this.equals((createOrder_result)that);
68 ashish 13273
      return false;
13274
    }
13275
 
483 rajveer 13276
    public boolean equals(createOrder_result that) {
68 ashish 13277
      if (that == null)
13278
        return false;
13279
 
13280
      boolean this_present_success = true;
13281
      boolean that_present_success = true;
13282
      if (this_present_success || that_present_success) {
13283
        if (!(this_present_success && that_present_success))
13284
          return false;
13285
        if (this.success != that.success)
13286
          return false;
13287
      }
13288
 
13289
      boolean this_present_ex = true && this.isSetEx();
13290
      boolean that_present_ex = true && that.isSetEx();
13291
      if (this_present_ex || that_present_ex) {
13292
        if (!(this_present_ex && that_present_ex))
13293
          return false;
13294
        if (!this.ex.equals(that.ex))
13295
          return false;
13296
      }
13297
 
13298
      return true;
13299
    }
13300
 
13301
    @Override
13302
    public int hashCode() {
13303
      return 0;
13304
    }
13305
 
483 rajveer 13306
    public int compareTo(createOrder_result other) {
68 ashish 13307
      if (!getClass().equals(other.getClass())) {
13308
        return getClass().getName().compareTo(other.getClass().getName());
13309
      }
13310
 
13311
      int lastComparison = 0;
483 rajveer 13312
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 13313
 
13314
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13315
      if (lastComparison != 0) {
13316
        return lastComparison;
13317
      }
13318
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13319
      if (lastComparison != 0) {
13320
        return lastComparison;
13321
      }
13322
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13323
      if (lastComparison != 0) {
13324
        return lastComparison;
13325
      }
13326
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13327
      if (lastComparison != 0) {
13328
        return lastComparison;
13329
      }
13330
      return 0;
13331
    }
13332
 
13333
    public void read(TProtocol iprot) throws TException {
13334
      TField field;
13335
      iprot.readStructBegin();
13336
      while (true)
13337
      {
13338
        field = iprot.readFieldBegin();
13339
        if (field.type == TType.STOP) { 
13340
          break;
13341
        }
13342
        _Fields fieldId = _Fields.findByThriftId(field.id);
13343
        if (fieldId == null) {
13344
          TProtocolUtil.skip(iprot, field.type);
13345
        } else {
13346
          switch (fieldId) {
13347
            case SUCCESS:
483 rajveer 13348
              if (field.type == TType.I64) {
13349
                this.success = iprot.readI64();
68 ashish 13350
                setSuccessIsSet(true);
13351
              } else { 
13352
                TProtocolUtil.skip(iprot, field.type);
13353
              }
13354
              break;
13355
            case EX:
13356
              if (field.type == TType.STRUCT) {
13357
                this.ex = new TransactionServiceException();
13358
                this.ex.read(iprot);
13359
              } else { 
13360
                TProtocolUtil.skip(iprot, field.type);
13361
              }
13362
              break;
13363
          }
13364
          iprot.readFieldEnd();
13365
        }
13366
      }
13367
      iprot.readStructEnd();
13368
      validate();
13369
    }
13370
 
13371
    public void write(TProtocol oprot) throws TException {
13372
      oprot.writeStructBegin(STRUCT_DESC);
13373
 
13374
      if (this.isSetSuccess()) {
13375
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13376
        oprot.writeI64(this.success);
68 ashish 13377
        oprot.writeFieldEnd();
13378
      } else if (this.isSetEx()) {
13379
        oprot.writeFieldBegin(EX_FIELD_DESC);
13380
        this.ex.write(oprot);
13381
        oprot.writeFieldEnd();
13382
      }
13383
      oprot.writeFieldStop();
13384
      oprot.writeStructEnd();
13385
    }
13386
 
13387
    @Override
13388
    public String toString() {
483 rajveer 13389
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 13390
      boolean first = true;
13391
 
13392
      sb.append("success:");
13393
      sb.append(this.success);
13394
      first = false;
13395
      if (!first) sb.append(", ");
13396
      sb.append("ex:");
13397
      if (this.ex == null) {
13398
        sb.append("null");
13399
      } else {
13400
        sb.append(this.ex);
13401
      }
13402
      first = false;
13403
      sb.append(")");
13404
      return sb.toString();
13405
    }
13406
 
13407
    public void validate() throws TException {
13408
      // check for required fields
13409
    }
13410
 
13411
  }
13412
 
483 rajveer 13413
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
13414
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 13415
 
483 rajveer 13416
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 13417
 
483 rajveer 13418
    private long id;
68 ashish 13419
 
13420
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13421
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13422
      ID((short)1, "id");
68 ashish 13423
 
13424
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13425
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13426
 
13427
      static {
13428
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13429
          byId.put((int)field._thriftId, field);
13430
          byName.put(field.getFieldName(), field);
13431
        }
13432
      }
13433
 
13434
      /**
13435
       * Find the _Fields constant that matches fieldId, or null if its not found.
13436
       */
13437
      public static _Fields findByThriftId(int fieldId) {
13438
        return byId.get(fieldId);
13439
      }
13440
 
13441
      /**
13442
       * Find the _Fields constant that matches fieldId, throwing an exception
13443
       * if it is not found.
13444
       */
13445
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13446
        _Fields fields = findByThriftId(fieldId);
13447
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13448
        return fields;
13449
      }
13450
 
13451
      /**
13452
       * Find the _Fields constant that matches name, or null if its not found.
13453
       */
13454
      public static _Fields findByName(String name) {
13455
        return byName.get(name);
13456
      }
13457
 
13458
      private final short _thriftId;
13459
      private final String _fieldName;
13460
 
13461
      _Fields(short thriftId, String fieldName) {
13462
        _thriftId = thriftId;
13463
        _fieldName = fieldName;
13464
      }
13465
 
13466
      public short getThriftFieldId() {
13467
        return _thriftId;
13468
      }
13469
 
13470
      public String getFieldName() {
13471
        return _fieldName;
13472
      }
13473
    }
13474
 
13475
    // isset id assignments
483 rajveer 13476
    private static final int __ID_ISSET_ID = 0;
13477
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 13478
 
13479
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13480
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 13481
          new FieldValueMetaData(TType.I64)));
13482
    }});
13483
 
13484
    static {
483 rajveer 13485
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 13486
    }
13487
 
483 rajveer 13488
    public getOrder_args() {
68 ashish 13489
    }
13490
 
483 rajveer 13491
    public getOrder_args(
13492
      long id)
68 ashish 13493
    {
13494
      this();
483 rajveer 13495
      this.id = id;
13496
      setIdIsSet(true);
68 ashish 13497
    }
13498
 
13499
    /**
13500
     * Performs a deep copy on <i>other</i>.
13501
     */
483 rajveer 13502
    public getOrder_args(getOrder_args other) {
68 ashish 13503
      __isset_bit_vector.clear();
13504
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 13505
      this.id = other.id;
68 ashish 13506
    }
13507
 
483 rajveer 13508
    public getOrder_args deepCopy() {
13509
      return new getOrder_args(this);
68 ashish 13510
    }
13511
 
13512
    @Deprecated
483 rajveer 13513
    public getOrder_args clone() {
13514
      return new getOrder_args(this);
68 ashish 13515
    }
13516
 
483 rajveer 13517
    public long getId() {
13518
      return this.id;
68 ashish 13519
    }
13520
 
483 rajveer 13521
    public getOrder_args setId(long id) {
13522
      this.id = id;
13523
      setIdIsSet(true);
68 ashish 13524
      return this;
13525
    }
13526
 
483 rajveer 13527
    public void unsetId() {
13528
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 13529
    }
13530
 
483 rajveer 13531
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
13532
    public boolean isSetId() {
13533
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 13534
    }
13535
 
483 rajveer 13536
    public void setIdIsSet(boolean value) {
13537
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 13538
    }
13539
 
13540
    public void setFieldValue(_Fields field, Object value) {
13541
      switch (field) {
483 rajveer 13542
      case ID:
68 ashish 13543
        if (value == null) {
483 rajveer 13544
          unsetId();
68 ashish 13545
        } else {
483 rajveer 13546
          setId((Long)value);
68 ashish 13547
        }
13548
        break;
13549
 
13550
      }
13551
    }
13552
 
13553
    public void setFieldValue(int fieldID, Object value) {
13554
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13555
    }
13556
 
13557
    public Object getFieldValue(_Fields field) {
13558
      switch (field) {
483 rajveer 13559
      case ID:
13560
        return new Long(getId());
68 ashish 13561
 
13562
      }
13563
      throw new IllegalStateException();
13564
    }
13565
 
13566
    public Object getFieldValue(int fieldId) {
13567
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13568
    }
13569
 
13570
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13571
    public boolean isSet(_Fields field) {
13572
      switch (field) {
483 rajveer 13573
      case ID:
13574
        return isSetId();
68 ashish 13575
      }
13576
      throw new IllegalStateException();
13577
    }
13578
 
13579
    public boolean isSet(int fieldID) {
13580
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13581
    }
13582
 
13583
    @Override
13584
    public boolean equals(Object that) {
13585
      if (that == null)
13586
        return false;
483 rajveer 13587
      if (that instanceof getOrder_args)
13588
        return this.equals((getOrder_args)that);
68 ashish 13589
      return false;
13590
    }
13591
 
483 rajveer 13592
    public boolean equals(getOrder_args that) {
68 ashish 13593
      if (that == null)
13594
        return false;
13595
 
483 rajveer 13596
      boolean this_present_id = true;
13597
      boolean that_present_id = true;
13598
      if (this_present_id || that_present_id) {
13599
        if (!(this_present_id && that_present_id))
68 ashish 13600
          return false;
483 rajveer 13601
        if (this.id != that.id)
68 ashish 13602
          return false;
13603
      }
13604
 
13605
      return true;
13606
    }
13607
 
13608
    @Override
13609
    public int hashCode() {
13610
      return 0;
13611
    }
13612
 
483 rajveer 13613
    public int compareTo(getOrder_args other) {
68 ashish 13614
      if (!getClass().equals(other.getClass())) {
13615
        return getClass().getName().compareTo(other.getClass().getName());
13616
      }
13617
 
13618
      int lastComparison = 0;
483 rajveer 13619
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 13620
 
483 rajveer 13621
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 13622
      if (lastComparison != 0) {
13623
        return lastComparison;
13624
      }
483 rajveer 13625
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 13626
      if (lastComparison != 0) {
13627
        return lastComparison;
13628
      }
13629
      return 0;
13630
    }
13631
 
13632
    public void read(TProtocol iprot) throws TException {
13633
      TField field;
13634
      iprot.readStructBegin();
13635
      while (true)
13636
      {
13637
        field = iprot.readFieldBegin();
13638
        if (field.type == TType.STOP) { 
13639
          break;
13640
        }
13641
        _Fields fieldId = _Fields.findByThriftId(field.id);
13642
        if (fieldId == null) {
13643
          TProtocolUtil.skip(iprot, field.type);
13644
        } else {
13645
          switch (fieldId) {
483 rajveer 13646
            case ID:
68 ashish 13647
              if (field.type == TType.I64) {
483 rajveer 13648
                this.id = iprot.readI64();
13649
                setIdIsSet(true);
68 ashish 13650
              } else { 
13651
                TProtocolUtil.skip(iprot, field.type);
13652
              }
13653
              break;
13654
          }
13655
          iprot.readFieldEnd();
13656
        }
13657
      }
13658
      iprot.readStructEnd();
13659
      validate();
13660
    }
13661
 
13662
    public void write(TProtocol oprot) throws TException {
13663
      validate();
13664
 
13665
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13666
      oprot.writeFieldBegin(ID_FIELD_DESC);
13667
      oprot.writeI64(this.id);
68 ashish 13668
      oprot.writeFieldEnd();
13669
      oprot.writeFieldStop();
13670
      oprot.writeStructEnd();
13671
    }
13672
 
13673
    @Override
13674
    public String toString() {
483 rajveer 13675
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 13676
      boolean first = true;
13677
 
483 rajveer 13678
      sb.append("id:");
13679
      sb.append(this.id);
68 ashish 13680
      first = false;
13681
      sb.append(")");
13682
      return sb.toString();
13683
    }
13684
 
13685
    public void validate() throws TException {
13686
      // check for required fields
13687
    }
13688
 
13689
  }
13690
 
483 rajveer 13691
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
13692
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 13693
 
483 rajveer 13694
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 13695
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13696
 
483 rajveer 13697
    private Order success;
68 ashish 13698
    private TransactionServiceException ex;
13699
 
13700
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13701
    public enum _Fields implements TFieldIdEnum {
13702
      SUCCESS((short)0, "success"),
13703
      EX((short)1, "ex");
13704
 
13705
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13706
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13707
 
13708
      static {
13709
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13710
          byId.put((int)field._thriftId, field);
13711
          byName.put(field.getFieldName(), field);
13712
        }
13713
      }
13714
 
13715
      /**
13716
       * Find the _Fields constant that matches fieldId, or null if its not found.
13717
       */
13718
      public static _Fields findByThriftId(int fieldId) {
13719
        return byId.get(fieldId);
13720
      }
13721
 
13722
      /**
13723
       * Find the _Fields constant that matches fieldId, throwing an exception
13724
       * if it is not found.
13725
       */
13726
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13727
        _Fields fields = findByThriftId(fieldId);
13728
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13729
        return fields;
13730
      }
13731
 
13732
      /**
13733
       * Find the _Fields constant that matches name, or null if its not found.
13734
       */
13735
      public static _Fields findByName(String name) {
13736
        return byName.get(name);
13737
      }
13738
 
13739
      private final short _thriftId;
13740
      private final String _fieldName;
13741
 
13742
      _Fields(short thriftId, String fieldName) {
13743
        _thriftId = thriftId;
13744
        _fieldName = fieldName;
13745
      }
13746
 
13747
      public short getThriftFieldId() {
13748
        return _thriftId;
13749
      }
13750
 
13751
      public String getFieldName() {
13752
        return _fieldName;
13753
      }
13754
    }
13755
 
13756
    // isset id assignments
13757
 
13758
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13759
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13760
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13761
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13762
          new FieldValueMetaData(TType.STRUCT)));
13763
    }});
13764
 
13765
    static {
483 rajveer 13766
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 13767
    }
13768
 
483 rajveer 13769
    public getOrder_result() {
68 ashish 13770
    }
13771
 
483 rajveer 13772
    public getOrder_result(
13773
      Order success,
68 ashish 13774
      TransactionServiceException ex)
13775
    {
13776
      this();
13777
      this.success = success;
13778
      this.ex = ex;
13779
    }
13780
 
13781
    /**
13782
     * Performs a deep copy on <i>other</i>.
13783
     */
483 rajveer 13784
    public getOrder_result(getOrder_result other) {
13785
      if (other.isSetSuccess()) {
13786
        this.success = new Order(other.success);
13787
      }
68 ashish 13788
      if (other.isSetEx()) {
13789
        this.ex = new TransactionServiceException(other.ex);
13790
      }
13791
    }
13792
 
483 rajveer 13793
    public getOrder_result deepCopy() {
13794
      return new getOrder_result(this);
68 ashish 13795
    }
13796
 
13797
    @Deprecated
483 rajveer 13798
    public getOrder_result clone() {
13799
      return new getOrder_result(this);
68 ashish 13800
    }
13801
 
483 rajveer 13802
    public Order getSuccess() {
68 ashish 13803
      return this.success;
13804
    }
13805
 
483 rajveer 13806
    public getOrder_result setSuccess(Order success) {
68 ashish 13807
      this.success = success;
13808
      return this;
13809
    }
13810
 
13811
    public void unsetSuccess() {
483 rajveer 13812
      this.success = null;
68 ashish 13813
    }
13814
 
13815
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13816
    public boolean isSetSuccess() {
483 rajveer 13817
      return this.success != null;
68 ashish 13818
    }
13819
 
13820
    public void setSuccessIsSet(boolean value) {
483 rajveer 13821
      if (!value) {
13822
        this.success = null;
13823
      }
68 ashish 13824
    }
13825
 
13826
    public TransactionServiceException getEx() {
13827
      return this.ex;
13828
    }
13829
 
483 rajveer 13830
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 13831
      this.ex = ex;
13832
      return this;
13833
    }
13834
 
13835
    public void unsetEx() {
13836
      this.ex = null;
13837
    }
13838
 
13839
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13840
    public boolean isSetEx() {
13841
      return this.ex != null;
13842
    }
13843
 
13844
    public void setExIsSet(boolean value) {
13845
      if (!value) {
13846
        this.ex = null;
13847
      }
13848
    }
13849
 
13850
    public void setFieldValue(_Fields field, Object value) {
13851
      switch (field) {
13852
      case SUCCESS:
13853
        if (value == null) {
13854
          unsetSuccess();
13855
        } else {
483 rajveer 13856
          setSuccess((Order)value);
68 ashish 13857
        }
13858
        break;
13859
 
13860
      case EX:
13861
        if (value == null) {
13862
          unsetEx();
13863
        } else {
13864
          setEx((TransactionServiceException)value);
13865
        }
13866
        break;
13867
 
13868
      }
13869
    }
13870
 
13871
    public void setFieldValue(int fieldID, Object value) {
13872
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13873
    }
13874
 
13875
    public Object getFieldValue(_Fields field) {
13876
      switch (field) {
13877
      case SUCCESS:
483 rajveer 13878
        return getSuccess();
68 ashish 13879
 
13880
      case EX:
13881
        return getEx();
13882
 
13883
      }
13884
      throw new IllegalStateException();
13885
    }
13886
 
13887
    public Object getFieldValue(int fieldId) {
13888
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13889
    }
13890
 
13891
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13892
    public boolean isSet(_Fields field) {
13893
      switch (field) {
13894
      case SUCCESS:
13895
        return isSetSuccess();
13896
      case EX:
13897
        return isSetEx();
13898
      }
13899
      throw new IllegalStateException();
13900
    }
13901
 
13902
    public boolean isSet(int fieldID) {
13903
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13904
    }
13905
 
13906
    @Override
13907
    public boolean equals(Object that) {
13908
      if (that == null)
13909
        return false;
483 rajveer 13910
      if (that instanceof getOrder_result)
13911
        return this.equals((getOrder_result)that);
68 ashish 13912
      return false;
13913
    }
13914
 
483 rajveer 13915
    public boolean equals(getOrder_result that) {
68 ashish 13916
      if (that == null)
13917
        return false;
13918
 
483 rajveer 13919
      boolean this_present_success = true && this.isSetSuccess();
13920
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13921
      if (this_present_success || that_present_success) {
13922
        if (!(this_present_success && that_present_success))
13923
          return false;
483 rajveer 13924
        if (!this.success.equals(that.success))
68 ashish 13925
          return false;
13926
      }
13927
 
13928
      boolean this_present_ex = true && this.isSetEx();
13929
      boolean that_present_ex = true && that.isSetEx();
13930
      if (this_present_ex || that_present_ex) {
13931
        if (!(this_present_ex && that_present_ex))
13932
          return false;
13933
        if (!this.ex.equals(that.ex))
13934
          return false;
13935
      }
13936
 
13937
      return true;
13938
    }
13939
 
13940
    @Override
13941
    public int hashCode() {
13942
      return 0;
13943
    }
13944
 
483 rajveer 13945
    public int compareTo(getOrder_result other) {
68 ashish 13946
      if (!getClass().equals(other.getClass())) {
13947
        return getClass().getName().compareTo(other.getClass().getName());
13948
      }
13949
 
13950
      int lastComparison = 0;
483 rajveer 13951
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 13952
 
13953
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13954
      if (lastComparison != 0) {
13955
        return lastComparison;
13956
      }
13957
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13958
      if (lastComparison != 0) {
13959
        return lastComparison;
13960
      }
13961
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13962
      if (lastComparison != 0) {
13963
        return lastComparison;
13964
      }
13965
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13966
      if (lastComparison != 0) {
13967
        return lastComparison;
13968
      }
13969
      return 0;
13970
    }
13971
 
13972
    public void read(TProtocol iprot) throws TException {
13973
      TField field;
13974
      iprot.readStructBegin();
13975
      while (true)
13976
      {
13977
        field = iprot.readFieldBegin();
13978
        if (field.type == TType.STOP) { 
13979
          break;
13980
        }
13981
        _Fields fieldId = _Fields.findByThriftId(field.id);
13982
        if (fieldId == null) {
13983
          TProtocolUtil.skip(iprot, field.type);
13984
        } else {
13985
          switch (fieldId) {
13986
            case SUCCESS:
483 rajveer 13987
              if (field.type == TType.STRUCT) {
13988
                this.success = new Order();
13989
                this.success.read(iprot);
68 ashish 13990
              } else { 
13991
                TProtocolUtil.skip(iprot, field.type);
13992
              }
13993
              break;
13994
            case EX:
13995
              if (field.type == TType.STRUCT) {
13996
                this.ex = new TransactionServiceException();
13997
                this.ex.read(iprot);
13998
              } else { 
13999
                TProtocolUtil.skip(iprot, field.type);
14000
              }
14001
              break;
14002
          }
14003
          iprot.readFieldEnd();
14004
        }
14005
      }
14006
      iprot.readStructEnd();
14007
      validate();
14008
    }
14009
 
14010
    public void write(TProtocol oprot) throws TException {
14011
      oprot.writeStructBegin(STRUCT_DESC);
14012
 
14013
      if (this.isSetSuccess()) {
14014
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14015
        this.success.write(oprot);
68 ashish 14016
        oprot.writeFieldEnd();
14017
      } else if (this.isSetEx()) {
14018
        oprot.writeFieldBegin(EX_FIELD_DESC);
14019
        this.ex.write(oprot);
14020
        oprot.writeFieldEnd();
14021
      }
14022
      oprot.writeFieldStop();
14023
      oprot.writeStructEnd();
14024
    }
14025
 
14026
    @Override
14027
    public String toString() {
483 rajveer 14028
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 14029
      boolean first = true;
14030
 
14031
      sb.append("success:");
483 rajveer 14032
      if (this.success == null) {
14033
        sb.append("null");
14034
      } else {
14035
        sb.append(this.success);
14036
      }
68 ashish 14037
      first = false;
14038
      if (!first) sb.append(", ");
14039
      sb.append("ex:");
14040
      if (this.ex == null) {
14041
        sb.append("null");
14042
      } else {
14043
        sb.append(this.ex);
14044
      }
14045
      first = false;
14046
      sb.append(")");
14047
      return sb.toString();
14048
    }
14049
 
14050
    public void validate() throws TException {
14051
      // check for required fields
14052
    }
14053
 
14054
  }
14055
 
483 rajveer 14056
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
14057
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 14058
 
483 rajveer 14059
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 14060
 
483 rajveer 14061
    private long orderId;
68 ashish 14062
 
14063
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14064
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14065
      ORDER_ID((short)1, "orderId");
68 ashish 14066
 
14067
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14068
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14069
 
14070
      static {
14071
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14072
          byId.put((int)field._thriftId, field);
14073
          byName.put(field.getFieldName(), field);
14074
        }
14075
      }
14076
 
14077
      /**
14078
       * Find the _Fields constant that matches fieldId, or null if its not found.
14079
       */
14080
      public static _Fields findByThriftId(int fieldId) {
14081
        return byId.get(fieldId);
14082
      }
14083
 
14084
      /**
14085
       * Find the _Fields constant that matches fieldId, throwing an exception
14086
       * if it is not found.
14087
       */
14088
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14089
        _Fields fields = findByThriftId(fieldId);
14090
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14091
        return fields;
14092
      }
14093
 
14094
      /**
14095
       * Find the _Fields constant that matches name, or null if its not found.
14096
       */
14097
      public static _Fields findByName(String name) {
14098
        return byName.get(name);
14099
      }
14100
 
14101
      private final short _thriftId;
14102
      private final String _fieldName;
14103
 
14104
      _Fields(short thriftId, String fieldName) {
14105
        _thriftId = thriftId;
14106
        _fieldName = fieldName;
14107
      }
14108
 
14109
      public short getThriftFieldId() {
14110
        return _thriftId;
14111
      }
14112
 
14113
      public String getFieldName() {
14114
        return _fieldName;
14115
      }
14116
    }
14117
 
14118
    // isset id assignments
483 rajveer 14119
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 14120
    private BitSet __isset_bit_vector = new BitSet(1);
14121
 
14122
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14123
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 14124
          new FieldValueMetaData(TType.I64)));
14125
    }});
14126
 
14127
    static {
483 rajveer 14128
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 14129
    }
14130
 
483 rajveer 14131
    public getLineItemsForOrder_args() {
68 ashish 14132
    }
14133
 
483 rajveer 14134
    public getLineItemsForOrder_args(
14135
      long orderId)
68 ashish 14136
    {
14137
      this();
483 rajveer 14138
      this.orderId = orderId;
14139
      setOrderIdIsSet(true);
68 ashish 14140
    }
14141
 
14142
    /**
14143
     * Performs a deep copy on <i>other</i>.
14144
     */
483 rajveer 14145
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 14146
      __isset_bit_vector.clear();
14147
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14148
      this.orderId = other.orderId;
68 ashish 14149
    }
14150
 
483 rajveer 14151
    public getLineItemsForOrder_args deepCopy() {
14152
      return new getLineItemsForOrder_args(this);
68 ashish 14153
    }
14154
 
14155
    @Deprecated
483 rajveer 14156
    public getLineItemsForOrder_args clone() {
14157
      return new getLineItemsForOrder_args(this);
68 ashish 14158
    }
14159
 
483 rajveer 14160
    public long getOrderId() {
14161
      return this.orderId;
68 ashish 14162
    }
14163
 
483 rajveer 14164
    public getLineItemsForOrder_args setOrderId(long orderId) {
14165
      this.orderId = orderId;
14166
      setOrderIdIsSet(true);
68 ashish 14167
      return this;
14168
    }
14169
 
483 rajveer 14170
    public void unsetOrderId() {
14171
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 14172
    }
14173
 
483 rajveer 14174
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14175
    public boolean isSetOrderId() {
14176
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 14177
    }
14178
 
483 rajveer 14179
    public void setOrderIdIsSet(boolean value) {
14180
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 14181
    }
14182
 
14183
    public void setFieldValue(_Fields field, Object value) {
14184
      switch (field) {
483 rajveer 14185
      case ORDER_ID:
68 ashish 14186
        if (value == null) {
483 rajveer 14187
          unsetOrderId();
68 ashish 14188
        } else {
483 rajveer 14189
          setOrderId((Long)value);
68 ashish 14190
        }
14191
        break;
14192
 
14193
      }
14194
    }
14195
 
14196
    public void setFieldValue(int fieldID, Object value) {
14197
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14198
    }
14199
 
14200
    public Object getFieldValue(_Fields field) {
14201
      switch (field) {
483 rajveer 14202
      case ORDER_ID:
14203
        return new Long(getOrderId());
68 ashish 14204
 
14205
      }
14206
      throw new IllegalStateException();
14207
    }
14208
 
14209
    public Object getFieldValue(int fieldId) {
14210
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14211
    }
14212
 
14213
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14214
    public boolean isSet(_Fields field) {
14215
      switch (field) {
483 rajveer 14216
      case ORDER_ID:
14217
        return isSetOrderId();
68 ashish 14218
      }
14219
      throw new IllegalStateException();
14220
    }
14221
 
14222
    public boolean isSet(int fieldID) {
14223
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14224
    }
14225
 
14226
    @Override
14227
    public boolean equals(Object that) {
14228
      if (that == null)
14229
        return false;
483 rajveer 14230
      if (that instanceof getLineItemsForOrder_args)
14231
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 14232
      return false;
14233
    }
14234
 
483 rajveer 14235
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 14236
      if (that == null)
14237
        return false;
14238
 
483 rajveer 14239
      boolean this_present_orderId = true;
14240
      boolean that_present_orderId = true;
14241
      if (this_present_orderId || that_present_orderId) {
14242
        if (!(this_present_orderId && that_present_orderId))
68 ashish 14243
          return false;
483 rajveer 14244
        if (this.orderId != that.orderId)
68 ashish 14245
          return false;
14246
      }
14247
 
14248
      return true;
14249
    }
14250
 
14251
    @Override
14252
    public int hashCode() {
14253
      return 0;
14254
    }
14255
 
483 rajveer 14256
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 14257
      if (!getClass().equals(other.getClass())) {
14258
        return getClass().getName().compareTo(other.getClass().getName());
14259
      }
14260
 
14261
      int lastComparison = 0;
483 rajveer 14262
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 14263
 
483 rajveer 14264
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 14265
      if (lastComparison != 0) {
14266
        return lastComparison;
14267
      }
483 rajveer 14268
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 14269
      if (lastComparison != 0) {
14270
        return lastComparison;
14271
      }
14272
      return 0;
14273
    }
14274
 
14275
    public void read(TProtocol iprot) throws TException {
14276
      TField field;
14277
      iprot.readStructBegin();
14278
      while (true)
14279
      {
14280
        field = iprot.readFieldBegin();
14281
        if (field.type == TType.STOP) { 
14282
          break;
14283
        }
14284
        _Fields fieldId = _Fields.findByThriftId(field.id);
14285
        if (fieldId == null) {
14286
          TProtocolUtil.skip(iprot, field.type);
14287
        } else {
14288
          switch (fieldId) {
483 rajveer 14289
            case ORDER_ID:
68 ashish 14290
              if (field.type == TType.I64) {
483 rajveer 14291
                this.orderId = iprot.readI64();
14292
                setOrderIdIsSet(true);
68 ashish 14293
              } else { 
14294
                TProtocolUtil.skip(iprot, field.type);
14295
              }
14296
              break;
14297
          }
14298
          iprot.readFieldEnd();
14299
        }
14300
      }
14301
      iprot.readStructEnd();
14302
      validate();
14303
    }
14304
 
14305
    public void write(TProtocol oprot) throws TException {
14306
      validate();
14307
 
14308
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14309
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14310
      oprot.writeI64(this.orderId);
68 ashish 14311
      oprot.writeFieldEnd();
14312
      oprot.writeFieldStop();
14313
      oprot.writeStructEnd();
14314
    }
14315
 
14316
    @Override
14317
    public String toString() {
483 rajveer 14318
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 14319
      boolean first = true;
14320
 
483 rajveer 14321
      sb.append("orderId:");
14322
      sb.append(this.orderId);
68 ashish 14323
      first = false;
14324
      sb.append(")");
14325
      return sb.toString();
14326
    }
14327
 
14328
    public void validate() throws TException {
14329
      // check for required fields
14330
    }
14331
 
14332
  }
14333
 
483 rajveer 14334
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
14335
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 14336
 
483 rajveer 14337
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 14338
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14339
 
483 rajveer 14340
    private List<LineItem> success;
68 ashish 14341
    private TransactionServiceException ex;
14342
 
14343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14344
    public enum _Fields implements TFieldIdEnum {
14345
      SUCCESS((short)0, "success"),
14346
      EX((short)1, "ex");
14347
 
14348
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14349
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14350
 
14351
      static {
14352
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14353
          byId.put((int)field._thriftId, field);
14354
          byName.put(field.getFieldName(), field);
14355
        }
14356
      }
14357
 
14358
      /**
14359
       * Find the _Fields constant that matches fieldId, or null if its not found.
14360
       */
14361
      public static _Fields findByThriftId(int fieldId) {
14362
        return byId.get(fieldId);
14363
      }
14364
 
14365
      /**
14366
       * Find the _Fields constant that matches fieldId, throwing an exception
14367
       * if it is not found.
14368
       */
14369
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14370
        _Fields fields = findByThriftId(fieldId);
14371
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14372
        return fields;
14373
      }
14374
 
14375
      /**
14376
       * Find the _Fields constant that matches name, or null if its not found.
14377
       */
14378
      public static _Fields findByName(String name) {
14379
        return byName.get(name);
14380
      }
14381
 
14382
      private final short _thriftId;
14383
      private final String _fieldName;
14384
 
14385
      _Fields(short thriftId, String fieldName) {
14386
        _thriftId = thriftId;
14387
        _fieldName = fieldName;
14388
      }
14389
 
14390
      public short getThriftFieldId() {
14391
        return _thriftId;
14392
      }
14393
 
14394
      public String getFieldName() {
14395
        return _fieldName;
14396
      }
14397
    }
14398
 
14399
    // isset id assignments
14400
 
14401
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14402
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14403
          new ListMetaData(TType.LIST, 
14404
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 14405
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14406
          new FieldValueMetaData(TType.STRUCT)));
14407
    }});
14408
 
14409
    static {
483 rajveer 14410
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 14411
    }
14412
 
483 rajveer 14413
    public getLineItemsForOrder_result() {
68 ashish 14414
    }
14415
 
483 rajveer 14416
    public getLineItemsForOrder_result(
14417
      List<LineItem> success,
68 ashish 14418
      TransactionServiceException ex)
14419
    {
14420
      this();
14421
      this.success = success;
14422
      this.ex = ex;
14423
    }
14424
 
14425
    /**
14426
     * Performs a deep copy on <i>other</i>.
14427
     */
483 rajveer 14428
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
14429
      if (other.isSetSuccess()) {
14430
        List<LineItem> __this__success = new ArrayList<LineItem>();
14431
        for (LineItem other_element : other.success) {
14432
          __this__success.add(new LineItem(other_element));
14433
        }
14434
        this.success = __this__success;
14435
      }
68 ashish 14436
      if (other.isSetEx()) {
14437
        this.ex = new TransactionServiceException(other.ex);
14438
      }
14439
    }
14440
 
483 rajveer 14441
    public getLineItemsForOrder_result deepCopy() {
14442
      return new getLineItemsForOrder_result(this);
68 ashish 14443
    }
14444
 
14445
    @Deprecated
483 rajveer 14446
    public getLineItemsForOrder_result clone() {
14447
      return new getLineItemsForOrder_result(this);
68 ashish 14448
    }
14449
 
483 rajveer 14450
    public int getSuccessSize() {
14451
      return (this.success == null) ? 0 : this.success.size();
14452
    }
14453
 
14454
    public java.util.Iterator<LineItem> getSuccessIterator() {
14455
      return (this.success == null) ? null : this.success.iterator();
14456
    }
14457
 
14458
    public void addToSuccess(LineItem elem) {
14459
      if (this.success == null) {
14460
        this.success = new ArrayList<LineItem>();
14461
      }
14462
      this.success.add(elem);
14463
    }
14464
 
14465
    public List<LineItem> getSuccess() {
68 ashish 14466
      return this.success;
14467
    }
14468
 
483 rajveer 14469
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 14470
      this.success = success;
14471
      return this;
14472
    }
14473
 
14474
    public void unsetSuccess() {
483 rajveer 14475
      this.success = null;
68 ashish 14476
    }
14477
 
14478
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14479
    public boolean isSetSuccess() {
483 rajveer 14480
      return this.success != null;
68 ashish 14481
    }
14482
 
14483
    public void setSuccessIsSet(boolean value) {
483 rajveer 14484
      if (!value) {
14485
        this.success = null;
14486
      }
68 ashish 14487
    }
14488
 
14489
    public TransactionServiceException getEx() {
14490
      return this.ex;
14491
    }
14492
 
483 rajveer 14493
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 14494
      this.ex = ex;
14495
      return this;
14496
    }
14497
 
14498
    public void unsetEx() {
14499
      this.ex = null;
14500
    }
14501
 
14502
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14503
    public boolean isSetEx() {
14504
      return this.ex != null;
14505
    }
14506
 
14507
    public void setExIsSet(boolean value) {
14508
      if (!value) {
14509
        this.ex = null;
14510
      }
14511
    }
14512
 
14513
    public void setFieldValue(_Fields field, Object value) {
14514
      switch (field) {
14515
      case SUCCESS:
14516
        if (value == null) {
14517
          unsetSuccess();
14518
        } else {
483 rajveer 14519
          setSuccess((List<LineItem>)value);
68 ashish 14520
        }
14521
        break;
14522
 
14523
      case EX:
14524
        if (value == null) {
14525
          unsetEx();
14526
        } else {
14527
          setEx((TransactionServiceException)value);
14528
        }
14529
        break;
14530
 
14531
      }
14532
    }
14533
 
14534
    public void setFieldValue(int fieldID, Object value) {
14535
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14536
    }
14537
 
14538
    public Object getFieldValue(_Fields field) {
14539
      switch (field) {
14540
      case SUCCESS:
483 rajveer 14541
        return getSuccess();
68 ashish 14542
 
14543
      case EX:
14544
        return getEx();
14545
 
14546
      }
14547
      throw new IllegalStateException();
14548
    }
14549
 
14550
    public Object getFieldValue(int fieldId) {
14551
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14552
    }
14553
 
14554
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14555
    public boolean isSet(_Fields field) {
14556
      switch (field) {
14557
      case SUCCESS:
14558
        return isSetSuccess();
14559
      case EX:
14560
        return isSetEx();
14561
      }
14562
      throw new IllegalStateException();
14563
    }
14564
 
14565
    public boolean isSet(int fieldID) {
14566
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14567
    }
14568
 
14569
    @Override
14570
    public boolean equals(Object that) {
14571
      if (that == null)
14572
        return false;
483 rajveer 14573
      if (that instanceof getLineItemsForOrder_result)
14574
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 14575
      return false;
14576
    }
14577
 
483 rajveer 14578
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 14579
      if (that == null)
14580
        return false;
14581
 
483 rajveer 14582
      boolean this_present_success = true && this.isSetSuccess();
14583
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 14584
      if (this_present_success || that_present_success) {
14585
        if (!(this_present_success && that_present_success))
14586
          return false;
483 rajveer 14587
        if (!this.success.equals(that.success))
68 ashish 14588
          return false;
14589
      }
14590
 
14591
      boolean this_present_ex = true && this.isSetEx();
14592
      boolean that_present_ex = true && that.isSetEx();
14593
      if (this_present_ex || that_present_ex) {
14594
        if (!(this_present_ex && that_present_ex))
14595
          return false;
14596
        if (!this.ex.equals(that.ex))
14597
          return false;
14598
      }
14599
 
14600
      return true;
14601
    }
14602
 
14603
    @Override
14604
    public int hashCode() {
14605
      return 0;
14606
    }
14607
 
483 rajveer 14608
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 14609
      if (!getClass().equals(other.getClass())) {
14610
        return getClass().getName().compareTo(other.getClass().getName());
14611
      }
14612
 
14613
      int lastComparison = 0;
483 rajveer 14614
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 14615
 
14616
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14617
      if (lastComparison != 0) {
14618
        return lastComparison;
14619
      }
14620
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14621
      if (lastComparison != 0) {
14622
        return lastComparison;
14623
      }
14624
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14625
      if (lastComparison != 0) {
14626
        return lastComparison;
14627
      }
14628
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14629
      if (lastComparison != 0) {
14630
        return lastComparison;
14631
      }
14632
      return 0;
14633
    }
14634
 
14635
    public void read(TProtocol iprot) throws TException {
14636
      TField field;
14637
      iprot.readStructBegin();
14638
      while (true)
14639
      {
14640
        field = iprot.readFieldBegin();
14641
        if (field.type == TType.STOP) { 
14642
          break;
14643
        }
14644
        _Fields fieldId = _Fields.findByThriftId(field.id);
14645
        if (fieldId == null) {
14646
          TProtocolUtil.skip(iprot, field.type);
14647
        } else {
14648
          switch (fieldId) {
14649
            case SUCCESS:
483 rajveer 14650
              if (field.type == TType.LIST) {
14651
                {
1022 varun.gupt 14652
                  TList _list32 = iprot.readListBegin();
14653
                  this.success = new ArrayList<LineItem>(_list32.size);
14654
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 14655
                  {
1022 varun.gupt 14656
                    LineItem _elem34;
14657
                    _elem34 = new LineItem();
14658
                    _elem34.read(iprot);
14659
                    this.success.add(_elem34);
483 rajveer 14660
                  }
14661
                  iprot.readListEnd();
14662
                }
68 ashish 14663
              } else { 
14664
                TProtocolUtil.skip(iprot, field.type);
14665
              }
14666
              break;
14667
            case EX:
14668
              if (field.type == TType.STRUCT) {
14669
                this.ex = new TransactionServiceException();
14670
                this.ex.read(iprot);
14671
              } else { 
14672
                TProtocolUtil.skip(iprot, field.type);
14673
              }
14674
              break;
14675
          }
14676
          iprot.readFieldEnd();
14677
        }
14678
      }
14679
      iprot.readStructEnd();
14680
      validate();
14681
    }
14682
 
14683
    public void write(TProtocol oprot) throws TException {
14684
      oprot.writeStructBegin(STRUCT_DESC);
14685
 
14686
      if (this.isSetSuccess()) {
14687
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14688
        {
14689
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 14690
          for (LineItem _iter35 : this.success)
483 rajveer 14691
          {
1022 varun.gupt 14692
            _iter35.write(oprot);
483 rajveer 14693
          }
14694
          oprot.writeListEnd();
14695
        }
68 ashish 14696
        oprot.writeFieldEnd();
14697
      } else if (this.isSetEx()) {
14698
        oprot.writeFieldBegin(EX_FIELD_DESC);
14699
        this.ex.write(oprot);
14700
        oprot.writeFieldEnd();
14701
      }
14702
      oprot.writeFieldStop();
14703
      oprot.writeStructEnd();
14704
    }
14705
 
14706
    @Override
14707
    public String toString() {
483 rajveer 14708
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 14709
      boolean first = true;
14710
 
14711
      sb.append("success:");
483 rajveer 14712
      if (this.success == null) {
14713
        sb.append("null");
14714
      } else {
14715
        sb.append(this.success);
14716
      }
68 ashish 14717
      first = false;
14718
      if (!first) sb.append(", ");
14719
      sb.append("ex:");
14720
      if (this.ex == null) {
14721
        sb.append("null");
14722
      } else {
14723
        sb.append(this.ex);
14724
      }
14725
      first = false;
14726
      sb.append(")");
14727
      return sb.toString();
14728
    }
14729
 
14730
    public void validate() throws TException {
14731
      // check for required fields
14732
    }
14733
 
14734
  }
14735
 
758 chandransh 14736
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
14737
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
14738
 
14739
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
14740
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
14741
 
14742
    private long warehouseId;
14743
    private long providerId;
14744
 
14745
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14746
    public enum _Fields implements TFieldIdEnum {
14747
      WAREHOUSE_ID((short)1, "warehouseId"),
14748
      PROVIDER_ID((short)2, "providerId");
14749
 
14750
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14751
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14752
 
14753
      static {
14754
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14755
          byId.put((int)field._thriftId, field);
14756
          byName.put(field.getFieldName(), field);
14757
        }
14758
      }
14759
 
14760
      /**
14761
       * Find the _Fields constant that matches fieldId, or null if its not found.
14762
       */
14763
      public static _Fields findByThriftId(int fieldId) {
14764
        return byId.get(fieldId);
14765
      }
14766
 
14767
      /**
14768
       * Find the _Fields constant that matches fieldId, throwing an exception
14769
       * if it is not found.
14770
       */
14771
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14772
        _Fields fields = findByThriftId(fieldId);
14773
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14774
        return fields;
14775
      }
14776
 
14777
      /**
14778
       * Find the _Fields constant that matches name, or null if its not found.
14779
       */
14780
      public static _Fields findByName(String name) {
14781
        return byName.get(name);
14782
      }
14783
 
14784
      private final short _thriftId;
14785
      private final String _fieldName;
14786
 
14787
      _Fields(short thriftId, String fieldName) {
14788
        _thriftId = thriftId;
14789
        _fieldName = fieldName;
14790
      }
14791
 
14792
      public short getThriftFieldId() {
14793
        return _thriftId;
14794
      }
14795
 
14796
      public String getFieldName() {
14797
        return _fieldName;
14798
      }
14799
    }
14800
 
14801
    // isset id assignments
14802
    private static final int __WAREHOUSEID_ISSET_ID = 0;
14803
    private static final int __PROVIDERID_ISSET_ID = 1;
14804
    private BitSet __isset_bit_vector = new BitSet(2);
14805
 
14806
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14807
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
14808
          new FieldValueMetaData(TType.I64)));
14809
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
14810
          new FieldValueMetaData(TType.I64)));
14811
    }});
14812
 
14813
    static {
14814
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
14815
    }
14816
 
14817
    public markOrdersAsManifested_args() {
14818
    }
14819
 
14820
    public markOrdersAsManifested_args(
14821
      long warehouseId,
14822
      long providerId)
14823
    {
14824
      this();
14825
      this.warehouseId = warehouseId;
14826
      setWarehouseIdIsSet(true);
14827
      this.providerId = providerId;
14828
      setProviderIdIsSet(true);
14829
    }
14830
 
14831
    /**
14832
     * Performs a deep copy on <i>other</i>.
14833
     */
14834
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
14835
      __isset_bit_vector.clear();
14836
      __isset_bit_vector.or(other.__isset_bit_vector);
14837
      this.warehouseId = other.warehouseId;
14838
      this.providerId = other.providerId;
14839
    }
14840
 
14841
    public markOrdersAsManifested_args deepCopy() {
14842
      return new markOrdersAsManifested_args(this);
14843
    }
14844
 
14845
    @Deprecated
14846
    public markOrdersAsManifested_args clone() {
14847
      return new markOrdersAsManifested_args(this);
14848
    }
14849
 
14850
    public long getWarehouseId() {
14851
      return this.warehouseId;
14852
    }
14853
 
14854
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
14855
      this.warehouseId = warehouseId;
14856
      setWarehouseIdIsSet(true);
14857
      return this;
14858
    }
14859
 
14860
    public void unsetWarehouseId() {
14861
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
14862
    }
14863
 
14864
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
14865
    public boolean isSetWarehouseId() {
14866
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
14867
    }
14868
 
14869
    public void setWarehouseIdIsSet(boolean value) {
14870
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
14871
    }
14872
 
14873
    public long getProviderId() {
14874
      return this.providerId;
14875
    }
14876
 
14877
    public markOrdersAsManifested_args setProviderId(long providerId) {
14878
      this.providerId = providerId;
14879
      setProviderIdIsSet(true);
14880
      return this;
14881
    }
14882
 
14883
    public void unsetProviderId() {
14884
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
14885
    }
14886
 
14887
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
14888
    public boolean isSetProviderId() {
14889
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
14890
    }
14891
 
14892
    public void setProviderIdIsSet(boolean value) {
14893
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
14894
    }
14895
 
14896
    public void setFieldValue(_Fields field, Object value) {
14897
      switch (field) {
14898
      case WAREHOUSE_ID:
14899
        if (value == null) {
14900
          unsetWarehouseId();
14901
        } else {
14902
          setWarehouseId((Long)value);
14903
        }
14904
        break;
14905
 
14906
      case PROVIDER_ID:
14907
        if (value == null) {
14908
          unsetProviderId();
14909
        } else {
14910
          setProviderId((Long)value);
14911
        }
14912
        break;
14913
 
14914
      }
14915
    }
14916
 
14917
    public void setFieldValue(int fieldID, Object value) {
14918
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14919
    }
14920
 
14921
    public Object getFieldValue(_Fields field) {
14922
      switch (field) {
14923
      case WAREHOUSE_ID:
14924
        return new Long(getWarehouseId());
14925
 
14926
      case PROVIDER_ID:
14927
        return new Long(getProviderId());
14928
 
14929
      }
14930
      throw new IllegalStateException();
14931
    }
14932
 
14933
    public Object getFieldValue(int fieldId) {
14934
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14935
    }
14936
 
14937
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14938
    public boolean isSet(_Fields field) {
14939
      switch (field) {
14940
      case WAREHOUSE_ID:
14941
        return isSetWarehouseId();
14942
      case PROVIDER_ID:
14943
        return isSetProviderId();
14944
      }
14945
      throw new IllegalStateException();
14946
    }
14947
 
14948
    public boolean isSet(int fieldID) {
14949
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14950
    }
14951
 
14952
    @Override
14953
    public boolean equals(Object that) {
14954
      if (that == null)
14955
        return false;
14956
      if (that instanceof markOrdersAsManifested_args)
14957
        return this.equals((markOrdersAsManifested_args)that);
14958
      return false;
14959
    }
14960
 
14961
    public boolean equals(markOrdersAsManifested_args that) {
14962
      if (that == null)
14963
        return false;
14964
 
14965
      boolean this_present_warehouseId = true;
14966
      boolean that_present_warehouseId = true;
14967
      if (this_present_warehouseId || that_present_warehouseId) {
14968
        if (!(this_present_warehouseId && that_present_warehouseId))
14969
          return false;
14970
        if (this.warehouseId != that.warehouseId)
14971
          return false;
14972
      }
14973
 
14974
      boolean this_present_providerId = true;
14975
      boolean that_present_providerId = true;
14976
      if (this_present_providerId || that_present_providerId) {
14977
        if (!(this_present_providerId && that_present_providerId))
14978
          return false;
14979
        if (this.providerId != that.providerId)
14980
          return false;
14981
      }
14982
 
14983
      return true;
14984
    }
14985
 
14986
    @Override
14987
    public int hashCode() {
14988
      return 0;
14989
    }
14990
 
14991
    public int compareTo(markOrdersAsManifested_args other) {
14992
      if (!getClass().equals(other.getClass())) {
14993
        return getClass().getName().compareTo(other.getClass().getName());
14994
      }
14995
 
14996
      int lastComparison = 0;
14997
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
14998
 
14999
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
15000
      if (lastComparison != 0) {
15001
        return lastComparison;
15002
      }
15003
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
15004
      if (lastComparison != 0) {
15005
        return lastComparison;
15006
      }
15007
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
15008
      if (lastComparison != 0) {
15009
        return lastComparison;
15010
      }
15011
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
15012
      if (lastComparison != 0) {
15013
        return lastComparison;
15014
      }
15015
      return 0;
15016
    }
15017
 
15018
    public void read(TProtocol iprot) throws TException {
15019
      TField field;
15020
      iprot.readStructBegin();
15021
      while (true)
15022
      {
15023
        field = iprot.readFieldBegin();
15024
        if (field.type == TType.STOP) { 
15025
          break;
15026
        }
15027
        _Fields fieldId = _Fields.findByThriftId(field.id);
15028
        if (fieldId == null) {
15029
          TProtocolUtil.skip(iprot, field.type);
15030
        } else {
15031
          switch (fieldId) {
15032
            case WAREHOUSE_ID:
15033
              if (field.type == TType.I64) {
15034
                this.warehouseId = iprot.readI64();
15035
                setWarehouseIdIsSet(true);
15036
              } else { 
15037
                TProtocolUtil.skip(iprot, field.type);
15038
              }
15039
              break;
15040
            case PROVIDER_ID:
15041
              if (field.type == TType.I64) {
15042
                this.providerId = iprot.readI64();
15043
                setProviderIdIsSet(true);
15044
              } else { 
15045
                TProtocolUtil.skip(iprot, field.type);
15046
              }
15047
              break;
15048
          }
15049
          iprot.readFieldEnd();
15050
        }
15051
      }
15052
      iprot.readStructEnd();
15053
      validate();
15054
    }
15055
 
15056
    public void write(TProtocol oprot) throws TException {
15057
      validate();
15058
 
15059
      oprot.writeStructBegin(STRUCT_DESC);
15060
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
15061
      oprot.writeI64(this.warehouseId);
15062
      oprot.writeFieldEnd();
15063
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
15064
      oprot.writeI64(this.providerId);
15065
      oprot.writeFieldEnd();
15066
      oprot.writeFieldStop();
15067
      oprot.writeStructEnd();
15068
    }
15069
 
15070
    @Override
15071
    public String toString() {
15072
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
15073
      boolean first = true;
15074
 
15075
      sb.append("warehouseId:");
15076
      sb.append(this.warehouseId);
15077
      first = false;
15078
      if (!first) sb.append(", ");
15079
      sb.append("providerId:");
15080
      sb.append(this.providerId);
15081
      first = false;
15082
      sb.append(")");
15083
      return sb.toString();
15084
    }
15085
 
15086
    public void validate() throws TException {
15087
      // check for required fields
15088
    }
15089
 
15090
  }
15091
 
15092
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
15093
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
15094
 
15095
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15096
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15097
 
15098
    private boolean success;
15099
    private TransactionServiceException ex;
15100
 
15101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15102
    public enum _Fields implements TFieldIdEnum {
15103
      SUCCESS((short)0, "success"),
15104
      EX((short)1, "ex");
15105
 
15106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15108
 
15109
      static {
15110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15111
          byId.put((int)field._thriftId, field);
15112
          byName.put(field.getFieldName(), field);
15113
        }
15114
      }
15115
 
15116
      /**
15117
       * Find the _Fields constant that matches fieldId, or null if its not found.
15118
       */
15119
      public static _Fields findByThriftId(int fieldId) {
15120
        return byId.get(fieldId);
15121
      }
15122
 
15123
      /**
15124
       * Find the _Fields constant that matches fieldId, throwing an exception
15125
       * if it is not found.
15126
       */
15127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15128
        _Fields fields = findByThriftId(fieldId);
15129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15130
        return fields;
15131
      }
15132
 
15133
      /**
15134
       * Find the _Fields constant that matches name, or null if its not found.
15135
       */
15136
      public static _Fields findByName(String name) {
15137
        return byName.get(name);
15138
      }
15139
 
15140
      private final short _thriftId;
15141
      private final String _fieldName;
15142
 
15143
      _Fields(short thriftId, String fieldName) {
15144
        _thriftId = thriftId;
15145
        _fieldName = fieldName;
15146
      }
15147
 
15148
      public short getThriftFieldId() {
15149
        return _thriftId;
15150
      }
15151
 
15152
      public String getFieldName() {
15153
        return _fieldName;
15154
      }
15155
    }
15156
 
15157
    // isset id assignments
15158
    private static final int __SUCCESS_ISSET_ID = 0;
15159
    private BitSet __isset_bit_vector = new BitSet(1);
15160
 
15161
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15162
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15163
          new FieldValueMetaData(TType.BOOL)));
15164
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15165
          new FieldValueMetaData(TType.STRUCT)));
15166
    }});
15167
 
15168
    static {
15169
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
15170
    }
15171
 
15172
    public markOrdersAsManifested_result() {
15173
    }
15174
 
15175
    public markOrdersAsManifested_result(
15176
      boolean success,
15177
      TransactionServiceException ex)
15178
    {
15179
      this();
15180
      this.success = success;
15181
      setSuccessIsSet(true);
15182
      this.ex = ex;
15183
    }
15184
 
15185
    /**
15186
     * Performs a deep copy on <i>other</i>.
15187
     */
15188
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
15189
      __isset_bit_vector.clear();
15190
      __isset_bit_vector.or(other.__isset_bit_vector);
15191
      this.success = other.success;
15192
      if (other.isSetEx()) {
15193
        this.ex = new TransactionServiceException(other.ex);
15194
      }
15195
    }
15196
 
15197
    public markOrdersAsManifested_result deepCopy() {
15198
      return new markOrdersAsManifested_result(this);
15199
    }
15200
 
15201
    @Deprecated
15202
    public markOrdersAsManifested_result clone() {
15203
      return new markOrdersAsManifested_result(this);
15204
    }
15205
 
15206
    public boolean isSuccess() {
15207
      return this.success;
15208
    }
15209
 
15210
    public markOrdersAsManifested_result setSuccess(boolean success) {
15211
      this.success = success;
15212
      setSuccessIsSet(true);
15213
      return this;
15214
    }
15215
 
15216
    public void unsetSuccess() {
15217
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15218
    }
15219
 
15220
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15221
    public boolean isSetSuccess() {
15222
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15223
    }
15224
 
15225
    public void setSuccessIsSet(boolean value) {
15226
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15227
    }
15228
 
15229
    public TransactionServiceException getEx() {
15230
      return this.ex;
15231
    }
15232
 
15233
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
15234
      this.ex = ex;
15235
      return this;
15236
    }
15237
 
15238
    public void unsetEx() {
15239
      this.ex = null;
15240
    }
15241
 
15242
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15243
    public boolean isSetEx() {
15244
      return this.ex != null;
15245
    }
15246
 
15247
    public void setExIsSet(boolean value) {
15248
      if (!value) {
15249
        this.ex = null;
15250
      }
15251
    }
15252
 
15253
    public void setFieldValue(_Fields field, Object value) {
15254
      switch (field) {
15255
      case SUCCESS:
15256
        if (value == null) {
15257
          unsetSuccess();
15258
        } else {
15259
          setSuccess((Boolean)value);
15260
        }
15261
        break;
15262
 
15263
      case EX:
15264
        if (value == null) {
15265
          unsetEx();
15266
        } else {
15267
          setEx((TransactionServiceException)value);
15268
        }
15269
        break;
15270
 
15271
      }
15272
    }
15273
 
15274
    public void setFieldValue(int fieldID, Object value) {
15275
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15276
    }
15277
 
15278
    public Object getFieldValue(_Fields field) {
15279
      switch (field) {
15280
      case SUCCESS:
15281
        return new Boolean(isSuccess());
15282
 
15283
      case EX:
15284
        return getEx();
15285
 
15286
      }
15287
      throw new IllegalStateException();
15288
    }
15289
 
15290
    public Object getFieldValue(int fieldId) {
15291
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15292
    }
15293
 
15294
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15295
    public boolean isSet(_Fields field) {
15296
      switch (field) {
15297
      case SUCCESS:
15298
        return isSetSuccess();
15299
      case EX:
15300
        return isSetEx();
15301
      }
15302
      throw new IllegalStateException();
15303
    }
15304
 
15305
    public boolean isSet(int fieldID) {
15306
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15307
    }
15308
 
15309
    @Override
15310
    public boolean equals(Object that) {
15311
      if (that == null)
15312
        return false;
15313
      if (that instanceof markOrdersAsManifested_result)
15314
        return this.equals((markOrdersAsManifested_result)that);
15315
      return false;
15316
    }
15317
 
15318
    public boolean equals(markOrdersAsManifested_result that) {
15319
      if (that == null)
15320
        return false;
15321
 
15322
      boolean this_present_success = true;
15323
      boolean that_present_success = true;
15324
      if (this_present_success || that_present_success) {
15325
        if (!(this_present_success && that_present_success))
15326
          return false;
15327
        if (this.success != that.success)
15328
          return false;
15329
      }
15330
 
15331
      boolean this_present_ex = true && this.isSetEx();
15332
      boolean that_present_ex = true && that.isSetEx();
15333
      if (this_present_ex || that_present_ex) {
15334
        if (!(this_present_ex && that_present_ex))
15335
          return false;
15336
        if (!this.ex.equals(that.ex))
15337
          return false;
15338
      }
15339
 
15340
      return true;
15341
    }
15342
 
15343
    @Override
15344
    public int hashCode() {
15345
      return 0;
15346
    }
15347
 
15348
    public int compareTo(markOrdersAsManifested_result other) {
15349
      if (!getClass().equals(other.getClass())) {
15350
        return getClass().getName().compareTo(other.getClass().getName());
15351
      }
15352
 
15353
      int lastComparison = 0;
15354
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
15355
 
15356
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15357
      if (lastComparison != 0) {
15358
        return lastComparison;
15359
      }
15360
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15361
      if (lastComparison != 0) {
15362
        return lastComparison;
15363
      }
15364
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15365
      if (lastComparison != 0) {
15366
        return lastComparison;
15367
      }
15368
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15369
      if (lastComparison != 0) {
15370
        return lastComparison;
15371
      }
15372
      return 0;
15373
    }
15374
 
15375
    public void read(TProtocol iprot) throws TException {
15376
      TField field;
15377
      iprot.readStructBegin();
15378
      while (true)
15379
      {
15380
        field = iprot.readFieldBegin();
15381
        if (field.type == TType.STOP) { 
15382
          break;
15383
        }
15384
        _Fields fieldId = _Fields.findByThriftId(field.id);
15385
        if (fieldId == null) {
15386
          TProtocolUtil.skip(iprot, field.type);
15387
        } else {
15388
          switch (fieldId) {
15389
            case SUCCESS:
15390
              if (field.type == TType.BOOL) {
15391
                this.success = iprot.readBool();
15392
                setSuccessIsSet(true);
15393
              } else { 
15394
                TProtocolUtil.skip(iprot, field.type);
15395
              }
15396
              break;
15397
            case EX:
15398
              if (field.type == TType.STRUCT) {
15399
                this.ex = new TransactionServiceException();
15400
                this.ex.read(iprot);
15401
              } else { 
15402
                TProtocolUtil.skip(iprot, field.type);
15403
              }
15404
              break;
15405
          }
15406
          iprot.readFieldEnd();
15407
        }
15408
      }
15409
      iprot.readStructEnd();
15410
      validate();
15411
    }
15412
 
15413
    public void write(TProtocol oprot) throws TException {
15414
      oprot.writeStructBegin(STRUCT_DESC);
15415
 
15416
      if (this.isSetSuccess()) {
15417
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15418
        oprot.writeBool(this.success);
15419
        oprot.writeFieldEnd();
15420
      } else if (this.isSetEx()) {
15421
        oprot.writeFieldBegin(EX_FIELD_DESC);
15422
        this.ex.write(oprot);
15423
        oprot.writeFieldEnd();
15424
      }
15425
      oprot.writeFieldStop();
15426
      oprot.writeStructEnd();
15427
    }
15428
 
15429
    @Override
15430
    public String toString() {
15431
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
15432
      boolean first = true;
15433
 
15434
      sb.append("success:");
15435
      sb.append(this.success);
15436
      first = false;
15437
      if (!first) sb.append(", ");
15438
      sb.append("ex:");
15439
      if (this.ex == null) {
15440
        sb.append("null");
15441
      } else {
15442
        sb.append(this.ex);
15443
      }
15444
      first = false;
15445
      sb.append(")");
15446
      return sb.toString();
15447
    }
15448
 
15449
    public void validate() throws TException {
15450
      // check for required fields
15451
    }
15452
 
15453
  }
15454
 
305 ashish 15455
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
15456
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
15457
 
483 rajveer 15458
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 15459
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
15460
 
483 rajveer 15461
    private long orderId;
305 ashish 15462
    private boolean valid;
15463
 
15464
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15465
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15466
      ORDER_ID((short)1, "orderId"),
305 ashish 15467
      VALID((short)2, "valid");
15468
 
15469
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15470
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15471
 
15472
      static {
15473
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15474
          byId.put((int)field._thriftId, field);
15475
          byName.put(field.getFieldName(), field);
15476
        }
15477
      }
15478
 
15479
      /**
15480
       * Find the _Fields constant that matches fieldId, or null if its not found.
15481
       */
15482
      public static _Fields findByThriftId(int fieldId) {
15483
        return byId.get(fieldId);
15484
      }
15485
 
15486
      /**
15487
       * Find the _Fields constant that matches fieldId, throwing an exception
15488
       * if it is not found.
15489
       */
15490
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15491
        _Fields fields = findByThriftId(fieldId);
15492
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15493
        return fields;
15494
      }
15495
 
15496
      /**
15497
       * Find the _Fields constant that matches name, or null if its not found.
15498
       */
15499
      public static _Fields findByName(String name) {
15500
        return byName.get(name);
15501
      }
15502
 
15503
      private final short _thriftId;
15504
      private final String _fieldName;
15505
 
15506
      _Fields(short thriftId, String fieldName) {
15507
        _thriftId = thriftId;
15508
        _fieldName = fieldName;
15509
      }
15510
 
15511
      public short getThriftFieldId() {
15512
        return _thriftId;
15513
      }
15514
 
15515
      public String getFieldName() {
15516
        return _fieldName;
15517
      }
15518
    }
15519
 
15520
    // isset id assignments
483 rajveer 15521
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 15522
    private static final int __VALID_ISSET_ID = 1;
15523
    private BitSet __isset_bit_vector = new BitSet(2);
15524
 
15525
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15526
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 15527
          new FieldValueMetaData(TType.I64)));
15528
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
15529
          new FieldValueMetaData(TType.BOOL)));
15530
    }});
15531
 
15532
    static {
15533
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
15534
    }
15535
 
15536
    public getAlerts_args() {
15537
    }
15538
 
15539
    public getAlerts_args(
483 rajveer 15540
      long orderId,
305 ashish 15541
      boolean valid)
15542
    {
15543
      this();
483 rajveer 15544
      this.orderId = orderId;
15545
      setOrderIdIsSet(true);
305 ashish 15546
      this.valid = valid;
15547
      setValidIsSet(true);
15548
    }
15549
 
15550
    /**
15551
     * Performs a deep copy on <i>other</i>.
15552
     */
15553
    public getAlerts_args(getAlerts_args other) {
15554
      __isset_bit_vector.clear();
15555
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15556
      this.orderId = other.orderId;
305 ashish 15557
      this.valid = other.valid;
15558
    }
15559
 
15560
    public getAlerts_args deepCopy() {
15561
      return new getAlerts_args(this);
15562
    }
15563
 
15564
    @Deprecated
15565
    public getAlerts_args clone() {
15566
      return new getAlerts_args(this);
15567
    }
15568
 
483 rajveer 15569
    public long getOrderId() {
15570
      return this.orderId;
305 ashish 15571
    }
15572
 
483 rajveer 15573
    public getAlerts_args setOrderId(long orderId) {
15574
      this.orderId = orderId;
15575
      setOrderIdIsSet(true);
305 ashish 15576
      return this;
15577
    }
15578
 
483 rajveer 15579
    public void unsetOrderId() {
15580
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 15581
    }
15582
 
483 rajveer 15583
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15584
    public boolean isSetOrderId() {
15585
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 15586
    }
15587
 
483 rajveer 15588
    public void setOrderIdIsSet(boolean value) {
15589
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 15590
    }
15591
 
15592
    public boolean isValid() {
15593
      return this.valid;
15594
    }
15595
 
15596
    public getAlerts_args setValid(boolean valid) {
15597
      this.valid = valid;
15598
      setValidIsSet(true);
15599
      return this;
15600
    }
15601
 
15602
    public void unsetValid() {
15603
      __isset_bit_vector.clear(__VALID_ISSET_ID);
15604
    }
15605
 
15606
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
15607
    public boolean isSetValid() {
15608
      return __isset_bit_vector.get(__VALID_ISSET_ID);
15609
    }
15610
 
15611
    public void setValidIsSet(boolean value) {
15612
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
15613
    }
15614
 
15615
    public void setFieldValue(_Fields field, Object value) {
15616
      switch (field) {
483 rajveer 15617
      case ORDER_ID:
305 ashish 15618
        if (value == null) {
483 rajveer 15619
          unsetOrderId();
305 ashish 15620
        } else {
483 rajveer 15621
          setOrderId((Long)value);
305 ashish 15622
        }
15623
        break;
15624
 
15625
      case VALID:
15626
        if (value == null) {
15627
          unsetValid();
15628
        } else {
15629
          setValid((Boolean)value);
15630
        }
15631
        break;
15632
 
15633
      }
15634
    }
15635
 
15636
    public void setFieldValue(int fieldID, Object value) {
15637
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15638
    }
15639
 
15640
    public Object getFieldValue(_Fields field) {
15641
      switch (field) {
483 rajveer 15642
      case ORDER_ID:
15643
        return new Long(getOrderId());
305 ashish 15644
 
15645
      case VALID:
15646
        return new Boolean(isValid());
15647
 
15648
      }
15649
      throw new IllegalStateException();
15650
    }
15651
 
15652
    public Object getFieldValue(int fieldId) {
15653
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15654
    }
15655
 
15656
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15657
    public boolean isSet(_Fields field) {
15658
      switch (field) {
483 rajveer 15659
      case ORDER_ID:
15660
        return isSetOrderId();
305 ashish 15661
      case VALID:
15662
        return isSetValid();
15663
      }
15664
      throw new IllegalStateException();
15665
    }
15666
 
15667
    public boolean isSet(int fieldID) {
15668
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15669
    }
15670
 
15671
    @Override
15672
    public boolean equals(Object that) {
15673
      if (that == null)
15674
        return false;
15675
      if (that instanceof getAlerts_args)
15676
        return this.equals((getAlerts_args)that);
15677
      return false;
15678
    }
15679
 
15680
    public boolean equals(getAlerts_args that) {
15681
      if (that == null)
15682
        return false;
15683
 
483 rajveer 15684
      boolean this_present_orderId = true;
15685
      boolean that_present_orderId = true;
15686
      if (this_present_orderId || that_present_orderId) {
15687
        if (!(this_present_orderId && that_present_orderId))
305 ashish 15688
          return false;
483 rajveer 15689
        if (this.orderId != that.orderId)
305 ashish 15690
          return false;
15691
      }
15692
 
15693
      boolean this_present_valid = true;
15694
      boolean that_present_valid = true;
15695
      if (this_present_valid || that_present_valid) {
15696
        if (!(this_present_valid && that_present_valid))
15697
          return false;
15698
        if (this.valid != that.valid)
15699
          return false;
15700
      }
15701
 
15702
      return true;
15703
    }
15704
 
15705
    @Override
15706
    public int hashCode() {
15707
      return 0;
15708
    }
15709
 
15710
    public int compareTo(getAlerts_args other) {
15711
      if (!getClass().equals(other.getClass())) {
15712
        return getClass().getName().compareTo(other.getClass().getName());
15713
      }
15714
 
15715
      int lastComparison = 0;
15716
      getAlerts_args typedOther = (getAlerts_args)other;
15717
 
483 rajveer 15718
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 15719
      if (lastComparison != 0) {
15720
        return lastComparison;
15721
      }
483 rajveer 15722
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 15723
      if (lastComparison != 0) {
15724
        return lastComparison;
15725
      }
15726
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
15727
      if (lastComparison != 0) {
15728
        return lastComparison;
15729
      }
15730
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
15731
      if (lastComparison != 0) {
15732
        return lastComparison;
15733
      }
15734
      return 0;
15735
    }
15736
 
15737
    public void read(TProtocol iprot) throws TException {
15738
      TField field;
15739
      iprot.readStructBegin();
15740
      while (true)
15741
      {
15742
        field = iprot.readFieldBegin();
15743
        if (field.type == TType.STOP) { 
15744
          break;
15745
        }
15746
        _Fields fieldId = _Fields.findByThriftId(field.id);
15747
        if (fieldId == null) {
15748
          TProtocolUtil.skip(iprot, field.type);
15749
        } else {
15750
          switch (fieldId) {
483 rajveer 15751
            case ORDER_ID:
305 ashish 15752
              if (field.type == TType.I64) {
483 rajveer 15753
                this.orderId = iprot.readI64();
15754
                setOrderIdIsSet(true);
305 ashish 15755
              } else { 
15756
                TProtocolUtil.skip(iprot, field.type);
15757
              }
15758
              break;
15759
            case VALID:
15760
              if (field.type == TType.BOOL) {
15761
                this.valid = iprot.readBool();
15762
                setValidIsSet(true);
15763
              } else { 
15764
                TProtocolUtil.skip(iprot, field.type);
15765
              }
15766
              break;
15767
          }
15768
          iprot.readFieldEnd();
15769
        }
15770
      }
15771
      iprot.readStructEnd();
15772
      validate();
15773
    }
15774
 
15775
    public void write(TProtocol oprot) throws TException {
15776
      validate();
15777
 
15778
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15779
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15780
      oprot.writeI64(this.orderId);
305 ashish 15781
      oprot.writeFieldEnd();
15782
      oprot.writeFieldBegin(VALID_FIELD_DESC);
15783
      oprot.writeBool(this.valid);
15784
      oprot.writeFieldEnd();
15785
      oprot.writeFieldStop();
15786
      oprot.writeStructEnd();
15787
    }
15788
 
15789
    @Override
15790
    public String toString() {
15791
      StringBuilder sb = new StringBuilder("getAlerts_args(");
15792
      boolean first = true;
15793
 
483 rajveer 15794
      sb.append("orderId:");
15795
      sb.append(this.orderId);
305 ashish 15796
      first = false;
15797
      if (!first) sb.append(", ");
15798
      sb.append("valid:");
15799
      sb.append(this.valid);
15800
      first = false;
15801
      sb.append(")");
15802
      return sb.toString();
15803
    }
15804
 
15805
    public void validate() throws TException {
15806
      // check for required fields
15807
    }
15808
 
15809
  }
15810
 
15811
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
15812
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
15813
 
15814
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15815
 
15816
    private List<Alert> success;
15817
 
15818
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15819
    public enum _Fields implements TFieldIdEnum {
15820
      SUCCESS((short)0, "success");
15821
 
15822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15824
 
15825
      static {
15826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15827
          byId.put((int)field._thriftId, field);
15828
          byName.put(field.getFieldName(), field);
15829
        }
15830
      }
15831
 
15832
      /**
15833
       * Find the _Fields constant that matches fieldId, or null if its not found.
15834
       */
15835
      public static _Fields findByThriftId(int fieldId) {
15836
        return byId.get(fieldId);
15837
      }
15838
 
15839
      /**
15840
       * Find the _Fields constant that matches fieldId, throwing an exception
15841
       * if it is not found.
15842
       */
15843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15844
        _Fields fields = findByThriftId(fieldId);
15845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15846
        return fields;
15847
      }
15848
 
15849
      /**
15850
       * Find the _Fields constant that matches name, or null if its not found.
15851
       */
15852
      public static _Fields findByName(String name) {
15853
        return byName.get(name);
15854
      }
15855
 
15856
      private final short _thriftId;
15857
      private final String _fieldName;
15858
 
15859
      _Fields(short thriftId, String fieldName) {
15860
        _thriftId = thriftId;
15861
        _fieldName = fieldName;
15862
      }
15863
 
15864
      public short getThriftFieldId() {
15865
        return _thriftId;
15866
      }
15867
 
15868
      public String getFieldName() {
15869
        return _fieldName;
15870
      }
15871
    }
15872
 
15873
    // isset id assignments
15874
 
15875
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15876
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15877
          new ListMetaData(TType.LIST, 
15878
              new StructMetaData(TType.STRUCT, Alert.class))));
15879
    }});
15880
 
15881
    static {
15882
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
15883
    }
15884
 
15885
    public getAlerts_result() {
15886
    }
15887
 
15888
    public getAlerts_result(
15889
      List<Alert> success)
15890
    {
15891
      this();
15892
      this.success = success;
15893
    }
15894
 
15895
    /**
15896
     * Performs a deep copy on <i>other</i>.
15897
     */
15898
    public getAlerts_result(getAlerts_result other) {
15899
      if (other.isSetSuccess()) {
15900
        List<Alert> __this__success = new ArrayList<Alert>();
15901
        for (Alert other_element : other.success) {
15902
          __this__success.add(new Alert(other_element));
15903
        }
15904
        this.success = __this__success;
15905
      }
15906
    }
15907
 
15908
    public getAlerts_result deepCopy() {
15909
      return new getAlerts_result(this);
15910
    }
15911
 
15912
    @Deprecated
15913
    public getAlerts_result clone() {
15914
      return new getAlerts_result(this);
15915
    }
15916
 
15917
    public int getSuccessSize() {
15918
      return (this.success == null) ? 0 : this.success.size();
15919
    }
15920
 
15921
    public java.util.Iterator<Alert> getSuccessIterator() {
15922
      return (this.success == null) ? null : this.success.iterator();
15923
    }
15924
 
15925
    public void addToSuccess(Alert elem) {
15926
      if (this.success == null) {
15927
        this.success = new ArrayList<Alert>();
15928
      }
15929
      this.success.add(elem);
15930
    }
15931
 
15932
    public List<Alert> getSuccess() {
15933
      return this.success;
15934
    }
15935
 
15936
    public getAlerts_result setSuccess(List<Alert> success) {
15937
      this.success = success;
15938
      return this;
15939
    }
15940
 
15941
    public void unsetSuccess() {
15942
      this.success = null;
15943
    }
15944
 
15945
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15946
    public boolean isSetSuccess() {
15947
      return this.success != null;
15948
    }
15949
 
15950
    public void setSuccessIsSet(boolean value) {
15951
      if (!value) {
15952
        this.success = null;
15953
      }
15954
    }
15955
 
15956
    public void setFieldValue(_Fields field, Object value) {
15957
      switch (field) {
15958
      case SUCCESS:
15959
        if (value == null) {
15960
          unsetSuccess();
15961
        } else {
15962
          setSuccess((List<Alert>)value);
15963
        }
15964
        break;
15965
 
15966
      }
15967
    }
15968
 
15969
    public void setFieldValue(int fieldID, Object value) {
15970
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15971
    }
15972
 
15973
    public Object getFieldValue(_Fields field) {
15974
      switch (field) {
15975
      case SUCCESS:
15976
        return getSuccess();
15977
 
15978
      }
15979
      throw new IllegalStateException();
15980
    }
15981
 
15982
    public Object getFieldValue(int fieldId) {
15983
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15984
    }
15985
 
15986
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15987
    public boolean isSet(_Fields field) {
15988
      switch (field) {
15989
      case SUCCESS:
15990
        return isSetSuccess();
15991
      }
15992
      throw new IllegalStateException();
15993
    }
15994
 
15995
    public boolean isSet(int fieldID) {
15996
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15997
    }
15998
 
15999
    @Override
16000
    public boolean equals(Object that) {
16001
      if (that == null)
16002
        return false;
16003
      if (that instanceof getAlerts_result)
16004
        return this.equals((getAlerts_result)that);
16005
      return false;
16006
    }
16007
 
16008
    public boolean equals(getAlerts_result that) {
16009
      if (that == null)
16010
        return false;
16011
 
16012
      boolean this_present_success = true && this.isSetSuccess();
16013
      boolean that_present_success = true && that.isSetSuccess();
16014
      if (this_present_success || that_present_success) {
16015
        if (!(this_present_success && that_present_success))
16016
          return false;
16017
        if (!this.success.equals(that.success))
16018
          return false;
16019
      }
16020
 
16021
      return true;
16022
    }
16023
 
16024
    @Override
16025
    public int hashCode() {
16026
      return 0;
16027
    }
16028
 
16029
    public int compareTo(getAlerts_result other) {
16030
      if (!getClass().equals(other.getClass())) {
16031
        return getClass().getName().compareTo(other.getClass().getName());
16032
      }
16033
 
16034
      int lastComparison = 0;
16035
      getAlerts_result typedOther = (getAlerts_result)other;
16036
 
16037
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16038
      if (lastComparison != 0) {
16039
        return lastComparison;
16040
      }
16041
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16042
      if (lastComparison != 0) {
16043
        return lastComparison;
16044
      }
16045
      return 0;
16046
    }
16047
 
16048
    public void read(TProtocol iprot) throws TException {
16049
      TField field;
16050
      iprot.readStructBegin();
16051
      while (true)
16052
      {
16053
        field = iprot.readFieldBegin();
16054
        if (field.type == TType.STOP) { 
16055
          break;
16056
        }
16057
        _Fields fieldId = _Fields.findByThriftId(field.id);
16058
        if (fieldId == null) {
16059
          TProtocolUtil.skip(iprot, field.type);
16060
        } else {
16061
          switch (fieldId) {
16062
            case SUCCESS:
16063
              if (field.type == TType.LIST) {
16064
                {
1022 varun.gupt 16065
                  TList _list36 = iprot.readListBegin();
16066
                  this.success = new ArrayList<Alert>(_list36.size);
16067
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
305 ashish 16068
                  {
1022 varun.gupt 16069
                    Alert _elem38;
16070
                    _elem38 = new Alert();
16071
                    _elem38.read(iprot);
16072
                    this.success.add(_elem38);
305 ashish 16073
                  }
16074
                  iprot.readListEnd();
16075
                }
16076
              } else { 
16077
                TProtocolUtil.skip(iprot, field.type);
16078
              }
16079
              break;
16080
          }
16081
          iprot.readFieldEnd();
16082
        }
16083
      }
16084
      iprot.readStructEnd();
16085
      validate();
16086
    }
16087
 
16088
    public void write(TProtocol oprot) throws TException {
16089
      oprot.writeStructBegin(STRUCT_DESC);
16090
 
16091
      if (this.isSetSuccess()) {
16092
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16093
        {
16094
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 16095
          for (Alert _iter39 : this.success)
305 ashish 16096
          {
1022 varun.gupt 16097
            _iter39.write(oprot);
305 ashish 16098
          }
16099
          oprot.writeListEnd();
16100
        }
16101
        oprot.writeFieldEnd();
16102
      }
16103
      oprot.writeFieldStop();
16104
      oprot.writeStructEnd();
16105
    }
16106
 
16107
    @Override
16108
    public String toString() {
16109
      StringBuilder sb = new StringBuilder("getAlerts_result(");
16110
      boolean first = true;
16111
 
16112
      sb.append("success:");
16113
      if (this.success == null) {
16114
        sb.append("null");
16115
      } else {
16116
        sb.append(this.success);
16117
      }
16118
      first = false;
16119
      sb.append(")");
16120
      return sb.toString();
16121
    }
16122
 
16123
    public void validate() throws TException {
16124
      // check for required fields
16125
    }
16126
 
16127
  }
16128
 
16129
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
16130
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
16131
 
483 rajveer 16132
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 16133
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
16134
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
16135
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
16136
 
483 rajveer 16137
    private long orderId;
305 ashish 16138
    private boolean unset;
16139
    private long type;
16140
    private String comment;
16141
 
16142
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16143
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16144
      ORDER_ID((short)1, "orderId"),
305 ashish 16145
      UNSET((short)2, "unset"),
16146
      TYPE((short)3, "type"),
16147
      COMMENT((short)4, "comment");
16148
 
16149
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16150
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16151
 
16152
      static {
16153
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16154
          byId.put((int)field._thriftId, field);
16155
          byName.put(field.getFieldName(), field);
16156
        }
16157
      }
16158
 
16159
      /**
16160
       * Find the _Fields constant that matches fieldId, or null if its not found.
16161
       */
16162
      public static _Fields findByThriftId(int fieldId) {
16163
        return byId.get(fieldId);
16164
      }
16165
 
16166
      /**
16167
       * Find the _Fields constant that matches fieldId, throwing an exception
16168
       * if it is not found.
16169
       */
16170
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16171
        _Fields fields = findByThriftId(fieldId);
16172
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16173
        return fields;
16174
      }
16175
 
16176
      /**
16177
       * Find the _Fields constant that matches name, or null if its not found.
16178
       */
16179
      public static _Fields findByName(String name) {
16180
        return byName.get(name);
16181
      }
16182
 
16183
      private final short _thriftId;
16184
      private final String _fieldName;
16185
 
16186
      _Fields(short thriftId, String fieldName) {
16187
        _thriftId = thriftId;
16188
        _fieldName = fieldName;
16189
      }
16190
 
16191
      public short getThriftFieldId() {
16192
        return _thriftId;
16193
      }
16194
 
16195
      public String getFieldName() {
16196
        return _fieldName;
16197
      }
16198
    }
16199
 
16200
    // isset id assignments
483 rajveer 16201
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 16202
    private static final int __UNSET_ISSET_ID = 1;
16203
    private static final int __TYPE_ISSET_ID = 2;
16204
    private BitSet __isset_bit_vector = new BitSet(3);
16205
 
16206
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16207
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 16208
          new FieldValueMetaData(TType.I64)));
16209
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
16210
          new FieldValueMetaData(TType.BOOL)));
16211
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
16212
          new FieldValueMetaData(TType.I64)));
16213
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
16214
          new FieldValueMetaData(TType.STRING)));
16215
    }});
16216
 
16217
    static {
16218
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
16219
    }
16220
 
16221
    public setAlert_args() {
16222
    }
16223
 
16224
    public setAlert_args(
483 rajveer 16225
      long orderId,
305 ashish 16226
      boolean unset,
16227
      long type,
16228
      String comment)
16229
    {
16230
      this();
483 rajveer 16231
      this.orderId = orderId;
16232
      setOrderIdIsSet(true);
305 ashish 16233
      this.unset = unset;
16234
      setUnsetIsSet(true);
16235
      this.type = type;
16236
      setTypeIsSet(true);
16237
      this.comment = comment;
16238
    }
16239
 
16240
    /**
16241
     * Performs a deep copy on <i>other</i>.
16242
     */
16243
    public setAlert_args(setAlert_args other) {
16244
      __isset_bit_vector.clear();
16245
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 16246
      this.orderId = other.orderId;
305 ashish 16247
      this.unset = other.unset;
16248
      this.type = other.type;
16249
      if (other.isSetComment()) {
16250
        this.comment = other.comment;
16251
      }
16252
    }
16253
 
16254
    public setAlert_args deepCopy() {
16255
      return new setAlert_args(this);
16256
    }
16257
 
16258
    @Deprecated
16259
    public setAlert_args clone() {
16260
      return new setAlert_args(this);
16261
    }
16262
 
483 rajveer 16263
    public long getOrderId() {
16264
      return this.orderId;
305 ashish 16265
    }
16266
 
483 rajveer 16267
    public setAlert_args setOrderId(long orderId) {
16268
      this.orderId = orderId;
16269
      setOrderIdIsSet(true);
305 ashish 16270
      return this;
16271
    }
16272
 
483 rajveer 16273
    public void unsetOrderId() {
16274
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 16275
    }
16276
 
483 rajveer 16277
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16278
    public boolean isSetOrderId() {
16279
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 16280
    }
16281
 
483 rajveer 16282
    public void setOrderIdIsSet(boolean value) {
16283
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 16284
    }
16285
 
16286
    public boolean isUnset() {
16287
      return this.unset;
16288
    }
16289
 
16290
    public setAlert_args setUnset(boolean unset) {
16291
      this.unset = unset;
16292
      setUnsetIsSet(true);
16293
      return this;
16294
    }
16295
 
16296
    public void unsetUnset() {
16297
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
16298
    }
16299
 
16300
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
16301
    public boolean isSetUnset() {
16302
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
16303
    }
16304
 
16305
    public void setUnsetIsSet(boolean value) {
16306
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
16307
    }
16308
 
16309
    public long getType() {
16310
      return this.type;
16311
    }
16312
 
16313
    public setAlert_args setType(long type) {
16314
      this.type = type;
16315
      setTypeIsSet(true);
16316
      return this;
16317
    }
16318
 
16319
    public void unsetType() {
16320
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
16321
    }
16322
 
16323
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
16324
    public boolean isSetType() {
16325
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
16326
    }
16327
 
16328
    public void setTypeIsSet(boolean value) {
16329
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
16330
    }
16331
 
16332
    public String getComment() {
16333
      return this.comment;
16334
    }
16335
 
16336
    public setAlert_args setComment(String comment) {
16337
      this.comment = comment;
16338
      return this;
16339
    }
16340
 
16341
    public void unsetComment() {
16342
      this.comment = null;
16343
    }
16344
 
16345
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
16346
    public boolean isSetComment() {
16347
      return this.comment != null;
16348
    }
16349
 
16350
    public void setCommentIsSet(boolean value) {
16351
      if (!value) {
16352
        this.comment = null;
16353
      }
16354
    }
16355
 
16356
    public void setFieldValue(_Fields field, Object value) {
16357
      switch (field) {
483 rajveer 16358
      case ORDER_ID:
305 ashish 16359
        if (value == null) {
483 rajveer 16360
          unsetOrderId();
305 ashish 16361
        } else {
483 rajveer 16362
          setOrderId((Long)value);
305 ashish 16363
        }
16364
        break;
16365
 
16366
      case UNSET:
16367
        if (value == null) {
16368
          unsetUnset();
16369
        } else {
16370
          setUnset((Boolean)value);
16371
        }
16372
        break;
16373
 
16374
      case TYPE:
16375
        if (value == null) {
16376
          unsetType();
16377
        } else {
16378
          setType((Long)value);
16379
        }
16380
        break;
16381
 
16382
      case COMMENT:
16383
        if (value == null) {
16384
          unsetComment();
16385
        } else {
16386
          setComment((String)value);
16387
        }
16388
        break;
16389
 
16390
      }
16391
    }
16392
 
16393
    public void setFieldValue(int fieldID, Object value) {
16394
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16395
    }
16396
 
16397
    public Object getFieldValue(_Fields field) {
16398
      switch (field) {
483 rajveer 16399
      case ORDER_ID:
16400
        return new Long(getOrderId());
305 ashish 16401
 
16402
      case UNSET:
16403
        return new Boolean(isUnset());
16404
 
16405
      case TYPE:
16406
        return new Long(getType());
16407
 
16408
      case COMMENT:
16409
        return getComment();
16410
 
16411
      }
16412
      throw new IllegalStateException();
16413
    }
16414
 
16415
    public Object getFieldValue(int fieldId) {
16416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16417
    }
16418
 
16419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16420
    public boolean isSet(_Fields field) {
16421
      switch (field) {
483 rajveer 16422
      case ORDER_ID:
16423
        return isSetOrderId();
305 ashish 16424
      case UNSET:
16425
        return isSetUnset();
16426
      case TYPE:
16427
        return isSetType();
16428
      case COMMENT:
16429
        return isSetComment();
16430
      }
16431
      throw new IllegalStateException();
16432
    }
16433
 
16434
    public boolean isSet(int fieldID) {
16435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16436
    }
16437
 
16438
    @Override
16439
    public boolean equals(Object that) {
16440
      if (that == null)
16441
        return false;
16442
      if (that instanceof setAlert_args)
16443
        return this.equals((setAlert_args)that);
16444
      return false;
16445
    }
16446
 
16447
    public boolean equals(setAlert_args that) {
16448
      if (that == null)
16449
        return false;
16450
 
483 rajveer 16451
      boolean this_present_orderId = true;
16452
      boolean that_present_orderId = true;
16453
      if (this_present_orderId || that_present_orderId) {
16454
        if (!(this_present_orderId && that_present_orderId))
305 ashish 16455
          return false;
483 rajveer 16456
        if (this.orderId != that.orderId)
305 ashish 16457
          return false;
16458
      }
16459
 
16460
      boolean this_present_unset = true;
16461
      boolean that_present_unset = true;
16462
      if (this_present_unset || that_present_unset) {
16463
        if (!(this_present_unset && that_present_unset))
16464
          return false;
16465
        if (this.unset != that.unset)
16466
          return false;
16467
      }
16468
 
16469
      boolean this_present_type = true;
16470
      boolean that_present_type = true;
16471
      if (this_present_type || that_present_type) {
16472
        if (!(this_present_type && that_present_type))
16473
          return false;
16474
        if (this.type != that.type)
16475
          return false;
16476
      }
16477
 
16478
      boolean this_present_comment = true && this.isSetComment();
16479
      boolean that_present_comment = true && that.isSetComment();
16480
      if (this_present_comment || that_present_comment) {
16481
        if (!(this_present_comment && that_present_comment))
16482
          return false;
16483
        if (!this.comment.equals(that.comment))
16484
          return false;
16485
      }
16486
 
16487
      return true;
16488
    }
16489
 
16490
    @Override
16491
    public int hashCode() {
16492
      return 0;
16493
    }
16494
 
16495
    public int compareTo(setAlert_args other) {
16496
      if (!getClass().equals(other.getClass())) {
16497
        return getClass().getName().compareTo(other.getClass().getName());
16498
      }
16499
 
16500
      int lastComparison = 0;
16501
      setAlert_args typedOther = (setAlert_args)other;
16502
 
483 rajveer 16503
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 16504
      if (lastComparison != 0) {
16505
        return lastComparison;
16506
      }
483 rajveer 16507
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 16508
      if (lastComparison != 0) {
16509
        return lastComparison;
16510
      }
16511
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
16512
      if (lastComparison != 0) {
16513
        return lastComparison;
16514
      }
16515
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
16516
      if (lastComparison != 0) {
16517
        return lastComparison;
16518
      }
16519
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
16520
      if (lastComparison != 0) {
16521
        return lastComparison;
16522
      }
16523
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
16524
      if (lastComparison != 0) {
16525
        return lastComparison;
16526
      }
16527
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
16528
      if (lastComparison != 0) {
16529
        return lastComparison;
16530
      }
16531
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
16532
      if (lastComparison != 0) {
16533
        return lastComparison;
16534
      }
16535
      return 0;
16536
    }
16537
 
16538
    public void read(TProtocol iprot) throws TException {
16539
      TField field;
16540
      iprot.readStructBegin();
16541
      while (true)
16542
      {
16543
        field = iprot.readFieldBegin();
16544
        if (field.type == TType.STOP) { 
16545
          break;
16546
        }
16547
        _Fields fieldId = _Fields.findByThriftId(field.id);
16548
        if (fieldId == null) {
16549
          TProtocolUtil.skip(iprot, field.type);
16550
        } else {
16551
          switch (fieldId) {
483 rajveer 16552
            case ORDER_ID:
305 ashish 16553
              if (field.type == TType.I64) {
483 rajveer 16554
                this.orderId = iprot.readI64();
16555
                setOrderIdIsSet(true);
305 ashish 16556
              } else { 
16557
                TProtocolUtil.skip(iprot, field.type);
16558
              }
16559
              break;
16560
            case UNSET:
16561
              if (field.type == TType.BOOL) {
16562
                this.unset = iprot.readBool();
16563
                setUnsetIsSet(true);
16564
              } else { 
16565
                TProtocolUtil.skip(iprot, field.type);
16566
              }
16567
              break;
16568
            case TYPE:
16569
              if (field.type == TType.I64) {
16570
                this.type = iprot.readI64();
16571
                setTypeIsSet(true);
16572
              } else { 
16573
                TProtocolUtil.skip(iprot, field.type);
16574
              }
16575
              break;
16576
            case COMMENT:
16577
              if (field.type == TType.STRING) {
16578
                this.comment = iprot.readString();
16579
              } else { 
16580
                TProtocolUtil.skip(iprot, field.type);
16581
              }
16582
              break;
16583
          }
16584
          iprot.readFieldEnd();
16585
        }
16586
      }
16587
      iprot.readStructEnd();
16588
      validate();
16589
    }
16590
 
16591
    public void write(TProtocol oprot) throws TException {
16592
      validate();
16593
 
16594
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16595
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16596
      oprot.writeI64(this.orderId);
305 ashish 16597
      oprot.writeFieldEnd();
16598
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
16599
      oprot.writeBool(this.unset);
16600
      oprot.writeFieldEnd();
16601
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
16602
      oprot.writeI64(this.type);
16603
      oprot.writeFieldEnd();
16604
      if (this.comment != null) {
16605
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
16606
        oprot.writeString(this.comment);
16607
        oprot.writeFieldEnd();
16608
      }
16609
      oprot.writeFieldStop();
16610
      oprot.writeStructEnd();
16611
    }
16612
 
16613
    @Override
16614
    public String toString() {
16615
      StringBuilder sb = new StringBuilder("setAlert_args(");
16616
      boolean first = true;
16617
 
483 rajveer 16618
      sb.append("orderId:");
16619
      sb.append(this.orderId);
305 ashish 16620
      first = false;
16621
      if (!first) sb.append(", ");
16622
      sb.append("unset:");
16623
      sb.append(this.unset);
16624
      first = false;
16625
      if (!first) sb.append(", ");
16626
      sb.append("type:");
16627
      sb.append(this.type);
16628
      first = false;
16629
      if (!first) sb.append(", ");
16630
      sb.append("comment:");
16631
      if (this.comment == null) {
16632
        sb.append("null");
16633
      } else {
16634
        sb.append(this.comment);
16635
      }
16636
      first = false;
16637
      sb.append(")");
16638
      return sb.toString();
16639
    }
16640
 
16641
    public void validate() throws TException {
16642
      // check for required fields
16643
    }
16644
 
16645
  }
16646
 
16647
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
16648
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
16649
 
16650
 
16651
 
16652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16653
    public enum _Fields implements TFieldIdEnum {
16654
;
16655
 
16656
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16658
 
16659
      static {
16660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16661
          byId.put((int)field._thriftId, field);
16662
          byName.put(field.getFieldName(), field);
16663
        }
16664
      }
16665
 
16666
      /**
16667
       * Find the _Fields constant that matches fieldId, or null if its not found.
16668
       */
16669
      public static _Fields findByThriftId(int fieldId) {
16670
        return byId.get(fieldId);
16671
      }
16672
 
16673
      /**
16674
       * Find the _Fields constant that matches fieldId, throwing an exception
16675
       * if it is not found.
16676
       */
16677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16678
        _Fields fields = findByThriftId(fieldId);
16679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16680
        return fields;
16681
      }
16682
 
16683
      /**
16684
       * Find the _Fields constant that matches name, or null if its not found.
16685
       */
16686
      public static _Fields findByName(String name) {
16687
        return byName.get(name);
16688
      }
16689
 
16690
      private final short _thriftId;
16691
      private final String _fieldName;
16692
 
16693
      _Fields(short thriftId, String fieldName) {
16694
        _thriftId = thriftId;
16695
        _fieldName = fieldName;
16696
      }
16697
 
16698
      public short getThriftFieldId() {
16699
        return _thriftId;
16700
      }
16701
 
16702
      public String getFieldName() {
16703
        return _fieldName;
16704
      }
16705
    }
16706
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16707
    }});
16708
 
16709
    static {
16710
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
16711
    }
16712
 
16713
    public setAlert_result() {
16714
    }
16715
 
16716
    /**
16717
     * Performs a deep copy on <i>other</i>.
16718
     */
16719
    public setAlert_result(setAlert_result other) {
16720
    }
16721
 
16722
    public setAlert_result deepCopy() {
16723
      return new setAlert_result(this);
16724
    }
16725
 
16726
    @Deprecated
16727
    public setAlert_result clone() {
16728
      return new setAlert_result(this);
16729
    }
16730
 
16731
    public void setFieldValue(_Fields field, Object value) {
16732
      switch (field) {
16733
      }
16734
    }
16735
 
16736
    public void setFieldValue(int fieldID, Object value) {
16737
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16738
    }
16739
 
16740
    public Object getFieldValue(_Fields field) {
16741
      switch (field) {
16742
      }
16743
      throw new IllegalStateException();
16744
    }
16745
 
16746
    public Object getFieldValue(int fieldId) {
16747
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16748
    }
16749
 
16750
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16751
    public boolean isSet(_Fields field) {
16752
      switch (field) {
16753
      }
16754
      throw new IllegalStateException();
16755
    }
16756
 
16757
    public boolean isSet(int fieldID) {
16758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16759
    }
16760
 
16761
    @Override
16762
    public boolean equals(Object that) {
16763
      if (that == null)
16764
        return false;
16765
      if (that instanceof setAlert_result)
16766
        return this.equals((setAlert_result)that);
16767
      return false;
16768
    }
16769
 
16770
    public boolean equals(setAlert_result that) {
16771
      if (that == null)
16772
        return false;
16773
 
16774
      return true;
16775
    }
16776
 
16777
    @Override
16778
    public int hashCode() {
16779
      return 0;
16780
    }
16781
 
16782
    public int compareTo(setAlert_result other) {
16783
      if (!getClass().equals(other.getClass())) {
16784
        return getClass().getName().compareTo(other.getClass().getName());
16785
      }
16786
 
16787
      int lastComparison = 0;
16788
      setAlert_result typedOther = (setAlert_result)other;
16789
 
16790
      return 0;
16791
    }
16792
 
16793
    public void read(TProtocol iprot) throws TException {
16794
      TField field;
16795
      iprot.readStructBegin();
16796
      while (true)
16797
      {
16798
        field = iprot.readFieldBegin();
16799
        if (field.type == TType.STOP) { 
16800
          break;
16801
        }
16802
        _Fields fieldId = _Fields.findByThriftId(field.id);
16803
        if (fieldId == null) {
16804
          TProtocolUtil.skip(iprot, field.type);
16805
        } else {
16806
          switch (fieldId) {
16807
          }
16808
          iprot.readFieldEnd();
16809
        }
16810
      }
16811
      iprot.readStructEnd();
16812
      validate();
16813
    }
16814
 
16815
    public void write(TProtocol oprot) throws TException {
16816
      oprot.writeStructBegin(STRUCT_DESC);
16817
 
16818
      oprot.writeFieldStop();
16819
      oprot.writeStructEnd();
16820
    }
16821
 
16822
    @Override
16823
    public String toString() {
16824
      StringBuilder sb = new StringBuilder("setAlert_result(");
16825
      boolean first = true;
16826
 
16827
      sb.append(")");
16828
      return sb.toString();
16829
    }
16830
 
16831
    public void validate() throws TException {
16832
      // check for required fields
16833
    }
16834
 
16835
  }
16836
 
68 ashish 16837
}