Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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