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