Subversion Repositories SmartDukaan

Rev

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