Subversion Repositories SmartDukaan

Rev

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