Subversion Repositories SmartDukaan

Rev

Rev 1022 | Rev 1133 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
483 rajveer 47
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 48
 
1022 varun.gupt 49
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
50
 
483 rajveer 51
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 52
 
640 chandransh 53
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 54
 
923 rajveer 55
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
56
 
57
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
58
 
483 rajveer 59
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 60
 
483 rajveer 61
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 62
 
483 rajveer 63
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 64
 
483 rajveer 65
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 66
 
483 rajveer 67
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 68
 
758 chandransh 69
    /**
70
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
71
     * 
72
     * @param warehouseId
73
     * @param providerId
74
     */
75
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
76
 
1114 chandransh 77
    /**
78
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
79
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
80
     * Raises an exception if we encounter report for an AWB number that we did not ship.
81
     * 
82
     * @param providerId
83
     * @param pickupDetails
84
     */
85
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException;
86
 
483 rajveer 87
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 88
 
483 rajveer 89
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 90
 
91
  }
92
 
93
  public static class Client implements Iface {
94
    public Client(TProtocol prot)
95
    {
96
      this(prot, prot);
97
    }
98
 
99
    public Client(TProtocol iprot, TProtocol oprot)
100
    {
101
      iprot_ = iprot;
102
      oprot_ = oprot;
103
    }
104
 
105
    protected TProtocol iprot_;
106
    protected TProtocol oprot_;
107
 
108
    protected int seqid_;
109
 
110
    public TProtocol getInputProtocol()
111
    {
112
      return this.iprot_;
113
    }
114
 
115
    public TProtocol getOutputProtocol()
116
    {
117
      return this.oprot_;
118
    }
119
 
764 rajveer 120
    public void closeSession() throws TException
121
    {
122
      send_closeSession();
123
      recv_closeSession();
124
    }
125
 
126
    public void send_closeSession() throws TException
127
    {
128
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
129
      closeSession_args args = new closeSession_args();
130
      args.write(oprot_);
131
      oprot_.writeMessageEnd();
132
      oprot_.getTransport().flush();
133
    }
134
 
135
    public void recv_closeSession() throws TException
136
    {
137
      TMessage msg = iprot_.readMessageBegin();
138
      if (msg.type == TMessageType.EXCEPTION) {
139
        TApplicationException x = TApplicationException.read(iprot_);
140
        iprot_.readMessageEnd();
141
        throw x;
142
      }
143
      closeSession_result result = new closeSession_result();
144
      result.read(iprot_);
145
      iprot_.readMessageEnd();
146
      return;
147
    }
148
 
132 ashish 149
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 150
    {
151
      send_createTransaction(transaction);
132 ashish 152
      return recv_createTransaction();
68 ashish 153
    }
154
 
155
    public void send_createTransaction(Transaction transaction) throws TException
156
    {
157
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
158
      createTransaction_args args = new createTransaction_args();
159
      args.transaction = transaction;
160
      args.write(oprot_);
161
      oprot_.writeMessageEnd();
162
      oprot_.getTransport().flush();
163
    }
164
 
132 ashish 165
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 166
    {
167
      TMessage msg = iprot_.readMessageBegin();
168
      if (msg.type == TMessageType.EXCEPTION) {
169
        TApplicationException x = TApplicationException.read(iprot_);
170
        iprot_.readMessageEnd();
171
        throw x;
172
      }
173
      createTransaction_result result = new createTransaction_result();
174
      result.read(iprot_);
175
      iprot_.readMessageEnd();
132 ashish 176
      if (result.isSetSuccess()) {
177
        return result.success;
178
      }
68 ashish 179
      if (result.ex != null) {
180
        throw result.ex;
181
      }
132 ashish 182
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 183
    }
184
 
185
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
186
    {
187
      send_getTransaction(id);
188
      return recv_getTransaction();
189
    }
190
 
191
    public void send_getTransaction(long id) throws TException
192
    {
193
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
194
      getTransaction_args args = new getTransaction_args();
195
      args.id = id;
196
      args.write(oprot_);
197
      oprot_.writeMessageEnd();
198
      oprot_.getTransport().flush();
199
    }
200
 
201
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
202
    {
203
      TMessage msg = iprot_.readMessageBegin();
204
      if (msg.type == TMessageType.EXCEPTION) {
205
        TApplicationException x = TApplicationException.read(iprot_);
206
        iprot_.readMessageEnd();
207
        throw x;
208
      }
209
      getTransaction_result result = new getTransaction_result();
210
      result.read(iprot_);
211
      iprot_.readMessageEnd();
212
      if (result.isSetSuccess()) {
213
        return result.success;
214
      }
215
      if (result.ex != null) {
216
        throw result.ex;
217
      }
218
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
219
    }
220
 
132 ashish 221
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 222
    {
132 ashish 223
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 224
      return recv_getTransactionsForCustomer();
225
    }
226
 
132 ashish 227
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 228
    {
229
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
230
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
231
      args.customerId = customerId;
132 ashish 232
      args.from_date = from_date;
233
      args.to_date = to_date;
68 ashish 234
      args.status = status;
235
      args.write(oprot_);
236
      oprot_.writeMessageEnd();
237
      oprot_.getTransport().flush();
238
    }
239
 
240
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
241
    {
242
      TMessage msg = iprot_.readMessageBegin();
243
      if (msg.type == TMessageType.EXCEPTION) {
244
        TApplicationException x = TApplicationException.read(iprot_);
245
        iprot_.readMessageEnd();
246
        throw x;
247
      }
248
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
249
      result.read(iprot_);
250
      iprot_.readMessageEnd();
251
      if (result.isSetSuccess()) {
252
        return result.success;
253
      }
254
      if (result.ex != null) {
255
        throw result.ex;
256
      }
257
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
258
    }
259
 
132 ashish 260
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
261
    {
262
      send_getTransactionsForShoppingCartId(shoppingCartId);
263
      return recv_getTransactionsForShoppingCartId();
264
    }
265
 
266
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
267
    {
268
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
269
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
270
      args.shoppingCartId = shoppingCartId;
271
      args.write(oprot_);
272
      oprot_.writeMessageEnd();
273
      oprot_.getTransport().flush();
274
    }
275
 
276
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
277
    {
278
      TMessage msg = iprot_.readMessageBegin();
279
      if (msg.type == TMessageType.EXCEPTION) {
280
        TApplicationException x = TApplicationException.read(iprot_);
281
        iprot_.readMessageEnd();
282
        throw x;
283
      }
284
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
285
      result.read(iprot_);
286
      iprot_.readMessageEnd();
287
      if (result.isSetSuccess()) {
288
        return result.success;
289
      }
290
      if (result.ex != null) {
291
        throw result.ex;
292
      }
293
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
294
    }
295
 
68 ashish 296
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
297
    {
298
      send_getTransactionStatus(transactionId);
299
      return recv_getTransactionStatus();
300
    }
301
 
302
    public void send_getTransactionStatus(long transactionId) throws TException
303
    {
304
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
305
      getTransactionStatus_args args = new getTransactionStatus_args();
306
      args.transactionId = transactionId;
307
      args.write(oprot_);
308
      oprot_.writeMessageEnd();
309
      oprot_.getTransport().flush();
310
    }
311
 
312
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
313
    {
314
      TMessage msg = iprot_.readMessageBegin();
315
      if (msg.type == TMessageType.EXCEPTION) {
316
        TApplicationException x = TApplicationException.read(iprot_);
317
        iprot_.readMessageEnd();
318
        throw x;
319
      }
320
      getTransactionStatus_result result = new getTransactionStatus_result();
321
      result.read(iprot_);
322
      iprot_.readMessageEnd();
323
      if (result.isSetSuccess()) {
324
        return result.success;
325
      }
326
      if (result.ex != null) {
327
        throw result.ex;
328
      }
329
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
330
    }
331
 
332
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
333
    {
334
      send_changeTransactionStatus(transactionId, status, description);
335
      return recv_changeTransactionStatus();
336
    }
337
 
338
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
339
    {
340
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
341
      changeTransactionStatus_args args = new changeTransactionStatus_args();
342
      args.transactionId = transactionId;
343
      args.status = status;
344
      args.description = description;
345
      args.write(oprot_);
346
      oprot_.writeMessageEnd();
347
      oprot_.getTransport().flush();
348
    }
349
 
350
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
351
    {
352
      TMessage msg = iprot_.readMessageBegin();
353
      if (msg.type == TMessageType.EXCEPTION) {
354
        TApplicationException x = TApplicationException.read(iprot_);
355
        iprot_.readMessageEnd();
356
        throw x;
357
      }
358
      changeTransactionStatus_result result = new changeTransactionStatus_result();
359
      result.read(iprot_);
360
      iprot_.readMessageEnd();
361
      if (result.isSetSuccess()) {
362
        return result.success;
363
      }
364
      if (result.ex != null) {
365
        throw result.ex;
366
      }
367
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
368
    }
369
 
483 rajveer 370
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 371
    {
483 rajveer 372
      send_getAllOrders(status, from_date, to_date, warehouse_id);
373
      return recv_getAllOrders();
68 ashish 374
    }
375
 
483 rajveer 376
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 377
    {
483 rajveer 378
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
379
      getAllOrders_args args = new getAllOrders_args();
380
      args.status = status;
381
      args.from_date = from_date;
382
      args.to_date = to_date;
383
      args.warehouse_id = warehouse_id;
68 ashish 384
      args.write(oprot_);
385
      oprot_.writeMessageEnd();
386
      oprot_.getTransport().flush();
387
    }
388
 
483 rajveer 389
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 390
    {
391
      TMessage msg = iprot_.readMessageBegin();
392
      if (msg.type == TMessageType.EXCEPTION) {
393
        TApplicationException x = TApplicationException.read(iprot_);
394
        iprot_.readMessageEnd();
395
        throw x;
396
      }
483 rajveer 397
      getAllOrders_result result = new getAllOrders_result();
68 ashish 398
      result.read(iprot_);
399
      iprot_.readMessageEnd();
400
      if (result.isSetSuccess()) {
401
        return result.success;
402
      }
403
      if (result.ex != null) {
404
        throw result.ex;
405
      }
483 rajveer 406
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 407
    }
408
 
1022 varun.gupt 409
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
410
    {
411
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
412
      return recv_getOrdersByBillingDate();
413
    }
414
 
415
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
416
    {
417
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
418
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
419
      args.status = status;
420
      args.start_billing_date = start_billing_date;
421
      args.end_billing_date = end_billing_date;
422
      args.warehouse_id = warehouse_id;
423
      args.write(oprot_);
424
      oprot_.writeMessageEnd();
425
      oprot_.getTransport().flush();
426
    }
427
 
428
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
429
    {
430
      TMessage msg = iprot_.readMessageBegin();
431
      if (msg.type == TMessageType.EXCEPTION) {
432
        TApplicationException x = TApplicationException.read(iprot_);
433
        iprot_.readMessageEnd();
434
        throw x;
435
      }
436
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
437
      result.read(iprot_);
438
      iprot_.readMessageEnd();
439
      if (result.isSetSuccess()) {
440
        return result.success;
441
      }
442
      if (result.ex != null) {
443
        throw result.ex;
444
      }
445
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
446
    }
447
 
483 rajveer 448
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 449
    {
483 rajveer 450
      send_changeOrderStatus(orderId, status, description);
451
      return recv_changeOrderStatus();
68 ashish 452
    }
453
 
483 rajveer 454
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 455
    {
483 rajveer 456
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
457
      changeOrderStatus_args args = new changeOrderStatus_args();
458
      args.orderId = orderId;
459
      args.status = status;
460
      args.description = description;
68 ashish 461
      args.write(oprot_);
462
      oprot_.writeMessageEnd();
463
      oprot_.getTransport().flush();
464
    }
465
 
483 rajveer 466
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 467
    {
468
      TMessage msg = iprot_.readMessageBegin();
469
      if (msg.type == TMessageType.EXCEPTION) {
470
        TApplicationException x = TApplicationException.read(iprot_);
471
        iprot_.readMessageEnd();
472
        throw x;
473
      }
483 rajveer 474
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 475
      result.read(iprot_);
476
      iprot_.readMessageEnd();
477
      if (result.isSetSuccess()) {
478
        return result.success;
479
      }
480
      if (result.ex != null) {
481
        throw result.ex;
482
      }
483 rajveer 483
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 484
    }
485
 
640 chandransh 486
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 487
    {
640 chandransh 488
      send_addBillingDetails(orderId, invoice_number, jacket_number, billed_by);
495 rajveer 489
      return recv_addBillingDetails();
490
    }
491
 
640 chandransh 492
    public void send_addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TException
495 rajveer 493
    {
494
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
495
      addBillingDetails_args args = new addBillingDetails_args();
496
      args.orderId = orderId;
497
      args.invoice_number = invoice_number;
640 chandransh 498
      args.jacket_number = jacket_number;
495 rajveer 499
      args.billed_by = billed_by;
500
      args.write(oprot_);
501
      oprot_.writeMessageEnd();
502
      oprot_.getTransport().flush();
503
    }
504
 
505
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
506
    {
507
      TMessage msg = iprot_.readMessageBegin();
508
      if (msg.type == TMessageType.EXCEPTION) {
509
        TApplicationException x = TApplicationException.read(iprot_);
510
        iprot_.readMessageEnd();
511
        throw x;
512
      }
513
      addBillingDetails_result result = new addBillingDetails_result();
514
      result.read(iprot_);
515
      iprot_.readMessageEnd();
516
      if (result.isSetSuccess()) {
517
        return result.success;
518
      }
519
      if (result.ex != null) {
520
        throw result.ex;
521
      }
522
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
523
    }
524
 
923 rajveer 525
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
526
    {
527
      send_acceptOrder(orderId);
528
      return recv_acceptOrder();
529
    }
530
 
531
    public void send_acceptOrder(long orderId) throws TException
532
    {
533
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
534
      acceptOrder_args args = new acceptOrder_args();
535
      args.orderId = orderId;
536
      args.write(oprot_);
537
      oprot_.writeMessageEnd();
538
      oprot_.getTransport().flush();
539
    }
540
 
541
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
542
    {
543
      TMessage msg = iprot_.readMessageBegin();
544
      if (msg.type == TMessageType.EXCEPTION) {
545
        TApplicationException x = TApplicationException.read(iprot_);
546
        iprot_.readMessageEnd();
547
        throw x;
548
      }
549
      acceptOrder_result result = new acceptOrder_result();
550
      result.read(iprot_);
551
      iprot_.readMessageEnd();
552
      if (result.isSetSuccess()) {
553
        return result.success;
554
      }
555
      if (result.ex != null) {
556
        throw result.ex;
557
      }
558
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
559
    }
560
 
561
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
562
    {
563
      send_billOrder(orderId);
564
      return recv_billOrder();
565
    }
566
 
567
    public void send_billOrder(long orderId) throws TException
568
    {
569
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
570
      billOrder_args args = new billOrder_args();
571
      args.orderId = orderId;
572
      args.write(oprot_);
573
      oprot_.writeMessageEnd();
574
      oprot_.getTransport().flush();
575
    }
576
 
577
    public boolean recv_billOrder() throws TransactionServiceException, TException
578
    {
579
      TMessage msg = iprot_.readMessageBegin();
580
      if (msg.type == TMessageType.EXCEPTION) {
581
        TApplicationException x = TApplicationException.read(iprot_);
582
        iprot_.readMessageEnd();
583
        throw x;
584
      }
585
      billOrder_result result = new billOrder_result();
586
      result.read(iprot_);
587
      iprot_.readMessageEnd();
588
      if (result.isSetSuccess()) {
589
        return result.success;
590
      }
591
      if (result.ex != null) {
592
        throw result.ex;
593
      }
594
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
595
    }
596
 
483 rajveer 597
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 598
    {
483 rajveer 599
      send_getOrdersForTransaction(transactionId);
600
      return recv_getOrdersForTransaction();
68 ashish 601
    }
602
 
483 rajveer 603
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 604
    {
483 rajveer 605
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
606
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 607
      args.transactionId = transactionId;
608
      args.write(oprot_);
609
      oprot_.writeMessageEnd();
610
      oprot_.getTransport().flush();
611
    }
612
 
483 rajveer 613
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 614
    {
615
      TMessage msg = iprot_.readMessageBegin();
616
      if (msg.type == TMessageType.EXCEPTION) {
617
        TApplicationException x = TApplicationException.read(iprot_);
618
        iprot_.readMessageEnd();
619
        throw x;
620
      }
483 rajveer 621
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 622
      result.read(iprot_);
623
      iprot_.readMessageEnd();
624
      if (result.isSetSuccess()) {
625
        return result.success;
626
      }
627
      if (result.ex != null) {
628
        throw result.ex;
629
      }
483 rajveer 630
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 631
    }
632
 
483 rajveer 633
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 634
    {
483 rajveer 635
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
636
      return recv_getOrdersForCustomer();
68 ashish 637
    }
638
 
483 rajveer 639
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 640
    {
483 rajveer 641
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
642
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
643
      args.customerId = customerId;
644
      args.from_date = from_date;
645
      args.to_date = to_date;
646
      args.status = status;
68 ashish 647
      args.write(oprot_);
648
      oprot_.writeMessageEnd();
649
      oprot_.getTransport().flush();
650
    }
651
 
483 rajveer 652
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 653
    {
654
      TMessage msg = iprot_.readMessageBegin();
655
      if (msg.type == TMessageType.EXCEPTION) {
656
        TApplicationException x = TApplicationException.read(iprot_);
657
        iprot_.readMessageEnd();
658
        throw x;
659
      }
483 rajveer 660
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 661
      result.read(iprot_);
662
      iprot_.readMessageEnd();
663
      if (result.isSetSuccess()) {
664
        return result.success;
665
      }
666
      if (result.ex != null) {
667
        throw result.ex;
668
      }
483 rajveer 669
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 670
    }
671
 
483 rajveer 672
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 673
    {
483 rajveer 674
      send_createOrder(order);
675
      return recv_createOrder();
68 ashish 676
    }
677
 
483 rajveer 678
    public void send_createOrder(Order order) throws TException
68 ashish 679
    {
483 rajveer 680
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
681
      createOrder_args args = new createOrder_args();
682
      args.order = order;
68 ashish 683
      args.write(oprot_);
684
      oprot_.writeMessageEnd();
685
      oprot_.getTransport().flush();
686
    }
687
 
483 rajveer 688
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 689
    {
690
      TMessage msg = iprot_.readMessageBegin();
691
      if (msg.type == TMessageType.EXCEPTION) {
692
        TApplicationException x = TApplicationException.read(iprot_);
693
        iprot_.readMessageEnd();
694
        throw x;
695
      }
483 rajveer 696
      createOrder_result result = new createOrder_result();
68 ashish 697
      result.read(iprot_);
698
      iprot_.readMessageEnd();
699
      if (result.isSetSuccess()) {
700
        return result.success;
701
      }
702
      if (result.ex != null) {
703
        throw result.ex;
704
      }
483 rajveer 705
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 706
    }
707
 
483 rajveer 708
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 709
    {
483 rajveer 710
      send_getOrder(id);
711
      return recv_getOrder();
68 ashish 712
    }
713
 
483 rajveer 714
    public void send_getOrder(long id) throws TException
68 ashish 715
    {
483 rajveer 716
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
717
      getOrder_args args = new getOrder_args();
718
      args.id = id;
68 ashish 719
      args.write(oprot_);
720
      oprot_.writeMessageEnd();
721
      oprot_.getTransport().flush();
722
    }
723
 
483 rajveer 724
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 725
    {
726
      TMessage msg = iprot_.readMessageBegin();
727
      if (msg.type == TMessageType.EXCEPTION) {
728
        TApplicationException x = TApplicationException.read(iprot_);
729
        iprot_.readMessageEnd();
730
        throw x;
731
      }
483 rajveer 732
      getOrder_result result = new getOrder_result();
68 ashish 733
      result.read(iprot_);
734
      iprot_.readMessageEnd();
735
      if (result.isSetSuccess()) {
736
        return result.success;
737
      }
738
      if (result.ex != null) {
739
        throw result.ex;
740
      }
483 rajveer 741
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 742
    }
743
 
483 rajveer 744
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 745
    {
483 rajveer 746
      send_getLineItemsForOrder(orderId);
747
      return recv_getLineItemsForOrder();
68 ashish 748
    }
749
 
483 rajveer 750
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 751
    {
483 rajveer 752
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
753
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
754
      args.orderId = orderId;
68 ashish 755
      args.write(oprot_);
756
      oprot_.writeMessageEnd();
757
      oprot_.getTransport().flush();
758
    }
759
 
483 rajveer 760
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 761
    {
762
      TMessage msg = iprot_.readMessageBegin();
763
      if (msg.type == TMessageType.EXCEPTION) {
764
        TApplicationException x = TApplicationException.read(iprot_);
765
        iprot_.readMessageEnd();
766
        throw x;
767
      }
483 rajveer 768
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 769
      result.read(iprot_);
770
      iprot_.readMessageEnd();
771
      if (result.isSetSuccess()) {
772
        return result.success;
773
      }
774
      if (result.ex != null) {
775
        throw result.ex;
776
      }
483 rajveer 777
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 778
    }
779
 
758 chandransh 780
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
781
    {
782
      send_markOrdersAsManifested(warehouseId, providerId);
783
      return recv_markOrdersAsManifested();
784
    }
785
 
786
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
787
    {
788
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
789
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
790
      args.warehouseId = warehouseId;
791
      args.providerId = providerId;
792
      args.write(oprot_);
793
      oprot_.writeMessageEnd();
794
      oprot_.getTransport().flush();
795
    }
796
 
797
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
798
    {
799
      TMessage msg = iprot_.readMessageBegin();
800
      if (msg.type == TMessageType.EXCEPTION) {
801
        TApplicationException x = TApplicationException.read(iprot_);
802
        iprot_.readMessageEnd();
803
        throw x;
804
      }
805
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
806
      result.read(iprot_);
807
      iprot_.readMessageEnd();
808
      if (result.isSetSuccess()) {
809
        return result.success;
810
      }
811
      if (result.ex != null) {
812
        throw result.ex;
813
      }
814
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
815
    }
816
 
1114 chandransh 817
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException
818
    {
819
      send_markOrdersAsPickedUp(providerId, pickupDetails);
820
      return recv_markOrdersAsPickedUp();
821
    }
822
 
823
    public void send_markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TException
824
    {
825
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
826
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
827
      args.providerId = providerId;
828
      args.pickupDetails = pickupDetails;
829
      args.write(oprot_);
830
      oprot_.writeMessageEnd();
831
      oprot_.getTransport().flush();
832
    }
833
 
834
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
835
    {
836
      TMessage msg = iprot_.readMessageBegin();
837
      if (msg.type == TMessageType.EXCEPTION) {
838
        TApplicationException x = TApplicationException.read(iprot_);
839
        iprot_.readMessageEnd();
840
        throw x;
841
      }
842
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
843
      result.read(iprot_);
844
      iprot_.readMessageEnd();
845
      if (result.isSetSuccess()) {
846
        return result.success;
847
      }
848
      if (result.ex != null) {
849
        throw result.ex;
850
      }
851
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
852
    }
853
 
483 rajveer 854
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 855
    {
483 rajveer 856
      send_getAlerts(orderId, valid);
305 ashish 857
      return recv_getAlerts();
858
    }
859
 
483 rajveer 860
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 861
    {
862
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
863
      getAlerts_args args = new getAlerts_args();
483 rajveer 864
      args.orderId = orderId;
305 ashish 865
      args.valid = valid;
866
      args.write(oprot_);
867
      oprot_.writeMessageEnd();
868
      oprot_.getTransport().flush();
869
    }
870
 
871
    public List<Alert> recv_getAlerts() throws TException
872
    {
873
      TMessage msg = iprot_.readMessageBegin();
874
      if (msg.type == TMessageType.EXCEPTION) {
875
        TApplicationException x = TApplicationException.read(iprot_);
876
        iprot_.readMessageEnd();
877
        throw x;
878
      }
879
      getAlerts_result result = new getAlerts_result();
880
      result.read(iprot_);
881
      iprot_.readMessageEnd();
882
      if (result.isSetSuccess()) {
883
        return result.success;
884
      }
885
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
886
    }
887
 
483 rajveer 888
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 889
    {
483 rajveer 890
      send_setAlert(orderId, unset, type, comment);
305 ashish 891
      recv_setAlert();
892
    }
893
 
483 rajveer 894
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 895
    {
896
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
897
      setAlert_args args = new setAlert_args();
483 rajveer 898
      args.orderId = orderId;
305 ashish 899
      args.unset = unset;
900
      args.type = type;
901
      args.comment = comment;
902
      args.write(oprot_);
903
      oprot_.writeMessageEnd();
904
      oprot_.getTransport().flush();
905
    }
906
 
907
    public void recv_setAlert() throws TException
908
    {
909
      TMessage msg = iprot_.readMessageBegin();
910
      if (msg.type == TMessageType.EXCEPTION) {
911
        TApplicationException x = TApplicationException.read(iprot_);
912
        iprot_.readMessageEnd();
913
        throw x;
914
      }
915
      setAlert_result result = new setAlert_result();
916
      result.read(iprot_);
917
      iprot_.readMessageEnd();
918
      return;
919
    }
920
 
68 ashish 921
  }
922
  public static class Processor implements TProcessor {
923
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
924
    public Processor(Iface iface)
925
    {
926
      iface_ = iface;
764 rajveer 927
      processMap_.put("closeSession", new closeSession());
68 ashish 928
      processMap_.put("createTransaction", new createTransaction());
929
      processMap_.put("getTransaction", new getTransaction());
930
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 931
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 932
      processMap_.put("getTransactionStatus", new getTransactionStatus());
933
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 934
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 935
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 936
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 937
      processMap_.put("addBillingDetails", new addBillingDetails());
923 rajveer 938
      processMap_.put("acceptOrder", new acceptOrder());
939
      processMap_.put("billOrder", new billOrder());
483 rajveer 940
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
941
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
942
      processMap_.put("createOrder", new createOrder());
943
      processMap_.put("getOrder", new getOrder());
944
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
758 chandransh 945
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 946
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
305 ashish 947
      processMap_.put("getAlerts", new getAlerts());
948
      processMap_.put("setAlert", new setAlert());
68 ashish 949
    }
950
 
951
    protected static interface ProcessFunction {
952
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
953
    }
954
 
955
    private Iface iface_;
956
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
957
 
958
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
959
    {
960
      TMessage msg = iprot.readMessageBegin();
961
      ProcessFunction fn = processMap_.get(msg.name);
962
      if (fn == null) {
963
        TProtocolUtil.skip(iprot, TType.STRUCT);
964
        iprot.readMessageEnd();
965
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
966
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
967
        x.write(oprot);
968
        oprot.writeMessageEnd();
969
        oprot.getTransport().flush();
970
        return true;
971
      }
972
      fn.process(msg.seqid, iprot, oprot);
973
      return true;
974
    }
975
 
764 rajveer 976
    private class closeSession implements ProcessFunction {
977
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
978
      {
979
        closeSession_args args = new closeSession_args();
980
        args.read(iprot);
981
        iprot.readMessageEnd();
982
        closeSession_result result = new closeSession_result();
983
        iface_.closeSession();
984
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
985
        result.write(oprot);
986
        oprot.writeMessageEnd();
987
        oprot.getTransport().flush();
988
      }
989
 
990
    }
991
 
68 ashish 992
    private class createTransaction implements ProcessFunction {
993
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
994
      {
995
        createTransaction_args args = new createTransaction_args();
996
        args.read(iprot);
997
        iprot.readMessageEnd();
998
        createTransaction_result result = new createTransaction_result();
999
        try {
132 ashish 1000
          result.success = iface_.createTransaction(args.transaction);
1001
          result.setSuccessIsSet(true);
68 ashish 1002
        } catch (TransactionServiceException ex) {
1003
          result.ex = ex;
1004
        } catch (Throwable th) {
1005
          LOGGER.error("Internal error processing createTransaction", th);
1006
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1007
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1008
          x.write(oprot);
1009
          oprot.writeMessageEnd();
1010
          oprot.getTransport().flush();
1011
          return;
1012
        }
1013
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1014
        result.write(oprot);
1015
        oprot.writeMessageEnd();
1016
        oprot.getTransport().flush();
1017
      }
1018
 
1019
    }
1020
 
1021
    private class getTransaction implements ProcessFunction {
1022
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1023
      {
1024
        getTransaction_args args = new getTransaction_args();
1025
        args.read(iprot);
1026
        iprot.readMessageEnd();
1027
        getTransaction_result result = new getTransaction_result();
1028
        try {
1029
          result.success = iface_.getTransaction(args.id);
1030
        } catch (TransactionServiceException ex) {
1031
          result.ex = ex;
1032
        } catch (Throwable th) {
1033
          LOGGER.error("Internal error processing getTransaction", th);
1034
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1035
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1036
          x.write(oprot);
1037
          oprot.writeMessageEnd();
1038
          oprot.getTransport().flush();
1039
          return;
1040
        }
1041
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1042
        result.write(oprot);
1043
        oprot.writeMessageEnd();
1044
        oprot.getTransport().flush();
1045
      }
1046
 
1047
    }
1048
 
1049
    private class getTransactionsForCustomer implements ProcessFunction {
1050
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1051
      {
1052
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1053
        args.read(iprot);
1054
        iprot.readMessageEnd();
1055
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1056
        try {
132 ashish 1057
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1058
        } catch (TransactionServiceException ex) {
1059
          result.ex = ex;
1060
        } catch (Throwable th) {
1061
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1062
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1063
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1064
          x.write(oprot);
1065
          oprot.writeMessageEnd();
1066
          oprot.getTransport().flush();
1067
          return;
1068
        }
1069
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1070
        result.write(oprot);
1071
        oprot.writeMessageEnd();
1072
        oprot.getTransport().flush();
1073
      }
1074
 
1075
    }
1076
 
132 ashish 1077
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1078
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1079
      {
1080
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1081
        args.read(iprot);
1082
        iprot.readMessageEnd();
1083
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1084
        try {
1085
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1086
        } catch (TransactionServiceException ex) {
1087
          result.ex = ex;
1088
        } catch (Throwable th) {
1089
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1090
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1091
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1092
          x.write(oprot);
1093
          oprot.writeMessageEnd();
1094
          oprot.getTransport().flush();
1095
          return;
1096
        }
1097
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1098
        result.write(oprot);
1099
        oprot.writeMessageEnd();
1100
        oprot.getTransport().flush();
1101
      }
1102
 
1103
    }
1104
 
68 ashish 1105
    private class getTransactionStatus implements ProcessFunction {
1106
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1107
      {
1108
        getTransactionStatus_args args = new getTransactionStatus_args();
1109
        args.read(iprot);
1110
        iprot.readMessageEnd();
1111
        getTransactionStatus_result result = new getTransactionStatus_result();
1112
        try {
1113
          result.success = iface_.getTransactionStatus(args.transactionId);
1114
        } catch (TransactionServiceException ex) {
1115
          result.ex = ex;
1116
        } catch (Throwable th) {
1117
          LOGGER.error("Internal error processing getTransactionStatus", th);
1118
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1119
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1120
          x.write(oprot);
1121
          oprot.writeMessageEnd();
1122
          oprot.getTransport().flush();
1123
          return;
1124
        }
1125
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1126
        result.write(oprot);
1127
        oprot.writeMessageEnd();
1128
        oprot.getTransport().flush();
1129
      }
1130
 
1131
    }
1132
 
1133
    private class changeTransactionStatus implements ProcessFunction {
1134
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1135
      {
1136
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1137
        args.read(iprot);
1138
        iprot.readMessageEnd();
1139
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1140
        try {
1141
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1142
          result.setSuccessIsSet(true);
1143
        } catch (TransactionServiceException ex) {
1144
          result.ex = ex;
1145
        } catch (Throwable th) {
1146
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1147
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1148
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1149
          x.write(oprot);
1150
          oprot.writeMessageEnd();
1151
          oprot.getTransport().flush();
1152
          return;
1153
        }
1154
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1155
        result.write(oprot);
1156
        oprot.writeMessageEnd();
1157
        oprot.getTransport().flush();
1158
      }
1159
 
1160
    }
1161
 
483 rajveer 1162
    private class getAllOrders implements ProcessFunction {
68 ashish 1163
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1164
      {
483 rajveer 1165
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1166
        args.read(iprot);
1167
        iprot.readMessageEnd();
483 rajveer 1168
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1169
        try {
483 rajveer 1170
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1171
        } catch (TransactionServiceException ex) {
1172
          result.ex = ex;
1173
        } catch (Throwable th) {
483 rajveer 1174
          LOGGER.error("Internal error processing getAllOrders", th);
1175
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1176
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1177
          x.write(oprot);
1178
          oprot.writeMessageEnd();
1179
          oprot.getTransport().flush();
1180
          return;
1181
        }
483 rajveer 1182
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1183
        result.write(oprot);
1184
        oprot.writeMessageEnd();
1185
        oprot.getTransport().flush();
1186
      }
1187
 
1188
    }
1189
 
1022 varun.gupt 1190
    private class getOrdersByBillingDate implements ProcessFunction {
1191
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1192
      {
1193
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1194
        args.read(iprot);
1195
        iprot.readMessageEnd();
1196
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1197
        try {
1198
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1199
        } catch (TransactionServiceException ex) {
1200
          result.ex = ex;
1201
        } catch (Throwable th) {
1202
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1203
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1204
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1205
          x.write(oprot);
1206
          oprot.writeMessageEnd();
1207
          oprot.getTransport().flush();
1208
          return;
1209
        }
1210
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1211
        result.write(oprot);
1212
        oprot.writeMessageEnd();
1213
        oprot.getTransport().flush();
1214
      }
1215
 
1216
    }
1217
 
483 rajveer 1218
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1219
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1220
      {
483 rajveer 1221
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1222
        args.read(iprot);
1223
        iprot.readMessageEnd();
483 rajveer 1224
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1225
        try {
483 rajveer 1226
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1227
          result.setSuccessIsSet(true);
1228
        } catch (TransactionServiceException ex) {
1229
          result.ex = ex;
1230
        } catch (Throwable th) {
483 rajveer 1231
          LOGGER.error("Internal error processing changeOrderStatus", th);
1232
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1233
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1234
          x.write(oprot);
1235
          oprot.writeMessageEnd();
1236
          oprot.getTransport().flush();
1237
          return;
1238
        }
483 rajveer 1239
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1240
        result.write(oprot);
1241
        oprot.writeMessageEnd();
1242
        oprot.getTransport().flush();
1243
      }
1244
 
1245
    }
1246
 
495 rajveer 1247
    private class addBillingDetails implements ProcessFunction {
1248
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1249
      {
1250
        addBillingDetails_args args = new addBillingDetails_args();
1251
        args.read(iprot);
1252
        iprot.readMessageEnd();
1253
        addBillingDetails_result result = new addBillingDetails_result();
1254
        try {
640 chandransh 1255
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.jacket_number, args.billed_by);
495 rajveer 1256
          result.setSuccessIsSet(true);
1257
        } catch (TransactionServiceException ex) {
1258
          result.ex = ex;
1259
        } catch (Throwable th) {
1260
          LOGGER.error("Internal error processing addBillingDetails", th);
1261
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1262
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1263
          x.write(oprot);
1264
          oprot.writeMessageEnd();
1265
          oprot.getTransport().flush();
1266
          return;
1267
        }
1268
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1269
        result.write(oprot);
1270
        oprot.writeMessageEnd();
1271
        oprot.getTransport().flush();
1272
      }
1273
 
1274
    }
1275
 
923 rajveer 1276
    private class acceptOrder implements ProcessFunction {
1277
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1278
      {
1279
        acceptOrder_args args = new acceptOrder_args();
1280
        args.read(iprot);
1281
        iprot.readMessageEnd();
1282
        acceptOrder_result result = new acceptOrder_result();
1283
        try {
1284
          result.success = iface_.acceptOrder(args.orderId);
1285
          result.setSuccessIsSet(true);
1286
        } catch (TransactionServiceException ex) {
1287
          result.ex = ex;
1288
        } catch (Throwable th) {
1289
          LOGGER.error("Internal error processing acceptOrder", th);
1290
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1291
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1292
          x.write(oprot);
1293
          oprot.writeMessageEnd();
1294
          oprot.getTransport().flush();
1295
          return;
1296
        }
1297
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1298
        result.write(oprot);
1299
        oprot.writeMessageEnd();
1300
        oprot.getTransport().flush();
1301
      }
1302
 
1303
    }
1304
 
1305
    private class billOrder implements ProcessFunction {
1306
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1307
      {
1308
        billOrder_args args = new billOrder_args();
1309
        args.read(iprot);
1310
        iprot.readMessageEnd();
1311
        billOrder_result result = new billOrder_result();
1312
        try {
1313
          result.success = iface_.billOrder(args.orderId);
1314
          result.setSuccessIsSet(true);
1315
        } catch (TransactionServiceException ex) {
1316
          result.ex = ex;
1317
        } catch (Throwable th) {
1318
          LOGGER.error("Internal error processing billOrder", th);
1319
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1320
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1321
          x.write(oprot);
1322
          oprot.writeMessageEnd();
1323
          oprot.getTransport().flush();
1324
          return;
1325
        }
1326
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1327
        result.write(oprot);
1328
        oprot.writeMessageEnd();
1329
        oprot.getTransport().flush();
1330
      }
1331
 
1332
    }
1333
 
483 rajveer 1334
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1335
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1336
      {
483 rajveer 1337
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1338
        args.read(iprot);
1339
        iprot.readMessageEnd();
483 rajveer 1340
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1341
        try {
483 rajveer 1342
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1343
        } catch (TransactionServiceException ex) {
1344
          result.ex = ex;
1345
        } catch (Throwable th) {
483 rajveer 1346
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1347
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1348
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1349
          x.write(oprot);
1350
          oprot.writeMessageEnd();
1351
          oprot.getTransport().flush();
1352
          return;
1353
        }
483 rajveer 1354
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1355
        result.write(oprot);
1356
        oprot.writeMessageEnd();
1357
        oprot.getTransport().flush();
1358
      }
1359
 
1360
    }
1361
 
483 rajveer 1362
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1363
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1364
      {
483 rajveer 1365
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1366
        args.read(iprot);
1367
        iprot.readMessageEnd();
483 rajveer 1368
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1369
        try {
483 rajveer 1370
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1371
        } catch (TransactionServiceException ex) {
1372
          result.ex = ex;
1373
        } catch (Throwable th) {
483 rajveer 1374
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1375
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1376
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1377
          x.write(oprot);
1378
          oprot.writeMessageEnd();
1379
          oprot.getTransport().flush();
1380
          return;
1381
        }
483 rajveer 1382
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1383
        result.write(oprot);
1384
        oprot.writeMessageEnd();
1385
        oprot.getTransport().flush();
1386
      }
1387
 
1388
    }
1389
 
483 rajveer 1390
    private class createOrder implements ProcessFunction {
68 ashish 1391
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1392
      {
483 rajveer 1393
        createOrder_args args = new createOrder_args();
68 ashish 1394
        args.read(iprot);
1395
        iprot.readMessageEnd();
483 rajveer 1396
        createOrder_result result = new createOrder_result();
68 ashish 1397
        try {
483 rajveer 1398
          result.success = iface_.createOrder(args.order);
68 ashish 1399
          result.setSuccessIsSet(true);
1400
        } catch (TransactionServiceException ex) {
1401
          result.ex = ex;
1402
        } catch (Throwable th) {
483 rajveer 1403
          LOGGER.error("Internal error processing createOrder", th);
1404
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1405
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1406
          x.write(oprot);
1407
          oprot.writeMessageEnd();
1408
          oprot.getTransport().flush();
1409
          return;
1410
        }
483 rajveer 1411
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1412
        result.write(oprot);
1413
        oprot.writeMessageEnd();
1414
        oprot.getTransport().flush();
1415
      }
1416
 
1417
    }
1418
 
483 rajveer 1419
    private class getOrder implements ProcessFunction {
68 ashish 1420
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1421
      {
483 rajveer 1422
        getOrder_args args = new getOrder_args();
68 ashish 1423
        args.read(iprot);
1424
        iprot.readMessageEnd();
483 rajveer 1425
        getOrder_result result = new getOrder_result();
68 ashish 1426
        try {
483 rajveer 1427
          result.success = iface_.getOrder(args.id);
68 ashish 1428
        } catch (TransactionServiceException ex) {
1429
          result.ex = ex;
1430
        } catch (Throwable th) {
483 rajveer 1431
          LOGGER.error("Internal error processing getOrder", th);
1432
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1433
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1434
          x.write(oprot);
1435
          oprot.writeMessageEnd();
1436
          oprot.getTransport().flush();
1437
          return;
1438
        }
483 rajveer 1439
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1440
        result.write(oprot);
1441
        oprot.writeMessageEnd();
1442
        oprot.getTransport().flush();
1443
      }
1444
 
1445
    }
1446
 
483 rajveer 1447
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1448
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1449
      {
483 rajveer 1450
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1451
        args.read(iprot);
1452
        iprot.readMessageEnd();
483 rajveer 1453
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1454
        try {
483 rajveer 1455
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1456
        } catch (TransactionServiceException ex) {
1457
          result.ex = ex;
1458
        } catch (Throwable th) {
483 rajveer 1459
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1460
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1461
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1462
          x.write(oprot);
1463
          oprot.writeMessageEnd();
1464
          oprot.getTransport().flush();
1465
          return;
1466
        }
483 rajveer 1467
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1468
        result.write(oprot);
1469
        oprot.writeMessageEnd();
1470
        oprot.getTransport().flush();
1471
      }
1472
 
1473
    }
1474
 
758 chandransh 1475
    private class markOrdersAsManifested implements ProcessFunction {
1476
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1477
      {
1478
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1479
        args.read(iprot);
1480
        iprot.readMessageEnd();
1481
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1482
        try {
1483
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1484
          result.setSuccessIsSet(true);
1485
        } catch (TransactionServiceException ex) {
1486
          result.ex = ex;
1487
        } catch (Throwable th) {
1488
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1489
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1490
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1491
          x.write(oprot);
1492
          oprot.writeMessageEnd();
1493
          oprot.getTransport().flush();
1494
          return;
1495
        }
1496
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1497
        result.write(oprot);
1498
        oprot.writeMessageEnd();
1499
        oprot.getTransport().flush();
1500
      }
1501
 
1502
    }
1503
 
1114 chandransh 1504
    private class markOrdersAsPickedUp implements ProcessFunction {
1505
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1506
      {
1507
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1508
        args.read(iprot);
1509
        iprot.readMessageEnd();
1510
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1511
        try {
1512
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
1513
        } catch (TransactionServiceException ex) {
1514
          result.ex = ex;
1515
        } catch (Throwable th) {
1516
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
1517
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
1518
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
1519
          x.write(oprot);
1520
          oprot.writeMessageEnd();
1521
          oprot.getTransport().flush();
1522
          return;
1523
        }
1524
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
1525
        result.write(oprot);
1526
        oprot.writeMessageEnd();
1527
        oprot.getTransport().flush();
1528
      }
1529
 
1530
    }
1531
 
305 ashish 1532
    private class getAlerts implements ProcessFunction {
1533
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1534
      {
1535
        getAlerts_args args = new getAlerts_args();
1536
        args.read(iprot);
1537
        iprot.readMessageEnd();
1538
        getAlerts_result result = new getAlerts_result();
483 rajveer 1539
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1540
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1541
        result.write(oprot);
1542
        oprot.writeMessageEnd();
1543
        oprot.getTransport().flush();
1544
      }
1545
 
1546
    }
1547
 
1548
    private class setAlert implements ProcessFunction {
1549
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1550
      {
1551
        setAlert_args args = new setAlert_args();
1552
        args.read(iprot);
1553
        iprot.readMessageEnd();
1554
        setAlert_result result = new setAlert_result();
483 rajveer 1555
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1556
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1557
        result.write(oprot);
1558
        oprot.writeMessageEnd();
1559
        oprot.getTransport().flush();
1560
      }
1561
 
1562
    }
1563
 
68 ashish 1564
  }
1565
 
764 rajveer 1566
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1567
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1568
 
1569
 
1570
 
1571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1572
    public enum _Fields implements TFieldIdEnum {
1573
;
1574
 
1575
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1577
 
1578
      static {
1579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1580
          byId.put((int)field._thriftId, field);
1581
          byName.put(field.getFieldName(), field);
1582
        }
1583
      }
1584
 
1585
      /**
1586
       * Find the _Fields constant that matches fieldId, or null if its not found.
1587
       */
1588
      public static _Fields findByThriftId(int fieldId) {
1589
        return byId.get(fieldId);
1590
      }
1591
 
1592
      /**
1593
       * Find the _Fields constant that matches fieldId, throwing an exception
1594
       * if it is not found.
1595
       */
1596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1597
        _Fields fields = findByThriftId(fieldId);
1598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1599
        return fields;
1600
      }
1601
 
1602
      /**
1603
       * Find the _Fields constant that matches name, or null if its not found.
1604
       */
1605
      public static _Fields findByName(String name) {
1606
        return byName.get(name);
1607
      }
1608
 
1609
      private final short _thriftId;
1610
      private final String _fieldName;
1611
 
1612
      _Fields(short thriftId, String fieldName) {
1613
        _thriftId = thriftId;
1614
        _fieldName = fieldName;
1615
      }
1616
 
1617
      public short getThriftFieldId() {
1618
        return _thriftId;
1619
      }
1620
 
1621
      public String getFieldName() {
1622
        return _fieldName;
1623
      }
1624
    }
1625
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1626
    }});
1627
 
1628
    static {
1629
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1630
    }
1631
 
1632
    public closeSession_args() {
1633
    }
1634
 
1635
    /**
1636
     * Performs a deep copy on <i>other</i>.
1637
     */
1638
    public closeSession_args(closeSession_args other) {
1639
    }
1640
 
1641
    public closeSession_args deepCopy() {
1642
      return new closeSession_args(this);
1643
    }
1644
 
1645
    @Deprecated
1646
    public closeSession_args clone() {
1647
      return new closeSession_args(this);
1648
    }
1649
 
1650
    public void setFieldValue(_Fields field, Object value) {
1651
      switch (field) {
1652
      }
1653
    }
1654
 
1655
    public void setFieldValue(int fieldID, Object value) {
1656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1657
    }
1658
 
1659
    public Object getFieldValue(_Fields field) {
1660
      switch (field) {
1661
      }
1662
      throw new IllegalStateException();
1663
    }
1664
 
1665
    public Object getFieldValue(int fieldId) {
1666
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1667
    }
1668
 
1669
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1670
    public boolean isSet(_Fields field) {
1671
      switch (field) {
1672
      }
1673
      throw new IllegalStateException();
1674
    }
1675
 
1676
    public boolean isSet(int fieldID) {
1677
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1678
    }
1679
 
1680
    @Override
1681
    public boolean equals(Object that) {
1682
      if (that == null)
1683
        return false;
1684
      if (that instanceof closeSession_args)
1685
        return this.equals((closeSession_args)that);
1686
      return false;
1687
    }
1688
 
1689
    public boolean equals(closeSession_args that) {
1690
      if (that == null)
1691
        return false;
1692
 
1693
      return true;
1694
    }
1695
 
1696
    @Override
1697
    public int hashCode() {
1698
      return 0;
1699
    }
1700
 
1701
    public int compareTo(closeSession_args other) {
1702
      if (!getClass().equals(other.getClass())) {
1703
        return getClass().getName().compareTo(other.getClass().getName());
1704
      }
1705
 
1706
      int lastComparison = 0;
1707
      closeSession_args typedOther = (closeSession_args)other;
1708
 
1709
      return 0;
1710
    }
1711
 
1712
    public void read(TProtocol iprot) throws TException {
1713
      TField field;
1714
      iprot.readStructBegin();
1715
      while (true)
1716
      {
1717
        field = iprot.readFieldBegin();
1718
        if (field.type == TType.STOP) { 
1719
          break;
1720
        }
1721
        _Fields fieldId = _Fields.findByThriftId(field.id);
1722
        if (fieldId == null) {
1723
          TProtocolUtil.skip(iprot, field.type);
1724
        } else {
1725
          switch (fieldId) {
1726
          }
1727
          iprot.readFieldEnd();
1728
        }
1729
      }
1730
      iprot.readStructEnd();
1731
      validate();
1732
    }
1733
 
1734
    public void write(TProtocol oprot) throws TException {
1735
      validate();
1736
 
1737
      oprot.writeStructBegin(STRUCT_DESC);
1738
      oprot.writeFieldStop();
1739
      oprot.writeStructEnd();
1740
    }
1741
 
1742
    @Override
1743
    public String toString() {
1744
      StringBuilder sb = new StringBuilder("closeSession_args(");
1745
      boolean first = true;
1746
 
1747
      sb.append(")");
1748
      return sb.toString();
1749
    }
1750
 
1751
    public void validate() throws TException {
1752
      // check for required fields
1753
    }
1754
 
1755
  }
1756
 
1757
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1758
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1759
 
1760
 
1761
 
1762
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1763
    public enum _Fields implements TFieldIdEnum {
1764
;
1765
 
1766
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1767
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1768
 
1769
      static {
1770
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1771
          byId.put((int)field._thriftId, field);
1772
          byName.put(field.getFieldName(), field);
1773
        }
1774
      }
1775
 
1776
      /**
1777
       * Find the _Fields constant that matches fieldId, or null if its not found.
1778
       */
1779
      public static _Fields findByThriftId(int fieldId) {
1780
        return byId.get(fieldId);
1781
      }
1782
 
1783
      /**
1784
       * Find the _Fields constant that matches fieldId, throwing an exception
1785
       * if it is not found.
1786
       */
1787
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1788
        _Fields fields = findByThriftId(fieldId);
1789
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1790
        return fields;
1791
      }
1792
 
1793
      /**
1794
       * Find the _Fields constant that matches name, or null if its not found.
1795
       */
1796
      public static _Fields findByName(String name) {
1797
        return byName.get(name);
1798
      }
1799
 
1800
      private final short _thriftId;
1801
      private final String _fieldName;
1802
 
1803
      _Fields(short thriftId, String fieldName) {
1804
        _thriftId = thriftId;
1805
        _fieldName = fieldName;
1806
      }
1807
 
1808
      public short getThriftFieldId() {
1809
        return _thriftId;
1810
      }
1811
 
1812
      public String getFieldName() {
1813
        return _fieldName;
1814
      }
1815
    }
1816
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1817
    }});
1818
 
1819
    static {
1820
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1821
    }
1822
 
1823
    public closeSession_result() {
1824
    }
1825
 
1826
    /**
1827
     * Performs a deep copy on <i>other</i>.
1828
     */
1829
    public closeSession_result(closeSession_result other) {
1830
    }
1831
 
1832
    public closeSession_result deepCopy() {
1833
      return new closeSession_result(this);
1834
    }
1835
 
1836
    @Deprecated
1837
    public closeSession_result clone() {
1838
      return new closeSession_result(this);
1839
    }
1840
 
1841
    public void setFieldValue(_Fields field, Object value) {
1842
      switch (field) {
1843
      }
1844
    }
1845
 
1846
    public void setFieldValue(int fieldID, Object value) {
1847
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1848
    }
1849
 
1850
    public Object getFieldValue(_Fields field) {
1851
      switch (field) {
1852
      }
1853
      throw new IllegalStateException();
1854
    }
1855
 
1856
    public Object getFieldValue(int fieldId) {
1857
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1858
    }
1859
 
1860
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1861
    public boolean isSet(_Fields field) {
1862
      switch (field) {
1863
      }
1864
      throw new IllegalStateException();
1865
    }
1866
 
1867
    public boolean isSet(int fieldID) {
1868
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1869
    }
1870
 
1871
    @Override
1872
    public boolean equals(Object that) {
1873
      if (that == null)
1874
        return false;
1875
      if (that instanceof closeSession_result)
1876
        return this.equals((closeSession_result)that);
1877
      return false;
1878
    }
1879
 
1880
    public boolean equals(closeSession_result that) {
1881
      if (that == null)
1882
        return false;
1883
 
1884
      return true;
1885
    }
1886
 
1887
    @Override
1888
    public int hashCode() {
1889
      return 0;
1890
    }
1891
 
1892
    public int compareTo(closeSession_result other) {
1893
      if (!getClass().equals(other.getClass())) {
1894
        return getClass().getName().compareTo(other.getClass().getName());
1895
      }
1896
 
1897
      int lastComparison = 0;
1898
      closeSession_result typedOther = (closeSession_result)other;
1899
 
1900
      return 0;
1901
    }
1902
 
1903
    public void read(TProtocol iprot) throws TException {
1904
      TField field;
1905
      iprot.readStructBegin();
1906
      while (true)
1907
      {
1908
        field = iprot.readFieldBegin();
1909
        if (field.type == TType.STOP) { 
1910
          break;
1911
        }
1912
        _Fields fieldId = _Fields.findByThriftId(field.id);
1913
        if (fieldId == null) {
1914
          TProtocolUtil.skip(iprot, field.type);
1915
        } else {
1916
          switch (fieldId) {
1917
          }
1918
          iprot.readFieldEnd();
1919
        }
1920
      }
1921
      iprot.readStructEnd();
1922
      validate();
1923
    }
1924
 
1925
    public void write(TProtocol oprot) throws TException {
1926
      oprot.writeStructBegin(STRUCT_DESC);
1927
 
1928
      oprot.writeFieldStop();
1929
      oprot.writeStructEnd();
1930
    }
1931
 
1932
    @Override
1933
    public String toString() {
1934
      StringBuilder sb = new StringBuilder("closeSession_result(");
1935
      boolean first = true;
1936
 
1937
      sb.append(")");
1938
      return sb.toString();
1939
    }
1940
 
1941
    public void validate() throws TException {
1942
      // check for required fields
1943
    }
1944
 
1945
  }
1946
 
684 chandransh 1947
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 1948
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
1949
 
1950
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
1951
 
1952
    private Transaction transaction;
1953
 
1954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1955
    public enum _Fields implements TFieldIdEnum {
1956
      TRANSACTION((short)1, "transaction");
1957
 
1958
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1959
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1960
 
1961
      static {
1962
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1963
          byId.put((int)field._thriftId, field);
1964
          byName.put(field.getFieldName(), field);
1965
        }
1966
      }
1967
 
1968
      /**
1969
       * Find the _Fields constant that matches fieldId, or null if its not found.
1970
       */
1971
      public static _Fields findByThriftId(int fieldId) {
1972
        return byId.get(fieldId);
1973
      }
1974
 
1975
      /**
1976
       * Find the _Fields constant that matches fieldId, throwing an exception
1977
       * if it is not found.
1978
       */
1979
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1980
        _Fields fields = findByThriftId(fieldId);
1981
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1982
        return fields;
1983
      }
1984
 
1985
      /**
1986
       * Find the _Fields constant that matches name, or null if its not found.
1987
       */
1988
      public static _Fields findByName(String name) {
1989
        return byName.get(name);
1990
      }
1991
 
1992
      private final short _thriftId;
1993
      private final String _fieldName;
1994
 
1995
      _Fields(short thriftId, String fieldName) {
1996
        _thriftId = thriftId;
1997
        _fieldName = fieldName;
1998
      }
1999
 
2000
      public short getThriftFieldId() {
2001
        return _thriftId;
2002
      }
2003
 
2004
      public String getFieldName() {
2005
        return _fieldName;
2006
      }
2007
    }
2008
 
2009
    // isset id assignments
2010
 
2011
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2012
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2013
          new StructMetaData(TType.STRUCT, Transaction.class)));
2014
    }});
2015
 
2016
    static {
2017
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2018
    }
2019
 
2020
    public createTransaction_args() {
2021
    }
2022
 
2023
    public createTransaction_args(
2024
      Transaction transaction)
2025
    {
2026
      this();
2027
      this.transaction = transaction;
2028
    }
2029
 
2030
    /**
2031
     * Performs a deep copy on <i>other</i>.
2032
     */
2033
    public createTransaction_args(createTransaction_args other) {
2034
      if (other.isSetTransaction()) {
2035
        this.transaction = new Transaction(other.transaction);
2036
      }
2037
    }
2038
 
2039
    public createTransaction_args deepCopy() {
2040
      return new createTransaction_args(this);
2041
    }
2042
 
2043
    @Deprecated
2044
    public createTransaction_args clone() {
2045
      return new createTransaction_args(this);
2046
    }
2047
 
2048
    public Transaction getTransaction() {
2049
      return this.transaction;
2050
    }
2051
 
2052
    public createTransaction_args setTransaction(Transaction transaction) {
2053
      this.transaction = transaction;
2054
      return this;
2055
    }
2056
 
2057
    public void unsetTransaction() {
2058
      this.transaction = null;
2059
    }
2060
 
2061
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2062
    public boolean isSetTransaction() {
2063
      return this.transaction != null;
2064
    }
2065
 
2066
    public void setTransactionIsSet(boolean value) {
2067
      if (!value) {
2068
        this.transaction = null;
2069
      }
2070
    }
2071
 
2072
    public void setFieldValue(_Fields field, Object value) {
2073
      switch (field) {
2074
      case TRANSACTION:
2075
        if (value == null) {
2076
          unsetTransaction();
2077
        } else {
2078
          setTransaction((Transaction)value);
2079
        }
2080
        break;
2081
 
2082
      }
2083
    }
2084
 
2085
    public void setFieldValue(int fieldID, Object value) {
2086
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2087
    }
2088
 
2089
    public Object getFieldValue(_Fields field) {
2090
      switch (field) {
2091
      case TRANSACTION:
2092
        return getTransaction();
2093
 
2094
      }
2095
      throw new IllegalStateException();
2096
    }
2097
 
2098
    public Object getFieldValue(int fieldId) {
2099
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2100
    }
2101
 
2102
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2103
    public boolean isSet(_Fields field) {
2104
      switch (field) {
2105
      case TRANSACTION:
2106
        return isSetTransaction();
2107
      }
2108
      throw new IllegalStateException();
2109
    }
2110
 
2111
    public boolean isSet(int fieldID) {
2112
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2113
    }
2114
 
2115
    @Override
2116
    public boolean equals(Object that) {
2117
      if (that == null)
2118
        return false;
2119
      if (that instanceof createTransaction_args)
2120
        return this.equals((createTransaction_args)that);
2121
      return false;
2122
    }
2123
 
2124
    public boolean equals(createTransaction_args that) {
2125
      if (that == null)
2126
        return false;
2127
 
2128
      boolean this_present_transaction = true && this.isSetTransaction();
2129
      boolean that_present_transaction = true && that.isSetTransaction();
2130
      if (this_present_transaction || that_present_transaction) {
2131
        if (!(this_present_transaction && that_present_transaction))
2132
          return false;
2133
        if (!this.transaction.equals(that.transaction))
2134
          return false;
2135
      }
2136
 
2137
      return true;
2138
    }
2139
 
2140
    @Override
2141
    public int hashCode() {
2142
      return 0;
2143
    }
2144
 
684 chandransh 2145
    public int compareTo(createTransaction_args other) {
2146
      if (!getClass().equals(other.getClass())) {
2147
        return getClass().getName().compareTo(other.getClass().getName());
2148
      }
2149
 
2150
      int lastComparison = 0;
2151
      createTransaction_args typedOther = (createTransaction_args)other;
2152
 
2153
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2154
      if (lastComparison != 0) {
2155
        return lastComparison;
2156
      }
2157
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2158
      if (lastComparison != 0) {
2159
        return lastComparison;
2160
      }
2161
      return 0;
2162
    }
2163
 
68 ashish 2164
    public void read(TProtocol iprot) throws TException {
2165
      TField field;
2166
      iprot.readStructBegin();
2167
      while (true)
2168
      {
2169
        field = iprot.readFieldBegin();
2170
        if (field.type == TType.STOP) { 
2171
          break;
2172
        }
2173
        _Fields fieldId = _Fields.findByThriftId(field.id);
2174
        if (fieldId == null) {
2175
          TProtocolUtil.skip(iprot, field.type);
2176
        } else {
2177
          switch (fieldId) {
2178
            case TRANSACTION:
2179
              if (field.type == TType.STRUCT) {
2180
                this.transaction = new Transaction();
2181
                this.transaction.read(iprot);
2182
              } else { 
2183
                TProtocolUtil.skip(iprot, field.type);
2184
              }
2185
              break;
2186
          }
2187
          iprot.readFieldEnd();
2188
        }
2189
      }
2190
      iprot.readStructEnd();
2191
      validate();
2192
    }
2193
 
2194
    public void write(TProtocol oprot) throws TException {
2195
      validate();
2196
 
2197
      oprot.writeStructBegin(STRUCT_DESC);
2198
      if (this.transaction != null) {
2199
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2200
        this.transaction.write(oprot);
2201
        oprot.writeFieldEnd();
2202
      }
2203
      oprot.writeFieldStop();
2204
      oprot.writeStructEnd();
2205
    }
2206
 
2207
    @Override
2208
    public String toString() {
2209
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2210
      boolean first = true;
2211
 
2212
      sb.append("transaction:");
2213
      if (this.transaction == null) {
2214
        sb.append("null");
2215
      } else {
2216
        sb.append(this.transaction);
2217
      }
2218
      first = false;
2219
      sb.append(")");
2220
      return sb.toString();
2221
    }
2222
 
2223
    public void validate() throws TException {
2224
      // check for required fields
2225
    }
2226
 
2227
  }
2228
 
2229
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2230
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2231
 
132 ashish 2232
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2233
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2234
 
132 ashish 2235
    private long success;
68 ashish 2236
    private TransactionServiceException ex;
2237
 
2238
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2239
    public enum _Fields implements TFieldIdEnum {
132 ashish 2240
      SUCCESS((short)0, "success"),
68 ashish 2241
      EX((short)1, "ex");
2242
 
2243
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2244
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2245
 
2246
      static {
2247
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2248
          byId.put((int)field._thriftId, field);
2249
          byName.put(field.getFieldName(), field);
2250
        }
2251
      }
2252
 
2253
      /**
2254
       * Find the _Fields constant that matches fieldId, or null if its not found.
2255
       */
2256
      public static _Fields findByThriftId(int fieldId) {
2257
        return byId.get(fieldId);
2258
      }
2259
 
2260
      /**
2261
       * Find the _Fields constant that matches fieldId, throwing an exception
2262
       * if it is not found.
2263
       */
2264
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2265
        _Fields fields = findByThriftId(fieldId);
2266
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2267
        return fields;
2268
      }
2269
 
2270
      /**
2271
       * Find the _Fields constant that matches name, or null if its not found.
2272
       */
2273
      public static _Fields findByName(String name) {
2274
        return byName.get(name);
2275
      }
2276
 
2277
      private final short _thriftId;
2278
      private final String _fieldName;
2279
 
2280
      _Fields(short thriftId, String fieldName) {
2281
        _thriftId = thriftId;
2282
        _fieldName = fieldName;
2283
      }
2284
 
2285
      public short getThriftFieldId() {
2286
        return _thriftId;
2287
      }
2288
 
2289
      public String getFieldName() {
2290
        return _fieldName;
2291
      }
2292
    }
2293
 
2294
    // isset id assignments
132 ashish 2295
    private static final int __SUCCESS_ISSET_ID = 0;
2296
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2297
 
2298
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2299
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2300
          new FieldValueMetaData(TType.I64)));
68 ashish 2301
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2302
          new FieldValueMetaData(TType.STRUCT)));
2303
    }});
2304
 
2305
    static {
2306
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2307
    }
2308
 
2309
    public createTransaction_result() {
2310
    }
2311
 
2312
    public createTransaction_result(
132 ashish 2313
      long success,
68 ashish 2314
      TransactionServiceException ex)
2315
    {
2316
      this();
132 ashish 2317
      this.success = success;
2318
      setSuccessIsSet(true);
68 ashish 2319
      this.ex = ex;
2320
    }
2321
 
2322
    /**
2323
     * Performs a deep copy on <i>other</i>.
2324
     */
2325
    public createTransaction_result(createTransaction_result other) {
132 ashish 2326
      __isset_bit_vector.clear();
2327
      __isset_bit_vector.or(other.__isset_bit_vector);
2328
      this.success = other.success;
68 ashish 2329
      if (other.isSetEx()) {
2330
        this.ex = new TransactionServiceException(other.ex);
2331
      }
2332
    }
2333
 
2334
    public createTransaction_result deepCopy() {
2335
      return new createTransaction_result(this);
2336
    }
2337
 
2338
    @Deprecated
2339
    public createTransaction_result clone() {
2340
      return new createTransaction_result(this);
2341
    }
2342
 
132 ashish 2343
    public long getSuccess() {
2344
      return this.success;
2345
    }
2346
 
2347
    public createTransaction_result setSuccess(long success) {
2348
      this.success = success;
2349
      setSuccessIsSet(true);
2350
      return this;
2351
    }
2352
 
2353
    public void unsetSuccess() {
2354
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2355
    }
2356
 
2357
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2358
    public boolean isSetSuccess() {
2359
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2360
    }
2361
 
2362
    public void setSuccessIsSet(boolean value) {
2363
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2364
    }
2365
 
68 ashish 2366
    public TransactionServiceException getEx() {
2367
      return this.ex;
2368
    }
2369
 
2370
    public createTransaction_result setEx(TransactionServiceException ex) {
2371
      this.ex = ex;
2372
      return this;
2373
    }
2374
 
2375
    public void unsetEx() {
2376
      this.ex = null;
2377
    }
2378
 
2379
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2380
    public boolean isSetEx() {
2381
      return this.ex != null;
2382
    }
2383
 
2384
    public void setExIsSet(boolean value) {
2385
      if (!value) {
2386
        this.ex = null;
2387
      }
2388
    }
2389
 
2390
    public void setFieldValue(_Fields field, Object value) {
2391
      switch (field) {
132 ashish 2392
      case SUCCESS:
2393
        if (value == null) {
2394
          unsetSuccess();
2395
        } else {
2396
          setSuccess((Long)value);
2397
        }
2398
        break;
2399
 
68 ashish 2400
      case EX:
2401
        if (value == null) {
2402
          unsetEx();
2403
        } else {
2404
          setEx((TransactionServiceException)value);
2405
        }
2406
        break;
2407
 
2408
      }
2409
    }
2410
 
2411
    public void setFieldValue(int fieldID, Object value) {
2412
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2413
    }
2414
 
2415
    public Object getFieldValue(_Fields field) {
2416
      switch (field) {
132 ashish 2417
      case SUCCESS:
2418
        return new Long(getSuccess());
2419
 
68 ashish 2420
      case EX:
2421
        return getEx();
2422
 
2423
      }
2424
      throw new IllegalStateException();
2425
    }
2426
 
2427
    public Object getFieldValue(int fieldId) {
2428
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2429
    }
2430
 
2431
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2432
    public boolean isSet(_Fields field) {
2433
      switch (field) {
132 ashish 2434
      case SUCCESS:
2435
        return isSetSuccess();
68 ashish 2436
      case EX:
2437
        return isSetEx();
2438
      }
2439
      throw new IllegalStateException();
2440
    }
2441
 
2442
    public boolean isSet(int fieldID) {
2443
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2444
    }
2445
 
2446
    @Override
2447
    public boolean equals(Object that) {
2448
      if (that == null)
2449
        return false;
2450
      if (that instanceof createTransaction_result)
2451
        return this.equals((createTransaction_result)that);
2452
      return false;
2453
    }
2454
 
2455
    public boolean equals(createTransaction_result that) {
2456
      if (that == null)
2457
        return false;
2458
 
132 ashish 2459
      boolean this_present_success = true;
2460
      boolean that_present_success = true;
2461
      if (this_present_success || that_present_success) {
2462
        if (!(this_present_success && that_present_success))
2463
          return false;
2464
        if (this.success != that.success)
2465
          return false;
2466
      }
2467
 
68 ashish 2468
      boolean this_present_ex = true && this.isSetEx();
2469
      boolean that_present_ex = true && that.isSetEx();
2470
      if (this_present_ex || that_present_ex) {
2471
        if (!(this_present_ex && that_present_ex))
2472
          return false;
2473
        if (!this.ex.equals(that.ex))
2474
          return false;
2475
      }
2476
 
2477
      return true;
2478
    }
2479
 
2480
    @Override
2481
    public int hashCode() {
2482
      return 0;
2483
    }
2484
 
2485
    public int compareTo(createTransaction_result other) {
2486
      if (!getClass().equals(other.getClass())) {
2487
        return getClass().getName().compareTo(other.getClass().getName());
2488
      }
2489
 
2490
      int lastComparison = 0;
2491
      createTransaction_result typedOther = (createTransaction_result)other;
2492
 
132 ashish 2493
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2494
      if (lastComparison != 0) {
2495
        return lastComparison;
2496
      }
2497
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2498
      if (lastComparison != 0) {
2499
        return lastComparison;
2500
      }
68 ashish 2501
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2502
      if (lastComparison != 0) {
2503
        return lastComparison;
2504
      }
2505
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2506
      if (lastComparison != 0) {
2507
        return lastComparison;
2508
      }
2509
      return 0;
2510
    }
2511
 
2512
    public void read(TProtocol iprot) throws TException {
2513
      TField field;
2514
      iprot.readStructBegin();
2515
      while (true)
2516
      {
2517
        field = iprot.readFieldBegin();
2518
        if (field.type == TType.STOP) { 
2519
          break;
2520
        }
2521
        _Fields fieldId = _Fields.findByThriftId(field.id);
2522
        if (fieldId == null) {
2523
          TProtocolUtil.skip(iprot, field.type);
2524
        } else {
2525
          switch (fieldId) {
132 ashish 2526
            case SUCCESS:
2527
              if (field.type == TType.I64) {
2528
                this.success = iprot.readI64();
2529
                setSuccessIsSet(true);
2530
              } else { 
2531
                TProtocolUtil.skip(iprot, field.type);
2532
              }
2533
              break;
68 ashish 2534
            case EX:
2535
              if (field.type == TType.STRUCT) {
2536
                this.ex = new TransactionServiceException();
2537
                this.ex.read(iprot);
2538
              } else { 
2539
                TProtocolUtil.skip(iprot, field.type);
2540
              }
2541
              break;
2542
          }
2543
          iprot.readFieldEnd();
2544
        }
2545
      }
2546
      iprot.readStructEnd();
2547
      validate();
2548
    }
2549
 
2550
    public void write(TProtocol oprot) throws TException {
2551
      oprot.writeStructBegin(STRUCT_DESC);
2552
 
132 ashish 2553
      if (this.isSetSuccess()) {
2554
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2555
        oprot.writeI64(this.success);
2556
        oprot.writeFieldEnd();
2557
      } else if (this.isSetEx()) {
68 ashish 2558
        oprot.writeFieldBegin(EX_FIELD_DESC);
2559
        this.ex.write(oprot);
2560
        oprot.writeFieldEnd();
2561
      }
2562
      oprot.writeFieldStop();
2563
      oprot.writeStructEnd();
2564
    }
2565
 
2566
    @Override
2567
    public String toString() {
2568
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2569
      boolean first = true;
2570
 
132 ashish 2571
      sb.append("success:");
2572
      sb.append(this.success);
2573
      first = false;
2574
      if (!first) sb.append(", ");
68 ashish 2575
      sb.append("ex:");
2576
      if (this.ex == null) {
2577
        sb.append("null");
2578
      } else {
2579
        sb.append(this.ex);
2580
      }
2581
      first = false;
2582
      sb.append(")");
2583
      return sb.toString();
2584
    }
2585
 
2586
    public void validate() throws TException {
2587
      // check for required fields
2588
    }
2589
 
2590
  }
2591
 
2592
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2593
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2594
 
2595
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2596
 
2597
    private long id;
2598
 
2599
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2600
    public enum _Fields implements TFieldIdEnum {
2601
      ID((short)1, "id");
2602
 
2603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2605
 
2606
      static {
2607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2608
          byId.put((int)field._thriftId, field);
2609
          byName.put(field.getFieldName(), field);
2610
        }
2611
      }
2612
 
2613
      /**
2614
       * Find the _Fields constant that matches fieldId, or null if its not found.
2615
       */
2616
      public static _Fields findByThriftId(int fieldId) {
2617
        return byId.get(fieldId);
2618
      }
2619
 
2620
      /**
2621
       * Find the _Fields constant that matches fieldId, throwing an exception
2622
       * if it is not found.
2623
       */
2624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2625
        _Fields fields = findByThriftId(fieldId);
2626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2627
        return fields;
2628
      }
2629
 
2630
      /**
2631
       * Find the _Fields constant that matches name, or null if its not found.
2632
       */
2633
      public static _Fields findByName(String name) {
2634
        return byName.get(name);
2635
      }
2636
 
2637
      private final short _thriftId;
2638
      private final String _fieldName;
2639
 
2640
      _Fields(short thriftId, String fieldName) {
2641
        _thriftId = thriftId;
2642
        _fieldName = fieldName;
2643
      }
2644
 
2645
      public short getThriftFieldId() {
2646
        return _thriftId;
2647
      }
2648
 
2649
      public String getFieldName() {
2650
        return _fieldName;
2651
      }
2652
    }
2653
 
2654
    // isset id assignments
2655
    private static final int __ID_ISSET_ID = 0;
2656
    private BitSet __isset_bit_vector = new BitSet(1);
2657
 
2658
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2659
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2660
          new FieldValueMetaData(TType.I64)));
2661
    }});
2662
 
2663
    static {
2664
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2665
    }
2666
 
2667
    public getTransaction_args() {
2668
    }
2669
 
2670
    public getTransaction_args(
2671
      long id)
2672
    {
2673
      this();
2674
      this.id = id;
2675
      setIdIsSet(true);
2676
    }
2677
 
2678
    /**
2679
     * Performs a deep copy on <i>other</i>.
2680
     */
2681
    public getTransaction_args(getTransaction_args other) {
2682
      __isset_bit_vector.clear();
2683
      __isset_bit_vector.or(other.__isset_bit_vector);
2684
      this.id = other.id;
2685
    }
2686
 
2687
    public getTransaction_args deepCopy() {
2688
      return new getTransaction_args(this);
2689
    }
2690
 
2691
    @Deprecated
2692
    public getTransaction_args clone() {
2693
      return new getTransaction_args(this);
2694
    }
2695
 
2696
    public long getId() {
2697
      return this.id;
2698
    }
2699
 
2700
    public getTransaction_args setId(long id) {
2701
      this.id = id;
2702
      setIdIsSet(true);
2703
      return this;
2704
    }
2705
 
2706
    public void unsetId() {
2707
      __isset_bit_vector.clear(__ID_ISSET_ID);
2708
    }
2709
 
2710
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2711
    public boolean isSetId() {
2712
      return __isset_bit_vector.get(__ID_ISSET_ID);
2713
    }
2714
 
2715
    public void setIdIsSet(boolean value) {
2716
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2717
    }
2718
 
2719
    public void setFieldValue(_Fields field, Object value) {
2720
      switch (field) {
2721
      case ID:
2722
        if (value == null) {
2723
          unsetId();
2724
        } else {
2725
          setId((Long)value);
2726
        }
2727
        break;
2728
 
2729
      }
2730
    }
2731
 
2732
    public void setFieldValue(int fieldID, Object value) {
2733
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2734
    }
2735
 
2736
    public Object getFieldValue(_Fields field) {
2737
      switch (field) {
2738
      case ID:
2739
        return new Long(getId());
2740
 
2741
      }
2742
      throw new IllegalStateException();
2743
    }
2744
 
2745
    public Object getFieldValue(int fieldId) {
2746
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2747
    }
2748
 
2749
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2750
    public boolean isSet(_Fields field) {
2751
      switch (field) {
2752
      case ID:
2753
        return isSetId();
2754
      }
2755
      throw new IllegalStateException();
2756
    }
2757
 
2758
    public boolean isSet(int fieldID) {
2759
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2760
    }
2761
 
2762
    @Override
2763
    public boolean equals(Object that) {
2764
      if (that == null)
2765
        return false;
2766
      if (that instanceof getTransaction_args)
2767
        return this.equals((getTransaction_args)that);
2768
      return false;
2769
    }
2770
 
2771
    public boolean equals(getTransaction_args that) {
2772
      if (that == null)
2773
        return false;
2774
 
2775
      boolean this_present_id = true;
2776
      boolean that_present_id = true;
2777
      if (this_present_id || that_present_id) {
2778
        if (!(this_present_id && that_present_id))
2779
          return false;
2780
        if (this.id != that.id)
2781
          return false;
2782
      }
2783
 
2784
      return true;
2785
    }
2786
 
2787
    @Override
2788
    public int hashCode() {
2789
      return 0;
2790
    }
2791
 
2792
    public int compareTo(getTransaction_args other) {
2793
      if (!getClass().equals(other.getClass())) {
2794
        return getClass().getName().compareTo(other.getClass().getName());
2795
      }
2796
 
2797
      int lastComparison = 0;
2798
      getTransaction_args typedOther = (getTransaction_args)other;
2799
 
2800
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2801
      if (lastComparison != 0) {
2802
        return lastComparison;
2803
      }
2804
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2805
      if (lastComparison != 0) {
2806
        return lastComparison;
2807
      }
2808
      return 0;
2809
    }
2810
 
2811
    public void read(TProtocol iprot) throws TException {
2812
      TField field;
2813
      iprot.readStructBegin();
2814
      while (true)
2815
      {
2816
        field = iprot.readFieldBegin();
2817
        if (field.type == TType.STOP) { 
2818
          break;
2819
        }
2820
        _Fields fieldId = _Fields.findByThriftId(field.id);
2821
        if (fieldId == null) {
2822
          TProtocolUtil.skip(iprot, field.type);
2823
        } else {
2824
          switch (fieldId) {
2825
            case ID:
2826
              if (field.type == TType.I64) {
2827
                this.id = iprot.readI64();
2828
                setIdIsSet(true);
2829
              } else { 
2830
                TProtocolUtil.skip(iprot, field.type);
2831
              }
2832
              break;
2833
          }
2834
          iprot.readFieldEnd();
2835
        }
2836
      }
2837
      iprot.readStructEnd();
2838
      validate();
2839
    }
2840
 
2841
    public void write(TProtocol oprot) throws TException {
2842
      validate();
2843
 
2844
      oprot.writeStructBegin(STRUCT_DESC);
2845
      oprot.writeFieldBegin(ID_FIELD_DESC);
2846
      oprot.writeI64(this.id);
2847
      oprot.writeFieldEnd();
2848
      oprot.writeFieldStop();
2849
      oprot.writeStructEnd();
2850
    }
2851
 
2852
    @Override
2853
    public String toString() {
2854
      StringBuilder sb = new StringBuilder("getTransaction_args(");
2855
      boolean first = true;
2856
 
2857
      sb.append("id:");
2858
      sb.append(this.id);
2859
      first = false;
2860
      sb.append(")");
2861
      return sb.toString();
2862
    }
2863
 
2864
    public void validate() throws TException {
2865
      // check for required fields
2866
    }
2867
 
2868
  }
2869
 
684 chandransh 2870
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 2871
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
2872
 
2873
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2874
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2875
 
2876
    private Transaction success;
2877
    private TransactionServiceException ex;
2878
 
2879
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2880
    public enum _Fields implements TFieldIdEnum {
2881
      SUCCESS((short)0, "success"),
2882
      EX((short)1, "ex");
2883
 
2884
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2885
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2886
 
2887
      static {
2888
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2889
          byId.put((int)field._thriftId, field);
2890
          byName.put(field.getFieldName(), field);
2891
        }
2892
      }
2893
 
2894
      /**
2895
       * Find the _Fields constant that matches fieldId, or null if its not found.
2896
       */
2897
      public static _Fields findByThriftId(int fieldId) {
2898
        return byId.get(fieldId);
2899
      }
2900
 
2901
      /**
2902
       * Find the _Fields constant that matches fieldId, throwing an exception
2903
       * if it is not found.
2904
       */
2905
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2906
        _Fields fields = findByThriftId(fieldId);
2907
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2908
        return fields;
2909
      }
2910
 
2911
      /**
2912
       * Find the _Fields constant that matches name, or null if its not found.
2913
       */
2914
      public static _Fields findByName(String name) {
2915
        return byName.get(name);
2916
      }
2917
 
2918
      private final short _thriftId;
2919
      private final String _fieldName;
2920
 
2921
      _Fields(short thriftId, String fieldName) {
2922
        _thriftId = thriftId;
2923
        _fieldName = fieldName;
2924
      }
2925
 
2926
      public short getThriftFieldId() {
2927
        return _thriftId;
2928
      }
2929
 
2930
      public String getFieldName() {
2931
        return _fieldName;
2932
      }
2933
    }
2934
 
2935
    // isset id assignments
2936
 
2937
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2938
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2939
          new StructMetaData(TType.STRUCT, Transaction.class)));
2940
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2941
          new FieldValueMetaData(TType.STRUCT)));
2942
    }});
2943
 
2944
    static {
2945
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
2946
    }
2947
 
2948
    public getTransaction_result() {
2949
    }
2950
 
2951
    public getTransaction_result(
2952
      Transaction success,
2953
      TransactionServiceException ex)
2954
    {
2955
      this();
2956
      this.success = success;
2957
      this.ex = ex;
2958
    }
2959
 
2960
    /**
2961
     * Performs a deep copy on <i>other</i>.
2962
     */
2963
    public getTransaction_result(getTransaction_result other) {
2964
      if (other.isSetSuccess()) {
2965
        this.success = new Transaction(other.success);
2966
      }
2967
      if (other.isSetEx()) {
2968
        this.ex = new TransactionServiceException(other.ex);
2969
      }
2970
    }
2971
 
2972
    public getTransaction_result deepCopy() {
2973
      return new getTransaction_result(this);
2974
    }
2975
 
2976
    @Deprecated
2977
    public getTransaction_result clone() {
2978
      return new getTransaction_result(this);
2979
    }
2980
 
2981
    public Transaction getSuccess() {
2982
      return this.success;
2983
    }
2984
 
2985
    public getTransaction_result setSuccess(Transaction success) {
2986
      this.success = success;
2987
      return this;
2988
    }
2989
 
2990
    public void unsetSuccess() {
2991
      this.success = null;
2992
    }
2993
 
2994
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2995
    public boolean isSetSuccess() {
2996
      return this.success != null;
2997
    }
2998
 
2999
    public void setSuccessIsSet(boolean value) {
3000
      if (!value) {
3001
        this.success = null;
3002
      }
3003
    }
3004
 
3005
    public TransactionServiceException getEx() {
3006
      return this.ex;
3007
    }
3008
 
3009
    public getTransaction_result setEx(TransactionServiceException ex) {
3010
      this.ex = ex;
3011
      return this;
3012
    }
3013
 
3014
    public void unsetEx() {
3015
      this.ex = null;
3016
    }
3017
 
3018
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3019
    public boolean isSetEx() {
3020
      return this.ex != null;
3021
    }
3022
 
3023
    public void setExIsSet(boolean value) {
3024
      if (!value) {
3025
        this.ex = null;
3026
      }
3027
    }
3028
 
3029
    public void setFieldValue(_Fields field, Object value) {
3030
      switch (field) {
3031
      case SUCCESS:
3032
        if (value == null) {
3033
          unsetSuccess();
3034
        } else {
3035
          setSuccess((Transaction)value);
3036
        }
3037
        break;
3038
 
3039
      case EX:
3040
        if (value == null) {
3041
          unsetEx();
3042
        } else {
3043
          setEx((TransactionServiceException)value);
3044
        }
3045
        break;
3046
 
3047
      }
3048
    }
3049
 
3050
    public void setFieldValue(int fieldID, Object value) {
3051
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3052
    }
3053
 
3054
    public Object getFieldValue(_Fields field) {
3055
      switch (field) {
3056
      case SUCCESS:
3057
        return getSuccess();
3058
 
3059
      case EX:
3060
        return getEx();
3061
 
3062
      }
3063
      throw new IllegalStateException();
3064
    }
3065
 
3066
    public Object getFieldValue(int fieldId) {
3067
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3068
    }
3069
 
3070
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3071
    public boolean isSet(_Fields field) {
3072
      switch (field) {
3073
      case SUCCESS:
3074
        return isSetSuccess();
3075
      case EX:
3076
        return isSetEx();
3077
      }
3078
      throw new IllegalStateException();
3079
    }
3080
 
3081
    public boolean isSet(int fieldID) {
3082
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3083
    }
3084
 
3085
    @Override
3086
    public boolean equals(Object that) {
3087
      if (that == null)
3088
        return false;
3089
      if (that instanceof getTransaction_result)
3090
        return this.equals((getTransaction_result)that);
3091
      return false;
3092
    }
3093
 
3094
    public boolean equals(getTransaction_result that) {
3095
      if (that == null)
3096
        return false;
3097
 
3098
      boolean this_present_success = true && this.isSetSuccess();
3099
      boolean that_present_success = true && that.isSetSuccess();
3100
      if (this_present_success || that_present_success) {
3101
        if (!(this_present_success && that_present_success))
3102
          return false;
3103
        if (!this.success.equals(that.success))
3104
          return false;
3105
      }
3106
 
3107
      boolean this_present_ex = true && this.isSetEx();
3108
      boolean that_present_ex = true && that.isSetEx();
3109
      if (this_present_ex || that_present_ex) {
3110
        if (!(this_present_ex && that_present_ex))
3111
          return false;
3112
        if (!this.ex.equals(that.ex))
3113
          return false;
3114
      }
3115
 
3116
      return true;
3117
    }
3118
 
3119
    @Override
3120
    public int hashCode() {
3121
      return 0;
3122
    }
3123
 
684 chandransh 3124
    public int compareTo(getTransaction_result other) {
3125
      if (!getClass().equals(other.getClass())) {
3126
        return getClass().getName().compareTo(other.getClass().getName());
3127
      }
3128
 
3129
      int lastComparison = 0;
3130
      getTransaction_result typedOther = (getTransaction_result)other;
3131
 
3132
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3133
      if (lastComparison != 0) {
3134
        return lastComparison;
3135
      }
3136
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3137
      if (lastComparison != 0) {
3138
        return lastComparison;
3139
      }
3140
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3141
      if (lastComparison != 0) {
3142
        return lastComparison;
3143
      }
3144
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3145
      if (lastComparison != 0) {
3146
        return lastComparison;
3147
      }
3148
      return 0;
3149
    }
3150
 
68 ashish 3151
    public void read(TProtocol iprot) throws TException {
3152
      TField field;
3153
      iprot.readStructBegin();
3154
      while (true)
3155
      {
3156
        field = iprot.readFieldBegin();
3157
        if (field.type == TType.STOP) { 
3158
          break;
3159
        }
3160
        _Fields fieldId = _Fields.findByThriftId(field.id);
3161
        if (fieldId == null) {
3162
          TProtocolUtil.skip(iprot, field.type);
3163
        } else {
3164
          switch (fieldId) {
3165
            case SUCCESS:
3166
              if (field.type == TType.STRUCT) {
3167
                this.success = new Transaction();
3168
                this.success.read(iprot);
3169
              } else { 
3170
                TProtocolUtil.skip(iprot, field.type);
3171
              }
3172
              break;
3173
            case EX:
3174
              if (field.type == TType.STRUCT) {
3175
                this.ex = new TransactionServiceException();
3176
                this.ex.read(iprot);
3177
              } else { 
3178
                TProtocolUtil.skip(iprot, field.type);
3179
              }
3180
              break;
3181
          }
3182
          iprot.readFieldEnd();
3183
        }
3184
      }
3185
      iprot.readStructEnd();
3186
      validate();
3187
    }
3188
 
3189
    public void write(TProtocol oprot) throws TException {
3190
      oprot.writeStructBegin(STRUCT_DESC);
3191
 
3192
      if (this.isSetSuccess()) {
3193
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3194
        this.success.write(oprot);
3195
        oprot.writeFieldEnd();
3196
      } else if (this.isSetEx()) {
3197
        oprot.writeFieldBegin(EX_FIELD_DESC);
3198
        this.ex.write(oprot);
3199
        oprot.writeFieldEnd();
3200
      }
3201
      oprot.writeFieldStop();
3202
      oprot.writeStructEnd();
3203
    }
3204
 
3205
    @Override
3206
    public String toString() {
3207
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3208
      boolean first = true;
3209
 
3210
      sb.append("success:");
3211
      if (this.success == null) {
3212
        sb.append("null");
3213
      } else {
3214
        sb.append(this.success);
3215
      }
3216
      first = false;
3217
      if (!first) sb.append(", ");
3218
      sb.append("ex:");
3219
      if (this.ex == null) {
3220
        sb.append("null");
3221
      } else {
3222
        sb.append(this.ex);
3223
      }
3224
      first = false;
3225
      sb.append(")");
3226
      return sb.toString();
3227
    }
3228
 
3229
    public void validate() throws TException {
3230
      // check for required fields
3231
    }
3232
 
3233
  }
3234
 
3235
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3236
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3237
 
3238
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3239
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3240
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3241
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3242
 
3243
    private long customerId;
132 ashish 3244
    private long from_date;
3245
    private long to_date;
68 ashish 3246
    private TransactionStatus status;
3247
 
3248
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3249
    public enum _Fields implements TFieldIdEnum {
3250
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3251
      FROM_DATE((short)2, "from_date"),
3252
      TO_DATE((short)3, "to_date"),
68 ashish 3253
      /**
3254
       * 
3255
       * @see TransactionStatus
3256
       */
3257
      STATUS((short)4, "status");
3258
 
3259
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3260
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3261
 
3262
      static {
3263
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3264
          byId.put((int)field._thriftId, field);
3265
          byName.put(field.getFieldName(), field);
3266
        }
3267
      }
3268
 
3269
      /**
3270
       * Find the _Fields constant that matches fieldId, or null if its not found.
3271
       */
3272
      public static _Fields findByThriftId(int fieldId) {
3273
        return byId.get(fieldId);
3274
      }
3275
 
3276
      /**
3277
       * Find the _Fields constant that matches fieldId, throwing an exception
3278
       * if it is not found.
3279
       */
3280
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3281
        _Fields fields = findByThriftId(fieldId);
3282
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3283
        return fields;
3284
      }
3285
 
3286
      /**
3287
       * Find the _Fields constant that matches name, or null if its not found.
3288
       */
3289
      public static _Fields findByName(String name) {
3290
        return byName.get(name);
3291
      }
3292
 
3293
      private final short _thriftId;
3294
      private final String _fieldName;
3295
 
3296
      _Fields(short thriftId, String fieldName) {
3297
        _thriftId = thriftId;
3298
        _fieldName = fieldName;
3299
      }
3300
 
3301
      public short getThriftFieldId() {
3302
        return _thriftId;
3303
      }
3304
 
3305
      public String getFieldName() {
3306
        return _fieldName;
3307
      }
3308
    }
3309
 
3310
    // isset id assignments
3311
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3312
    private static final int __FROM_DATE_ISSET_ID = 1;
3313
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3314
    private BitSet __isset_bit_vector = new BitSet(3);
3315
 
3316
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3317
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3318
          new FieldValueMetaData(TType.I64)));
132 ashish 3319
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3320
          new FieldValueMetaData(TType.I64)));
132 ashish 3321
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3322
          new FieldValueMetaData(TType.I64)));
3323
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3324
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3325
    }});
3326
 
3327
    static {
3328
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3329
    }
3330
 
3331
    public getTransactionsForCustomer_args() {
3332
    }
3333
 
3334
    public getTransactionsForCustomer_args(
3335
      long customerId,
132 ashish 3336
      long from_date,
3337
      long to_date,
68 ashish 3338
      TransactionStatus status)
3339
    {
3340
      this();
3341
      this.customerId = customerId;
3342
      setCustomerIdIsSet(true);
132 ashish 3343
      this.from_date = from_date;
3344
      setFrom_dateIsSet(true);
3345
      this.to_date = to_date;
3346
      setTo_dateIsSet(true);
68 ashish 3347
      this.status = status;
3348
    }
3349
 
3350
    /**
3351
     * Performs a deep copy on <i>other</i>.
3352
     */
3353
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3354
      __isset_bit_vector.clear();
3355
      __isset_bit_vector.or(other.__isset_bit_vector);
3356
      this.customerId = other.customerId;
132 ashish 3357
      this.from_date = other.from_date;
3358
      this.to_date = other.to_date;
68 ashish 3359
      if (other.isSetStatus()) {
3360
        this.status = other.status;
3361
      }
3362
    }
3363
 
3364
    public getTransactionsForCustomer_args deepCopy() {
3365
      return new getTransactionsForCustomer_args(this);
3366
    }
3367
 
3368
    @Deprecated
3369
    public getTransactionsForCustomer_args clone() {
3370
      return new getTransactionsForCustomer_args(this);
3371
    }
3372
 
3373
    public long getCustomerId() {
3374
      return this.customerId;
3375
    }
3376
 
3377
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3378
      this.customerId = customerId;
3379
      setCustomerIdIsSet(true);
3380
      return this;
3381
    }
3382
 
3383
    public void unsetCustomerId() {
3384
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3385
    }
3386
 
3387
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3388
    public boolean isSetCustomerId() {
3389
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3390
    }
3391
 
3392
    public void setCustomerIdIsSet(boolean value) {
3393
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3394
    }
3395
 
132 ashish 3396
    public long getFrom_date() {
3397
      return this.from_date;
68 ashish 3398
    }
3399
 
132 ashish 3400
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3401
      this.from_date = from_date;
3402
      setFrom_dateIsSet(true);
68 ashish 3403
      return this;
3404
    }
3405
 
132 ashish 3406
    public void unsetFrom_date() {
3407
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3408
    }
3409
 
132 ashish 3410
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3411
    public boolean isSetFrom_date() {
3412
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3413
    }
3414
 
132 ashish 3415
    public void setFrom_dateIsSet(boolean value) {
3416
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3417
    }
3418
 
132 ashish 3419
    public long getTo_date() {
3420
      return this.to_date;
68 ashish 3421
    }
3422
 
132 ashish 3423
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3424
      this.to_date = to_date;
3425
      setTo_dateIsSet(true);
68 ashish 3426
      return this;
3427
    }
3428
 
132 ashish 3429
    public void unsetTo_date() {
3430
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3431
    }
3432
 
132 ashish 3433
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3434
    public boolean isSetTo_date() {
3435
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3436
    }
3437
 
132 ashish 3438
    public void setTo_dateIsSet(boolean value) {
3439
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3440
    }
3441
 
3442
    /**
3443
     * 
3444
     * @see TransactionStatus
3445
     */
3446
    public TransactionStatus getStatus() {
3447
      return this.status;
3448
    }
3449
 
3450
    /**
3451
     * 
3452
     * @see TransactionStatus
3453
     */
3454
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3455
      this.status = status;
3456
      return this;
3457
    }
3458
 
3459
    public void unsetStatus() {
3460
      this.status = null;
3461
    }
3462
 
3463
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3464
    public boolean isSetStatus() {
3465
      return this.status != null;
3466
    }
3467
 
3468
    public void setStatusIsSet(boolean value) {
3469
      if (!value) {
3470
        this.status = null;
3471
      }
3472
    }
3473
 
3474
    public void setFieldValue(_Fields field, Object value) {
3475
      switch (field) {
3476
      case CUSTOMER_ID:
3477
        if (value == null) {
3478
          unsetCustomerId();
3479
        } else {
3480
          setCustomerId((Long)value);
3481
        }
3482
        break;
3483
 
132 ashish 3484
      case FROM_DATE:
68 ashish 3485
        if (value == null) {
132 ashish 3486
          unsetFrom_date();
68 ashish 3487
        } else {
132 ashish 3488
          setFrom_date((Long)value);
68 ashish 3489
        }
3490
        break;
3491
 
132 ashish 3492
      case TO_DATE:
68 ashish 3493
        if (value == null) {
132 ashish 3494
          unsetTo_date();
68 ashish 3495
        } else {
132 ashish 3496
          setTo_date((Long)value);
68 ashish 3497
        }
3498
        break;
3499
 
3500
      case STATUS:
3501
        if (value == null) {
3502
          unsetStatus();
3503
        } else {
3504
          setStatus((TransactionStatus)value);
3505
        }
3506
        break;
3507
 
3508
      }
3509
    }
3510
 
3511
    public void setFieldValue(int fieldID, Object value) {
3512
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3513
    }
3514
 
3515
    public Object getFieldValue(_Fields field) {
3516
      switch (field) {
3517
      case CUSTOMER_ID:
3518
        return new Long(getCustomerId());
3519
 
132 ashish 3520
      case FROM_DATE:
3521
        return new Long(getFrom_date());
68 ashish 3522
 
132 ashish 3523
      case TO_DATE:
3524
        return new Long(getTo_date());
68 ashish 3525
 
3526
      case STATUS:
3527
        return getStatus();
3528
 
3529
      }
3530
      throw new IllegalStateException();
3531
    }
3532
 
3533
    public Object getFieldValue(int fieldId) {
3534
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3535
    }
3536
 
3537
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3538
    public boolean isSet(_Fields field) {
3539
      switch (field) {
3540
      case CUSTOMER_ID:
3541
        return isSetCustomerId();
132 ashish 3542
      case FROM_DATE:
3543
        return isSetFrom_date();
3544
      case TO_DATE:
3545
        return isSetTo_date();
68 ashish 3546
      case STATUS:
3547
        return isSetStatus();
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 getTransactionsForCustomer_args)
3561
        return this.equals((getTransactionsForCustomer_args)that);
3562
      return false;
3563
    }
3564
 
3565
    public boolean equals(getTransactionsForCustomer_args that) {
3566
      if (that == null)
3567
        return false;
3568
 
3569
      boolean this_present_customerId = true;
3570
      boolean that_present_customerId = true;
3571
      if (this_present_customerId || that_present_customerId) {
3572
        if (!(this_present_customerId && that_present_customerId))
3573
          return false;
3574
        if (this.customerId != that.customerId)
3575
          return false;
3576
      }
3577
 
132 ashish 3578
      boolean this_present_from_date = true;
3579
      boolean that_present_from_date = true;
3580
      if (this_present_from_date || that_present_from_date) {
3581
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3582
          return false;
132 ashish 3583
        if (this.from_date != that.from_date)
68 ashish 3584
          return false;
3585
      }
3586
 
132 ashish 3587
      boolean this_present_to_date = true;
3588
      boolean that_present_to_date = true;
3589
      if (this_present_to_date || that_present_to_date) {
3590
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3591
          return false;
132 ashish 3592
        if (this.to_date != that.to_date)
68 ashish 3593
          return false;
3594
      }
3595
 
3596
      boolean this_present_status = true && this.isSetStatus();
3597
      boolean that_present_status = true && that.isSetStatus();
3598
      if (this_present_status || that_present_status) {
3599
        if (!(this_present_status && that_present_status))
3600
          return false;
3601
        if (!this.status.equals(that.status))
3602
          return false;
3603
      }
3604
 
3605
      return true;
3606
    }
3607
 
3608
    @Override
3609
    public int hashCode() {
3610
      return 0;
3611
    }
3612
 
3613
    public int compareTo(getTransactionsForCustomer_args other) {
3614
      if (!getClass().equals(other.getClass())) {
3615
        return getClass().getName().compareTo(other.getClass().getName());
3616
      }
3617
 
3618
      int lastComparison = 0;
3619
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
3620
 
3621
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
3622
      if (lastComparison != 0) {
3623
        return lastComparison;
3624
      }
3625
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
3626
      if (lastComparison != 0) {
3627
        return lastComparison;
3628
      }
132 ashish 3629
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3630
      if (lastComparison != 0) {
3631
        return lastComparison;
3632
      }
132 ashish 3633
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3634
      if (lastComparison != 0) {
3635
        return lastComparison;
3636
      }
132 ashish 3637
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3638
      if (lastComparison != 0) {
3639
        return lastComparison;
3640
      }
132 ashish 3641
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3642
      if (lastComparison != 0) {
3643
        return lastComparison;
3644
      }
3645
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3646
      if (lastComparison != 0) {
3647
        return lastComparison;
3648
      }
3649
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3650
      if (lastComparison != 0) {
3651
        return lastComparison;
3652
      }
3653
      return 0;
3654
    }
3655
 
3656
    public void read(TProtocol iprot) throws TException {
3657
      TField field;
3658
      iprot.readStructBegin();
3659
      while (true)
3660
      {
3661
        field = iprot.readFieldBegin();
3662
        if (field.type == TType.STOP) { 
3663
          break;
3664
        }
3665
        _Fields fieldId = _Fields.findByThriftId(field.id);
3666
        if (fieldId == null) {
3667
          TProtocolUtil.skip(iprot, field.type);
3668
        } else {
3669
          switch (fieldId) {
3670
            case CUSTOMER_ID:
3671
              if (field.type == TType.I64) {
3672
                this.customerId = iprot.readI64();
3673
                setCustomerIdIsSet(true);
3674
              } else { 
3675
                TProtocolUtil.skip(iprot, field.type);
3676
              }
3677
              break;
132 ashish 3678
            case FROM_DATE:
68 ashish 3679
              if (field.type == TType.I64) {
132 ashish 3680
                this.from_date = iprot.readI64();
3681
                setFrom_dateIsSet(true);
68 ashish 3682
              } else { 
3683
                TProtocolUtil.skip(iprot, field.type);
3684
              }
3685
              break;
132 ashish 3686
            case TO_DATE:
68 ashish 3687
              if (field.type == TType.I64) {
132 ashish 3688
                this.to_date = iprot.readI64();
3689
                setTo_dateIsSet(true);
68 ashish 3690
              } else { 
3691
                TProtocolUtil.skip(iprot, field.type);
3692
              }
3693
              break;
3694
            case STATUS:
3695
              if (field.type == TType.I32) {
3696
                this.status = TransactionStatus.findByValue(iprot.readI32());
3697
              } else { 
3698
                TProtocolUtil.skip(iprot, field.type);
3699
              }
3700
              break;
3701
          }
3702
          iprot.readFieldEnd();
3703
        }
3704
      }
3705
      iprot.readStructEnd();
3706
      validate();
3707
    }
3708
 
3709
    public void write(TProtocol oprot) throws TException {
3710
      validate();
3711
 
3712
      oprot.writeStructBegin(STRUCT_DESC);
3713
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
3714
      oprot.writeI64(this.customerId);
3715
      oprot.writeFieldEnd();
132 ashish 3716
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3717
      oprot.writeI64(this.from_date);
68 ashish 3718
      oprot.writeFieldEnd();
132 ashish 3719
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3720
      oprot.writeI64(this.to_date);
68 ashish 3721
      oprot.writeFieldEnd();
3722
      if (this.status != null) {
3723
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3724
        oprot.writeI32(this.status.getValue());
3725
        oprot.writeFieldEnd();
3726
      }
3727
      oprot.writeFieldStop();
3728
      oprot.writeStructEnd();
3729
    }
3730
 
3731
    @Override
3732
    public String toString() {
3733
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
3734
      boolean first = true;
3735
 
3736
      sb.append("customerId:");
3737
      sb.append(this.customerId);
3738
      first = false;
3739
      if (!first) sb.append(", ");
132 ashish 3740
      sb.append("from_date:");
3741
      sb.append(this.from_date);
68 ashish 3742
      first = false;
3743
      if (!first) sb.append(", ");
132 ashish 3744
      sb.append("to_date:");
3745
      sb.append(this.to_date);
68 ashish 3746
      first = false;
3747
      if (!first) sb.append(", ");
3748
      sb.append("status:");
3749
      if (this.status == null) {
3750
        sb.append("null");
3751
      } else {
3752
        String status_name = status.name();
3753
        if (status_name != null) {
3754
          sb.append(status_name);
3755
          sb.append(" (");
3756
        }
3757
        sb.append(this.status);
3758
        if (status_name != null) {
3759
          sb.append(")");
3760
        }
3761
      }
3762
      first = false;
3763
      sb.append(")");
3764
      return sb.toString();
3765
    }
3766
 
3767
    public void validate() throws TException {
3768
      // check for required fields
3769
    }
3770
 
3771
  }
3772
 
684 chandransh 3773
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 3774
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
3775
 
3776
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3777
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3778
 
3779
    private List<Transaction> success;
3780
    private TransactionServiceException ex;
3781
 
3782
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3783
    public enum _Fields implements TFieldIdEnum {
3784
      SUCCESS((short)0, "success"),
3785
      EX((short)1, "ex");
3786
 
3787
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3788
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3789
 
3790
      static {
3791
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3792
          byId.put((int)field._thriftId, field);
3793
          byName.put(field.getFieldName(), field);
3794
        }
3795
      }
3796
 
3797
      /**
3798
       * Find the _Fields constant that matches fieldId, or null if its not found.
3799
       */
3800
      public static _Fields findByThriftId(int fieldId) {
3801
        return byId.get(fieldId);
3802
      }
3803
 
3804
      /**
3805
       * Find the _Fields constant that matches fieldId, throwing an exception
3806
       * if it is not found.
3807
       */
3808
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3809
        _Fields fields = findByThriftId(fieldId);
3810
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3811
        return fields;
3812
      }
3813
 
3814
      /**
3815
       * Find the _Fields constant that matches name, or null if its not found.
3816
       */
3817
      public static _Fields findByName(String name) {
3818
        return byName.get(name);
3819
      }
3820
 
3821
      private final short _thriftId;
3822
      private final String _fieldName;
3823
 
3824
      _Fields(short thriftId, String fieldName) {
3825
        _thriftId = thriftId;
3826
        _fieldName = fieldName;
3827
      }
3828
 
3829
      public short getThriftFieldId() {
3830
        return _thriftId;
3831
      }
3832
 
3833
      public String getFieldName() {
3834
        return _fieldName;
3835
      }
3836
    }
3837
 
3838
    // isset id assignments
3839
 
3840
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3841
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3842
          new ListMetaData(TType.LIST, 
3843
              new StructMetaData(TType.STRUCT, Transaction.class))));
3844
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3845
          new FieldValueMetaData(TType.STRUCT)));
3846
    }});
3847
 
3848
    static {
3849
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
3850
    }
3851
 
3852
    public getTransactionsForCustomer_result() {
3853
    }
3854
 
3855
    public getTransactionsForCustomer_result(
3856
      List<Transaction> success,
3857
      TransactionServiceException ex)
3858
    {
3859
      this();
3860
      this.success = success;
3861
      this.ex = ex;
3862
    }
3863
 
3864
    /**
3865
     * Performs a deep copy on <i>other</i>.
3866
     */
3867
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
3868
      if (other.isSetSuccess()) {
3869
        List<Transaction> __this__success = new ArrayList<Transaction>();
3870
        for (Transaction other_element : other.success) {
3871
          __this__success.add(new Transaction(other_element));
3872
        }
3873
        this.success = __this__success;
3874
      }
3875
      if (other.isSetEx()) {
3876
        this.ex = new TransactionServiceException(other.ex);
3877
      }
3878
    }
3879
 
3880
    public getTransactionsForCustomer_result deepCopy() {
3881
      return new getTransactionsForCustomer_result(this);
3882
    }
3883
 
3884
    @Deprecated
3885
    public getTransactionsForCustomer_result clone() {
3886
      return new getTransactionsForCustomer_result(this);
3887
    }
3888
 
3889
    public int getSuccessSize() {
3890
      return (this.success == null) ? 0 : this.success.size();
3891
    }
3892
 
3893
    public java.util.Iterator<Transaction> getSuccessIterator() {
3894
      return (this.success == null) ? null : this.success.iterator();
3895
    }
3896
 
3897
    public void addToSuccess(Transaction elem) {
3898
      if (this.success == null) {
3899
        this.success = new ArrayList<Transaction>();
3900
      }
3901
      this.success.add(elem);
3902
    }
3903
 
3904
    public List<Transaction> getSuccess() {
3905
      return this.success;
3906
    }
3907
 
3908
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
3909
      this.success = success;
3910
      return this;
3911
    }
3912
 
3913
    public void unsetSuccess() {
3914
      this.success = null;
3915
    }
3916
 
3917
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3918
    public boolean isSetSuccess() {
3919
      return this.success != null;
3920
    }
3921
 
3922
    public void setSuccessIsSet(boolean value) {
3923
      if (!value) {
3924
        this.success = null;
3925
      }
3926
    }
3927
 
3928
    public TransactionServiceException getEx() {
3929
      return this.ex;
3930
    }
3931
 
3932
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
3933
      this.ex = ex;
3934
      return this;
3935
    }
3936
 
3937
    public void unsetEx() {
3938
      this.ex = null;
3939
    }
3940
 
3941
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3942
    public boolean isSetEx() {
3943
      return this.ex != null;
3944
    }
3945
 
3946
    public void setExIsSet(boolean value) {
3947
      if (!value) {
3948
        this.ex = null;
3949
      }
3950
    }
3951
 
3952
    public void setFieldValue(_Fields field, Object value) {
3953
      switch (field) {
3954
      case SUCCESS:
3955
        if (value == null) {
3956
          unsetSuccess();
3957
        } else {
3958
          setSuccess((List<Transaction>)value);
3959
        }
3960
        break;
3961
 
3962
      case EX:
3963
        if (value == null) {
3964
          unsetEx();
3965
        } else {
3966
          setEx((TransactionServiceException)value);
3967
        }
3968
        break;
3969
 
3970
      }
3971
    }
3972
 
3973
    public void setFieldValue(int fieldID, Object value) {
3974
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3975
    }
3976
 
3977
    public Object getFieldValue(_Fields field) {
3978
      switch (field) {
3979
      case SUCCESS:
3980
        return getSuccess();
3981
 
3982
      case EX:
3983
        return getEx();
3984
 
3985
      }
3986
      throw new IllegalStateException();
3987
    }
3988
 
3989
    public Object getFieldValue(int fieldId) {
3990
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3991
    }
3992
 
3993
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3994
    public boolean isSet(_Fields field) {
3995
      switch (field) {
3996
      case SUCCESS:
3997
        return isSetSuccess();
3998
      case EX:
3999
        return isSetEx();
4000
      }
4001
      throw new IllegalStateException();
4002
    }
4003
 
4004
    public boolean isSet(int fieldID) {
4005
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4006
    }
4007
 
4008
    @Override
4009
    public boolean equals(Object that) {
4010
      if (that == null)
4011
        return false;
4012
      if (that instanceof getTransactionsForCustomer_result)
4013
        return this.equals((getTransactionsForCustomer_result)that);
4014
      return false;
4015
    }
4016
 
4017
    public boolean equals(getTransactionsForCustomer_result that) {
4018
      if (that == null)
4019
        return false;
4020
 
4021
      boolean this_present_success = true && this.isSetSuccess();
4022
      boolean that_present_success = true && that.isSetSuccess();
4023
      if (this_present_success || that_present_success) {
4024
        if (!(this_present_success && that_present_success))
4025
          return false;
4026
        if (!this.success.equals(that.success))
4027
          return false;
4028
      }
4029
 
4030
      boolean this_present_ex = true && this.isSetEx();
4031
      boolean that_present_ex = true && that.isSetEx();
4032
      if (this_present_ex || that_present_ex) {
4033
        if (!(this_present_ex && that_present_ex))
4034
          return false;
4035
        if (!this.ex.equals(that.ex))
4036
          return false;
4037
      }
4038
 
4039
      return true;
4040
    }
4041
 
4042
    @Override
4043
    public int hashCode() {
4044
      return 0;
4045
    }
4046
 
684 chandransh 4047
    public int compareTo(getTransactionsForCustomer_result other) {
4048
      if (!getClass().equals(other.getClass())) {
4049
        return getClass().getName().compareTo(other.getClass().getName());
4050
      }
4051
 
4052
      int lastComparison = 0;
4053
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4054
 
4055
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4056
      if (lastComparison != 0) {
4057
        return lastComparison;
4058
      }
4059
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4060
      if (lastComparison != 0) {
4061
        return lastComparison;
4062
      }
4063
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4064
      if (lastComparison != 0) {
4065
        return lastComparison;
4066
      }
4067
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4068
      if (lastComparison != 0) {
4069
        return lastComparison;
4070
      }
4071
      return 0;
4072
    }
4073
 
68 ashish 4074
    public void read(TProtocol iprot) throws TException {
4075
      TField field;
4076
      iprot.readStructBegin();
4077
      while (true)
4078
      {
4079
        field = iprot.readFieldBegin();
4080
        if (field.type == TType.STOP) { 
4081
          break;
4082
        }
4083
        _Fields fieldId = _Fields.findByThriftId(field.id);
4084
        if (fieldId == null) {
4085
          TProtocolUtil.skip(iprot, field.type);
4086
        } else {
4087
          switch (fieldId) {
4088
            case SUCCESS:
4089
              if (field.type == TType.LIST) {
4090
                {
684 chandransh 4091
                  TList _list8 = iprot.readListBegin();
4092
                  this.success = new ArrayList<Transaction>(_list8.size);
4093
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4094
                  {
684 chandransh 4095
                    Transaction _elem10;
4096
                    _elem10 = new Transaction();
4097
                    _elem10.read(iprot);
4098
                    this.success.add(_elem10);
68 ashish 4099
                  }
4100
                  iprot.readListEnd();
4101
                }
4102
              } else { 
4103
                TProtocolUtil.skip(iprot, field.type);
4104
              }
4105
              break;
4106
            case EX:
4107
              if (field.type == TType.STRUCT) {
4108
                this.ex = new TransactionServiceException();
4109
                this.ex.read(iprot);
4110
              } else { 
4111
                TProtocolUtil.skip(iprot, field.type);
4112
              }
4113
              break;
4114
          }
4115
          iprot.readFieldEnd();
4116
        }
4117
      }
4118
      iprot.readStructEnd();
4119
      validate();
4120
    }
4121
 
4122
    public void write(TProtocol oprot) throws TException {
4123
      oprot.writeStructBegin(STRUCT_DESC);
4124
 
4125
      if (this.isSetSuccess()) {
4126
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4127
        {
4128
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4129
          for (Transaction _iter11 : this.success)
68 ashish 4130
          {
684 chandransh 4131
            _iter11.write(oprot);
68 ashish 4132
          }
4133
          oprot.writeListEnd();
4134
        }
4135
        oprot.writeFieldEnd();
4136
      } else if (this.isSetEx()) {
4137
        oprot.writeFieldBegin(EX_FIELD_DESC);
4138
        this.ex.write(oprot);
4139
        oprot.writeFieldEnd();
4140
      }
4141
      oprot.writeFieldStop();
4142
      oprot.writeStructEnd();
4143
    }
4144
 
4145
    @Override
4146
    public String toString() {
4147
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4148
      boolean first = true;
4149
 
4150
      sb.append("success:");
4151
      if (this.success == null) {
4152
        sb.append("null");
4153
      } else {
4154
        sb.append(this.success);
4155
      }
4156
      first = false;
4157
      if (!first) sb.append(", ");
4158
      sb.append("ex:");
4159
      if (this.ex == null) {
4160
        sb.append("null");
4161
      } else {
4162
        sb.append(this.ex);
4163
      }
4164
      first = false;
4165
      sb.append(")");
4166
      return sb.toString();
4167
    }
4168
 
4169
    public void validate() throws TException {
4170
      // check for required fields
4171
    }
4172
 
4173
  }
4174
 
132 ashish 4175
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4176
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4177
 
4178
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4179
 
4180
    private long shoppingCartId;
4181
 
4182
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4183
    public enum _Fields implements TFieldIdEnum {
4184
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4185
 
4186
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4188
 
4189
      static {
4190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4191
          byId.put((int)field._thriftId, field);
4192
          byName.put(field.getFieldName(), field);
4193
        }
4194
      }
4195
 
4196
      /**
4197
       * Find the _Fields constant that matches fieldId, or null if its not found.
4198
       */
4199
      public static _Fields findByThriftId(int fieldId) {
4200
        return byId.get(fieldId);
4201
      }
4202
 
4203
      /**
4204
       * Find the _Fields constant that matches fieldId, throwing an exception
4205
       * if it is not found.
4206
       */
4207
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4208
        _Fields fields = findByThriftId(fieldId);
4209
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4210
        return fields;
4211
      }
4212
 
4213
      /**
4214
       * Find the _Fields constant that matches name, or null if its not found.
4215
       */
4216
      public static _Fields findByName(String name) {
4217
        return byName.get(name);
4218
      }
4219
 
4220
      private final short _thriftId;
4221
      private final String _fieldName;
4222
 
4223
      _Fields(short thriftId, String fieldName) {
4224
        _thriftId = thriftId;
4225
        _fieldName = fieldName;
4226
      }
4227
 
4228
      public short getThriftFieldId() {
4229
        return _thriftId;
4230
      }
4231
 
4232
      public String getFieldName() {
4233
        return _fieldName;
4234
      }
4235
    }
4236
 
4237
    // isset id assignments
4238
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4239
    private BitSet __isset_bit_vector = new BitSet(1);
4240
 
4241
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4242
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4243
          new FieldValueMetaData(TType.I64)));
4244
    }});
4245
 
4246
    static {
4247
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4248
    }
4249
 
4250
    public getTransactionsForShoppingCartId_args() {
4251
    }
4252
 
4253
    public getTransactionsForShoppingCartId_args(
4254
      long shoppingCartId)
4255
    {
4256
      this();
4257
      this.shoppingCartId = shoppingCartId;
4258
      setShoppingCartIdIsSet(true);
4259
    }
4260
 
4261
    /**
4262
     * Performs a deep copy on <i>other</i>.
4263
     */
4264
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4265
      __isset_bit_vector.clear();
4266
      __isset_bit_vector.or(other.__isset_bit_vector);
4267
      this.shoppingCartId = other.shoppingCartId;
4268
    }
4269
 
4270
    public getTransactionsForShoppingCartId_args deepCopy() {
4271
      return new getTransactionsForShoppingCartId_args(this);
4272
    }
4273
 
4274
    @Deprecated
4275
    public getTransactionsForShoppingCartId_args clone() {
4276
      return new getTransactionsForShoppingCartId_args(this);
4277
    }
4278
 
4279
    public long getShoppingCartId() {
4280
      return this.shoppingCartId;
4281
    }
4282
 
4283
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4284
      this.shoppingCartId = shoppingCartId;
4285
      setShoppingCartIdIsSet(true);
4286
      return this;
4287
    }
4288
 
4289
    public void unsetShoppingCartId() {
4290
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4291
    }
4292
 
4293
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4294
    public boolean isSetShoppingCartId() {
4295
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4296
    }
4297
 
4298
    public void setShoppingCartIdIsSet(boolean value) {
4299
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4300
    }
4301
 
4302
    public void setFieldValue(_Fields field, Object value) {
4303
      switch (field) {
4304
      case SHOPPING_CART_ID:
4305
        if (value == null) {
4306
          unsetShoppingCartId();
4307
        } else {
4308
          setShoppingCartId((Long)value);
4309
        }
4310
        break;
4311
 
4312
      }
4313
    }
4314
 
4315
    public void setFieldValue(int fieldID, Object value) {
4316
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4317
    }
4318
 
4319
    public Object getFieldValue(_Fields field) {
4320
      switch (field) {
4321
      case SHOPPING_CART_ID:
4322
        return new Long(getShoppingCartId());
4323
 
4324
      }
4325
      throw new IllegalStateException();
4326
    }
4327
 
4328
    public Object getFieldValue(int fieldId) {
4329
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4330
    }
4331
 
4332
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4333
    public boolean isSet(_Fields field) {
4334
      switch (field) {
4335
      case SHOPPING_CART_ID:
4336
        return isSetShoppingCartId();
4337
      }
4338
      throw new IllegalStateException();
4339
    }
4340
 
4341
    public boolean isSet(int fieldID) {
4342
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4343
    }
4344
 
4345
    @Override
4346
    public boolean equals(Object that) {
4347
      if (that == null)
4348
        return false;
4349
      if (that instanceof getTransactionsForShoppingCartId_args)
4350
        return this.equals((getTransactionsForShoppingCartId_args)that);
4351
      return false;
4352
    }
4353
 
4354
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4355
      if (that == null)
4356
        return false;
4357
 
4358
      boolean this_present_shoppingCartId = true;
4359
      boolean that_present_shoppingCartId = true;
4360
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4361
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4362
          return false;
4363
        if (this.shoppingCartId != that.shoppingCartId)
4364
          return false;
4365
      }
4366
 
4367
      return true;
4368
    }
4369
 
4370
    @Override
4371
    public int hashCode() {
4372
      return 0;
4373
    }
4374
 
4375
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4376
      if (!getClass().equals(other.getClass())) {
4377
        return getClass().getName().compareTo(other.getClass().getName());
4378
      }
4379
 
4380
      int lastComparison = 0;
4381
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4382
 
4383
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4384
      if (lastComparison != 0) {
4385
        return lastComparison;
4386
      }
4387
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4388
      if (lastComparison != 0) {
4389
        return lastComparison;
4390
      }
4391
      return 0;
4392
    }
4393
 
4394
    public void read(TProtocol iprot) throws TException {
4395
      TField field;
4396
      iprot.readStructBegin();
4397
      while (true)
4398
      {
4399
        field = iprot.readFieldBegin();
4400
        if (field.type == TType.STOP) { 
4401
          break;
4402
        }
4403
        _Fields fieldId = _Fields.findByThriftId(field.id);
4404
        if (fieldId == null) {
4405
          TProtocolUtil.skip(iprot, field.type);
4406
        } else {
4407
          switch (fieldId) {
4408
            case SHOPPING_CART_ID:
4409
              if (field.type == TType.I64) {
4410
                this.shoppingCartId = iprot.readI64();
4411
                setShoppingCartIdIsSet(true);
4412
              } else { 
4413
                TProtocolUtil.skip(iprot, field.type);
4414
              }
4415
              break;
4416
          }
4417
          iprot.readFieldEnd();
4418
        }
4419
      }
4420
      iprot.readStructEnd();
4421
      validate();
4422
    }
4423
 
4424
    public void write(TProtocol oprot) throws TException {
4425
      validate();
4426
 
4427
      oprot.writeStructBegin(STRUCT_DESC);
4428
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4429
      oprot.writeI64(this.shoppingCartId);
4430
      oprot.writeFieldEnd();
4431
      oprot.writeFieldStop();
4432
      oprot.writeStructEnd();
4433
    }
4434
 
4435
    @Override
4436
    public String toString() {
4437
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4438
      boolean first = true;
4439
 
4440
      sb.append("shoppingCartId:");
4441
      sb.append(this.shoppingCartId);
4442
      first = false;
4443
      sb.append(")");
4444
      return sb.toString();
4445
    }
4446
 
4447
    public void validate() throws TException {
4448
      // check for required fields
4449
    }
4450
 
4451
  }
4452
 
684 chandransh 4453
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4454
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4455
 
4456
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4457
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4458
 
4459
    private List<Transaction> success;
4460
    private TransactionServiceException ex;
4461
 
4462
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4463
    public enum _Fields implements TFieldIdEnum {
4464
      SUCCESS((short)0, "success"),
4465
      EX((short)1, "ex");
4466
 
4467
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4468
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4469
 
4470
      static {
4471
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4472
          byId.put((int)field._thriftId, field);
4473
          byName.put(field.getFieldName(), field);
4474
        }
4475
      }
4476
 
4477
      /**
4478
       * Find the _Fields constant that matches fieldId, or null if its not found.
4479
       */
4480
      public static _Fields findByThriftId(int fieldId) {
4481
        return byId.get(fieldId);
4482
      }
4483
 
4484
      /**
4485
       * Find the _Fields constant that matches fieldId, throwing an exception
4486
       * if it is not found.
4487
       */
4488
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4489
        _Fields fields = findByThriftId(fieldId);
4490
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4491
        return fields;
4492
      }
4493
 
4494
      /**
4495
       * Find the _Fields constant that matches name, or null if its not found.
4496
       */
4497
      public static _Fields findByName(String name) {
4498
        return byName.get(name);
4499
      }
4500
 
4501
      private final short _thriftId;
4502
      private final String _fieldName;
4503
 
4504
      _Fields(short thriftId, String fieldName) {
4505
        _thriftId = thriftId;
4506
        _fieldName = fieldName;
4507
      }
4508
 
4509
      public short getThriftFieldId() {
4510
        return _thriftId;
4511
      }
4512
 
4513
      public String getFieldName() {
4514
        return _fieldName;
4515
      }
4516
    }
4517
 
4518
    // isset id assignments
4519
 
4520
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4521
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4522
          new ListMetaData(TType.LIST, 
4523
              new StructMetaData(TType.STRUCT, Transaction.class))));
4524
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4525
          new FieldValueMetaData(TType.STRUCT)));
4526
    }});
4527
 
4528
    static {
4529
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4530
    }
4531
 
4532
    public getTransactionsForShoppingCartId_result() {
4533
    }
4534
 
4535
    public getTransactionsForShoppingCartId_result(
4536
      List<Transaction> success,
4537
      TransactionServiceException ex)
4538
    {
4539
      this();
4540
      this.success = success;
4541
      this.ex = ex;
4542
    }
4543
 
4544
    /**
4545
     * Performs a deep copy on <i>other</i>.
4546
     */
4547
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4548
      if (other.isSetSuccess()) {
4549
        List<Transaction> __this__success = new ArrayList<Transaction>();
4550
        for (Transaction other_element : other.success) {
4551
          __this__success.add(new Transaction(other_element));
4552
        }
4553
        this.success = __this__success;
4554
      }
4555
      if (other.isSetEx()) {
4556
        this.ex = new TransactionServiceException(other.ex);
4557
      }
4558
    }
4559
 
4560
    public getTransactionsForShoppingCartId_result deepCopy() {
4561
      return new getTransactionsForShoppingCartId_result(this);
4562
    }
4563
 
4564
    @Deprecated
4565
    public getTransactionsForShoppingCartId_result clone() {
4566
      return new getTransactionsForShoppingCartId_result(this);
4567
    }
4568
 
4569
    public int getSuccessSize() {
4570
      return (this.success == null) ? 0 : this.success.size();
4571
    }
4572
 
4573
    public java.util.Iterator<Transaction> getSuccessIterator() {
4574
      return (this.success == null) ? null : this.success.iterator();
4575
    }
4576
 
4577
    public void addToSuccess(Transaction elem) {
4578
      if (this.success == null) {
4579
        this.success = new ArrayList<Transaction>();
4580
      }
4581
      this.success.add(elem);
4582
    }
4583
 
4584
    public List<Transaction> getSuccess() {
4585
      return this.success;
4586
    }
4587
 
4588
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4589
      this.success = success;
4590
      return this;
4591
    }
4592
 
4593
    public void unsetSuccess() {
4594
      this.success = null;
4595
    }
4596
 
4597
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4598
    public boolean isSetSuccess() {
4599
      return this.success != null;
4600
    }
4601
 
4602
    public void setSuccessIsSet(boolean value) {
4603
      if (!value) {
4604
        this.success = null;
4605
      }
4606
    }
4607
 
4608
    public TransactionServiceException getEx() {
4609
      return this.ex;
4610
    }
4611
 
4612
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4613
      this.ex = ex;
4614
      return this;
4615
    }
4616
 
4617
    public void unsetEx() {
4618
      this.ex = null;
4619
    }
4620
 
4621
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4622
    public boolean isSetEx() {
4623
      return this.ex != null;
4624
    }
4625
 
4626
    public void setExIsSet(boolean value) {
4627
      if (!value) {
4628
        this.ex = null;
4629
      }
4630
    }
4631
 
4632
    public void setFieldValue(_Fields field, Object value) {
4633
      switch (field) {
4634
      case SUCCESS:
4635
        if (value == null) {
4636
          unsetSuccess();
4637
        } else {
4638
          setSuccess((List<Transaction>)value);
4639
        }
4640
        break;
4641
 
4642
      case EX:
4643
        if (value == null) {
4644
          unsetEx();
4645
        } else {
4646
          setEx((TransactionServiceException)value);
4647
        }
4648
        break;
4649
 
4650
      }
4651
    }
4652
 
4653
    public void setFieldValue(int fieldID, Object value) {
4654
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4655
    }
4656
 
4657
    public Object getFieldValue(_Fields field) {
4658
      switch (field) {
4659
      case SUCCESS:
4660
        return getSuccess();
4661
 
4662
      case EX:
4663
        return getEx();
4664
 
4665
      }
4666
      throw new IllegalStateException();
4667
    }
4668
 
4669
    public Object getFieldValue(int fieldId) {
4670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4671
    }
4672
 
4673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4674
    public boolean isSet(_Fields field) {
4675
      switch (field) {
4676
      case SUCCESS:
4677
        return isSetSuccess();
4678
      case EX:
4679
        return isSetEx();
4680
      }
4681
      throw new IllegalStateException();
4682
    }
4683
 
4684
    public boolean isSet(int fieldID) {
4685
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4686
    }
4687
 
4688
    @Override
4689
    public boolean equals(Object that) {
4690
      if (that == null)
4691
        return false;
4692
      if (that instanceof getTransactionsForShoppingCartId_result)
4693
        return this.equals((getTransactionsForShoppingCartId_result)that);
4694
      return false;
4695
    }
4696
 
4697
    public boolean equals(getTransactionsForShoppingCartId_result that) {
4698
      if (that == null)
4699
        return false;
4700
 
4701
      boolean this_present_success = true && this.isSetSuccess();
4702
      boolean that_present_success = true && that.isSetSuccess();
4703
      if (this_present_success || that_present_success) {
4704
        if (!(this_present_success && that_present_success))
4705
          return false;
4706
        if (!this.success.equals(that.success))
4707
          return false;
4708
      }
4709
 
4710
      boolean this_present_ex = true && this.isSetEx();
4711
      boolean that_present_ex = true && that.isSetEx();
4712
      if (this_present_ex || that_present_ex) {
4713
        if (!(this_present_ex && that_present_ex))
4714
          return false;
4715
        if (!this.ex.equals(that.ex))
4716
          return false;
4717
      }
4718
 
4719
      return true;
4720
    }
4721
 
4722
    @Override
4723
    public int hashCode() {
4724
      return 0;
4725
    }
4726
 
684 chandransh 4727
    public int compareTo(getTransactionsForShoppingCartId_result other) {
4728
      if (!getClass().equals(other.getClass())) {
4729
        return getClass().getName().compareTo(other.getClass().getName());
4730
      }
4731
 
4732
      int lastComparison = 0;
4733
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
4734
 
4735
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4736
      if (lastComparison != 0) {
4737
        return lastComparison;
4738
      }
4739
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4740
      if (lastComparison != 0) {
4741
        return lastComparison;
4742
      }
4743
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4744
      if (lastComparison != 0) {
4745
        return lastComparison;
4746
      }
4747
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4748
      if (lastComparison != 0) {
4749
        return lastComparison;
4750
      }
4751
      return 0;
4752
    }
4753
 
132 ashish 4754
    public void read(TProtocol iprot) throws TException {
4755
      TField field;
4756
      iprot.readStructBegin();
4757
      while (true)
4758
      {
4759
        field = iprot.readFieldBegin();
4760
        if (field.type == TType.STOP) { 
4761
          break;
4762
        }
4763
        _Fields fieldId = _Fields.findByThriftId(field.id);
4764
        if (fieldId == null) {
4765
          TProtocolUtil.skip(iprot, field.type);
4766
        } else {
4767
          switch (fieldId) {
4768
            case SUCCESS:
4769
              if (field.type == TType.LIST) {
4770
                {
684 chandransh 4771
                  TList _list12 = iprot.readListBegin();
4772
                  this.success = new ArrayList<Transaction>(_list12.size);
4773
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 4774
                  {
684 chandransh 4775
                    Transaction _elem14;
4776
                    _elem14 = new Transaction();
4777
                    _elem14.read(iprot);
4778
                    this.success.add(_elem14);
132 ashish 4779
                  }
4780
                  iprot.readListEnd();
4781
                }
4782
              } else { 
4783
                TProtocolUtil.skip(iprot, field.type);
4784
              }
4785
              break;
4786
            case EX:
4787
              if (field.type == TType.STRUCT) {
4788
                this.ex = new TransactionServiceException();
4789
                this.ex.read(iprot);
4790
              } else { 
4791
                TProtocolUtil.skip(iprot, field.type);
4792
              }
4793
              break;
4794
          }
4795
          iprot.readFieldEnd();
4796
        }
4797
      }
4798
      iprot.readStructEnd();
4799
      validate();
4800
    }
4801
 
4802
    public void write(TProtocol oprot) throws TException {
4803
      oprot.writeStructBegin(STRUCT_DESC);
4804
 
4805
      if (this.isSetSuccess()) {
4806
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4807
        {
4808
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4809
          for (Transaction _iter15 : this.success)
132 ashish 4810
          {
684 chandransh 4811
            _iter15.write(oprot);
132 ashish 4812
          }
4813
          oprot.writeListEnd();
4814
        }
4815
        oprot.writeFieldEnd();
4816
      } else if (this.isSetEx()) {
4817
        oprot.writeFieldBegin(EX_FIELD_DESC);
4818
        this.ex.write(oprot);
4819
        oprot.writeFieldEnd();
4820
      }
4821
      oprot.writeFieldStop();
4822
      oprot.writeStructEnd();
4823
    }
4824
 
4825
    @Override
4826
    public String toString() {
4827
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
4828
      boolean first = true;
4829
 
4830
      sb.append("success:");
4831
      if (this.success == null) {
4832
        sb.append("null");
4833
      } else {
4834
        sb.append(this.success);
4835
      }
4836
      first = false;
4837
      if (!first) sb.append(", ");
4838
      sb.append("ex:");
4839
      if (this.ex == null) {
4840
        sb.append("null");
4841
      } else {
4842
        sb.append(this.ex);
4843
      }
4844
      first = false;
4845
      sb.append(")");
4846
      return sb.toString();
4847
    }
4848
 
4849
    public void validate() throws TException {
4850
      // check for required fields
4851
    }
4852
 
4853
  }
4854
 
68 ashish 4855
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
4856
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
4857
 
4858
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
4859
 
4860
    private long transactionId;
4861
 
4862
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4863
    public enum _Fields implements TFieldIdEnum {
4864
      TRANSACTION_ID((short)1, "transactionId");
4865
 
4866
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4868
 
4869
      static {
4870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4871
          byId.put((int)field._thriftId, field);
4872
          byName.put(field.getFieldName(), field);
4873
        }
4874
      }
4875
 
4876
      /**
4877
       * Find the _Fields constant that matches fieldId, or null if its not found.
4878
       */
4879
      public static _Fields findByThriftId(int fieldId) {
4880
        return byId.get(fieldId);
4881
      }
4882
 
4883
      /**
4884
       * Find the _Fields constant that matches fieldId, throwing an exception
4885
       * if it is not found.
4886
       */
4887
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4888
        _Fields fields = findByThriftId(fieldId);
4889
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4890
        return fields;
4891
      }
4892
 
4893
      /**
4894
       * Find the _Fields constant that matches name, or null if its not found.
4895
       */
4896
      public static _Fields findByName(String name) {
4897
        return byName.get(name);
4898
      }
4899
 
4900
      private final short _thriftId;
4901
      private final String _fieldName;
4902
 
4903
      _Fields(short thriftId, String fieldName) {
4904
        _thriftId = thriftId;
4905
        _fieldName = fieldName;
4906
      }
4907
 
4908
      public short getThriftFieldId() {
4909
        return _thriftId;
4910
      }
4911
 
4912
      public String getFieldName() {
4913
        return _fieldName;
4914
      }
4915
    }
4916
 
4917
    // isset id assignments
4918
    private static final int __TRANSACTIONID_ISSET_ID = 0;
4919
    private BitSet __isset_bit_vector = new BitSet(1);
4920
 
4921
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4922
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
4923
          new FieldValueMetaData(TType.I64)));
4924
    }});
4925
 
4926
    static {
4927
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
4928
    }
4929
 
4930
    public getTransactionStatus_args() {
4931
    }
4932
 
4933
    public getTransactionStatus_args(
4934
      long transactionId)
4935
    {
4936
      this();
4937
      this.transactionId = transactionId;
4938
      setTransactionIdIsSet(true);
4939
    }
4940
 
4941
    /**
4942
     * Performs a deep copy on <i>other</i>.
4943
     */
4944
    public getTransactionStatus_args(getTransactionStatus_args other) {
4945
      __isset_bit_vector.clear();
4946
      __isset_bit_vector.or(other.__isset_bit_vector);
4947
      this.transactionId = other.transactionId;
4948
    }
4949
 
4950
    public getTransactionStatus_args deepCopy() {
4951
      return new getTransactionStatus_args(this);
4952
    }
4953
 
4954
    @Deprecated
4955
    public getTransactionStatus_args clone() {
4956
      return new getTransactionStatus_args(this);
4957
    }
4958
 
4959
    public long getTransactionId() {
4960
      return this.transactionId;
4961
    }
4962
 
4963
    public getTransactionStatus_args setTransactionId(long transactionId) {
4964
      this.transactionId = transactionId;
4965
      setTransactionIdIsSet(true);
4966
      return this;
4967
    }
4968
 
4969
    public void unsetTransactionId() {
4970
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
4971
    }
4972
 
4973
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
4974
    public boolean isSetTransactionId() {
4975
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
4976
    }
4977
 
4978
    public void setTransactionIdIsSet(boolean value) {
4979
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
4980
    }
4981
 
4982
    public void setFieldValue(_Fields field, Object value) {
4983
      switch (field) {
4984
      case TRANSACTION_ID:
4985
        if (value == null) {
4986
          unsetTransactionId();
4987
        } else {
4988
          setTransactionId((Long)value);
4989
        }
4990
        break;
4991
 
4992
      }
4993
    }
4994
 
4995
    public void setFieldValue(int fieldID, Object value) {
4996
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4997
    }
4998
 
4999
    public Object getFieldValue(_Fields field) {
5000
      switch (field) {
5001
      case TRANSACTION_ID:
5002
        return new Long(getTransactionId());
5003
 
5004
      }
5005
      throw new IllegalStateException();
5006
    }
5007
 
5008
    public Object getFieldValue(int fieldId) {
5009
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5010
    }
5011
 
5012
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5013
    public boolean isSet(_Fields field) {
5014
      switch (field) {
5015
      case TRANSACTION_ID:
5016
        return isSetTransactionId();
5017
      }
5018
      throw new IllegalStateException();
5019
    }
5020
 
5021
    public boolean isSet(int fieldID) {
5022
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5023
    }
5024
 
5025
    @Override
5026
    public boolean equals(Object that) {
5027
      if (that == null)
5028
        return false;
5029
      if (that instanceof getTransactionStatus_args)
5030
        return this.equals((getTransactionStatus_args)that);
5031
      return false;
5032
    }
5033
 
5034
    public boolean equals(getTransactionStatus_args that) {
5035
      if (that == null)
5036
        return false;
5037
 
5038
      boolean this_present_transactionId = true;
5039
      boolean that_present_transactionId = true;
5040
      if (this_present_transactionId || that_present_transactionId) {
5041
        if (!(this_present_transactionId && that_present_transactionId))
5042
          return false;
5043
        if (this.transactionId != that.transactionId)
5044
          return false;
5045
      }
5046
 
5047
      return true;
5048
    }
5049
 
5050
    @Override
5051
    public int hashCode() {
5052
      return 0;
5053
    }
5054
 
5055
    public int compareTo(getTransactionStatus_args other) {
5056
      if (!getClass().equals(other.getClass())) {
5057
        return getClass().getName().compareTo(other.getClass().getName());
5058
      }
5059
 
5060
      int lastComparison = 0;
5061
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5062
 
5063
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5064
      if (lastComparison != 0) {
5065
        return lastComparison;
5066
      }
5067
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5068
      if (lastComparison != 0) {
5069
        return lastComparison;
5070
      }
5071
      return 0;
5072
    }
5073
 
5074
    public void read(TProtocol iprot) throws TException {
5075
      TField field;
5076
      iprot.readStructBegin();
5077
      while (true)
5078
      {
5079
        field = iprot.readFieldBegin();
5080
        if (field.type == TType.STOP) { 
5081
          break;
5082
        }
5083
        _Fields fieldId = _Fields.findByThriftId(field.id);
5084
        if (fieldId == null) {
5085
          TProtocolUtil.skip(iprot, field.type);
5086
        } else {
5087
          switch (fieldId) {
5088
            case TRANSACTION_ID:
5089
              if (field.type == TType.I64) {
5090
                this.transactionId = iprot.readI64();
5091
                setTransactionIdIsSet(true);
5092
              } else { 
5093
                TProtocolUtil.skip(iprot, field.type);
5094
              }
5095
              break;
5096
          }
5097
          iprot.readFieldEnd();
5098
        }
5099
      }
5100
      iprot.readStructEnd();
5101
      validate();
5102
    }
5103
 
5104
    public void write(TProtocol oprot) throws TException {
5105
      validate();
5106
 
5107
      oprot.writeStructBegin(STRUCT_DESC);
5108
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5109
      oprot.writeI64(this.transactionId);
5110
      oprot.writeFieldEnd();
5111
      oprot.writeFieldStop();
5112
      oprot.writeStructEnd();
5113
    }
5114
 
5115
    @Override
5116
    public String toString() {
5117
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5118
      boolean first = true;
5119
 
5120
      sb.append("transactionId:");
5121
      sb.append(this.transactionId);
5122
      first = false;
5123
      sb.append(")");
5124
      return sb.toString();
5125
    }
5126
 
5127
    public void validate() throws TException {
5128
      // check for required fields
5129
    }
5130
 
5131
  }
5132
 
5133
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5134
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5135
 
5136
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5137
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5138
 
5139
    private TransactionStatus success;
5140
    private TransactionServiceException ex;
5141
 
5142
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5143
    public enum _Fields implements TFieldIdEnum {
5144
      /**
5145
       * 
5146
       * @see TransactionStatus
5147
       */
5148
      SUCCESS((short)0, "success"),
5149
      EX((short)1, "ex");
5150
 
5151
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5152
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5153
 
5154
      static {
5155
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5156
          byId.put((int)field._thriftId, field);
5157
          byName.put(field.getFieldName(), field);
5158
        }
5159
      }
5160
 
5161
      /**
5162
       * Find the _Fields constant that matches fieldId, or null if its not found.
5163
       */
5164
      public static _Fields findByThriftId(int fieldId) {
5165
        return byId.get(fieldId);
5166
      }
5167
 
5168
      /**
5169
       * Find the _Fields constant that matches fieldId, throwing an exception
5170
       * if it is not found.
5171
       */
5172
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5173
        _Fields fields = findByThriftId(fieldId);
5174
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5175
        return fields;
5176
      }
5177
 
5178
      /**
5179
       * Find the _Fields constant that matches name, or null if its not found.
5180
       */
5181
      public static _Fields findByName(String name) {
5182
        return byName.get(name);
5183
      }
5184
 
5185
      private final short _thriftId;
5186
      private final String _fieldName;
5187
 
5188
      _Fields(short thriftId, String fieldName) {
5189
        _thriftId = thriftId;
5190
        _fieldName = fieldName;
5191
      }
5192
 
5193
      public short getThriftFieldId() {
5194
        return _thriftId;
5195
      }
5196
 
5197
      public String getFieldName() {
5198
        return _fieldName;
5199
      }
5200
    }
5201
 
5202
    // isset id assignments
5203
 
5204
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5205
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5206
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5207
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5208
          new FieldValueMetaData(TType.STRUCT)));
5209
    }});
5210
 
5211
    static {
5212
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5213
    }
5214
 
5215
    public getTransactionStatus_result() {
5216
    }
5217
 
5218
    public getTransactionStatus_result(
5219
      TransactionStatus success,
5220
      TransactionServiceException ex)
5221
    {
5222
      this();
5223
      this.success = success;
5224
      this.ex = ex;
5225
    }
5226
 
5227
    /**
5228
     * Performs a deep copy on <i>other</i>.
5229
     */
5230
    public getTransactionStatus_result(getTransactionStatus_result other) {
5231
      if (other.isSetSuccess()) {
5232
        this.success = other.success;
5233
      }
5234
      if (other.isSetEx()) {
5235
        this.ex = new TransactionServiceException(other.ex);
5236
      }
5237
    }
5238
 
5239
    public getTransactionStatus_result deepCopy() {
5240
      return new getTransactionStatus_result(this);
5241
    }
5242
 
5243
    @Deprecated
5244
    public getTransactionStatus_result clone() {
5245
      return new getTransactionStatus_result(this);
5246
    }
5247
 
5248
    /**
5249
     * 
5250
     * @see TransactionStatus
5251
     */
5252
    public TransactionStatus getSuccess() {
5253
      return this.success;
5254
    }
5255
 
5256
    /**
5257
     * 
5258
     * @see TransactionStatus
5259
     */
5260
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5261
      this.success = success;
5262
      return this;
5263
    }
5264
 
5265
    public void unsetSuccess() {
5266
      this.success = null;
5267
    }
5268
 
5269
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5270
    public boolean isSetSuccess() {
5271
      return this.success != null;
5272
    }
5273
 
5274
    public void setSuccessIsSet(boolean value) {
5275
      if (!value) {
5276
        this.success = null;
5277
      }
5278
    }
5279
 
5280
    public TransactionServiceException getEx() {
5281
      return this.ex;
5282
    }
5283
 
5284
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5285
      this.ex = ex;
5286
      return this;
5287
    }
5288
 
5289
    public void unsetEx() {
5290
      this.ex = null;
5291
    }
5292
 
5293
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5294
    public boolean isSetEx() {
5295
      return this.ex != null;
5296
    }
5297
 
5298
    public void setExIsSet(boolean value) {
5299
      if (!value) {
5300
        this.ex = null;
5301
      }
5302
    }
5303
 
5304
    public void setFieldValue(_Fields field, Object value) {
5305
      switch (field) {
5306
      case SUCCESS:
5307
        if (value == null) {
5308
          unsetSuccess();
5309
        } else {
5310
          setSuccess((TransactionStatus)value);
5311
        }
5312
        break;
5313
 
5314
      case EX:
5315
        if (value == null) {
5316
          unsetEx();
5317
        } else {
5318
          setEx((TransactionServiceException)value);
5319
        }
5320
        break;
5321
 
5322
      }
5323
    }
5324
 
5325
    public void setFieldValue(int fieldID, Object value) {
5326
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5327
    }
5328
 
5329
    public Object getFieldValue(_Fields field) {
5330
      switch (field) {
5331
      case SUCCESS:
5332
        return getSuccess();
5333
 
5334
      case EX:
5335
        return getEx();
5336
 
5337
      }
5338
      throw new IllegalStateException();
5339
    }
5340
 
5341
    public Object getFieldValue(int fieldId) {
5342
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5343
    }
5344
 
5345
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5346
    public boolean isSet(_Fields field) {
5347
      switch (field) {
5348
      case SUCCESS:
5349
        return isSetSuccess();
5350
      case EX:
5351
        return isSetEx();
5352
      }
5353
      throw new IllegalStateException();
5354
    }
5355
 
5356
    public boolean isSet(int fieldID) {
5357
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5358
    }
5359
 
5360
    @Override
5361
    public boolean equals(Object that) {
5362
      if (that == null)
5363
        return false;
5364
      if (that instanceof getTransactionStatus_result)
5365
        return this.equals((getTransactionStatus_result)that);
5366
      return false;
5367
    }
5368
 
5369
    public boolean equals(getTransactionStatus_result that) {
5370
      if (that == null)
5371
        return false;
5372
 
5373
      boolean this_present_success = true && this.isSetSuccess();
5374
      boolean that_present_success = true && that.isSetSuccess();
5375
      if (this_present_success || that_present_success) {
5376
        if (!(this_present_success && that_present_success))
5377
          return false;
5378
        if (!this.success.equals(that.success))
5379
          return false;
5380
      }
5381
 
5382
      boolean this_present_ex = true && this.isSetEx();
5383
      boolean that_present_ex = true && that.isSetEx();
5384
      if (this_present_ex || that_present_ex) {
5385
        if (!(this_present_ex && that_present_ex))
5386
          return false;
5387
        if (!this.ex.equals(that.ex))
5388
          return false;
5389
      }
5390
 
5391
      return true;
5392
    }
5393
 
5394
    @Override
5395
    public int hashCode() {
5396
      return 0;
5397
    }
5398
 
5399
    public int compareTo(getTransactionStatus_result other) {
5400
      if (!getClass().equals(other.getClass())) {
5401
        return getClass().getName().compareTo(other.getClass().getName());
5402
      }
5403
 
5404
      int lastComparison = 0;
5405
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5406
 
5407
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5408
      if (lastComparison != 0) {
5409
        return lastComparison;
5410
      }
5411
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5412
      if (lastComparison != 0) {
5413
        return lastComparison;
5414
      }
5415
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5416
      if (lastComparison != 0) {
5417
        return lastComparison;
5418
      }
5419
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5420
      if (lastComparison != 0) {
5421
        return lastComparison;
5422
      }
5423
      return 0;
5424
    }
5425
 
5426
    public void read(TProtocol iprot) throws TException {
5427
      TField field;
5428
      iprot.readStructBegin();
5429
      while (true)
5430
      {
5431
        field = iprot.readFieldBegin();
5432
        if (field.type == TType.STOP) { 
5433
          break;
5434
        }
5435
        _Fields fieldId = _Fields.findByThriftId(field.id);
5436
        if (fieldId == null) {
5437
          TProtocolUtil.skip(iprot, field.type);
5438
        } else {
5439
          switch (fieldId) {
5440
            case SUCCESS:
5441
              if (field.type == TType.I32) {
5442
                this.success = TransactionStatus.findByValue(iprot.readI32());
5443
              } else { 
5444
                TProtocolUtil.skip(iprot, field.type);
5445
              }
5446
              break;
5447
            case EX:
5448
              if (field.type == TType.STRUCT) {
5449
                this.ex = new TransactionServiceException();
5450
                this.ex.read(iprot);
5451
              } else { 
5452
                TProtocolUtil.skip(iprot, field.type);
5453
              }
5454
              break;
5455
          }
5456
          iprot.readFieldEnd();
5457
        }
5458
      }
5459
      iprot.readStructEnd();
5460
      validate();
5461
    }
5462
 
5463
    public void write(TProtocol oprot) throws TException {
5464
      oprot.writeStructBegin(STRUCT_DESC);
5465
 
5466
      if (this.isSetSuccess()) {
5467
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5468
        oprot.writeI32(this.success.getValue());
5469
        oprot.writeFieldEnd();
5470
      } else if (this.isSetEx()) {
5471
        oprot.writeFieldBegin(EX_FIELD_DESC);
5472
        this.ex.write(oprot);
5473
        oprot.writeFieldEnd();
5474
      }
5475
      oprot.writeFieldStop();
5476
      oprot.writeStructEnd();
5477
    }
5478
 
5479
    @Override
5480
    public String toString() {
5481
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5482
      boolean first = true;
5483
 
5484
      sb.append("success:");
5485
      if (this.success == null) {
5486
        sb.append("null");
5487
      } else {
5488
        String success_name = success.name();
5489
        if (success_name != null) {
5490
          sb.append(success_name);
5491
          sb.append(" (");
5492
        }
5493
        sb.append(this.success);
5494
        if (success_name != null) {
5495
          sb.append(")");
5496
        }
5497
      }
5498
      first = false;
5499
      if (!first) sb.append(", ");
5500
      sb.append("ex:");
5501
      if (this.ex == null) {
5502
        sb.append("null");
5503
      } else {
5504
        sb.append(this.ex);
5505
      }
5506
      first = false;
5507
      sb.append(")");
5508
      return sb.toString();
5509
    }
5510
 
5511
    public void validate() throws TException {
5512
      // check for required fields
5513
    }
5514
 
5515
  }
5516
 
5517
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5518
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5519
 
5520
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5521
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5522
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5523
 
5524
    private long transactionId;
5525
    private TransactionStatus status;
5526
    private String description;
5527
 
5528
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5529
    public enum _Fields implements TFieldIdEnum {
5530
      TRANSACTION_ID((short)1, "transactionId"),
5531
      /**
5532
       * 
5533
       * @see TransactionStatus
5534
       */
5535
      STATUS((short)2, "status"),
5536
      DESCRIPTION((short)3, "description");
5537
 
5538
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5539
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5540
 
5541
      static {
5542
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5543
          byId.put((int)field._thriftId, field);
5544
          byName.put(field.getFieldName(), field);
5545
        }
5546
      }
5547
 
5548
      /**
5549
       * Find the _Fields constant that matches fieldId, or null if its not found.
5550
       */
5551
      public static _Fields findByThriftId(int fieldId) {
5552
        return byId.get(fieldId);
5553
      }
5554
 
5555
      /**
5556
       * Find the _Fields constant that matches fieldId, throwing an exception
5557
       * if it is not found.
5558
       */
5559
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5560
        _Fields fields = findByThriftId(fieldId);
5561
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5562
        return fields;
5563
      }
5564
 
5565
      /**
5566
       * Find the _Fields constant that matches name, or null if its not found.
5567
       */
5568
      public static _Fields findByName(String name) {
5569
        return byName.get(name);
5570
      }
5571
 
5572
      private final short _thriftId;
5573
      private final String _fieldName;
5574
 
5575
      _Fields(short thriftId, String fieldName) {
5576
        _thriftId = thriftId;
5577
        _fieldName = fieldName;
5578
      }
5579
 
5580
      public short getThriftFieldId() {
5581
        return _thriftId;
5582
      }
5583
 
5584
      public String getFieldName() {
5585
        return _fieldName;
5586
      }
5587
    }
5588
 
5589
    // isset id assignments
5590
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5591
    private BitSet __isset_bit_vector = new BitSet(1);
5592
 
5593
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5594
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5595
          new FieldValueMetaData(TType.I64)));
5596
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5597
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5598
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5599
          new FieldValueMetaData(TType.STRING)));
5600
    }});
5601
 
5602
    static {
5603
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5604
    }
5605
 
5606
    public changeTransactionStatus_args() {
5607
    }
5608
 
5609
    public changeTransactionStatus_args(
5610
      long transactionId,
5611
      TransactionStatus status,
5612
      String description)
5613
    {
5614
      this();
5615
      this.transactionId = transactionId;
5616
      setTransactionIdIsSet(true);
5617
      this.status = status;
5618
      this.description = description;
5619
    }
5620
 
5621
    /**
5622
     * Performs a deep copy on <i>other</i>.
5623
     */
5624
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
5625
      __isset_bit_vector.clear();
5626
      __isset_bit_vector.or(other.__isset_bit_vector);
5627
      this.transactionId = other.transactionId;
5628
      if (other.isSetStatus()) {
5629
        this.status = other.status;
5630
      }
5631
      if (other.isSetDescription()) {
5632
        this.description = other.description;
5633
      }
5634
    }
5635
 
5636
    public changeTransactionStatus_args deepCopy() {
5637
      return new changeTransactionStatus_args(this);
5638
    }
5639
 
5640
    @Deprecated
5641
    public changeTransactionStatus_args clone() {
5642
      return new changeTransactionStatus_args(this);
5643
    }
5644
 
5645
    public long getTransactionId() {
5646
      return this.transactionId;
5647
    }
5648
 
5649
    public changeTransactionStatus_args setTransactionId(long transactionId) {
5650
      this.transactionId = transactionId;
5651
      setTransactionIdIsSet(true);
5652
      return this;
5653
    }
5654
 
5655
    public void unsetTransactionId() {
5656
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5657
    }
5658
 
5659
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5660
    public boolean isSetTransactionId() {
5661
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5662
    }
5663
 
5664
    public void setTransactionIdIsSet(boolean value) {
5665
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5666
    }
5667
 
5668
    /**
5669
     * 
5670
     * @see TransactionStatus
5671
     */
5672
    public TransactionStatus getStatus() {
5673
      return this.status;
5674
    }
5675
 
5676
    /**
5677
     * 
5678
     * @see TransactionStatus
5679
     */
5680
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
5681
      this.status = status;
5682
      return this;
5683
    }
5684
 
5685
    public void unsetStatus() {
5686
      this.status = null;
5687
    }
5688
 
5689
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5690
    public boolean isSetStatus() {
5691
      return this.status != null;
5692
    }
5693
 
5694
    public void setStatusIsSet(boolean value) {
5695
      if (!value) {
5696
        this.status = null;
5697
      }
5698
    }
5699
 
5700
    public String getDescription() {
5701
      return this.description;
5702
    }
5703
 
5704
    public changeTransactionStatus_args setDescription(String description) {
5705
      this.description = description;
5706
      return this;
5707
    }
5708
 
5709
    public void unsetDescription() {
5710
      this.description = null;
5711
    }
5712
 
5713
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
5714
    public boolean isSetDescription() {
5715
      return this.description != null;
5716
    }
5717
 
5718
    public void setDescriptionIsSet(boolean value) {
5719
      if (!value) {
5720
        this.description = null;
5721
      }
5722
    }
5723
 
5724
    public void setFieldValue(_Fields field, Object value) {
5725
      switch (field) {
5726
      case TRANSACTION_ID:
5727
        if (value == null) {
5728
          unsetTransactionId();
5729
        } else {
5730
          setTransactionId((Long)value);
5731
        }
5732
        break;
5733
 
5734
      case STATUS:
5735
        if (value == null) {
5736
          unsetStatus();
5737
        } else {
5738
          setStatus((TransactionStatus)value);
5739
        }
5740
        break;
5741
 
5742
      case DESCRIPTION:
5743
        if (value == null) {
5744
          unsetDescription();
5745
        } else {
5746
          setDescription((String)value);
5747
        }
5748
        break;
5749
 
5750
      }
5751
    }
5752
 
5753
    public void setFieldValue(int fieldID, Object value) {
5754
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5755
    }
5756
 
5757
    public Object getFieldValue(_Fields field) {
5758
      switch (field) {
5759
      case TRANSACTION_ID:
5760
        return new Long(getTransactionId());
5761
 
5762
      case STATUS:
5763
        return getStatus();
5764
 
5765
      case DESCRIPTION:
5766
        return getDescription();
5767
 
5768
      }
5769
      throw new IllegalStateException();
5770
    }
5771
 
5772
    public Object getFieldValue(int fieldId) {
5773
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5774
    }
5775
 
5776
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5777
    public boolean isSet(_Fields field) {
5778
      switch (field) {
5779
      case TRANSACTION_ID:
5780
        return isSetTransactionId();
5781
      case STATUS:
5782
        return isSetStatus();
5783
      case DESCRIPTION:
5784
        return isSetDescription();
5785
      }
5786
      throw new IllegalStateException();
5787
    }
5788
 
5789
    public boolean isSet(int fieldID) {
5790
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5791
    }
5792
 
5793
    @Override
5794
    public boolean equals(Object that) {
5795
      if (that == null)
5796
        return false;
5797
      if (that instanceof changeTransactionStatus_args)
5798
        return this.equals((changeTransactionStatus_args)that);
5799
      return false;
5800
    }
5801
 
5802
    public boolean equals(changeTransactionStatus_args that) {
5803
      if (that == null)
5804
        return false;
5805
 
5806
      boolean this_present_transactionId = true;
5807
      boolean that_present_transactionId = true;
5808
      if (this_present_transactionId || that_present_transactionId) {
5809
        if (!(this_present_transactionId && that_present_transactionId))
5810
          return false;
5811
        if (this.transactionId != that.transactionId)
5812
          return false;
5813
      }
5814
 
5815
      boolean this_present_status = true && this.isSetStatus();
5816
      boolean that_present_status = true && that.isSetStatus();
5817
      if (this_present_status || that_present_status) {
5818
        if (!(this_present_status && that_present_status))
5819
          return false;
5820
        if (!this.status.equals(that.status))
5821
          return false;
5822
      }
5823
 
5824
      boolean this_present_description = true && this.isSetDescription();
5825
      boolean that_present_description = true && that.isSetDescription();
5826
      if (this_present_description || that_present_description) {
5827
        if (!(this_present_description && that_present_description))
5828
          return false;
5829
        if (!this.description.equals(that.description))
5830
          return false;
5831
      }
5832
 
5833
      return true;
5834
    }
5835
 
5836
    @Override
5837
    public int hashCode() {
5838
      return 0;
5839
    }
5840
 
5841
    public int compareTo(changeTransactionStatus_args other) {
5842
      if (!getClass().equals(other.getClass())) {
5843
        return getClass().getName().compareTo(other.getClass().getName());
5844
      }
5845
 
5846
      int lastComparison = 0;
5847
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
5848
 
5849
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5850
      if (lastComparison != 0) {
5851
        return lastComparison;
5852
      }
5853
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5854
      if (lastComparison != 0) {
5855
        return lastComparison;
5856
      }
5857
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5858
      if (lastComparison != 0) {
5859
        return lastComparison;
5860
      }
5861
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5862
      if (lastComparison != 0) {
5863
        return lastComparison;
5864
      }
5865
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
5866
      if (lastComparison != 0) {
5867
        return lastComparison;
5868
      }
5869
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
5870
      if (lastComparison != 0) {
5871
        return lastComparison;
5872
      }
5873
      return 0;
5874
    }
5875
 
5876
    public void read(TProtocol iprot) throws TException {
5877
      TField field;
5878
      iprot.readStructBegin();
5879
      while (true)
5880
      {
5881
        field = iprot.readFieldBegin();
5882
        if (field.type == TType.STOP) { 
5883
          break;
5884
        }
5885
        _Fields fieldId = _Fields.findByThriftId(field.id);
5886
        if (fieldId == null) {
5887
          TProtocolUtil.skip(iprot, field.type);
5888
        } else {
5889
          switch (fieldId) {
5890
            case TRANSACTION_ID:
5891
              if (field.type == TType.I64) {
5892
                this.transactionId = iprot.readI64();
5893
                setTransactionIdIsSet(true);
5894
              } else { 
5895
                TProtocolUtil.skip(iprot, field.type);
5896
              }
5897
              break;
5898
            case STATUS:
5899
              if (field.type == TType.I32) {
5900
                this.status = TransactionStatus.findByValue(iprot.readI32());
5901
              } else { 
5902
                TProtocolUtil.skip(iprot, field.type);
5903
              }
5904
              break;
5905
            case DESCRIPTION:
5906
              if (field.type == TType.STRING) {
5907
                this.description = iprot.readString();
5908
              } else { 
5909
                TProtocolUtil.skip(iprot, field.type);
5910
              }
5911
              break;
5912
          }
5913
          iprot.readFieldEnd();
5914
        }
5915
      }
5916
      iprot.readStructEnd();
5917
      validate();
5918
    }
5919
 
5920
    public void write(TProtocol oprot) throws TException {
5921
      validate();
5922
 
5923
      oprot.writeStructBegin(STRUCT_DESC);
5924
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5925
      oprot.writeI64(this.transactionId);
5926
      oprot.writeFieldEnd();
5927
      if (this.status != null) {
5928
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5929
        oprot.writeI32(this.status.getValue());
5930
        oprot.writeFieldEnd();
5931
      }
5932
      if (this.description != null) {
5933
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
5934
        oprot.writeString(this.description);
5935
        oprot.writeFieldEnd();
5936
      }
5937
      oprot.writeFieldStop();
5938
      oprot.writeStructEnd();
5939
    }
5940
 
5941
    @Override
5942
    public String toString() {
5943
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
5944
      boolean first = true;
5945
 
5946
      sb.append("transactionId:");
5947
      sb.append(this.transactionId);
5948
      first = false;
5949
      if (!first) sb.append(", ");
5950
      sb.append("status:");
5951
      if (this.status == null) {
5952
        sb.append("null");
5953
      } else {
5954
        String status_name = status.name();
5955
        if (status_name != null) {
5956
          sb.append(status_name);
5957
          sb.append(" (");
5958
        }
5959
        sb.append(this.status);
5960
        if (status_name != null) {
5961
          sb.append(")");
5962
        }
5963
      }
5964
      first = false;
5965
      if (!first) sb.append(", ");
5966
      sb.append("description:");
5967
      if (this.description == null) {
5968
        sb.append("null");
5969
      } else {
5970
        sb.append(this.description);
5971
      }
5972
      first = false;
5973
      sb.append(")");
5974
      return sb.toString();
5975
    }
5976
 
5977
    public void validate() throws TException {
5978
      // check for required fields
5979
    }
5980
 
5981
  }
5982
 
5983
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
5984
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
5985
 
5986
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
5987
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5988
 
5989
    private boolean success;
5990
    private TransactionServiceException ex;
5991
 
5992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5993
    public enum _Fields implements TFieldIdEnum {
5994
      SUCCESS((short)0, "success"),
5995
      EX((short)1, "ex");
5996
 
5997
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5998
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5999
 
6000
      static {
6001
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6002
          byId.put((int)field._thriftId, field);
6003
          byName.put(field.getFieldName(), field);
6004
        }
6005
      }
6006
 
6007
      /**
6008
       * Find the _Fields constant that matches fieldId, or null if its not found.
6009
       */
6010
      public static _Fields findByThriftId(int fieldId) {
6011
        return byId.get(fieldId);
6012
      }
6013
 
6014
      /**
6015
       * Find the _Fields constant that matches fieldId, throwing an exception
6016
       * if it is not found.
6017
       */
6018
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6019
        _Fields fields = findByThriftId(fieldId);
6020
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6021
        return fields;
6022
      }
6023
 
6024
      /**
6025
       * Find the _Fields constant that matches name, or null if its not found.
6026
       */
6027
      public static _Fields findByName(String name) {
6028
        return byName.get(name);
6029
      }
6030
 
6031
      private final short _thriftId;
6032
      private final String _fieldName;
6033
 
6034
      _Fields(short thriftId, String fieldName) {
6035
        _thriftId = thriftId;
6036
        _fieldName = fieldName;
6037
      }
6038
 
6039
      public short getThriftFieldId() {
6040
        return _thriftId;
6041
      }
6042
 
6043
      public String getFieldName() {
6044
        return _fieldName;
6045
      }
6046
    }
6047
 
6048
    // isset id assignments
6049
    private static final int __SUCCESS_ISSET_ID = 0;
6050
    private BitSet __isset_bit_vector = new BitSet(1);
6051
 
6052
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6053
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6054
          new FieldValueMetaData(TType.BOOL)));
6055
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6056
          new FieldValueMetaData(TType.STRUCT)));
6057
    }});
6058
 
6059
    static {
6060
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6061
    }
6062
 
6063
    public changeTransactionStatus_result() {
6064
    }
6065
 
6066
    public changeTransactionStatus_result(
6067
      boolean success,
6068
      TransactionServiceException ex)
6069
    {
6070
      this();
6071
      this.success = success;
6072
      setSuccessIsSet(true);
6073
      this.ex = ex;
6074
    }
6075
 
6076
    /**
6077
     * Performs a deep copy on <i>other</i>.
6078
     */
6079
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6080
      __isset_bit_vector.clear();
6081
      __isset_bit_vector.or(other.__isset_bit_vector);
6082
      this.success = other.success;
6083
      if (other.isSetEx()) {
6084
        this.ex = new TransactionServiceException(other.ex);
6085
      }
6086
    }
6087
 
6088
    public changeTransactionStatus_result deepCopy() {
6089
      return new changeTransactionStatus_result(this);
6090
    }
6091
 
6092
    @Deprecated
6093
    public changeTransactionStatus_result clone() {
6094
      return new changeTransactionStatus_result(this);
6095
    }
6096
 
6097
    public boolean isSuccess() {
6098
      return this.success;
6099
    }
6100
 
6101
    public changeTransactionStatus_result setSuccess(boolean success) {
6102
      this.success = success;
6103
      setSuccessIsSet(true);
6104
      return this;
6105
    }
6106
 
6107
    public void unsetSuccess() {
6108
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6109
    }
6110
 
6111
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6112
    public boolean isSetSuccess() {
6113
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6114
    }
6115
 
6116
    public void setSuccessIsSet(boolean value) {
6117
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6118
    }
6119
 
6120
    public TransactionServiceException getEx() {
6121
      return this.ex;
6122
    }
6123
 
6124
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6125
      this.ex = ex;
6126
      return this;
6127
    }
6128
 
6129
    public void unsetEx() {
6130
      this.ex = null;
6131
    }
6132
 
6133
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6134
    public boolean isSetEx() {
6135
      return this.ex != null;
6136
    }
6137
 
6138
    public void setExIsSet(boolean value) {
6139
      if (!value) {
6140
        this.ex = null;
6141
      }
6142
    }
6143
 
6144
    public void setFieldValue(_Fields field, Object value) {
6145
      switch (field) {
6146
      case SUCCESS:
6147
        if (value == null) {
6148
          unsetSuccess();
6149
        } else {
6150
          setSuccess((Boolean)value);
6151
        }
6152
        break;
6153
 
6154
      case EX:
6155
        if (value == null) {
6156
          unsetEx();
6157
        } else {
6158
          setEx((TransactionServiceException)value);
6159
        }
6160
        break;
6161
 
6162
      }
6163
    }
6164
 
6165
    public void setFieldValue(int fieldID, Object value) {
6166
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6167
    }
6168
 
6169
    public Object getFieldValue(_Fields field) {
6170
      switch (field) {
6171
      case SUCCESS:
6172
        return new Boolean(isSuccess());
6173
 
6174
      case EX:
6175
        return getEx();
6176
 
6177
      }
6178
      throw new IllegalStateException();
6179
    }
6180
 
6181
    public Object getFieldValue(int fieldId) {
6182
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6183
    }
6184
 
6185
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6186
    public boolean isSet(_Fields field) {
6187
      switch (field) {
6188
      case SUCCESS:
6189
        return isSetSuccess();
6190
      case EX:
6191
        return isSetEx();
6192
      }
6193
      throw new IllegalStateException();
6194
    }
6195
 
6196
    public boolean isSet(int fieldID) {
6197
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6198
    }
6199
 
6200
    @Override
6201
    public boolean equals(Object that) {
6202
      if (that == null)
6203
        return false;
6204
      if (that instanceof changeTransactionStatus_result)
6205
        return this.equals((changeTransactionStatus_result)that);
6206
      return false;
6207
    }
6208
 
6209
    public boolean equals(changeTransactionStatus_result that) {
6210
      if (that == null)
6211
        return false;
6212
 
6213
      boolean this_present_success = true;
6214
      boolean that_present_success = true;
6215
      if (this_present_success || that_present_success) {
6216
        if (!(this_present_success && that_present_success))
6217
          return false;
6218
        if (this.success != that.success)
6219
          return false;
6220
      }
6221
 
6222
      boolean this_present_ex = true && this.isSetEx();
6223
      boolean that_present_ex = true && that.isSetEx();
6224
      if (this_present_ex || that_present_ex) {
6225
        if (!(this_present_ex && that_present_ex))
6226
          return false;
6227
        if (!this.ex.equals(that.ex))
6228
          return false;
6229
      }
6230
 
6231
      return true;
6232
    }
6233
 
6234
    @Override
6235
    public int hashCode() {
6236
      return 0;
6237
    }
6238
 
6239
    public int compareTo(changeTransactionStatus_result other) {
6240
      if (!getClass().equals(other.getClass())) {
6241
        return getClass().getName().compareTo(other.getClass().getName());
6242
      }
6243
 
6244
      int lastComparison = 0;
6245
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6246
 
6247
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6248
      if (lastComparison != 0) {
6249
        return lastComparison;
6250
      }
6251
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6252
      if (lastComparison != 0) {
6253
        return lastComparison;
6254
      }
6255
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6256
      if (lastComparison != 0) {
6257
        return lastComparison;
6258
      }
6259
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6260
      if (lastComparison != 0) {
6261
        return lastComparison;
6262
      }
6263
      return 0;
6264
    }
6265
 
6266
    public void read(TProtocol iprot) throws TException {
6267
      TField field;
6268
      iprot.readStructBegin();
6269
      while (true)
6270
      {
6271
        field = iprot.readFieldBegin();
6272
        if (field.type == TType.STOP) { 
6273
          break;
6274
        }
6275
        _Fields fieldId = _Fields.findByThriftId(field.id);
6276
        if (fieldId == null) {
6277
          TProtocolUtil.skip(iprot, field.type);
6278
        } else {
6279
          switch (fieldId) {
6280
            case SUCCESS:
6281
              if (field.type == TType.BOOL) {
6282
                this.success = iprot.readBool();
6283
                setSuccessIsSet(true);
6284
              } else { 
6285
                TProtocolUtil.skip(iprot, field.type);
6286
              }
6287
              break;
6288
            case EX:
6289
              if (field.type == TType.STRUCT) {
6290
                this.ex = new TransactionServiceException();
6291
                this.ex.read(iprot);
6292
              } else { 
6293
                TProtocolUtil.skip(iprot, field.type);
6294
              }
6295
              break;
6296
          }
6297
          iprot.readFieldEnd();
6298
        }
6299
      }
6300
      iprot.readStructEnd();
6301
      validate();
6302
    }
6303
 
6304
    public void write(TProtocol oprot) throws TException {
6305
      oprot.writeStructBegin(STRUCT_DESC);
6306
 
6307
      if (this.isSetSuccess()) {
6308
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6309
        oprot.writeBool(this.success);
6310
        oprot.writeFieldEnd();
6311
      } else if (this.isSetEx()) {
6312
        oprot.writeFieldBegin(EX_FIELD_DESC);
6313
        this.ex.write(oprot);
6314
        oprot.writeFieldEnd();
6315
      }
6316
      oprot.writeFieldStop();
6317
      oprot.writeStructEnd();
6318
    }
6319
 
6320
    @Override
6321
    public String toString() {
6322
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6323
      boolean first = true;
6324
 
6325
      sb.append("success:");
6326
      sb.append(this.success);
6327
      first = false;
6328
      if (!first) sb.append(", ");
6329
      sb.append("ex:");
6330
      if (this.ex == null) {
6331
        sb.append("null");
6332
      } else {
6333
        sb.append(this.ex);
6334
      }
6335
      first = false;
6336
      sb.append(")");
6337
      return sb.toString();
6338
    }
6339
 
6340
    public void validate() throws TException {
6341
      // check for required fields
6342
    }
6343
 
6344
  }
6345
 
483 rajveer 6346
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6347
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6348
 
483 rajveer 6349
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6350
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6351
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6352
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6353
 
483 rajveer 6354
    private OrderStatus status;
6355
    private long from_date;
6356
    private long to_date;
6357
    private long warehouse_id;
68 ashish 6358
 
6359
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6360
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6361
      /**
6362
       * 
6363
       * @see OrderStatus
6364
       */
6365
      STATUS((short)1, "status"),
6366
      FROM_DATE((short)2, "from_date"),
6367
      TO_DATE((short)3, "to_date"),
6368
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6369
 
6370
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6371
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6372
 
6373
      static {
6374
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6375
          byId.put((int)field._thriftId, field);
6376
          byName.put(field.getFieldName(), field);
6377
        }
6378
      }
6379
 
6380
      /**
6381
       * Find the _Fields constant that matches fieldId, or null if its not found.
6382
       */
6383
      public static _Fields findByThriftId(int fieldId) {
6384
        return byId.get(fieldId);
6385
      }
6386
 
6387
      /**
6388
       * Find the _Fields constant that matches fieldId, throwing an exception
6389
       * if it is not found.
6390
       */
6391
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6392
        _Fields fields = findByThriftId(fieldId);
6393
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6394
        return fields;
6395
      }
6396
 
6397
      /**
6398
       * Find the _Fields constant that matches name, or null if its not found.
6399
       */
6400
      public static _Fields findByName(String name) {
6401
        return byName.get(name);
6402
      }
6403
 
6404
      private final short _thriftId;
6405
      private final String _fieldName;
6406
 
6407
      _Fields(short thriftId, String fieldName) {
6408
        _thriftId = thriftId;
6409
        _fieldName = fieldName;
6410
      }
6411
 
6412
      public short getThriftFieldId() {
6413
        return _thriftId;
6414
      }
6415
 
6416
      public String getFieldName() {
6417
        return _fieldName;
6418
      }
6419
    }
6420
 
6421
    // isset id assignments
483 rajveer 6422
    private static final int __FROM_DATE_ISSET_ID = 0;
6423
    private static final int __TO_DATE_ISSET_ID = 1;
6424
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6425
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6426
 
6427
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6428
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6429
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6430
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6431
          new FieldValueMetaData(TType.I64)));
483 rajveer 6432
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6433
          new FieldValueMetaData(TType.I64)));
6434
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6435
          new FieldValueMetaData(TType.I64)));
68 ashish 6436
    }});
6437
 
6438
    static {
483 rajveer 6439
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6440
    }
6441
 
483 rajveer 6442
    public getAllOrders_args() {
68 ashish 6443
    }
6444
 
483 rajveer 6445
    public getAllOrders_args(
6446
      OrderStatus status,
6447
      long from_date,
6448
      long to_date,
6449
      long warehouse_id)
68 ashish 6450
    {
6451
      this();
483 rajveer 6452
      this.status = status;
6453
      this.from_date = from_date;
6454
      setFrom_dateIsSet(true);
6455
      this.to_date = to_date;
6456
      setTo_dateIsSet(true);
6457
      this.warehouse_id = warehouse_id;
6458
      setWarehouse_idIsSet(true);
68 ashish 6459
    }
6460
 
6461
    /**
6462
     * Performs a deep copy on <i>other</i>.
6463
     */
483 rajveer 6464
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6465
      __isset_bit_vector.clear();
6466
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6467
      if (other.isSetStatus()) {
6468
        this.status = other.status;
6469
      }
6470
      this.from_date = other.from_date;
6471
      this.to_date = other.to_date;
6472
      this.warehouse_id = other.warehouse_id;
68 ashish 6473
    }
6474
 
483 rajveer 6475
    public getAllOrders_args deepCopy() {
6476
      return new getAllOrders_args(this);
68 ashish 6477
    }
6478
 
6479
    @Deprecated
483 rajveer 6480
    public getAllOrders_args clone() {
6481
      return new getAllOrders_args(this);
68 ashish 6482
    }
6483
 
483 rajveer 6484
    /**
6485
     * 
6486
     * @see OrderStatus
6487
     */
6488
    public OrderStatus getStatus() {
6489
      return this.status;
68 ashish 6490
    }
6491
 
483 rajveer 6492
    /**
6493
     * 
6494
     * @see OrderStatus
6495
     */
6496
    public getAllOrders_args setStatus(OrderStatus status) {
6497
      this.status = status;
68 ashish 6498
      return this;
6499
    }
6500
 
483 rajveer 6501
    public void unsetStatus() {
6502
      this.status = null;
68 ashish 6503
    }
6504
 
483 rajveer 6505
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6506
    public boolean isSetStatus() {
6507
      return this.status != null;
68 ashish 6508
    }
6509
 
483 rajveer 6510
    public void setStatusIsSet(boolean value) {
6511
      if (!value) {
6512
        this.status = null;
68 ashish 6513
      }
6514
    }
6515
 
483 rajveer 6516
    public long getFrom_date() {
6517
      return this.from_date;
68 ashish 6518
    }
6519
 
483 rajveer 6520
    public getAllOrders_args setFrom_date(long from_date) {
6521
      this.from_date = from_date;
6522
      setFrom_dateIsSet(true);
6523
      return this;
68 ashish 6524
    }
6525
 
483 rajveer 6526
    public void unsetFrom_date() {
6527
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6528
    }
6529
 
483 rajveer 6530
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6531
    public boolean isSetFrom_date() {
6532
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6533
    }
6534
 
483 rajveer 6535
    public void setFrom_dateIsSet(boolean value) {
6536
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6537
    }
6538
 
483 rajveer 6539
    public long getTo_date() {
6540
      return this.to_date;
68 ashish 6541
    }
6542
 
483 rajveer 6543
    public getAllOrders_args setTo_date(long to_date) {
6544
      this.to_date = to_date;
6545
      setTo_dateIsSet(true);
68 ashish 6546
      return this;
6547
    }
6548
 
483 rajveer 6549
    public void unsetTo_date() {
6550
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6551
    }
6552
 
483 rajveer 6553
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6554
    public boolean isSetTo_date() {
6555
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6556
    }
6557
 
483 rajveer 6558
    public void setTo_dateIsSet(boolean value) {
6559
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6560
    }
6561
 
483 rajveer 6562
    public long getWarehouse_id() {
6563
      return this.warehouse_id;
68 ashish 6564
    }
6565
 
483 rajveer 6566
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6567
      this.warehouse_id = warehouse_id;
6568
      setWarehouse_idIsSet(true);
68 ashish 6569
      return this;
6570
    }
6571
 
483 rajveer 6572
    public void unsetWarehouse_id() {
6573
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6574
    }
6575
 
483 rajveer 6576
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6577
    public boolean isSetWarehouse_id() {
6578
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6579
    }
6580
 
483 rajveer 6581
    public void setWarehouse_idIsSet(boolean value) {
6582
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6583
    }
6584
 
6585
    public void setFieldValue(_Fields field, Object value) {
6586
      switch (field) {
483 rajveer 6587
      case STATUS:
68 ashish 6588
        if (value == null) {
483 rajveer 6589
          unsetStatus();
68 ashish 6590
        } else {
483 rajveer 6591
          setStatus((OrderStatus)value);
68 ashish 6592
        }
6593
        break;
6594
 
483 rajveer 6595
      case FROM_DATE:
68 ashish 6596
        if (value == null) {
483 rajveer 6597
          unsetFrom_date();
68 ashish 6598
        } else {
483 rajveer 6599
          setFrom_date((Long)value);
68 ashish 6600
        }
6601
        break;
6602
 
483 rajveer 6603
      case TO_DATE:
6604
        if (value == null) {
6605
          unsetTo_date();
6606
        } else {
6607
          setTo_date((Long)value);
6608
        }
6609
        break;
6610
 
6611
      case WAREHOUSE_ID:
6612
        if (value == null) {
6613
          unsetWarehouse_id();
6614
        } else {
6615
          setWarehouse_id((Long)value);
6616
        }
6617
        break;
6618
 
68 ashish 6619
      }
6620
    }
6621
 
6622
    public void setFieldValue(int fieldID, Object value) {
6623
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6624
    }
6625
 
6626
    public Object getFieldValue(_Fields field) {
6627
      switch (field) {
483 rajveer 6628
      case STATUS:
6629
        return getStatus();
68 ashish 6630
 
483 rajveer 6631
      case FROM_DATE:
6632
        return new Long(getFrom_date());
68 ashish 6633
 
483 rajveer 6634
      case TO_DATE:
6635
        return new Long(getTo_date());
6636
 
6637
      case WAREHOUSE_ID:
6638
        return new Long(getWarehouse_id());
6639
 
68 ashish 6640
      }
6641
      throw new IllegalStateException();
6642
    }
6643
 
6644
    public Object getFieldValue(int fieldId) {
6645
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6646
    }
6647
 
6648
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6649
    public boolean isSet(_Fields field) {
6650
      switch (field) {
483 rajveer 6651
      case STATUS:
6652
        return isSetStatus();
6653
      case FROM_DATE:
6654
        return isSetFrom_date();
6655
      case TO_DATE:
6656
        return isSetTo_date();
6657
      case WAREHOUSE_ID:
6658
        return isSetWarehouse_id();
68 ashish 6659
      }
6660
      throw new IllegalStateException();
6661
    }
6662
 
6663
    public boolean isSet(int fieldID) {
6664
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6665
    }
6666
 
6667
    @Override
6668
    public boolean equals(Object that) {
6669
      if (that == null)
6670
        return false;
483 rajveer 6671
      if (that instanceof getAllOrders_args)
6672
        return this.equals((getAllOrders_args)that);
68 ashish 6673
      return false;
6674
    }
6675
 
483 rajveer 6676
    public boolean equals(getAllOrders_args that) {
68 ashish 6677
      if (that == null)
6678
        return false;
6679
 
483 rajveer 6680
      boolean this_present_status = true && this.isSetStatus();
6681
      boolean that_present_status = true && that.isSetStatus();
6682
      if (this_present_status || that_present_status) {
6683
        if (!(this_present_status && that_present_status))
68 ashish 6684
          return false;
483 rajveer 6685
        if (!this.status.equals(that.status))
68 ashish 6686
          return false;
6687
      }
6688
 
483 rajveer 6689
      boolean this_present_from_date = true;
6690
      boolean that_present_from_date = true;
6691
      if (this_present_from_date || that_present_from_date) {
6692
        if (!(this_present_from_date && that_present_from_date))
68 ashish 6693
          return false;
483 rajveer 6694
        if (this.from_date != that.from_date)
68 ashish 6695
          return false;
6696
      }
6697
 
483 rajveer 6698
      boolean this_present_to_date = true;
6699
      boolean that_present_to_date = true;
6700
      if (this_present_to_date || that_present_to_date) {
6701
        if (!(this_present_to_date && that_present_to_date))
6702
          return false;
6703
        if (this.to_date != that.to_date)
6704
          return false;
68 ashish 6705
      }
6706
 
483 rajveer 6707
      boolean this_present_warehouse_id = true;
6708
      boolean that_present_warehouse_id = true;
6709
      if (this_present_warehouse_id || that_present_warehouse_id) {
6710
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 6711
          return false;
483 rajveer 6712
        if (this.warehouse_id != that.warehouse_id)
68 ashish 6713
          return false;
6714
      }
6715
 
6716
      return true;
6717
    }
6718
 
6719
    @Override
6720
    public int hashCode() {
6721
      return 0;
6722
    }
6723
 
483 rajveer 6724
    public int compareTo(getAllOrders_args other) {
68 ashish 6725
      if (!getClass().equals(other.getClass())) {
6726
        return getClass().getName().compareTo(other.getClass().getName());
6727
      }
6728
 
6729
      int lastComparison = 0;
483 rajveer 6730
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 6731
 
483 rajveer 6732
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 6733
      if (lastComparison != 0) {
6734
        return lastComparison;
6735
      }
483 rajveer 6736
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 6737
      if (lastComparison != 0) {
6738
        return lastComparison;
6739
      }
483 rajveer 6740
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
6741
      if (lastComparison != 0) {
6742
        return lastComparison;
6743
      }
6744
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
6745
      if (lastComparison != 0) {
6746
        return lastComparison;
6747
      }
6748
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
6749
      if (lastComparison != 0) {
6750
        return lastComparison;
6751
      }
6752
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
6753
      if (lastComparison != 0) {
6754
        return lastComparison;
6755
      }
6756
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
6757
      if (lastComparison != 0) {
6758
        return lastComparison;
6759
      }
6760
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
6761
      if (lastComparison != 0) {
6762
        return lastComparison;
6763
      }
68 ashish 6764
      return 0;
6765
    }
6766
 
6767
    public void read(TProtocol iprot) throws TException {
6768
      TField field;
6769
      iprot.readStructBegin();
6770
      while (true)
6771
      {
6772
        field = iprot.readFieldBegin();
6773
        if (field.type == TType.STOP) { 
6774
          break;
6775
        }
6776
        _Fields fieldId = _Fields.findByThriftId(field.id);
6777
        if (fieldId == null) {
6778
          TProtocolUtil.skip(iprot, field.type);
6779
        } else {
6780
          switch (fieldId) {
483 rajveer 6781
            case STATUS:
6782
              if (field.type == TType.I32) {
6783
                this.status = OrderStatus.findByValue(iprot.readI32());
6784
              } else { 
6785
                TProtocolUtil.skip(iprot, field.type);
6786
              }
6787
              break;
6788
            case FROM_DATE:
68 ashish 6789
              if (field.type == TType.I64) {
483 rajveer 6790
                this.from_date = iprot.readI64();
6791
                setFrom_dateIsSet(true);
68 ashish 6792
              } else { 
6793
                TProtocolUtil.skip(iprot, field.type);
6794
              }
6795
              break;
483 rajveer 6796
            case TO_DATE:
6797
              if (field.type == TType.I64) {
6798
                this.to_date = iprot.readI64();
6799
                setTo_dateIsSet(true);
6800
              } else { 
6801
                TProtocolUtil.skip(iprot, field.type);
6802
              }
6803
              break;
6804
            case WAREHOUSE_ID:
6805
              if (field.type == TType.I64) {
6806
                this.warehouse_id = iprot.readI64();
6807
                setWarehouse_idIsSet(true);
6808
              } else { 
6809
                TProtocolUtil.skip(iprot, field.type);
6810
              }
6811
              break;
68 ashish 6812
          }
6813
          iprot.readFieldEnd();
6814
        }
6815
      }
6816
      iprot.readStructEnd();
6817
      validate();
6818
    }
6819
 
6820
    public void write(TProtocol oprot) throws TException {
6821
      validate();
6822
 
6823
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 6824
      if (this.status != null) {
6825
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6826
        oprot.writeI32(this.status.getValue());
6827
        oprot.writeFieldEnd();
6828
      }
6829
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
6830
      oprot.writeI64(this.from_date);
68 ashish 6831
      oprot.writeFieldEnd();
483 rajveer 6832
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
6833
      oprot.writeI64(this.to_date);
6834
      oprot.writeFieldEnd();
6835
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
6836
      oprot.writeI64(this.warehouse_id);
6837
      oprot.writeFieldEnd();
68 ashish 6838
      oprot.writeFieldStop();
6839
      oprot.writeStructEnd();
6840
    }
6841
 
6842
    @Override
6843
    public String toString() {
483 rajveer 6844
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 6845
      boolean first = true;
6846
 
483 rajveer 6847
      sb.append("status:");
6848
      if (this.status == null) {
6849
        sb.append("null");
6850
      } else {
6851
        String status_name = status.name();
6852
        if (status_name != null) {
6853
          sb.append(status_name);
6854
          sb.append(" (");
6855
        }
6856
        sb.append(this.status);
6857
        if (status_name != null) {
6858
          sb.append(")");
6859
        }
6860
      }
68 ashish 6861
      first = false;
483 rajveer 6862
      if (!first) sb.append(", ");
6863
      sb.append("from_date:");
6864
      sb.append(this.from_date);
6865
      first = false;
6866
      if (!first) sb.append(", ");
6867
      sb.append("to_date:");
6868
      sb.append(this.to_date);
6869
      first = false;
6870
      if (!first) sb.append(", ");
6871
      sb.append("warehouse_id:");
6872
      sb.append(this.warehouse_id);
6873
      first = false;
68 ashish 6874
      sb.append(")");
6875
      return sb.toString();
6876
    }
6877
 
6878
    public void validate() throws TException {
6879
      // check for required fields
6880
    }
6881
 
6882
  }
6883
 
483 rajveer 6884
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
6885
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 6886
 
483 rajveer 6887
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 6888
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6889
 
483 rajveer 6890
    private List<Order> success;
68 ashish 6891
    private TransactionServiceException ex;
6892
 
6893
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6894
    public enum _Fields implements TFieldIdEnum {
6895
      SUCCESS((short)0, "success"),
6896
      EX((short)1, "ex");
6897
 
6898
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6899
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6900
 
6901
      static {
6902
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6903
          byId.put((int)field._thriftId, field);
6904
          byName.put(field.getFieldName(), field);
6905
        }
6906
      }
6907
 
6908
      /**
6909
       * Find the _Fields constant that matches fieldId, or null if its not found.
6910
       */
6911
      public static _Fields findByThriftId(int fieldId) {
6912
        return byId.get(fieldId);
6913
      }
6914
 
6915
      /**
6916
       * Find the _Fields constant that matches fieldId, throwing an exception
6917
       * if it is not found.
6918
       */
6919
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6920
        _Fields fields = findByThriftId(fieldId);
6921
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6922
        return fields;
6923
      }
6924
 
6925
      /**
6926
       * Find the _Fields constant that matches name, or null if its not found.
6927
       */
6928
      public static _Fields findByName(String name) {
6929
        return byName.get(name);
6930
      }
6931
 
6932
      private final short _thriftId;
6933
      private final String _fieldName;
6934
 
6935
      _Fields(short thriftId, String fieldName) {
6936
        _thriftId = thriftId;
6937
        _fieldName = fieldName;
6938
      }
6939
 
6940
      public short getThriftFieldId() {
6941
        return _thriftId;
6942
      }
6943
 
6944
      public String getFieldName() {
6945
        return _fieldName;
6946
      }
6947
    }
6948
 
6949
    // isset id assignments
6950
 
6951
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6952
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 6953
          new ListMetaData(TType.LIST, 
6954
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 6955
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6956
          new FieldValueMetaData(TType.STRUCT)));
6957
    }});
6958
 
6959
    static {
483 rajveer 6960
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 6961
    }
6962
 
483 rajveer 6963
    public getAllOrders_result() {
68 ashish 6964
    }
6965
 
483 rajveer 6966
    public getAllOrders_result(
6967
      List<Order> success,
68 ashish 6968
      TransactionServiceException ex)
6969
    {
6970
      this();
6971
      this.success = success;
6972
      this.ex = ex;
6973
    }
6974
 
6975
    /**
6976
     * Performs a deep copy on <i>other</i>.
6977
     */
483 rajveer 6978
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 6979
      if (other.isSetSuccess()) {
483 rajveer 6980
        List<Order> __this__success = new ArrayList<Order>();
6981
        for (Order other_element : other.success) {
6982
          __this__success.add(new Order(other_element));
6983
        }
6984
        this.success = __this__success;
68 ashish 6985
      }
6986
      if (other.isSetEx()) {
6987
        this.ex = new TransactionServiceException(other.ex);
6988
      }
6989
    }
6990
 
483 rajveer 6991
    public getAllOrders_result deepCopy() {
6992
      return new getAllOrders_result(this);
68 ashish 6993
    }
6994
 
6995
    @Deprecated
483 rajveer 6996
    public getAllOrders_result clone() {
6997
      return new getAllOrders_result(this);
68 ashish 6998
    }
6999
 
483 rajveer 7000
    public int getSuccessSize() {
7001
      return (this.success == null) ? 0 : this.success.size();
7002
    }
7003
 
7004
    public java.util.Iterator<Order> getSuccessIterator() {
7005
      return (this.success == null) ? null : this.success.iterator();
7006
    }
7007
 
7008
    public void addToSuccess(Order elem) {
7009
      if (this.success == null) {
7010
        this.success = new ArrayList<Order>();
7011
      }
7012
      this.success.add(elem);
7013
    }
7014
 
7015
    public List<Order> getSuccess() {
68 ashish 7016
      return this.success;
7017
    }
7018
 
483 rajveer 7019
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 7020
      this.success = success;
7021
      return this;
7022
    }
7023
 
7024
    public void unsetSuccess() {
7025
      this.success = null;
7026
    }
7027
 
7028
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7029
    public boolean isSetSuccess() {
7030
      return this.success != null;
7031
    }
7032
 
7033
    public void setSuccessIsSet(boolean value) {
7034
      if (!value) {
7035
        this.success = null;
7036
      }
7037
    }
7038
 
7039
    public TransactionServiceException getEx() {
7040
      return this.ex;
7041
    }
7042
 
483 rajveer 7043
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 7044
      this.ex = ex;
7045
      return this;
7046
    }
7047
 
7048
    public void unsetEx() {
7049
      this.ex = null;
7050
    }
7051
 
7052
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7053
    public boolean isSetEx() {
7054
      return this.ex != null;
7055
    }
7056
 
7057
    public void setExIsSet(boolean value) {
7058
      if (!value) {
7059
        this.ex = null;
7060
      }
7061
    }
7062
 
7063
    public void setFieldValue(_Fields field, Object value) {
7064
      switch (field) {
7065
      case SUCCESS:
7066
        if (value == null) {
7067
          unsetSuccess();
7068
        } else {
483 rajveer 7069
          setSuccess((List<Order>)value);
68 ashish 7070
        }
7071
        break;
7072
 
7073
      case EX:
7074
        if (value == null) {
7075
          unsetEx();
7076
        } else {
7077
          setEx((TransactionServiceException)value);
7078
        }
7079
        break;
7080
 
7081
      }
7082
    }
7083
 
7084
    public void setFieldValue(int fieldID, Object value) {
7085
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7086
    }
7087
 
7088
    public Object getFieldValue(_Fields field) {
7089
      switch (field) {
7090
      case SUCCESS:
7091
        return getSuccess();
7092
 
7093
      case EX:
7094
        return getEx();
7095
 
7096
      }
7097
      throw new IllegalStateException();
7098
    }
7099
 
7100
    public Object getFieldValue(int fieldId) {
7101
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7102
    }
7103
 
7104
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7105
    public boolean isSet(_Fields field) {
7106
      switch (field) {
7107
      case SUCCESS:
7108
        return isSetSuccess();
7109
      case EX:
7110
        return isSetEx();
7111
      }
7112
      throw new IllegalStateException();
7113
    }
7114
 
7115
    public boolean isSet(int fieldID) {
7116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7117
    }
7118
 
7119
    @Override
7120
    public boolean equals(Object that) {
7121
      if (that == null)
7122
        return false;
483 rajveer 7123
      if (that instanceof getAllOrders_result)
7124
        return this.equals((getAllOrders_result)that);
68 ashish 7125
      return false;
7126
    }
7127
 
483 rajveer 7128
    public boolean equals(getAllOrders_result that) {
68 ashish 7129
      if (that == null)
7130
        return false;
7131
 
7132
      boolean this_present_success = true && this.isSetSuccess();
7133
      boolean that_present_success = true && that.isSetSuccess();
7134
      if (this_present_success || that_present_success) {
7135
        if (!(this_present_success && that_present_success))
7136
          return false;
7137
        if (!this.success.equals(that.success))
7138
          return false;
7139
      }
7140
 
7141
      boolean this_present_ex = true && this.isSetEx();
7142
      boolean that_present_ex = true && that.isSetEx();
7143
      if (this_present_ex || that_present_ex) {
7144
        if (!(this_present_ex && that_present_ex))
7145
          return false;
7146
        if (!this.ex.equals(that.ex))
7147
          return false;
7148
      }
7149
 
7150
      return true;
7151
    }
7152
 
7153
    @Override
7154
    public int hashCode() {
7155
      return 0;
7156
    }
7157
 
483 rajveer 7158
    public int compareTo(getAllOrders_result other) {
7159
      if (!getClass().equals(other.getClass())) {
7160
        return getClass().getName().compareTo(other.getClass().getName());
7161
      }
7162
 
7163
      int lastComparison = 0;
7164
      getAllOrders_result typedOther = (getAllOrders_result)other;
7165
 
7166
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7167
      if (lastComparison != 0) {
7168
        return lastComparison;
7169
      }
7170
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7171
      if (lastComparison != 0) {
7172
        return lastComparison;
7173
      }
7174
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7175
      if (lastComparison != 0) {
7176
        return lastComparison;
7177
      }
7178
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7179
      if (lastComparison != 0) {
7180
        return lastComparison;
7181
      }
7182
      return 0;
7183
    }
7184
 
68 ashish 7185
    public void read(TProtocol iprot) throws TException {
7186
      TField field;
7187
      iprot.readStructBegin();
7188
      while (true)
7189
      {
7190
        field = iprot.readFieldBegin();
7191
        if (field.type == TType.STOP) { 
7192
          break;
7193
        }
7194
        _Fields fieldId = _Fields.findByThriftId(field.id);
7195
        if (fieldId == null) {
7196
          TProtocolUtil.skip(iprot, field.type);
7197
        } else {
7198
          switch (fieldId) {
7199
            case SUCCESS:
483 rajveer 7200
              if (field.type == TType.LIST) {
7201
                {
684 chandransh 7202
                  TList _list16 = iprot.readListBegin();
7203
                  this.success = new ArrayList<Order>(_list16.size);
7204
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7205
                  {
684 chandransh 7206
                    Order _elem18;
7207
                    _elem18 = new Order();
7208
                    _elem18.read(iprot);
7209
                    this.success.add(_elem18);
483 rajveer 7210
                  }
7211
                  iprot.readListEnd();
7212
                }
68 ashish 7213
              } else { 
7214
                TProtocolUtil.skip(iprot, field.type);
7215
              }
7216
              break;
7217
            case EX:
7218
              if (field.type == TType.STRUCT) {
7219
                this.ex = new TransactionServiceException();
7220
                this.ex.read(iprot);
7221
              } else { 
7222
                TProtocolUtil.skip(iprot, field.type);
7223
              }
7224
              break;
7225
          }
7226
          iprot.readFieldEnd();
7227
        }
7228
      }
7229
      iprot.readStructEnd();
7230
      validate();
7231
    }
7232
 
7233
    public void write(TProtocol oprot) throws TException {
7234
      oprot.writeStructBegin(STRUCT_DESC);
7235
 
7236
      if (this.isSetSuccess()) {
7237
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7238
        {
7239
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7240
          for (Order _iter19 : this.success)
483 rajveer 7241
          {
684 chandransh 7242
            _iter19.write(oprot);
483 rajveer 7243
          }
7244
          oprot.writeListEnd();
7245
        }
68 ashish 7246
        oprot.writeFieldEnd();
7247
      } else if (this.isSetEx()) {
7248
        oprot.writeFieldBegin(EX_FIELD_DESC);
7249
        this.ex.write(oprot);
7250
        oprot.writeFieldEnd();
7251
      }
7252
      oprot.writeFieldStop();
7253
      oprot.writeStructEnd();
7254
    }
7255
 
7256
    @Override
7257
    public String toString() {
483 rajveer 7258
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7259
      boolean first = true;
7260
 
7261
      sb.append("success:");
7262
      if (this.success == null) {
7263
        sb.append("null");
7264
      } else {
7265
        sb.append(this.success);
7266
      }
7267
      first = false;
7268
      if (!first) sb.append(", ");
7269
      sb.append("ex:");
7270
      if (this.ex == null) {
7271
        sb.append("null");
7272
      } else {
7273
        sb.append(this.ex);
7274
      }
7275
      first = false;
7276
      sb.append(")");
7277
      return sb.toString();
7278
    }
7279
 
7280
    public void validate() throws TException {
7281
      // check for required fields
7282
    }
7283
 
7284
  }
7285
 
1022 varun.gupt 7286
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7287
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7288
 
7289
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7290
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7291
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7292
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7293
 
7294
    private OrderStatus status;
7295
    private long start_billing_date;
7296
    private long end_billing_date;
7297
    private long warehouse_id;
7298
 
7299
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7300
    public enum _Fields implements TFieldIdEnum {
7301
      /**
7302
       * 
7303
       * @see OrderStatus
7304
       */
7305
      STATUS((short)1, "status"),
7306
      START_BILLING_DATE((short)2, "start_billing_date"),
7307
      END_BILLING_DATE((short)3, "end_billing_date"),
7308
      WAREHOUSE_ID((short)4, "warehouse_id");
7309
 
7310
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7311
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7312
 
7313
      static {
7314
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7315
          byId.put((int)field._thriftId, field);
7316
          byName.put(field.getFieldName(), field);
7317
        }
7318
      }
7319
 
7320
      /**
7321
       * Find the _Fields constant that matches fieldId, or null if its not found.
7322
       */
7323
      public static _Fields findByThriftId(int fieldId) {
7324
        return byId.get(fieldId);
7325
      }
7326
 
7327
      /**
7328
       * Find the _Fields constant that matches fieldId, throwing an exception
7329
       * if it is not found.
7330
       */
7331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7332
        _Fields fields = findByThriftId(fieldId);
7333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7334
        return fields;
7335
      }
7336
 
7337
      /**
7338
       * Find the _Fields constant that matches name, or null if its not found.
7339
       */
7340
      public static _Fields findByName(String name) {
7341
        return byName.get(name);
7342
      }
7343
 
7344
      private final short _thriftId;
7345
      private final String _fieldName;
7346
 
7347
      _Fields(short thriftId, String fieldName) {
7348
        _thriftId = thriftId;
7349
        _fieldName = fieldName;
7350
      }
7351
 
7352
      public short getThriftFieldId() {
7353
        return _thriftId;
7354
      }
7355
 
7356
      public String getFieldName() {
7357
        return _fieldName;
7358
      }
7359
    }
7360
 
7361
    // isset id assignments
7362
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7363
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7364
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7365
    private BitSet __isset_bit_vector = new BitSet(3);
7366
 
7367
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7368
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7369
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7370
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7371
          new FieldValueMetaData(TType.I64)));
7372
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7373
          new FieldValueMetaData(TType.I64)));
7374
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7375
          new FieldValueMetaData(TType.I64)));
7376
    }});
7377
 
7378
    static {
7379
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7380
    }
7381
 
7382
    public getOrdersByBillingDate_args() {
7383
    }
7384
 
7385
    public getOrdersByBillingDate_args(
7386
      OrderStatus status,
7387
      long start_billing_date,
7388
      long end_billing_date,
7389
      long warehouse_id)
7390
    {
7391
      this();
7392
      this.status = status;
7393
      this.start_billing_date = start_billing_date;
7394
      setStart_billing_dateIsSet(true);
7395
      this.end_billing_date = end_billing_date;
7396
      setEnd_billing_dateIsSet(true);
7397
      this.warehouse_id = warehouse_id;
7398
      setWarehouse_idIsSet(true);
7399
    }
7400
 
7401
    /**
7402
     * Performs a deep copy on <i>other</i>.
7403
     */
7404
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7405
      __isset_bit_vector.clear();
7406
      __isset_bit_vector.or(other.__isset_bit_vector);
7407
      if (other.isSetStatus()) {
7408
        this.status = other.status;
7409
      }
7410
      this.start_billing_date = other.start_billing_date;
7411
      this.end_billing_date = other.end_billing_date;
7412
      this.warehouse_id = other.warehouse_id;
7413
    }
7414
 
7415
    public getOrdersByBillingDate_args deepCopy() {
7416
      return new getOrdersByBillingDate_args(this);
7417
    }
7418
 
7419
    @Deprecated
7420
    public getOrdersByBillingDate_args clone() {
7421
      return new getOrdersByBillingDate_args(this);
7422
    }
7423
 
7424
    /**
7425
     * 
7426
     * @see OrderStatus
7427
     */
7428
    public OrderStatus getStatus() {
7429
      return this.status;
7430
    }
7431
 
7432
    /**
7433
     * 
7434
     * @see OrderStatus
7435
     */
7436
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7437
      this.status = status;
7438
      return this;
7439
    }
7440
 
7441
    public void unsetStatus() {
7442
      this.status = null;
7443
    }
7444
 
7445
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7446
    public boolean isSetStatus() {
7447
      return this.status != null;
7448
    }
7449
 
7450
    public void setStatusIsSet(boolean value) {
7451
      if (!value) {
7452
        this.status = null;
7453
      }
7454
    }
7455
 
7456
    public long getStart_billing_date() {
7457
      return this.start_billing_date;
7458
    }
7459
 
7460
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7461
      this.start_billing_date = start_billing_date;
7462
      setStart_billing_dateIsSet(true);
7463
      return this;
7464
    }
7465
 
7466
    public void unsetStart_billing_date() {
7467
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7468
    }
7469
 
7470
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7471
    public boolean isSetStart_billing_date() {
7472
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7473
    }
7474
 
7475
    public void setStart_billing_dateIsSet(boolean value) {
7476
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7477
    }
7478
 
7479
    public long getEnd_billing_date() {
7480
      return this.end_billing_date;
7481
    }
7482
 
7483
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7484
      this.end_billing_date = end_billing_date;
7485
      setEnd_billing_dateIsSet(true);
7486
      return this;
7487
    }
7488
 
7489
    public void unsetEnd_billing_date() {
7490
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7491
    }
7492
 
7493
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7494
    public boolean isSetEnd_billing_date() {
7495
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7496
    }
7497
 
7498
    public void setEnd_billing_dateIsSet(boolean value) {
7499
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7500
    }
7501
 
7502
    public long getWarehouse_id() {
7503
      return this.warehouse_id;
7504
    }
7505
 
7506
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7507
      this.warehouse_id = warehouse_id;
7508
      setWarehouse_idIsSet(true);
7509
      return this;
7510
    }
7511
 
7512
    public void unsetWarehouse_id() {
7513
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7514
    }
7515
 
7516
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7517
    public boolean isSetWarehouse_id() {
7518
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7519
    }
7520
 
7521
    public void setWarehouse_idIsSet(boolean value) {
7522
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7523
    }
7524
 
7525
    public void setFieldValue(_Fields field, Object value) {
7526
      switch (field) {
7527
      case STATUS:
7528
        if (value == null) {
7529
          unsetStatus();
7530
        } else {
7531
          setStatus((OrderStatus)value);
7532
        }
7533
        break;
7534
 
7535
      case START_BILLING_DATE:
7536
        if (value == null) {
7537
          unsetStart_billing_date();
7538
        } else {
7539
          setStart_billing_date((Long)value);
7540
        }
7541
        break;
7542
 
7543
      case END_BILLING_DATE:
7544
        if (value == null) {
7545
          unsetEnd_billing_date();
7546
        } else {
7547
          setEnd_billing_date((Long)value);
7548
        }
7549
        break;
7550
 
7551
      case WAREHOUSE_ID:
7552
        if (value == null) {
7553
          unsetWarehouse_id();
7554
        } else {
7555
          setWarehouse_id((Long)value);
7556
        }
7557
        break;
7558
 
7559
      }
7560
    }
7561
 
7562
    public void setFieldValue(int fieldID, Object value) {
7563
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7564
    }
7565
 
7566
    public Object getFieldValue(_Fields field) {
7567
      switch (field) {
7568
      case STATUS:
7569
        return getStatus();
7570
 
7571
      case START_BILLING_DATE:
7572
        return new Long(getStart_billing_date());
7573
 
7574
      case END_BILLING_DATE:
7575
        return new Long(getEnd_billing_date());
7576
 
7577
      case WAREHOUSE_ID:
7578
        return new Long(getWarehouse_id());
7579
 
7580
      }
7581
      throw new IllegalStateException();
7582
    }
7583
 
7584
    public Object getFieldValue(int fieldId) {
7585
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7586
    }
7587
 
7588
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7589
    public boolean isSet(_Fields field) {
7590
      switch (field) {
7591
      case STATUS:
7592
        return isSetStatus();
7593
      case START_BILLING_DATE:
7594
        return isSetStart_billing_date();
7595
      case END_BILLING_DATE:
7596
        return isSetEnd_billing_date();
7597
      case WAREHOUSE_ID:
7598
        return isSetWarehouse_id();
7599
      }
7600
      throw new IllegalStateException();
7601
    }
7602
 
7603
    public boolean isSet(int fieldID) {
7604
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7605
    }
7606
 
7607
    @Override
7608
    public boolean equals(Object that) {
7609
      if (that == null)
7610
        return false;
7611
      if (that instanceof getOrdersByBillingDate_args)
7612
        return this.equals((getOrdersByBillingDate_args)that);
7613
      return false;
7614
    }
7615
 
7616
    public boolean equals(getOrdersByBillingDate_args that) {
7617
      if (that == null)
7618
        return false;
7619
 
7620
      boolean this_present_status = true && this.isSetStatus();
7621
      boolean that_present_status = true && that.isSetStatus();
7622
      if (this_present_status || that_present_status) {
7623
        if (!(this_present_status && that_present_status))
7624
          return false;
7625
        if (!this.status.equals(that.status))
7626
          return false;
7627
      }
7628
 
7629
      boolean this_present_start_billing_date = true;
7630
      boolean that_present_start_billing_date = true;
7631
      if (this_present_start_billing_date || that_present_start_billing_date) {
7632
        if (!(this_present_start_billing_date && that_present_start_billing_date))
7633
          return false;
7634
        if (this.start_billing_date != that.start_billing_date)
7635
          return false;
7636
      }
7637
 
7638
      boolean this_present_end_billing_date = true;
7639
      boolean that_present_end_billing_date = true;
7640
      if (this_present_end_billing_date || that_present_end_billing_date) {
7641
        if (!(this_present_end_billing_date && that_present_end_billing_date))
7642
          return false;
7643
        if (this.end_billing_date != that.end_billing_date)
7644
          return false;
7645
      }
7646
 
7647
      boolean this_present_warehouse_id = true;
7648
      boolean that_present_warehouse_id = true;
7649
      if (this_present_warehouse_id || that_present_warehouse_id) {
7650
        if (!(this_present_warehouse_id && that_present_warehouse_id))
7651
          return false;
7652
        if (this.warehouse_id != that.warehouse_id)
7653
          return false;
7654
      }
7655
 
7656
      return true;
7657
    }
7658
 
7659
    @Override
7660
    public int hashCode() {
7661
      return 0;
7662
    }
7663
 
7664
    public int compareTo(getOrdersByBillingDate_args other) {
7665
      if (!getClass().equals(other.getClass())) {
7666
        return getClass().getName().compareTo(other.getClass().getName());
7667
      }
7668
 
7669
      int lastComparison = 0;
7670
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
7671
 
7672
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7673
      if (lastComparison != 0) {
7674
        return lastComparison;
7675
      }
7676
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7677
      if (lastComparison != 0) {
7678
        return lastComparison;
7679
      }
7680
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
7681
      if (lastComparison != 0) {
7682
        return lastComparison;
7683
      }
7684
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
7685
      if (lastComparison != 0) {
7686
        return lastComparison;
7687
      }
7688
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
7689
      if (lastComparison != 0) {
7690
        return lastComparison;
7691
      }
7692
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
7693
      if (lastComparison != 0) {
7694
        return lastComparison;
7695
      }
7696
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7697
      if (lastComparison != 0) {
7698
        return lastComparison;
7699
      }
7700
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7701
      if (lastComparison != 0) {
7702
        return lastComparison;
7703
      }
7704
      return 0;
7705
    }
7706
 
7707
    public void read(TProtocol iprot) throws TException {
7708
      TField field;
7709
      iprot.readStructBegin();
7710
      while (true)
7711
      {
7712
        field = iprot.readFieldBegin();
7713
        if (field.type == TType.STOP) { 
7714
          break;
7715
        }
7716
        _Fields fieldId = _Fields.findByThriftId(field.id);
7717
        if (fieldId == null) {
7718
          TProtocolUtil.skip(iprot, field.type);
7719
        } else {
7720
          switch (fieldId) {
7721
            case STATUS:
7722
              if (field.type == TType.I32) {
7723
                this.status = OrderStatus.findByValue(iprot.readI32());
7724
              } else { 
7725
                TProtocolUtil.skip(iprot, field.type);
7726
              }
7727
              break;
7728
            case START_BILLING_DATE:
7729
              if (field.type == TType.I64) {
7730
                this.start_billing_date = iprot.readI64();
7731
                setStart_billing_dateIsSet(true);
7732
              } else { 
7733
                TProtocolUtil.skip(iprot, field.type);
7734
              }
7735
              break;
7736
            case END_BILLING_DATE:
7737
              if (field.type == TType.I64) {
7738
                this.end_billing_date = iprot.readI64();
7739
                setEnd_billing_dateIsSet(true);
7740
              } else { 
7741
                TProtocolUtil.skip(iprot, field.type);
7742
              }
7743
              break;
7744
            case WAREHOUSE_ID:
7745
              if (field.type == TType.I64) {
7746
                this.warehouse_id = iprot.readI64();
7747
                setWarehouse_idIsSet(true);
7748
              } else { 
7749
                TProtocolUtil.skip(iprot, field.type);
7750
              }
7751
              break;
7752
          }
7753
          iprot.readFieldEnd();
7754
        }
7755
      }
7756
      iprot.readStructEnd();
7757
      validate();
7758
    }
7759
 
7760
    public void write(TProtocol oprot) throws TException {
7761
      validate();
7762
 
7763
      oprot.writeStructBegin(STRUCT_DESC);
7764
      if (this.status != null) {
7765
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7766
        oprot.writeI32(this.status.getValue());
7767
        oprot.writeFieldEnd();
7768
      }
7769
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
7770
      oprot.writeI64(this.start_billing_date);
7771
      oprot.writeFieldEnd();
7772
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
7773
      oprot.writeI64(this.end_billing_date);
7774
      oprot.writeFieldEnd();
7775
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7776
      oprot.writeI64(this.warehouse_id);
7777
      oprot.writeFieldEnd();
7778
      oprot.writeFieldStop();
7779
      oprot.writeStructEnd();
7780
    }
7781
 
7782
    @Override
7783
    public String toString() {
7784
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
7785
      boolean first = true;
7786
 
7787
      sb.append("status:");
7788
      if (this.status == null) {
7789
        sb.append("null");
7790
      } else {
7791
        String status_name = status.name();
7792
        if (status_name != null) {
7793
          sb.append(status_name);
7794
          sb.append(" (");
7795
        }
7796
        sb.append(this.status);
7797
        if (status_name != null) {
7798
          sb.append(")");
7799
        }
7800
      }
7801
      first = false;
7802
      if (!first) sb.append(", ");
7803
      sb.append("start_billing_date:");
7804
      sb.append(this.start_billing_date);
7805
      first = false;
7806
      if (!first) sb.append(", ");
7807
      sb.append("end_billing_date:");
7808
      sb.append(this.end_billing_date);
7809
      first = false;
7810
      if (!first) sb.append(", ");
7811
      sb.append("warehouse_id:");
7812
      sb.append(this.warehouse_id);
7813
      first = false;
7814
      sb.append(")");
7815
      return sb.toString();
7816
    }
7817
 
7818
    public void validate() throws TException {
7819
      // check for required fields
7820
    }
7821
 
7822
  }
7823
 
7824
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
7825
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
7826
 
7827
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
7828
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7829
 
7830
    private List<Order> success;
7831
    private TransactionServiceException ex;
7832
 
7833
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7834
    public enum _Fields implements TFieldIdEnum {
7835
      SUCCESS((short)0, "success"),
7836
      EX((short)1, "ex");
7837
 
7838
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7839
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7840
 
7841
      static {
7842
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7843
          byId.put((int)field._thriftId, field);
7844
          byName.put(field.getFieldName(), field);
7845
        }
7846
      }
7847
 
7848
      /**
7849
       * Find the _Fields constant that matches fieldId, or null if its not found.
7850
       */
7851
      public static _Fields findByThriftId(int fieldId) {
7852
        return byId.get(fieldId);
7853
      }
7854
 
7855
      /**
7856
       * Find the _Fields constant that matches fieldId, throwing an exception
7857
       * if it is not found.
7858
       */
7859
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7860
        _Fields fields = findByThriftId(fieldId);
7861
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7862
        return fields;
7863
      }
7864
 
7865
      /**
7866
       * Find the _Fields constant that matches name, or null if its not found.
7867
       */
7868
      public static _Fields findByName(String name) {
7869
        return byName.get(name);
7870
      }
7871
 
7872
      private final short _thriftId;
7873
      private final String _fieldName;
7874
 
7875
      _Fields(short thriftId, String fieldName) {
7876
        _thriftId = thriftId;
7877
        _fieldName = fieldName;
7878
      }
7879
 
7880
      public short getThriftFieldId() {
7881
        return _thriftId;
7882
      }
7883
 
7884
      public String getFieldName() {
7885
        return _fieldName;
7886
      }
7887
    }
7888
 
7889
    // isset id assignments
7890
 
7891
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7892
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7893
          new ListMetaData(TType.LIST, 
7894
              new StructMetaData(TType.STRUCT, Order.class))));
7895
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7896
          new FieldValueMetaData(TType.STRUCT)));
7897
    }});
7898
 
7899
    static {
7900
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
7901
    }
7902
 
7903
    public getOrdersByBillingDate_result() {
7904
    }
7905
 
7906
    public getOrdersByBillingDate_result(
7907
      List<Order> success,
7908
      TransactionServiceException ex)
7909
    {
7910
      this();
7911
      this.success = success;
7912
      this.ex = ex;
7913
    }
7914
 
7915
    /**
7916
     * Performs a deep copy on <i>other</i>.
7917
     */
7918
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
7919
      if (other.isSetSuccess()) {
7920
        List<Order> __this__success = new ArrayList<Order>();
7921
        for (Order other_element : other.success) {
7922
          __this__success.add(new Order(other_element));
7923
        }
7924
        this.success = __this__success;
7925
      }
7926
      if (other.isSetEx()) {
7927
        this.ex = new TransactionServiceException(other.ex);
7928
      }
7929
    }
7930
 
7931
    public getOrdersByBillingDate_result deepCopy() {
7932
      return new getOrdersByBillingDate_result(this);
7933
    }
7934
 
7935
    @Deprecated
7936
    public getOrdersByBillingDate_result clone() {
7937
      return new getOrdersByBillingDate_result(this);
7938
    }
7939
 
7940
    public int getSuccessSize() {
7941
      return (this.success == null) ? 0 : this.success.size();
7942
    }
7943
 
7944
    public java.util.Iterator<Order> getSuccessIterator() {
7945
      return (this.success == null) ? null : this.success.iterator();
7946
    }
7947
 
7948
    public void addToSuccess(Order elem) {
7949
      if (this.success == null) {
7950
        this.success = new ArrayList<Order>();
7951
      }
7952
      this.success.add(elem);
7953
    }
7954
 
7955
    public List<Order> getSuccess() {
7956
      return this.success;
7957
    }
7958
 
7959
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
7960
      this.success = success;
7961
      return this;
7962
    }
7963
 
7964
    public void unsetSuccess() {
7965
      this.success = null;
7966
    }
7967
 
7968
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7969
    public boolean isSetSuccess() {
7970
      return this.success != null;
7971
    }
7972
 
7973
    public void setSuccessIsSet(boolean value) {
7974
      if (!value) {
7975
        this.success = null;
7976
      }
7977
    }
7978
 
7979
    public TransactionServiceException getEx() {
7980
      return this.ex;
7981
    }
7982
 
7983
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
7984
      this.ex = ex;
7985
      return this;
7986
    }
7987
 
7988
    public void unsetEx() {
7989
      this.ex = null;
7990
    }
7991
 
7992
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7993
    public boolean isSetEx() {
7994
      return this.ex != null;
7995
    }
7996
 
7997
    public void setExIsSet(boolean value) {
7998
      if (!value) {
7999
        this.ex = null;
8000
      }
8001
    }
8002
 
8003
    public void setFieldValue(_Fields field, Object value) {
8004
      switch (field) {
8005
      case SUCCESS:
8006
        if (value == null) {
8007
          unsetSuccess();
8008
        } else {
8009
          setSuccess((List<Order>)value);
8010
        }
8011
        break;
8012
 
8013
      case EX:
8014
        if (value == null) {
8015
          unsetEx();
8016
        } else {
8017
          setEx((TransactionServiceException)value);
8018
        }
8019
        break;
8020
 
8021
      }
8022
    }
8023
 
8024
    public void setFieldValue(int fieldID, Object value) {
8025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8026
    }
8027
 
8028
    public Object getFieldValue(_Fields field) {
8029
      switch (field) {
8030
      case SUCCESS:
8031
        return getSuccess();
8032
 
8033
      case EX:
8034
        return getEx();
8035
 
8036
      }
8037
      throw new IllegalStateException();
8038
    }
8039
 
8040
    public Object getFieldValue(int fieldId) {
8041
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8042
    }
8043
 
8044
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8045
    public boolean isSet(_Fields field) {
8046
      switch (field) {
8047
      case SUCCESS:
8048
        return isSetSuccess();
8049
      case EX:
8050
        return isSetEx();
8051
      }
8052
      throw new IllegalStateException();
8053
    }
8054
 
8055
    public boolean isSet(int fieldID) {
8056
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8057
    }
8058
 
8059
    @Override
8060
    public boolean equals(Object that) {
8061
      if (that == null)
8062
        return false;
8063
      if (that instanceof getOrdersByBillingDate_result)
8064
        return this.equals((getOrdersByBillingDate_result)that);
8065
      return false;
8066
    }
8067
 
8068
    public boolean equals(getOrdersByBillingDate_result that) {
8069
      if (that == null)
8070
        return false;
8071
 
8072
      boolean this_present_success = true && this.isSetSuccess();
8073
      boolean that_present_success = true && that.isSetSuccess();
8074
      if (this_present_success || that_present_success) {
8075
        if (!(this_present_success && that_present_success))
8076
          return false;
8077
        if (!this.success.equals(that.success))
8078
          return false;
8079
      }
8080
 
8081
      boolean this_present_ex = true && this.isSetEx();
8082
      boolean that_present_ex = true && that.isSetEx();
8083
      if (this_present_ex || that_present_ex) {
8084
        if (!(this_present_ex && that_present_ex))
8085
          return false;
8086
        if (!this.ex.equals(that.ex))
8087
          return false;
8088
      }
8089
 
8090
      return true;
8091
    }
8092
 
8093
    @Override
8094
    public int hashCode() {
8095
      return 0;
8096
    }
8097
 
8098
    public int compareTo(getOrdersByBillingDate_result other) {
8099
      if (!getClass().equals(other.getClass())) {
8100
        return getClass().getName().compareTo(other.getClass().getName());
8101
      }
8102
 
8103
      int lastComparison = 0;
8104
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8105
 
8106
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8107
      if (lastComparison != 0) {
8108
        return lastComparison;
8109
      }
8110
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8111
      if (lastComparison != 0) {
8112
        return lastComparison;
8113
      }
8114
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8115
      if (lastComparison != 0) {
8116
        return lastComparison;
8117
      }
8118
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8119
      if (lastComparison != 0) {
8120
        return lastComparison;
8121
      }
8122
      return 0;
8123
    }
8124
 
8125
    public void read(TProtocol iprot) throws TException {
8126
      TField field;
8127
      iprot.readStructBegin();
8128
      while (true)
8129
      {
8130
        field = iprot.readFieldBegin();
8131
        if (field.type == TType.STOP) { 
8132
          break;
8133
        }
8134
        _Fields fieldId = _Fields.findByThriftId(field.id);
8135
        if (fieldId == null) {
8136
          TProtocolUtil.skip(iprot, field.type);
8137
        } else {
8138
          switch (fieldId) {
8139
            case SUCCESS:
8140
              if (field.type == TType.LIST) {
8141
                {
8142
                  TList _list20 = iprot.readListBegin();
8143
                  this.success = new ArrayList<Order>(_list20.size);
8144
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8145
                  {
8146
                    Order _elem22;
8147
                    _elem22 = new Order();
8148
                    _elem22.read(iprot);
8149
                    this.success.add(_elem22);
8150
                  }
8151
                  iprot.readListEnd();
8152
                }
8153
              } else { 
8154
                TProtocolUtil.skip(iprot, field.type);
8155
              }
8156
              break;
8157
            case EX:
8158
              if (field.type == TType.STRUCT) {
8159
                this.ex = new TransactionServiceException();
8160
                this.ex.read(iprot);
8161
              } else { 
8162
                TProtocolUtil.skip(iprot, field.type);
8163
              }
8164
              break;
8165
          }
8166
          iprot.readFieldEnd();
8167
        }
8168
      }
8169
      iprot.readStructEnd();
8170
      validate();
8171
    }
8172
 
8173
    public void write(TProtocol oprot) throws TException {
8174
      oprot.writeStructBegin(STRUCT_DESC);
8175
 
8176
      if (this.isSetSuccess()) {
8177
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8178
        {
8179
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8180
          for (Order _iter23 : this.success)
8181
          {
8182
            _iter23.write(oprot);
8183
          }
8184
          oprot.writeListEnd();
8185
        }
8186
        oprot.writeFieldEnd();
8187
      } else if (this.isSetEx()) {
8188
        oprot.writeFieldBegin(EX_FIELD_DESC);
8189
        this.ex.write(oprot);
8190
        oprot.writeFieldEnd();
8191
      }
8192
      oprot.writeFieldStop();
8193
      oprot.writeStructEnd();
8194
    }
8195
 
8196
    @Override
8197
    public String toString() {
8198
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8199
      boolean first = true;
8200
 
8201
      sb.append("success:");
8202
      if (this.success == null) {
8203
        sb.append("null");
8204
      } else {
8205
        sb.append(this.success);
8206
      }
8207
      first = false;
8208
      if (!first) sb.append(", ");
8209
      sb.append("ex:");
8210
      if (this.ex == null) {
8211
        sb.append("null");
8212
      } else {
8213
        sb.append(this.ex);
8214
      }
8215
      first = false;
8216
      sb.append(")");
8217
      return sb.toString();
8218
    }
8219
 
8220
    public void validate() throws TException {
8221
      // check for required fields
8222
    }
8223
 
8224
  }
8225
 
483 rajveer 8226
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8227
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8228
 
483 rajveer 8229
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8230
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8231
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8232
 
483 rajveer 8233
    private long orderId;
8234
    private OrderStatus status;
8235
    private String description;
68 ashish 8236
 
8237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8238
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8239
      ORDER_ID((short)1, "orderId"),
8240
      /**
8241
       * 
8242
       * @see OrderStatus
8243
       */
8244
      STATUS((short)2, "status"),
8245
      DESCRIPTION((short)3, "description");
68 ashish 8246
 
8247
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8248
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8249
 
8250
      static {
8251
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8252
          byId.put((int)field._thriftId, field);
8253
          byName.put(field.getFieldName(), field);
8254
        }
8255
      }
8256
 
8257
      /**
8258
       * Find the _Fields constant that matches fieldId, or null if its not found.
8259
       */
8260
      public static _Fields findByThriftId(int fieldId) {
8261
        return byId.get(fieldId);
8262
      }
8263
 
8264
      /**
8265
       * Find the _Fields constant that matches fieldId, throwing an exception
8266
       * if it is not found.
8267
       */
8268
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8269
        _Fields fields = findByThriftId(fieldId);
8270
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8271
        return fields;
8272
      }
8273
 
8274
      /**
8275
       * Find the _Fields constant that matches name, or null if its not found.
8276
       */
8277
      public static _Fields findByName(String name) {
8278
        return byName.get(name);
8279
      }
8280
 
8281
      private final short _thriftId;
8282
      private final String _fieldName;
8283
 
8284
      _Fields(short thriftId, String fieldName) {
8285
        _thriftId = thriftId;
8286
        _fieldName = fieldName;
8287
      }
8288
 
8289
      public short getThriftFieldId() {
8290
        return _thriftId;
8291
      }
8292
 
8293
      public String getFieldName() {
8294
        return _fieldName;
8295
      }
8296
    }
8297
 
8298
    // isset id assignments
483 rajveer 8299
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8300
    private BitSet __isset_bit_vector = new BitSet(1);
8301
 
8302
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8303
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8304
          new FieldValueMetaData(TType.I64)));
483 rajveer 8305
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8306
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8307
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8308
          new FieldValueMetaData(TType.STRING)));
68 ashish 8309
    }});
8310
 
8311
    static {
483 rajveer 8312
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8313
    }
8314
 
483 rajveer 8315
    public changeOrderStatus_args() {
68 ashish 8316
    }
8317
 
483 rajveer 8318
    public changeOrderStatus_args(
8319
      long orderId,
8320
      OrderStatus status,
8321
      String description)
68 ashish 8322
    {
8323
      this();
483 rajveer 8324
      this.orderId = orderId;
8325
      setOrderIdIsSet(true);
8326
      this.status = status;
8327
      this.description = description;
68 ashish 8328
    }
8329
 
8330
    /**
8331
     * Performs a deep copy on <i>other</i>.
8332
     */
483 rajveer 8333
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8334
      __isset_bit_vector.clear();
8335
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8336
      this.orderId = other.orderId;
8337
      if (other.isSetStatus()) {
8338
        this.status = other.status;
8339
      }
8340
      if (other.isSetDescription()) {
8341
        this.description = other.description;
8342
      }
68 ashish 8343
    }
8344
 
483 rajveer 8345
    public changeOrderStatus_args deepCopy() {
8346
      return new changeOrderStatus_args(this);
68 ashish 8347
    }
8348
 
8349
    @Deprecated
483 rajveer 8350
    public changeOrderStatus_args clone() {
8351
      return new changeOrderStatus_args(this);
68 ashish 8352
    }
8353
 
483 rajveer 8354
    public long getOrderId() {
8355
      return this.orderId;
68 ashish 8356
    }
8357
 
483 rajveer 8358
    public changeOrderStatus_args setOrderId(long orderId) {
8359
      this.orderId = orderId;
8360
      setOrderIdIsSet(true);
68 ashish 8361
      return this;
8362
    }
8363
 
483 rajveer 8364
    public void unsetOrderId() {
8365
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8366
    }
8367
 
483 rajveer 8368
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8369
    public boolean isSetOrderId() {
8370
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8371
    }
8372
 
483 rajveer 8373
    public void setOrderIdIsSet(boolean value) {
8374
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8375
    }
8376
 
483 rajveer 8377
    /**
8378
     * 
8379
     * @see OrderStatus
8380
     */
8381
    public OrderStatus getStatus() {
8382
      return this.status;
68 ashish 8383
    }
8384
 
8385
    /**
483 rajveer 8386
     * 
8387
     * @see OrderStatus
68 ashish 8388
     */
483 rajveer 8389
    public changeOrderStatus_args setStatus(OrderStatus status) {
8390
      this.status = status;
68 ashish 8391
      return this;
8392
    }
8393
 
483 rajveer 8394
    public void unsetStatus() {
8395
      this.status = null;
68 ashish 8396
    }
8397
 
483 rajveer 8398
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8399
    public boolean isSetStatus() {
8400
      return this.status != null;
68 ashish 8401
    }
8402
 
483 rajveer 8403
    public void setStatusIsSet(boolean value) {
68 ashish 8404
      if (!value) {
483 rajveer 8405
        this.status = null;
68 ashish 8406
      }
8407
    }
8408
 
483 rajveer 8409
    public String getDescription() {
8410
      return this.description;
68 ashish 8411
    }
8412
 
483 rajveer 8413
    public changeOrderStatus_args setDescription(String description) {
8414
      this.description = description;
68 ashish 8415
      return this;
8416
    }
8417
 
483 rajveer 8418
    public void unsetDescription() {
8419
      this.description = null;
68 ashish 8420
    }
8421
 
483 rajveer 8422
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8423
    public boolean isSetDescription() {
8424
      return this.description != null;
68 ashish 8425
    }
8426
 
483 rajveer 8427
    public void setDescriptionIsSet(boolean value) {
68 ashish 8428
      if (!value) {
483 rajveer 8429
        this.description = null;
68 ashish 8430
      }
8431
    }
8432
 
8433
    public void setFieldValue(_Fields field, Object value) {
8434
      switch (field) {
483 rajveer 8435
      case ORDER_ID:
68 ashish 8436
        if (value == null) {
483 rajveer 8437
          unsetOrderId();
68 ashish 8438
        } else {
483 rajveer 8439
          setOrderId((Long)value);
68 ashish 8440
        }
8441
        break;
8442
 
483 rajveer 8443
      case STATUS:
68 ashish 8444
        if (value == null) {
483 rajveer 8445
          unsetStatus();
68 ashish 8446
        } else {
483 rajveer 8447
          setStatus((OrderStatus)value);
68 ashish 8448
        }
8449
        break;
8450
 
483 rajveer 8451
      case DESCRIPTION:
8452
        if (value == null) {
8453
          unsetDescription();
8454
        } else {
8455
          setDescription((String)value);
8456
        }
8457
        break;
8458
 
68 ashish 8459
      }
8460
    }
8461
 
8462
    public void setFieldValue(int fieldID, Object value) {
8463
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8464
    }
8465
 
8466
    public Object getFieldValue(_Fields field) {
8467
      switch (field) {
483 rajveer 8468
      case ORDER_ID:
8469
        return new Long(getOrderId());
68 ashish 8470
 
483 rajveer 8471
      case STATUS:
8472
        return getStatus();
68 ashish 8473
 
483 rajveer 8474
      case DESCRIPTION:
8475
        return getDescription();
8476
 
68 ashish 8477
      }
8478
      throw new IllegalStateException();
8479
    }
8480
 
8481
    public Object getFieldValue(int fieldId) {
8482
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8483
    }
8484
 
8485
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8486
    public boolean isSet(_Fields field) {
8487
      switch (field) {
483 rajveer 8488
      case ORDER_ID:
8489
        return isSetOrderId();
8490
      case STATUS:
8491
        return isSetStatus();
8492
      case DESCRIPTION:
8493
        return isSetDescription();
68 ashish 8494
      }
8495
      throw new IllegalStateException();
8496
    }
8497
 
8498
    public boolean isSet(int fieldID) {
8499
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8500
    }
8501
 
8502
    @Override
8503
    public boolean equals(Object that) {
8504
      if (that == null)
8505
        return false;
483 rajveer 8506
      if (that instanceof changeOrderStatus_args)
8507
        return this.equals((changeOrderStatus_args)that);
68 ashish 8508
      return false;
8509
    }
8510
 
483 rajveer 8511
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8512
      if (that == null)
8513
        return false;
8514
 
483 rajveer 8515
      boolean this_present_orderId = true;
8516
      boolean that_present_orderId = true;
8517
      if (this_present_orderId || that_present_orderId) {
8518
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8519
          return false;
483 rajveer 8520
        if (this.orderId != that.orderId)
68 ashish 8521
          return false;
8522
      }
8523
 
483 rajveer 8524
      boolean this_present_status = true && this.isSetStatus();
8525
      boolean that_present_status = true && that.isSetStatus();
8526
      if (this_present_status || that_present_status) {
8527
        if (!(this_present_status && that_present_status))
68 ashish 8528
          return false;
483 rajveer 8529
        if (!this.status.equals(that.status))
68 ashish 8530
          return false;
8531
      }
8532
 
483 rajveer 8533
      boolean this_present_description = true && this.isSetDescription();
8534
      boolean that_present_description = true && that.isSetDescription();
8535
      if (this_present_description || that_present_description) {
8536
        if (!(this_present_description && that_present_description))
8537
          return false;
8538
        if (!this.description.equals(that.description))
8539
          return false;
8540
      }
8541
 
68 ashish 8542
      return true;
8543
    }
8544
 
8545
    @Override
8546
    public int hashCode() {
8547
      return 0;
8548
    }
8549
 
483 rajveer 8550
    public int compareTo(changeOrderStatus_args other) {
8551
      if (!getClass().equals(other.getClass())) {
8552
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 8553
      }
8554
 
483 rajveer 8555
      int lastComparison = 0;
8556
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 8557
 
483 rajveer 8558
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8559
      if (lastComparison != 0) {
8560
        return lastComparison;
68 ashish 8561
      }
483 rajveer 8562
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8563
      if (lastComparison != 0) {
8564
        return lastComparison;
68 ashish 8565
      }
483 rajveer 8566
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8567
      if (lastComparison != 0) {
8568
        return lastComparison;
68 ashish 8569
      }
483 rajveer 8570
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8571
      if (lastComparison != 0) {
8572
        return lastComparison;
68 ashish 8573
      }
483 rajveer 8574
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8575
      if (lastComparison != 0) {
8576
        return lastComparison;
68 ashish 8577
      }
483 rajveer 8578
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8579
      if (lastComparison != 0) {
8580
        return lastComparison;
68 ashish 8581
      }
8582
      return 0;
8583
    }
8584
 
8585
    public void read(TProtocol iprot) throws TException {
8586
      TField field;
8587
      iprot.readStructBegin();
8588
      while (true)
8589
      {
8590
        field = iprot.readFieldBegin();
8591
        if (field.type == TType.STOP) { 
8592
          break;
8593
        }
8594
        _Fields fieldId = _Fields.findByThriftId(field.id);
8595
        if (fieldId == null) {
8596
          TProtocolUtil.skip(iprot, field.type);
8597
        } else {
8598
          switch (fieldId) {
483 rajveer 8599
            case ORDER_ID:
68 ashish 8600
              if (field.type == TType.I64) {
483 rajveer 8601
                this.orderId = iprot.readI64();
8602
                setOrderIdIsSet(true);
68 ashish 8603
              } else { 
8604
                TProtocolUtil.skip(iprot, field.type);
8605
              }
8606
              break;
483 rajveer 8607
            case STATUS:
8608
              if (field.type == TType.I32) {
8609
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 8610
              } else { 
8611
                TProtocolUtil.skip(iprot, field.type);
8612
              }
8613
              break;
483 rajveer 8614
            case DESCRIPTION:
8615
              if (field.type == TType.STRING) {
8616
                this.description = iprot.readString();
8617
              } else { 
8618
                TProtocolUtil.skip(iprot, field.type);
8619
              }
8620
              break;
68 ashish 8621
          }
8622
          iprot.readFieldEnd();
8623
        }
8624
      }
8625
      iprot.readStructEnd();
8626
      validate();
8627
    }
8628
 
8629
    public void write(TProtocol oprot) throws TException {
8630
      validate();
8631
 
8632
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8633
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8634
      oprot.writeI64(this.orderId);
68 ashish 8635
      oprot.writeFieldEnd();
483 rajveer 8636
      if (this.status != null) {
8637
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8638
        oprot.writeI32(this.status.getValue());
68 ashish 8639
        oprot.writeFieldEnd();
8640
      }
483 rajveer 8641
      if (this.description != null) {
8642
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8643
        oprot.writeString(this.description);
8644
        oprot.writeFieldEnd();
8645
      }
68 ashish 8646
      oprot.writeFieldStop();
8647
      oprot.writeStructEnd();
8648
    }
8649
 
8650
    @Override
8651
    public String toString() {
483 rajveer 8652
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 8653
      boolean first = true;
8654
 
483 rajveer 8655
      sb.append("orderId:");
8656
      sb.append(this.orderId);
68 ashish 8657
      first = false;
8658
      if (!first) sb.append(", ");
483 rajveer 8659
      sb.append("status:");
8660
      if (this.status == null) {
68 ashish 8661
        sb.append("null");
8662
      } else {
483 rajveer 8663
        String status_name = status.name();
8664
        if (status_name != null) {
8665
          sb.append(status_name);
8666
          sb.append(" (");
8667
        }
8668
        sb.append(this.status);
8669
        if (status_name != null) {
8670
          sb.append(")");
8671
        }
68 ashish 8672
      }
8673
      first = false;
483 rajveer 8674
      if (!first) sb.append(", ");
8675
      sb.append("description:");
8676
      if (this.description == null) {
8677
        sb.append("null");
8678
      } else {
8679
        sb.append(this.description);
8680
      }
8681
      first = false;
68 ashish 8682
      sb.append(")");
8683
      return sb.toString();
8684
    }
8685
 
8686
    public void validate() throws TException {
8687
      // check for required fields
8688
    }
8689
 
8690
  }
8691
 
483 rajveer 8692
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
8693
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 8694
 
8695
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8696
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8697
 
8698
    private boolean success;
8699
    private TransactionServiceException ex;
8700
 
8701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8702
    public enum _Fields implements TFieldIdEnum {
8703
      SUCCESS((short)0, "success"),
8704
      EX((short)1, "ex");
8705
 
8706
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8707
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8708
 
8709
      static {
8710
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8711
          byId.put((int)field._thriftId, field);
8712
          byName.put(field.getFieldName(), field);
8713
        }
8714
      }
8715
 
8716
      /**
8717
       * Find the _Fields constant that matches fieldId, or null if its not found.
8718
       */
8719
      public static _Fields findByThriftId(int fieldId) {
8720
        return byId.get(fieldId);
8721
      }
8722
 
8723
      /**
8724
       * Find the _Fields constant that matches fieldId, throwing an exception
8725
       * if it is not found.
8726
       */
8727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8728
        _Fields fields = findByThriftId(fieldId);
8729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8730
        return fields;
8731
      }
8732
 
8733
      /**
8734
       * Find the _Fields constant that matches name, or null if its not found.
8735
       */
8736
      public static _Fields findByName(String name) {
8737
        return byName.get(name);
8738
      }
8739
 
8740
      private final short _thriftId;
8741
      private final String _fieldName;
8742
 
8743
      _Fields(short thriftId, String fieldName) {
8744
        _thriftId = thriftId;
8745
        _fieldName = fieldName;
8746
      }
8747
 
8748
      public short getThriftFieldId() {
8749
        return _thriftId;
8750
      }
8751
 
8752
      public String getFieldName() {
8753
        return _fieldName;
8754
      }
8755
    }
8756
 
8757
    // isset id assignments
8758
    private static final int __SUCCESS_ISSET_ID = 0;
8759
    private BitSet __isset_bit_vector = new BitSet(1);
8760
 
8761
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8762
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8763
          new FieldValueMetaData(TType.BOOL)));
8764
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8765
          new FieldValueMetaData(TType.STRUCT)));
8766
    }});
8767
 
8768
    static {
483 rajveer 8769
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 8770
    }
8771
 
483 rajveer 8772
    public changeOrderStatus_result() {
68 ashish 8773
    }
8774
 
483 rajveer 8775
    public changeOrderStatus_result(
68 ashish 8776
      boolean success,
8777
      TransactionServiceException ex)
8778
    {
8779
      this();
8780
      this.success = success;
8781
      setSuccessIsSet(true);
8782
      this.ex = ex;
8783
    }
8784
 
8785
    /**
8786
     * Performs a deep copy on <i>other</i>.
8787
     */
483 rajveer 8788
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 8789
      __isset_bit_vector.clear();
8790
      __isset_bit_vector.or(other.__isset_bit_vector);
8791
      this.success = other.success;
8792
      if (other.isSetEx()) {
8793
        this.ex = new TransactionServiceException(other.ex);
8794
      }
8795
    }
8796
 
483 rajveer 8797
    public changeOrderStatus_result deepCopy() {
8798
      return new changeOrderStatus_result(this);
68 ashish 8799
    }
8800
 
8801
    @Deprecated
483 rajveer 8802
    public changeOrderStatus_result clone() {
8803
      return new changeOrderStatus_result(this);
68 ashish 8804
    }
8805
 
8806
    public boolean isSuccess() {
8807
      return this.success;
8808
    }
8809
 
483 rajveer 8810
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 8811
      this.success = success;
8812
      setSuccessIsSet(true);
8813
      return this;
8814
    }
8815
 
8816
    public void unsetSuccess() {
8817
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8818
    }
8819
 
8820
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8821
    public boolean isSetSuccess() {
8822
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8823
    }
8824
 
8825
    public void setSuccessIsSet(boolean value) {
8826
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8827
    }
8828
 
8829
    public TransactionServiceException getEx() {
8830
      return this.ex;
8831
    }
8832
 
483 rajveer 8833
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 8834
      this.ex = ex;
8835
      return this;
8836
    }
8837
 
8838
    public void unsetEx() {
8839
      this.ex = null;
8840
    }
8841
 
8842
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8843
    public boolean isSetEx() {
8844
      return this.ex != null;
8845
    }
8846
 
8847
    public void setExIsSet(boolean value) {
8848
      if (!value) {
8849
        this.ex = null;
8850
      }
8851
    }
8852
 
8853
    public void setFieldValue(_Fields field, Object value) {
8854
      switch (field) {
8855
      case SUCCESS:
8856
        if (value == null) {
8857
          unsetSuccess();
8858
        } else {
8859
          setSuccess((Boolean)value);
8860
        }
8861
        break;
8862
 
8863
      case EX:
8864
        if (value == null) {
8865
          unsetEx();
8866
        } else {
8867
          setEx((TransactionServiceException)value);
8868
        }
8869
        break;
8870
 
8871
      }
8872
    }
8873
 
8874
    public void setFieldValue(int fieldID, Object value) {
8875
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8876
    }
8877
 
8878
    public Object getFieldValue(_Fields field) {
8879
      switch (field) {
8880
      case SUCCESS:
8881
        return new Boolean(isSuccess());
8882
 
8883
      case EX:
8884
        return getEx();
8885
 
8886
      }
8887
      throw new IllegalStateException();
8888
    }
8889
 
8890
    public Object getFieldValue(int fieldId) {
8891
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8892
    }
8893
 
8894
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8895
    public boolean isSet(_Fields field) {
8896
      switch (field) {
8897
      case SUCCESS:
8898
        return isSetSuccess();
8899
      case EX:
8900
        return isSetEx();
8901
      }
8902
      throw new IllegalStateException();
8903
    }
8904
 
8905
    public boolean isSet(int fieldID) {
8906
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8907
    }
8908
 
8909
    @Override
8910
    public boolean equals(Object that) {
8911
      if (that == null)
8912
        return false;
483 rajveer 8913
      if (that instanceof changeOrderStatus_result)
8914
        return this.equals((changeOrderStatus_result)that);
68 ashish 8915
      return false;
8916
    }
8917
 
483 rajveer 8918
    public boolean equals(changeOrderStatus_result that) {
68 ashish 8919
      if (that == null)
8920
        return false;
8921
 
8922
      boolean this_present_success = true;
8923
      boolean that_present_success = true;
8924
      if (this_present_success || that_present_success) {
8925
        if (!(this_present_success && that_present_success))
8926
          return false;
8927
        if (this.success != that.success)
8928
          return false;
8929
      }
8930
 
8931
      boolean this_present_ex = true && this.isSetEx();
8932
      boolean that_present_ex = true && that.isSetEx();
8933
      if (this_present_ex || that_present_ex) {
8934
        if (!(this_present_ex && that_present_ex))
8935
          return false;
8936
        if (!this.ex.equals(that.ex))
8937
          return false;
8938
      }
8939
 
8940
      return true;
8941
    }
8942
 
8943
    @Override
8944
    public int hashCode() {
8945
      return 0;
8946
    }
8947
 
483 rajveer 8948
    public int compareTo(changeOrderStatus_result other) {
68 ashish 8949
      if (!getClass().equals(other.getClass())) {
8950
        return getClass().getName().compareTo(other.getClass().getName());
8951
      }
8952
 
8953
      int lastComparison = 0;
483 rajveer 8954
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 8955
 
8956
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8957
      if (lastComparison != 0) {
8958
        return lastComparison;
8959
      }
8960
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8961
      if (lastComparison != 0) {
8962
        return lastComparison;
8963
      }
8964
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8965
      if (lastComparison != 0) {
8966
        return lastComparison;
8967
      }
8968
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8969
      if (lastComparison != 0) {
8970
        return lastComparison;
8971
      }
8972
      return 0;
8973
    }
8974
 
8975
    public void read(TProtocol iprot) throws TException {
8976
      TField field;
8977
      iprot.readStructBegin();
8978
      while (true)
8979
      {
8980
        field = iprot.readFieldBegin();
8981
        if (field.type == TType.STOP) { 
8982
          break;
8983
        }
8984
        _Fields fieldId = _Fields.findByThriftId(field.id);
8985
        if (fieldId == null) {
8986
          TProtocolUtil.skip(iprot, field.type);
8987
        } else {
8988
          switch (fieldId) {
8989
            case SUCCESS:
8990
              if (field.type == TType.BOOL) {
8991
                this.success = iprot.readBool();
8992
                setSuccessIsSet(true);
8993
              } else { 
8994
                TProtocolUtil.skip(iprot, field.type);
8995
              }
8996
              break;
8997
            case EX:
8998
              if (field.type == TType.STRUCT) {
8999
                this.ex = new TransactionServiceException();
9000
                this.ex.read(iprot);
9001
              } else { 
9002
                TProtocolUtil.skip(iprot, field.type);
9003
              }
9004
              break;
9005
          }
9006
          iprot.readFieldEnd();
9007
        }
9008
      }
9009
      iprot.readStructEnd();
9010
      validate();
9011
    }
9012
 
9013
    public void write(TProtocol oprot) throws TException {
9014
      oprot.writeStructBegin(STRUCT_DESC);
9015
 
9016
      if (this.isSetSuccess()) {
9017
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9018
        oprot.writeBool(this.success);
9019
        oprot.writeFieldEnd();
9020
      } else if (this.isSetEx()) {
9021
        oprot.writeFieldBegin(EX_FIELD_DESC);
9022
        this.ex.write(oprot);
9023
        oprot.writeFieldEnd();
9024
      }
9025
      oprot.writeFieldStop();
9026
      oprot.writeStructEnd();
9027
    }
9028
 
9029
    @Override
9030
    public String toString() {
483 rajveer 9031
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 9032
      boolean first = true;
9033
 
9034
      sb.append("success:");
9035
      sb.append(this.success);
9036
      first = false;
9037
      if (!first) sb.append(", ");
9038
      sb.append("ex:");
9039
      if (this.ex == null) {
9040
        sb.append("null");
9041
      } else {
9042
        sb.append(this.ex);
9043
      }
9044
      first = false;
9045
      sb.append(")");
9046
      return sb.toString();
9047
    }
9048
 
9049
    public void validate() throws TException {
9050
      // check for required fields
9051
    }
9052
 
9053
  }
9054
 
495 rajveer 9055
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
9056
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
9057
 
9058
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9059
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
640 chandransh 9060
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)3);
9061
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)4);
495 rajveer 9062
 
9063
    private long orderId;
9064
    private String invoice_number;
640 chandransh 9065
    private long jacket_number;
495 rajveer 9066
    private String billed_by;
9067
 
9068
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9069
    public enum _Fields implements TFieldIdEnum {
9070
      ORDER_ID((short)1, "orderId"),
9071
      INVOICE_NUMBER((short)2, "invoice_number"),
640 chandransh 9072
      JACKET_NUMBER((short)3, "jacket_number"),
9073
      BILLED_BY((short)4, "billed_by");
495 rajveer 9074
 
9075
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9076
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9077
 
9078
      static {
9079
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9080
          byId.put((int)field._thriftId, field);
9081
          byName.put(field.getFieldName(), field);
9082
        }
9083
      }
9084
 
9085
      /**
9086
       * Find the _Fields constant that matches fieldId, or null if its not found.
9087
       */
9088
      public static _Fields findByThriftId(int fieldId) {
9089
        return byId.get(fieldId);
9090
      }
9091
 
9092
      /**
9093
       * Find the _Fields constant that matches fieldId, throwing an exception
9094
       * if it is not found.
9095
       */
9096
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9097
        _Fields fields = findByThriftId(fieldId);
9098
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9099
        return fields;
9100
      }
9101
 
9102
      /**
9103
       * Find the _Fields constant that matches name, or null if its not found.
9104
       */
9105
      public static _Fields findByName(String name) {
9106
        return byName.get(name);
9107
      }
9108
 
9109
      private final short _thriftId;
9110
      private final String _fieldName;
9111
 
9112
      _Fields(short thriftId, String fieldName) {
9113
        _thriftId = thriftId;
9114
        _fieldName = fieldName;
9115
      }
9116
 
9117
      public short getThriftFieldId() {
9118
        return _thriftId;
9119
      }
9120
 
9121
      public String getFieldName() {
9122
        return _fieldName;
9123
      }
9124
    }
9125
 
9126
    // isset id assignments
9127
    private static final int __ORDERID_ISSET_ID = 0;
640 chandransh 9128
    private static final int __JACKET_NUMBER_ISSET_ID = 1;
9129
    private BitSet __isset_bit_vector = new BitSet(2);
495 rajveer 9130
 
9131
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9132
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9133
          new FieldValueMetaData(TType.I64)));
9134
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9135
          new FieldValueMetaData(TType.STRING)));
640 chandransh 9136
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
9137
          new FieldValueMetaData(TType.I64)));
495 rajveer 9138
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9139
          new FieldValueMetaData(TType.STRING)));
9140
    }});
9141
 
9142
    static {
9143
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9144
    }
9145
 
9146
    public addBillingDetails_args() {
9147
    }
9148
 
9149
    public addBillingDetails_args(
9150
      long orderId,
9151
      String invoice_number,
640 chandransh 9152
      long jacket_number,
495 rajveer 9153
      String billed_by)
9154
    {
9155
      this();
9156
      this.orderId = orderId;
9157
      setOrderIdIsSet(true);
9158
      this.invoice_number = invoice_number;
640 chandransh 9159
      this.jacket_number = jacket_number;
9160
      setJacket_numberIsSet(true);
495 rajveer 9161
      this.billed_by = billed_by;
9162
    }
9163
 
9164
    /**
9165
     * Performs a deep copy on <i>other</i>.
9166
     */
9167
    public addBillingDetails_args(addBillingDetails_args other) {
9168
      __isset_bit_vector.clear();
9169
      __isset_bit_vector.or(other.__isset_bit_vector);
9170
      this.orderId = other.orderId;
9171
      if (other.isSetInvoice_number()) {
9172
        this.invoice_number = other.invoice_number;
9173
      }
640 chandransh 9174
      this.jacket_number = other.jacket_number;
495 rajveer 9175
      if (other.isSetBilled_by()) {
9176
        this.billed_by = other.billed_by;
9177
      }
9178
    }
9179
 
9180
    public addBillingDetails_args deepCopy() {
9181
      return new addBillingDetails_args(this);
9182
    }
9183
 
9184
    @Deprecated
9185
    public addBillingDetails_args clone() {
9186
      return new addBillingDetails_args(this);
9187
    }
9188
 
9189
    public long getOrderId() {
9190
      return this.orderId;
9191
    }
9192
 
9193
    public addBillingDetails_args setOrderId(long orderId) {
9194
      this.orderId = orderId;
9195
      setOrderIdIsSet(true);
9196
      return this;
9197
    }
9198
 
9199
    public void unsetOrderId() {
9200
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9201
    }
9202
 
9203
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9204
    public boolean isSetOrderId() {
9205
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9206
    }
9207
 
9208
    public void setOrderIdIsSet(boolean value) {
9209
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9210
    }
9211
 
9212
    public String getInvoice_number() {
9213
      return this.invoice_number;
9214
    }
9215
 
9216
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9217
      this.invoice_number = invoice_number;
9218
      return this;
9219
    }
9220
 
9221
    public void unsetInvoice_number() {
9222
      this.invoice_number = null;
9223
    }
9224
 
9225
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9226
    public boolean isSetInvoice_number() {
9227
      return this.invoice_number != null;
9228
    }
9229
 
9230
    public void setInvoice_numberIsSet(boolean value) {
9231
      if (!value) {
9232
        this.invoice_number = null;
9233
      }
9234
    }
9235
 
640 chandransh 9236
    public long getJacket_number() {
9237
      return this.jacket_number;
9238
    }
9239
 
9240
    public addBillingDetails_args setJacket_number(long jacket_number) {
9241
      this.jacket_number = jacket_number;
9242
      setJacket_numberIsSet(true);
9243
      return this;
9244
    }
9245
 
9246
    public void unsetJacket_number() {
9247
      __isset_bit_vector.clear(__JACKET_NUMBER_ISSET_ID);
9248
    }
9249
 
9250
    /** Returns true if field jacket_number is set (has been asigned a value) and false otherwise */
9251
    public boolean isSetJacket_number() {
9252
      return __isset_bit_vector.get(__JACKET_NUMBER_ISSET_ID);
9253
    }
9254
 
9255
    public void setJacket_numberIsSet(boolean value) {
9256
      __isset_bit_vector.set(__JACKET_NUMBER_ISSET_ID, value);
9257
    }
9258
 
495 rajveer 9259
    public String getBilled_by() {
9260
      return this.billed_by;
9261
    }
9262
 
9263
    public addBillingDetails_args setBilled_by(String billed_by) {
9264
      this.billed_by = billed_by;
9265
      return this;
9266
    }
9267
 
9268
    public void unsetBilled_by() {
9269
      this.billed_by = null;
9270
    }
9271
 
9272
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9273
    public boolean isSetBilled_by() {
9274
      return this.billed_by != null;
9275
    }
9276
 
9277
    public void setBilled_byIsSet(boolean value) {
9278
      if (!value) {
9279
        this.billed_by = null;
9280
      }
9281
    }
9282
 
9283
    public void setFieldValue(_Fields field, Object value) {
9284
      switch (field) {
9285
      case ORDER_ID:
9286
        if (value == null) {
9287
          unsetOrderId();
9288
        } else {
9289
          setOrderId((Long)value);
9290
        }
9291
        break;
9292
 
9293
      case INVOICE_NUMBER:
9294
        if (value == null) {
9295
          unsetInvoice_number();
9296
        } else {
9297
          setInvoice_number((String)value);
9298
        }
9299
        break;
9300
 
640 chandransh 9301
      case JACKET_NUMBER:
9302
        if (value == null) {
9303
          unsetJacket_number();
9304
        } else {
9305
          setJacket_number((Long)value);
9306
        }
9307
        break;
9308
 
495 rajveer 9309
      case BILLED_BY:
9310
        if (value == null) {
9311
          unsetBilled_by();
9312
        } else {
9313
          setBilled_by((String)value);
9314
        }
9315
        break;
9316
 
9317
      }
9318
    }
9319
 
9320
    public void setFieldValue(int fieldID, Object value) {
9321
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9322
    }
9323
 
9324
    public Object getFieldValue(_Fields field) {
9325
      switch (field) {
9326
      case ORDER_ID:
9327
        return new Long(getOrderId());
9328
 
9329
      case INVOICE_NUMBER:
9330
        return getInvoice_number();
9331
 
640 chandransh 9332
      case JACKET_NUMBER:
9333
        return new Long(getJacket_number());
9334
 
495 rajveer 9335
      case BILLED_BY:
9336
        return getBilled_by();
9337
 
9338
      }
9339
      throw new IllegalStateException();
9340
    }
9341
 
9342
    public Object getFieldValue(int fieldId) {
9343
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9344
    }
9345
 
9346
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9347
    public boolean isSet(_Fields field) {
9348
      switch (field) {
9349
      case ORDER_ID:
9350
        return isSetOrderId();
9351
      case INVOICE_NUMBER:
9352
        return isSetInvoice_number();
640 chandransh 9353
      case JACKET_NUMBER:
9354
        return isSetJacket_number();
495 rajveer 9355
      case BILLED_BY:
9356
        return isSetBilled_by();
9357
      }
9358
      throw new IllegalStateException();
9359
    }
9360
 
9361
    public boolean isSet(int fieldID) {
9362
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9363
    }
9364
 
9365
    @Override
9366
    public boolean equals(Object that) {
9367
      if (that == null)
9368
        return false;
9369
      if (that instanceof addBillingDetails_args)
9370
        return this.equals((addBillingDetails_args)that);
9371
      return false;
9372
    }
9373
 
9374
    public boolean equals(addBillingDetails_args that) {
9375
      if (that == null)
9376
        return false;
9377
 
9378
      boolean this_present_orderId = true;
9379
      boolean that_present_orderId = true;
9380
      if (this_present_orderId || that_present_orderId) {
9381
        if (!(this_present_orderId && that_present_orderId))
9382
          return false;
9383
        if (this.orderId != that.orderId)
9384
          return false;
9385
      }
9386
 
9387
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9388
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9389
      if (this_present_invoice_number || that_present_invoice_number) {
9390
        if (!(this_present_invoice_number && that_present_invoice_number))
9391
          return false;
9392
        if (!this.invoice_number.equals(that.invoice_number))
9393
          return false;
9394
      }
9395
 
640 chandransh 9396
      boolean this_present_jacket_number = true;
9397
      boolean that_present_jacket_number = true;
9398
      if (this_present_jacket_number || that_present_jacket_number) {
9399
        if (!(this_present_jacket_number && that_present_jacket_number))
9400
          return false;
9401
        if (this.jacket_number != that.jacket_number)
9402
          return false;
9403
      }
9404
 
495 rajveer 9405
      boolean this_present_billed_by = true && this.isSetBilled_by();
9406
      boolean that_present_billed_by = true && that.isSetBilled_by();
9407
      if (this_present_billed_by || that_present_billed_by) {
9408
        if (!(this_present_billed_by && that_present_billed_by))
9409
          return false;
9410
        if (!this.billed_by.equals(that.billed_by))
9411
          return false;
9412
      }
9413
 
9414
      return true;
9415
    }
9416
 
9417
    @Override
9418
    public int hashCode() {
9419
      return 0;
9420
    }
9421
 
9422
    public int compareTo(addBillingDetails_args other) {
9423
      if (!getClass().equals(other.getClass())) {
9424
        return getClass().getName().compareTo(other.getClass().getName());
9425
      }
9426
 
9427
      int lastComparison = 0;
9428
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9429
 
9430
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9431
      if (lastComparison != 0) {
9432
        return lastComparison;
9433
      }
9434
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9435
      if (lastComparison != 0) {
9436
        return lastComparison;
9437
      }
9438
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9439
      if (lastComparison != 0) {
9440
        return lastComparison;
9441
      }
9442
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9443
      if (lastComparison != 0) {
9444
        return lastComparison;
9445
      }
640 chandransh 9446
      lastComparison = Boolean.valueOf(isSetJacket_number()).compareTo(isSetJacket_number());
9447
      if (lastComparison != 0) {
9448
        return lastComparison;
9449
      }
9450
      lastComparison = TBaseHelper.compareTo(jacket_number, typedOther.jacket_number);
9451
      if (lastComparison != 0) {
9452
        return lastComparison;
9453
      }
495 rajveer 9454
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9455
      if (lastComparison != 0) {
9456
        return lastComparison;
9457
      }
9458
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9459
      if (lastComparison != 0) {
9460
        return lastComparison;
9461
      }
9462
      return 0;
9463
    }
9464
 
9465
    public void read(TProtocol iprot) throws TException {
9466
      TField field;
9467
      iprot.readStructBegin();
9468
      while (true)
9469
      {
9470
        field = iprot.readFieldBegin();
9471
        if (field.type == TType.STOP) { 
9472
          break;
9473
        }
9474
        _Fields fieldId = _Fields.findByThriftId(field.id);
9475
        if (fieldId == null) {
9476
          TProtocolUtil.skip(iprot, field.type);
9477
        } else {
9478
          switch (fieldId) {
9479
            case ORDER_ID:
9480
              if (field.type == TType.I64) {
9481
                this.orderId = iprot.readI64();
9482
                setOrderIdIsSet(true);
9483
              } else { 
9484
                TProtocolUtil.skip(iprot, field.type);
9485
              }
9486
              break;
9487
            case INVOICE_NUMBER:
9488
              if (field.type == TType.STRING) {
9489
                this.invoice_number = iprot.readString();
9490
              } else { 
9491
                TProtocolUtil.skip(iprot, field.type);
9492
              }
9493
              break;
640 chandransh 9494
            case JACKET_NUMBER:
9495
              if (field.type == TType.I64) {
9496
                this.jacket_number = iprot.readI64();
9497
                setJacket_numberIsSet(true);
9498
              } else { 
9499
                TProtocolUtil.skip(iprot, field.type);
9500
              }
9501
              break;
495 rajveer 9502
            case BILLED_BY:
9503
              if (field.type == TType.STRING) {
9504
                this.billed_by = iprot.readString();
9505
              } else { 
9506
                TProtocolUtil.skip(iprot, field.type);
9507
              }
9508
              break;
9509
          }
9510
          iprot.readFieldEnd();
9511
        }
9512
      }
9513
      iprot.readStructEnd();
9514
      validate();
9515
    }
9516
 
9517
    public void write(TProtocol oprot) throws TException {
9518
      validate();
9519
 
9520
      oprot.writeStructBegin(STRUCT_DESC);
9521
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9522
      oprot.writeI64(this.orderId);
9523
      oprot.writeFieldEnd();
9524
      if (this.invoice_number != null) {
9525
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9526
        oprot.writeString(this.invoice_number);
9527
        oprot.writeFieldEnd();
9528
      }
640 chandransh 9529
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
9530
      oprot.writeI64(this.jacket_number);
9531
      oprot.writeFieldEnd();
495 rajveer 9532
      if (this.billed_by != null) {
9533
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9534
        oprot.writeString(this.billed_by);
9535
        oprot.writeFieldEnd();
9536
      }
9537
      oprot.writeFieldStop();
9538
      oprot.writeStructEnd();
9539
    }
9540
 
9541
    @Override
9542
    public String toString() {
9543
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9544
      boolean first = true;
9545
 
9546
      sb.append("orderId:");
9547
      sb.append(this.orderId);
9548
      first = false;
9549
      if (!first) sb.append(", ");
9550
      sb.append("invoice_number:");
9551
      if (this.invoice_number == null) {
9552
        sb.append("null");
9553
      } else {
9554
        sb.append(this.invoice_number);
9555
      }
9556
      first = false;
9557
      if (!first) sb.append(", ");
640 chandransh 9558
      sb.append("jacket_number:");
9559
      sb.append(this.jacket_number);
9560
      first = false;
9561
      if (!first) sb.append(", ");
495 rajveer 9562
      sb.append("billed_by:");
9563
      if (this.billed_by == null) {
9564
        sb.append("null");
9565
      } else {
9566
        sb.append(this.billed_by);
9567
      }
9568
      first = false;
9569
      sb.append(")");
9570
      return sb.toString();
9571
    }
9572
 
9573
    public void validate() throws TException {
9574
      // check for required fields
9575
    }
9576
 
9577
  }
9578
 
9579
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9580
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9581
 
9582
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9583
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9584
 
9585
    private boolean success;
9586
    private TransactionServiceException ex;
9587
 
9588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9589
    public enum _Fields implements TFieldIdEnum {
9590
      SUCCESS((short)0, "success"),
9591
      EX((short)1, "ex");
9592
 
9593
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9595
 
9596
      static {
9597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9598
          byId.put((int)field._thriftId, field);
9599
          byName.put(field.getFieldName(), field);
9600
        }
9601
      }
9602
 
9603
      /**
9604
       * Find the _Fields constant that matches fieldId, or null if its not found.
9605
       */
9606
      public static _Fields findByThriftId(int fieldId) {
9607
        return byId.get(fieldId);
9608
      }
9609
 
9610
      /**
9611
       * Find the _Fields constant that matches fieldId, throwing an exception
9612
       * if it is not found.
9613
       */
9614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9615
        _Fields fields = findByThriftId(fieldId);
9616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9617
        return fields;
9618
      }
9619
 
9620
      /**
9621
       * Find the _Fields constant that matches name, or null if its not found.
9622
       */
9623
      public static _Fields findByName(String name) {
9624
        return byName.get(name);
9625
      }
9626
 
9627
      private final short _thriftId;
9628
      private final String _fieldName;
9629
 
9630
      _Fields(short thriftId, String fieldName) {
9631
        _thriftId = thriftId;
9632
        _fieldName = fieldName;
9633
      }
9634
 
9635
      public short getThriftFieldId() {
9636
        return _thriftId;
9637
      }
9638
 
9639
      public String getFieldName() {
9640
        return _fieldName;
9641
      }
9642
    }
9643
 
9644
    // isset id assignments
9645
    private static final int __SUCCESS_ISSET_ID = 0;
9646
    private BitSet __isset_bit_vector = new BitSet(1);
9647
 
9648
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9649
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9650
          new FieldValueMetaData(TType.BOOL)));
9651
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9652
          new FieldValueMetaData(TType.STRUCT)));
9653
    }});
9654
 
9655
    static {
9656
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
9657
    }
9658
 
9659
    public addBillingDetails_result() {
9660
    }
9661
 
9662
    public addBillingDetails_result(
9663
      boolean success,
9664
      TransactionServiceException ex)
9665
    {
9666
      this();
9667
      this.success = success;
9668
      setSuccessIsSet(true);
9669
      this.ex = ex;
9670
    }
9671
 
9672
    /**
9673
     * Performs a deep copy on <i>other</i>.
9674
     */
9675
    public addBillingDetails_result(addBillingDetails_result other) {
9676
      __isset_bit_vector.clear();
9677
      __isset_bit_vector.or(other.__isset_bit_vector);
9678
      this.success = other.success;
9679
      if (other.isSetEx()) {
9680
        this.ex = new TransactionServiceException(other.ex);
9681
      }
9682
    }
9683
 
9684
    public addBillingDetails_result deepCopy() {
9685
      return new addBillingDetails_result(this);
9686
    }
9687
 
9688
    @Deprecated
9689
    public addBillingDetails_result clone() {
9690
      return new addBillingDetails_result(this);
9691
    }
9692
 
9693
    public boolean isSuccess() {
9694
      return this.success;
9695
    }
9696
 
9697
    public addBillingDetails_result setSuccess(boolean success) {
9698
      this.success = success;
9699
      setSuccessIsSet(true);
9700
      return this;
9701
    }
9702
 
9703
    public void unsetSuccess() {
9704
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9705
    }
9706
 
9707
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9708
    public boolean isSetSuccess() {
9709
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9710
    }
9711
 
9712
    public void setSuccessIsSet(boolean value) {
9713
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9714
    }
9715
 
9716
    public TransactionServiceException getEx() {
9717
      return this.ex;
9718
    }
9719
 
9720
    public addBillingDetails_result setEx(TransactionServiceException ex) {
9721
      this.ex = ex;
9722
      return this;
9723
    }
9724
 
9725
    public void unsetEx() {
9726
      this.ex = null;
9727
    }
9728
 
9729
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9730
    public boolean isSetEx() {
9731
      return this.ex != null;
9732
    }
9733
 
9734
    public void setExIsSet(boolean value) {
9735
      if (!value) {
9736
        this.ex = null;
9737
      }
9738
    }
9739
 
9740
    public void setFieldValue(_Fields field, Object value) {
9741
      switch (field) {
9742
      case SUCCESS:
9743
        if (value == null) {
9744
          unsetSuccess();
9745
        } else {
9746
          setSuccess((Boolean)value);
9747
        }
9748
        break;
9749
 
9750
      case EX:
9751
        if (value == null) {
9752
          unsetEx();
9753
        } else {
9754
          setEx((TransactionServiceException)value);
9755
        }
9756
        break;
9757
 
9758
      }
9759
    }
9760
 
9761
    public void setFieldValue(int fieldID, Object value) {
9762
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9763
    }
9764
 
9765
    public Object getFieldValue(_Fields field) {
9766
      switch (field) {
9767
      case SUCCESS:
9768
        return new Boolean(isSuccess());
9769
 
9770
      case EX:
9771
        return getEx();
9772
 
9773
      }
9774
      throw new IllegalStateException();
9775
    }
9776
 
9777
    public Object getFieldValue(int fieldId) {
9778
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9779
    }
9780
 
9781
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9782
    public boolean isSet(_Fields field) {
9783
      switch (field) {
9784
      case SUCCESS:
9785
        return isSetSuccess();
9786
      case EX:
9787
        return isSetEx();
9788
      }
9789
      throw new IllegalStateException();
9790
    }
9791
 
9792
    public boolean isSet(int fieldID) {
9793
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9794
    }
9795
 
9796
    @Override
9797
    public boolean equals(Object that) {
9798
      if (that == null)
9799
        return false;
9800
      if (that instanceof addBillingDetails_result)
9801
        return this.equals((addBillingDetails_result)that);
9802
      return false;
9803
    }
9804
 
9805
    public boolean equals(addBillingDetails_result that) {
9806
      if (that == null)
9807
        return false;
9808
 
9809
      boolean this_present_success = true;
9810
      boolean that_present_success = true;
9811
      if (this_present_success || that_present_success) {
9812
        if (!(this_present_success && that_present_success))
9813
          return false;
9814
        if (this.success != that.success)
9815
          return false;
9816
      }
9817
 
9818
      boolean this_present_ex = true && this.isSetEx();
9819
      boolean that_present_ex = true && that.isSetEx();
9820
      if (this_present_ex || that_present_ex) {
9821
        if (!(this_present_ex && that_present_ex))
9822
          return false;
9823
        if (!this.ex.equals(that.ex))
9824
          return false;
9825
      }
9826
 
9827
      return true;
9828
    }
9829
 
9830
    @Override
9831
    public int hashCode() {
9832
      return 0;
9833
    }
9834
 
9835
    public int compareTo(addBillingDetails_result other) {
9836
      if (!getClass().equals(other.getClass())) {
9837
        return getClass().getName().compareTo(other.getClass().getName());
9838
      }
9839
 
9840
      int lastComparison = 0;
9841
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
9842
 
9843
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9844
      if (lastComparison != 0) {
9845
        return lastComparison;
9846
      }
9847
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9848
      if (lastComparison != 0) {
9849
        return lastComparison;
9850
      }
9851
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9852
      if (lastComparison != 0) {
9853
        return lastComparison;
9854
      }
9855
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9856
      if (lastComparison != 0) {
9857
        return lastComparison;
9858
      }
9859
      return 0;
9860
    }
9861
 
9862
    public void read(TProtocol iprot) throws TException {
9863
      TField field;
9864
      iprot.readStructBegin();
9865
      while (true)
9866
      {
9867
        field = iprot.readFieldBegin();
9868
        if (field.type == TType.STOP) { 
9869
          break;
9870
        }
9871
        _Fields fieldId = _Fields.findByThriftId(field.id);
9872
        if (fieldId == null) {
9873
          TProtocolUtil.skip(iprot, field.type);
9874
        } else {
9875
          switch (fieldId) {
9876
            case SUCCESS:
9877
              if (field.type == TType.BOOL) {
9878
                this.success = iprot.readBool();
9879
                setSuccessIsSet(true);
9880
              } else { 
9881
                TProtocolUtil.skip(iprot, field.type);
9882
              }
9883
              break;
9884
            case EX:
9885
              if (field.type == TType.STRUCT) {
9886
                this.ex = new TransactionServiceException();
9887
                this.ex.read(iprot);
9888
              } else { 
9889
                TProtocolUtil.skip(iprot, field.type);
9890
              }
9891
              break;
9892
          }
9893
          iprot.readFieldEnd();
9894
        }
9895
      }
9896
      iprot.readStructEnd();
9897
      validate();
9898
    }
9899
 
9900
    public void write(TProtocol oprot) throws TException {
9901
      oprot.writeStructBegin(STRUCT_DESC);
9902
 
9903
      if (this.isSetSuccess()) {
9904
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9905
        oprot.writeBool(this.success);
9906
        oprot.writeFieldEnd();
9907
      } else if (this.isSetEx()) {
9908
        oprot.writeFieldBegin(EX_FIELD_DESC);
9909
        this.ex.write(oprot);
9910
        oprot.writeFieldEnd();
9911
      }
9912
      oprot.writeFieldStop();
9913
      oprot.writeStructEnd();
9914
    }
9915
 
9916
    @Override
9917
    public String toString() {
9918
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
9919
      boolean first = true;
9920
 
9921
      sb.append("success:");
9922
      sb.append(this.success);
9923
      first = false;
9924
      if (!first) sb.append(", ");
9925
      sb.append("ex:");
9926
      if (this.ex == null) {
9927
        sb.append("null");
9928
      } else {
9929
        sb.append(this.ex);
9930
      }
9931
      first = false;
9932
      sb.append(")");
9933
      return sb.toString();
9934
    }
9935
 
9936
    public void validate() throws TException {
9937
      // check for required fields
9938
    }
9939
 
9940
  }
9941
 
923 rajveer 9942
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
9943
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
9944
 
9945
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9946
 
9947
    private long orderId;
9948
 
9949
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9950
    public enum _Fields implements TFieldIdEnum {
9951
      ORDER_ID((short)1, "orderId");
9952
 
9953
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9954
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9955
 
9956
      static {
9957
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9958
          byId.put((int)field._thriftId, field);
9959
          byName.put(field.getFieldName(), field);
9960
        }
9961
      }
9962
 
9963
      /**
9964
       * Find the _Fields constant that matches fieldId, or null if its not found.
9965
       */
9966
      public static _Fields findByThriftId(int fieldId) {
9967
        return byId.get(fieldId);
9968
      }
9969
 
9970
      /**
9971
       * Find the _Fields constant that matches fieldId, throwing an exception
9972
       * if it is not found.
9973
       */
9974
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9975
        _Fields fields = findByThriftId(fieldId);
9976
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9977
        return fields;
9978
      }
9979
 
9980
      /**
9981
       * Find the _Fields constant that matches name, or null if its not found.
9982
       */
9983
      public static _Fields findByName(String name) {
9984
        return byName.get(name);
9985
      }
9986
 
9987
      private final short _thriftId;
9988
      private final String _fieldName;
9989
 
9990
      _Fields(short thriftId, String fieldName) {
9991
        _thriftId = thriftId;
9992
        _fieldName = fieldName;
9993
      }
9994
 
9995
      public short getThriftFieldId() {
9996
        return _thriftId;
9997
      }
9998
 
9999
      public String getFieldName() {
10000
        return _fieldName;
10001
      }
10002
    }
10003
 
10004
    // isset id assignments
10005
    private static final int __ORDERID_ISSET_ID = 0;
10006
    private BitSet __isset_bit_vector = new BitSet(1);
10007
 
10008
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10009
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10010
          new FieldValueMetaData(TType.I64)));
10011
    }});
10012
 
10013
    static {
10014
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
10015
    }
10016
 
10017
    public acceptOrder_args() {
10018
    }
10019
 
10020
    public acceptOrder_args(
10021
      long orderId)
10022
    {
10023
      this();
10024
      this.orderId = orderId;
10025
      setOrderIdIsSet(true);
10026
    }
10027
 
10028
    /**
10029
     * Performs a deep copy on <i>other</i>.
10030
     */
10031
    public acceptOrder_args(acceptOrder_args other) {
10032
      __isset_bit_vector.clear();
10033
      __isset_bit_vector.or(other.__isset_bit_vector);
10034
      this.orderId = other.orderId;
10035
    }
10036
 
10037
    public acceptOrder_args deepCopy() {
10038
      return new acceptOrder_args(this);
10039
    }
10040
 
10041
    @Deprecated
10042
    public acceptOrder_args clone() {
10043
      return new acceptOrder_args(this);
10044
    }
10045
 
10046
    public long getOrderId() {
10047
      return this.orderId;
10048
    }
10049
 
10050
    public acceptOrder_args setOrderId(long orderId) {
10051
      this.orderId = orderId;
10052
      setOrderIdIsSet(true);
10053
      return this;
10054
    }
10055
 
10056
    public void unsetOrderId() {
10057
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10058
    }
10059
 
10060
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10061
    public boolean isSetOrderId() {
10062
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10063
    }
10064
 
10065
    public void setOrderIdIsSet(boolean value) {
10066
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10067
    }
10068
 
10069
    public void setFieldValue(_Fields field, Object value) {
10070
      switch (field) {
10071
      case ORDER_ID:
10072
        if (value == null) {
10073
          unsetOrderId();
10074
        } else {
10075
          setOrderId((Long)value);
10076
        }
10077
        break;
10078
 
10079
      }
10080
    }
10081
 
10082
    public void setFieldValue(int fieldID, Object value) {
10083
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10084
    }
10085
 
10086
    public Object getFieldValue(_Fields field) {
10087
      switch (field) {
10088
      case ORDER_ID:
10089
        return new Long(getOrderId());
10090
 
10091
      }
10092
      throw new IllegalStateException();
10093
    }
10094
 
10095
    public Object getFieldValue(int fieldId) {
10096
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10097
    }
10098
 
10099
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10100
    public boolean isSet(_Fields field) {
10101
      switch (field) {
10102
      case ORDER_ID:
10103
        return isSetOrderId();
10104
      }
10105
      throw new IllegalStateException();
10106
    }
10107
 
10108
    public boolean isSet(int fieldID) {
10109
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10110
    }
10111
 
10112
    @Override
10113
    public boolean equals(Object that) {
10114
      if (that == null)
10115
        return false;
10116
      if (that instanceof acceptOrder_args)
10117
        return this.equals((acceptOrder_args)that);
10118
      return false;
10119
    }
10120
 
10121
    public boolean equals(acceptOrder_args that) {
10122
      if (that == null)
10123
        return false;
10124
 
10125
      boolean this_present_orderId = true;
10126
      boolean that_present_orderId = true;
10127
      if (this_present_orderId || that_present_orderId) {
10128
        if (!(this_present_orderId && that_present_orderId))
10129
          return false;
10130
        if (this.orderId != that.orderId)
10131
          return false;
10132
      }
10133
 
10134
      return true;
10135
    }
10136
 
10137
    @Override
10138
    public int hashCode() {
10139
      return 0;
10140
    }
10141
 
10142
    public int compareTo(acceptOrder_args other) {
10143
      if (!getClass().equals(other.getClass())) {
10144
        return getClass().getName().compareTo(other.getClass().getName());
10145
      }
10146
 
10147
      int lastComparison = 0;
10148
      acceptOrder_args typedOther = (acceptOrder_args)other;
10149
 
10150
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10151
      if (lastComparison != 0) {
10152
        return lastComparison;
10153
      }
10154
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10155
      if (lastComparison != 0) {
10156
        return lastComparison;
10157
      }
10158
      return 0;
10159
    }
10160
 
10161
    public void read(TProtocol iprot) throws TException {
10162
      TField field;
10163
      iprot.readStructBegin();
10164
      while (true)
10165
      {
10166
        field = iprot.readFieldBegin();
10167
        if (field.type == TType.STOP) { 
10168
          break;
10169
        }
10170
        _Fields fieldId = _Fields.findByThriftId(field.id);
10171
        if (fieldId == null) {
10172
          TProtocolUtil.skip(iprot, field.type);
10173
        } else {
10174
          switch (fieldId) {
10175
            case ORDER_ID:
10176
              if (field.type == TType.I64) {
10177
                this.orderId = iprot.readI64();
10178
                setOrderIdIsSet(true);
10179
              } else { 
10180
                TProtocolUtil.skip(iprot, field.type);
10181
              }
10182
              break;
10183
          }
10184
          iprot.readFieldEnd();
10185
        }
10186
      }
10187
      iprot.readStructEnd();
10188
      validate();
10189
    }
10190
 
10191
    public void write(TProtocol oprot) throws TException {
10192
      validate();
10193
 
10194
      oprot.writeStructBegin(STRUCT_DESC);
10195
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10196
      oprot.writeI64(this.orderId);
10197
      oprot.writeFieldEnd();
10198
      oprot.writeFieldStop();
10199
      oprot.writeStructEnd();
10200
    }
10201
 
10202
    @Override
10203
    public String toString() {
10204
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
10205
      boolean first = true;
10206
 
10207
      sb.append("orderId:");
10208
      sb.append(this.orderId);
10209
      first = false;
10210
      sb.append(")");
10211
      return sb.toString();
10212
    }
10213
 
10214
    public void validate() throws TException {
10215
      // check for required fields
10216
    }
10217
 
10218
  }
10219
 
10220
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
10221
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
10222
 
10223
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10224
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10225
 
10226
    private boolean success;
10227
    private TransactionServiceException ex;
10228
 
10229
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10230
    public enum _Fields implements TFieldIdEnum {
10231
      SUCCESS((short)0, "success"),
10232
      EX((short)1, "ex");
10233
 
10234
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10236
 
10237
      static {
10238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10239
          byId.put((int)field._thriftId, field);
10240
          byName.put(field.getFieldName(), field);
10241
        }
10242
      }
10243
 
10244
      /**
10245
       * Find the _Fields constant that matches fieldId, or null if its not found.
10246
       */
10247
      public static _Fields findByThriftId(int fieldId) {
10248
        return byId.get(fieldId);
10249
      }
10250
 
10251
      /**
10252
       * Find the _Fields constant that matches fieldId, throwing an exception
10253
       * if it is not found.
10254
       */
10255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10256
        _Fields fields = findByThriftId(fieldId);
10257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10258
        return fields;
10259
      }
10260
 
10261
      /**
10262
       * Find the _Fields constant that matches name, or null if its not found.
10263
       */
10264
      public static _Fields findByName(String name) {
10265
        return byName.get(name);
10266
      }
10267
 
10268
      private final short _thriftId;
10269
      private final String _fieldName;
10270
 
10271
      _Fields(short thriftId, String fieldName) {
10272
        _thriftId = thriftId;
10273
        _fieldName = fieldName;
10274
      }
10275
 
10276
      public short getThriftFieldId() {
10277
        return _thriftId;
10278
      }
10279
 
10280
      public String getFieldName() {
10281
        return _fieldName;
10282
      }
10283
    }
10284
 
10285
    // isset id assignments
10286
    private static final int __SUCCESS_ISSET_ID = 0;
10287
    private BitSet __isset_bit_vector = new BitSet(1);
10288
 
10289
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10290
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10291
          new FieldValueMetaData(TType.BOOL)));
10292
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10293
          new FieldValueMetaData(TType.STRUCT)));
10294
    }});
10295
 
10296
    static {
10297
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
10298
    }
10299
 
10300
    public acceptOrder_result() {
10301
    }
10302
 
10303
    public acceptOrder_result(
10304
      boolean success,
10305
      TransactionServiceException ex)
10306
    {
10307
      this();
10308
      this.success = success;
10309
      setSuccessIsSet(true);
10310
      this.ex = ex;
10311
    }
10312
 
10313
    /**
10314
     * Performs a deep copy on <i>other</i>.
10315
     */
10316
    public acceptOrder_result(acceptOrder_result other) {
10317
      __isset_bit_vector.clear();
10318
      __isset_bit_vector.or(other.__isset_bit_vector);
10319
      this.success = other.success;
10320
      if (other.isSetEx()) {
10321
        this.ex = new TransactionServiceException(other.ex);
10322
      }
10323
    }
10324
 
10325
    public acceptOrder_result deepCopy() {
10326
      return new acceptOrder_result(this);
10327
    }
10328
 
10329
    @Deprecated
10330
    public acceptOrder_result clone() {
10331
      return new acceptOrder_result(this);
10332
    }
10333
 
10334
    public boolean isSuccess() {
10335
      return this.success;
10336
    }
10337
 
10338
    public acceptOrder_result setSuccess(boolean success) {
10339
      this.success = success;
10340
      setSuccessIsSet(true);
10341
      return this;
10342
    }
10343
 
10344
    public void unsetSuccess() {
10345
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10346
    }
10347
 
10348
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10349
    public boolean isSetSuccess() {
10350
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10351
    }
10352
 
10353
    public void setSuccessIsSet(boolean value) {
10354
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10355
    }
10356
 
10357
    public TransactionServiceException getEx() {
10358
      return this.ex;
10359
    }
10360
 
10361
    public acceptOrder_result setEx(TransactionServiceException ex) {
10362
      this.ex = ex;
10363
      return this;
10364
    }
10365
 
10366
    public void unsetEx() {
10367
      this.ex = null;
10368
    }
10369
 
10370
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10371
    public boolean isSetEx() {
10372
      return this.ex != null;
10373
    }
10374
 
10375
    public void setExIsSet(boolean value) {
10376
      if (!value) {
10377
        this.ex = null;
10378
      }
10379
    }
10380
 
10381
    public void setFieldValue(_Fields field, Object value) {
10382
      switch (field) {
10383
      case SUCCESS:
10384
        if (value == null) {
10385
          unsetSuccess();
10386
        } else {
10387
          setSuccess((Boolean)value);
10388
        }
10389
        break;
10390
 
10391
      case EX:
10392
        if (value == null) {
10393
          unsetEx();
10394
        } else {
10395
          setEx((TransactionServiceException)value);
10396
        }
10397
        break;
10398
 
10399
      }
10400
    }
10401
 
10402
    public void setFieldValue(int fieldID, Object value) {
10403
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10404
    }
10405
 
10406
    public Object getFieldValue(_Fields field) {
10407
      switch (field) {
10408
      case SUCCESS:
10409
        return new Boolean(isSuccess());
10410
 
10411
      case EX:
10412
        return getEx();
10413
 
10414
      }
10415
      throw new IllegalStateException();
10416
    }
10417
 
10418
    public Object getFieldValue(int fieldId) {
10419
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10420
    }
10421
 
10422
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10423
    public boolean isSet(_Fields field) {
10424
      switch (field) {
10425
      case SUCCESS:
10426
        return isSetSuccess();
10427
      case EX:
10428
        return isSetEx();
10429
      }
10430
      throw new IllegalStateException();
10431
    }
10432
 
10433
    public boolean isSet(int fieldID) {
10434
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10435
    }
10436
 
10437
    @Override
10438
    public boolean equals(Object that) {
10439
      if (that == null)
10440
        return false;
10441
      if (that instanceof acceptOrder_result)
10442
        return this.equals((acceptOrder_result)that);
10443
      return false;
10444
    }
10445
 
10446
    public boolean equals(acceptOrder_result that) {
10447
      if (that == null)
10448
        return false;
10449
 
10450
      boolean this_present_success = true;
10451
      boolean that_present_success = true;
10452
      if (this_present_success || that_present_success) {
10453
        if (!(this_present_success && that_present_success))
10454
          return false;
10455
        if (this.success != that.success)
10456
          return false;
10457
      }
10458
 
10459
      boolean this_present_ex = true && this.isSetEx();
10460
      boolean that_present_ex = true && that.isSetEx();
10461
      if (this_present_ex || that_present_ex) {
10462
        if (!(this_present_ex && that_present_ex))
10463
          return false;
10464
        if (!this.ex.equals(that.ex))
10465
          return false;
10466
      }
10467
 
10468
      return true;
10469
    }
10470
 
10471
    @Override
10472
    public int hashCode() {
10473
      return 0;
10474
    }
10475
 
10476
    public int compareTo(acceptOrder_result other) {
10477
      if (!getClass().equals(other.getClass())) {
10478
        return getClass().getName().compareTo(other.getClass().getName());
10479
      }
10480
 
10481
      int lastComparison = 0;
10482
      acceptOrder_result typedOther = (acceptOrder_result)other;
10483
 
10484
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10485
      if (lastComparison != 0) {
10486
        return lastComparison;
10487
      }
10488
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10489
      if (lastComparison != 0) {
10490
        return lastComparison;
10491
      }
10492
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10493
      if (lastComparison != 0) {
10494
        return lastComparison;
10495
      }
10496
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10497
      if (lastComparison != 0) {
10498
        return lastComparison;
10499
      }
10500
      return 0;
10501
    }
10502
 
10503
    public void read(TProtocol iprot) throws TException {
10504
      TField field;
10505
      iprot.readStructBegin();
10506
      while (true)
10507
      {
10508
        field = iprot.readFieldBegin();
10509
        if (field.type == TType.STOP) { 
10510
          break;
10511
        }
10512
        _Fields fieldId = _Fields.findByThriftId(field.id);
10513
        if (fieldId == null) {
10514
          TProtocolUtil.skip(iprot, field.type);
10515
        } else {
10516
          switch (fieldId) {
10517
            case SUCCESS:
10518
              if (field.type == TType.BOOL) {
10519
                this.success = iprot.readBool();
10520
                setSuccessIsSet(true);
10521
              } else { 
10522
                TProtocolUtil.skip(iprot, field.type);
10523
              }
10524
              break;
10525
            case EX:
10526
              if (field.type == TType.STRUCT) {
10527
                this.ex = new TransactionServiceException();
10528
                this.ex.read(iprot);
10529
              } else { 
10530
                TProtocolUtil.skip(iprot, field.type);
10531
              }
10532
              break;
10533
          }
10534
          iprot.readFieldEnd();
10535
        }
10536
      }
10537
      iprot.readStructEnd();
10538
      validate();
10539
    }
10540
 
10541
    public void write(TProtocol oprot) throws TException {
10542
      oprot.writeStructBegin(STRUCT_DESC);
10543
 
10544
      if (this.isSetSuccess()) {
10545
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10546
        oprot.writeBool(this.success);
10547
        oprot.writeFieldEnd();
10548
      } else if (this.isSetEx()) {
10549
        oprot.writeFieldBegin(EX_FIELD_DESC);
10550
        this.ex.write(oprot);
10551
        oprot.writeFieldEnd();
10552
      }
10553
      oprot.writeFieldStop();
10554
      oprot.writeStructEnd();
10555
    }
10556
 
10557
    @Override
10558
    public String toString() {
10559
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
10560
      boolean first = true;
10561
 
10562
      sb.append("success:");
10563
      sb.append(this.success);
10564
      first = false;
10565
      if (!first) sb.append(", ");
10566
      sb.append("ex:");
10567
      if (this.ex == null) {
10568
        sb.append("null");
10569
      } else {
10570
        sb.append(this.ex);
10571
      }
10572
      first = false;
10573
      sb.append(")");
10574
      return sb.toString();
10575
    }
10576
 
10577
    public void validate() throws TException {
10578
      // check for required fields
10579
    }
10580
 
10581
  }
10582
 
10583
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
10584
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
10585
 
10586
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10587
 
10588
    private long orderId;
10589
 
10590
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10591
    public enum _Fields implements TFieldIdEnum {
10592
      ORDER_ID((short)1, "orderId");
10593
 
10594
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10595
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10596
 
10597
      static {
10598
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10599
          byId.put((int)field._thriftId, field);
10600
          byName.put(field.getFieldName(), field);
10601
        }
10602
      }
10603
 
10604
      /**
10605
       * Find the _Fields constant that matches fieldId, or null if its not found.
10606
       */
10607
      public static _Fields findByThriftId(int fieldId) {
10608
        return byId.get(fieldId);
10609
      }
10610
 
10611
      /**
10612
       * Find the _Fields constant that matches fieldId, throwing an exception
10613
       * if it is not found.
10614
       */
10615
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10616
        _Fields fields = findByThriftId(fieldId);
10617
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10618
        return fields;
10619
      }
10620
 
10621
      /**
10622
       * Find the _Fields constant that matches name, or null if its not found.
10623
       */
10624
      public static _Fields findByName(String name) {
10625
        return byName.get(name);
10626
      }
10627
 
10628
      private final short _thriftId;
10629
      private final String _fieldName;
10630
 
10631
      _Fields(short thriftId, String fieldName) {
10632
        _thriftId = thriftId;
10633
        _fieldName = fieldName;
10634
      }
10635
 
10636
      public short getThriftFieldId() {
10637
        return _thriftId;
10638
      }
10639
 
10640
      public String getFieldName() {
10641
        return _fieldName;
10642
      }
10643
    }
10644
 
10645
    // isset id assignments
10646
    private static final int __ORDERID_ISSET_ID = 0;
10647
    private BitSet __isset_bit_vector = new BitSet(1);
10648
 
10649
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10650
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10651
          new FieldValueMetaData(TType.I64)));
10652
    }});
10653
 
10654
    static {
10655
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
10656
    }
10657
 
10658
    public billOrder_args() {
10659
    }
10660
 
10661
    public billOrder_args(
10662
      long orderId)
10663
    {
10664
      this();
10665
      this.orderId = orderId;
10666
      setOrderIdIsSet(true);
10667
    }
10668
 
10669
    /**
10670
     * Performs a deep copy on <i>other</i>.
10671
     */
10672
    public billOrder_args(billOrder_args other) {
10673
      __isset_bit_vector.clear();
10674
      __isset_bit_vector.or(other.__isset_bit_vector);
10675
      this.orderId = other.orderId;
10676
    }
10677
 
10678
    public billOrder_args deepCopy() {
10679
      return new billOrder_args(this);
10680
    }
10681
 
10682
    @Deprecated
10683
    public billOrder_args clone() {
10684
      return new billOrder_args(this);
10685
    }
10686
 
10687
    public long getOrderId() {
10688
      return this.orderId;
10689
    }
10690
 
10691
    public billOrder_args setOrderId(long orderId) {
10692
      this.orderId = orderId;
10693
      setOrderIdIsSet(true);
10694
      return this;
10695
    }
10696
 
10697
    public void unsetOrderId() {
10698
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10699
    }
10700
 
10701
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10702
    public boolean isSetOrderId() {
10703
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10704
    }
10705
 
10706
    public void setOrderIdIsSet(boolean value) {
10707
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10708
    }
10709
 
10710
    public void setFieldValue(_Fields field, Object value) {
10711
      switch (field) {
10712
      case ORDER_ID:
10713
        if (value == null) {
10714
          unsetOrderId();
10715
        } else {
10716
          setOrderId((Long)value);
10717
        }
10718
        break;
10719
 
10720
      }
10721
    }
10722
 
10723
    public void setFieldValue(int fieldID, Object value) {
10724
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10725
    }
10726
 
10727
    public Object getFieldValue(_Fields field) {
10728
      switch (field) {
10729
      case ORDER_ID:
10730
        return new Long(getOrderId());
10731
 
10732
      }
10733
      throw new IllegalStateException();
10734
    }
10735
 
10736
    public Object getFieldValue(int fieldId) {
10737
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10738
    }
10739
 
10740
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10741
    public boolean isSet(_Fields field) {
10742
      switch (field) {
10743
      case ORDER_ID:
10744
        return isSetOrderId();
10745
      }
10746
      throw new IllegalStateException();
10747
    }
10748
 
10749
    public boolean isSet(int fieldID) {
10750
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10751
    }
10752
 
10753
    @Override
10754
    public boolean equals(Object that) {
10755
      if (that == null)
10756
        return false;
10757
      if (that instanceof billOrder_args)
10758
        return this.equals((billOrder_args)that);
10759
      return false;
10760
    }
10761
 
10762
    public boolean equals(billOrder_args that) {
10763
      if (that == null)
10764
        return false;
10765
 
10766
      boolean this_present_orderId = true;
10767
      boolean that_present_orderId = true;
10768
      if (this_present_orderId || that_present_orderId) {
10769
        if (!(this_present_orderId && that_present_orderId))
10770
          return false;
10771
        if (this.orderId != that.orderId)
10772
          return false;
10773
      }
10774
 
10775
      return true;
10776
    }
10777
 
10778
    @Override
10779
    public int hashCode() {
10780
      return 0;
10781
    }
10782
 
10783
    public int compareTo(billOrder_args other) {
10784
      if (!getClass().equals(other.getClass())) {
10785
        return getClass().getName().compareTo(other.getClass().getName());
10786
      }
10787
 
10788
      int lastComparison = 0;
10789
      billOrder_args typedOther = (billOrder_args)other;
10790
 
10791
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10792
      if (lastComparison != 0) {
10793
        return lastComparison;
10794
      }
10795
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10796
      if (lastComparison != 0) {
10797
        return lastComparison;
10798
      }
10799
      return 0;
10800
    }
10801
 
10802
    public void read(TProtocol iprot) throws TException {
10803
      TField field;
10804
      iprot.readStructBegin();
10805
      while (true)
10806
      {
10807
        field = iprot.readFieldBegin();
10808
        if (field.type == TType.STOP) { 
10809
          break;
10810
        }
10811
        _Fields fieldId = _Fields.findByThriftId(field.id);
10812
        if (fieldId == null) {
10813
          TProtocolUtil.skip(iprot, field.type);
10814
        } else {
10815
          switch (fieldId) {
10816
            case ORDER_ID:
10817
              if (field.type == TType.I64) {
10818
                this.orderId = iprot.readI64();
10819
                setOrderIdIsSet(true);
10820
              } else { 
10821
                TProtocolUtil.skip(iprot, field.type);
10822
              }
10823
              break;
10824
          }
10825
          iprot.readFieldEnd();
10826
        }
10827
      }
10828
      iprot.readStructEnd();
10829
      validate();
10830
    }
10831
 
10832
    public void write(TProtocol oprot) throws TException {
10833
      validate();
10834
 
10835
      oprot.writeStructBegin(STRUCT_DESC);
10836
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10837
      oprot.writeI64(this.orderId);
10838
      oprot.writeFieldEnd();
10839
      oprot.writeFieldStop();
10840
      oprot.writeStructEnd();
10841
    }
10842
 
10843
    @Override
10844
    public String toString() {
10845
      StringBuilder sb = new StringBuilder("billOrder_args(");
10846
      boolean first = true;
10847
 
10848
      sb.append("orderId:");
10849
      sb.append(this.orderId);
10850
      first = false;
10851
      sb.append(")");
10852
      return sb.toString();
10853
    }
10854
 
10855
    public void validate() throws TException {
10856
      // check for required fields
10857
    }
10858
 
10859
  }
10860
 
10861
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
10862
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
10863
 
10864
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10865
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10866
 
10867
    private boolean success;
10868
    private TransactionServiceException ex;
10869
 
10870
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10871
    public enum _Fields implements TFieldIdEnum {
10872
      SUCCESS((short)0, "success"),
10873
      EX((short)1, "ex");
10874
 
10875
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10876
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10877
 
10878
      static {
10879
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10880
          byId.put((int)field._thriftId, field);
10881
          byName.put(field.getFieldName(), field);
10882
        }
10883
      }
10884
 
10885
      /**
10886
       * Find the _Fields constant that matches fieldId, or null if its not found.
10887
       */
10888
      public static _Fields findByThriftId(int fieldId) {
10889
        return byId.get(fieldId);
10890
      }
10891
 
10892
      /**
10893
       * Find the _Fields constant that matches fieldId, throwing an exception
10894
       * if it is not found.
10895
       */
10896
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10897
        _Fields fields = findByThriftId(fieldId);
10898
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10899
        return fields;
10900
      }
10901
 
10902
      /**
10903
       * Find the _Fields constant that matches name, or null if its not found.
10904
       */
10905
      public static _Fields findByName(String name) {
10906
        return byName.get(name);
10907
      }
10908
 
10909
      private final short _thriftId;
10910
      private final String _fieldName;
10911
 
10912
      _Fields(short thriftId, String fieldName) {
10913
        _thriftId = thriftId;
10914
        _fieldName = fieldName;
10915
      }
10916
 
10917
      public short getThriftFieldId() {
10918
        return _thriftId;
10919
      }
10920
 
10921
      public String getFieldName() {
10922
        return _fieldName;
10923
      }
10924
    }
10925
 
10926
    // isset id assignments
10927
    private static final int __SUCCESS_ISSET_ID = 0;
10928
    private BitSet __isset_bit_vector = new BitSet(1);
10929
 
10930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10931
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10932
          new FieldValueMetaData(TType.BOOL)));
10933
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10934
          new FieldValueMetaData(TType.STRUCT)));
10935
    }});
10936
 
10937
    static {
10938
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
10939
    }
10940
 
10941
    public billOrder_result() {
10942
    }
10943
 
10944
    public billOrder_result(
10945
      boolean success,
10946
      TransactionServiceException ex)
10947
    {
10948
      this();
10949
      this.success = success;
10950
      setSuccessIsSet(true);
10951
      this.ex = ex;
10952
    }
10953
 
10954
    /**
10955
     * Performs a deep copy on <i>other</i>.
10956
     */
10957
    public billOrder_result(billOrder_result other) {
10958
      __isset_bit_vector.clear();
10959
      __isset_bit_vector.or(other.__isset_bit_vector);
10960
      this.success = other.success;
10961
      if (other.isSetEx()) {
10962
        this.ex = new TransactionServiceException(other.ex);
10963
      }
10964
    }
10965
 
10966
    public billOrder_result deepCopy() {
10967
      return new billOrder_result(this);
10968
    }
10969
 
10970
    @Deprecated
10971
    public billOrder_result clone() {
10972
      return new billOrder_result(this);
10973
    }
10974
 
10975
    public boolean isSuccess() {
10976
      return this.success;
10977
    }
10978
 
10979
    public billOrder_result setSuccess(boolean success) {
10980
      this.success = success;
10981
      setSuccessIsSet(true);
10982
      return this;
10983
    }
10984
 
10985
    public void unsetSuccess() {
10986
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10987
    }
10988
 
10989
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10990
    public boolean isSetSuccess() {
10991
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10992
    }
10993
 
10994
    public void setSuccessIsSet(boolean value) {
10995
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10996
    }
10997
 
10998
    public TransactionServiceException getEx() {
10999
      return this.ex;
11000
    }
11001
 
11002
    public billOrder_result setEx(TransactionServiceException ex) {
11003
      this.ex = ex;
11004
      return this;
11005
    }
11006
 
11007
    public void unsetEx() {
11008
      this.ex = null;
11009
    }
11010
 
11011
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11012
    public boolean isSetEx() {
11013
      return this.ex != null;
11014
    }
11015
 
11016
    public void setExIsSet(boolean value) {
11017
      if (!value) {
11018
        this.ex = null;
11019
      }
11020
    }
11021
 
11022
    public void setFieldValue(_Fields field, Object value) {
11023
      switch (field) {
11024
      case SUCCESS:
11025
        if (value == null) {
11026
          unsetSuccess();
11027
        } else {
11028
          setSuccess((Boolean)value);
11029
        }
11030
        break;
11031
 
11032
      case EX:
11033
        if (value == null) {
11034
          unsetEx();
11035
        } else {
11036
          setEx((TransactionServiceException)value);
11037
        }
11038
        break;
11039
 
11040
      }
11041
    }
11042
 
11043
    public void setFieldValue(int fieldID, Object value) {
11044
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11045
    }
11046
 
11047
    public Object getFieldValue(_Fields field) {
11048
      switch (field) {
11049
      case SUCCESS:
11050
        return new Boolean(isSuccess());
11051
 
11052
      case EX:
11053
        return getEx();
11054
 
11055
      }
11056
      throw new IllegalStateException();
11057
    }
11058
 
11059
    public Object getFieldValue(int fieldId) {
11060
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11061
    }
11062
 
11063
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11064
    public boolean isSet(_Fields field) {
11065
      switch (field) {
11066
      case SUCCESS:
11067
        return isSetSuccess();
11068
      case EX:
11069
        return isSetEx();
11070
      }
11071
      throw new IllegalStateException();
11072
    }
11073
 
11074
    public boolean isSet(int fieldID) {
11075
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11076
    }
11077
 
11078
    @Override
11079
    public boolean equals(Object that) {
11080
      if (that == null)
11081
        return false;
11082
      if (that instanceof billOrder_result)
11083
        return this.equals((billOrder_result)that);
11084
      return false;
11085
    }
11086
 
11087
    public boolean equals(billOrder_result that) {
11088
      if (that == null)
11089
        return false;
11090
 
11091
      boolean this_present_success = true;
11092
      boolean that_present_success = true;
11093
      if (this_present_success || that_present_success) {
11094
        if (!(this_present_success && that_present_success))
11095
          return false;
11096
        if (this.success != that.success)
11097
          return false;
11098
      }
11099
 
11100
      boolean this_present_ex = true && this.isSetEx();
11101
      boolean that_present_ex = true && that.isSetEx();
11102
      if (this_present_ex || that_present_ex) {
11103
        if (!(this_present_ex && that_present_ex))
11104
          return false;
11105
        if (!this.ex.equals(that.ex))
11106
          return false;
11107
      }
11108
 
11109
      return true;
11110
    }
11111
 
11112
    @Override
11113
    public int hashCode() {
11114
      return 0;
11115
    }
11116
 
11117
    public int compareTo(billOrder_result other) {
11118
      if (!getClass().equals(other.getClass())) {
11119
        return getClass().getName().compareTo(other.getClass().getName());
11120
      }
11121
 
11122
      int lastComparison = 0;
11123
      billOrder_result typedOther = (billOrder_result)other;
11124
 
11125
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11126
      if (lastComparison != 0) {
11127
        return lastComparison;
11128
      }
11129
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11130
      if (lastComparison != 0) {
11131
        return lastComparison;
11132
      }
11133
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11134
      if (lastComparison != 0) {
11135
        return lastComparison;
11136
      }
11137
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11138
      if (lastComparison != 0) {
11139
        return lastComparison;
11140
      }
11141
      return 0;
11142
    }
11143
 
11144
    public void read(TProtocol iprot) throws TException {
11145
      TField field;
11146
      iprot.readStructBegin();
11147
      while (true)
11148
      {
11149
        field = iprot.readFieldBegin();
11150
        if (field.type == TType.STOP) { 
11151
          break;
11152
        }
11153
        _Fields fieldId = _Fields.findByThriftId(field.id);
11154
        if (fieldId == null) {
11155
          TProtocolUtil.skip(iprot, field.type);
11156
        } else {
11157
          switch (fieldId) {
11158
            case SUCCESS:
11159
              if (field.type == TType.BOOL) {
11160
                this.success = iprot.readBool();
11161
                setSuccessIsSet(true);
11162
              } else { 
11163
                TProtocolUtil.skip(iprot, field.type);
11164
              }
11165
              break;
11166
            case EX:
11167
              if (field.type == TType.STRUCT) {
11168
                this.ex = new TransactionServiceException();
11169
                this.ex.read(iprot);
11170
              } else { 
11171
                TProtocolUtil.skip(iprot, field.type);
11172
              }
11173
              break;
11174
          }
11175
          iprot.readFieldEnd();
11176
        }
11177
      }
11178
      iprot.readStructEnd();
11179
      validate();
11180
    }
11181
 
11182
    public void write(TProtocol oprot) throws TException {
11183
      oprot.writeStructBegin(STRUCT_DESC);
11184
 
11185
      if (this.isSetSuccess()) {
11186
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11187
        oprot.writeBool(this.success);
11188
        oprot.writeFieldEnd();
11189
      } else if (this.isSetEx()) {
11190
        oprot.writeFieldBegin(EX_FIELD_DESC);
11191
        this.ex.write(oprot);
11192
        oprot.writeFieldEnd();
11193
      }
11194
      oprot.writeFieldStop();
11195
      oprot.writeStructEnd();
11196
    }
11197
 
11198
    @Override
11199
    public String toString() {
11200
      StringBuilder sb = new StringBuilder("billOrder_result(");
11201
      boolean first = true;
11202
 
11203
      sb.append("success:");
11204
      sb.append(this.success);
11205
      first = false;
11206
      if (!first) sb.append(", ");
11207
      sb.append("ex:");
11208
      if (this.ex == null) {
11209
        sb.append("null");
11210
      } else {
11211
        sb.append(this.ex);
11212
      }
11213
      first = false;
11214
      sb.append(")");
11215
      return sb.toString();
11216
    }
11217
 
11218
    public void validate() throws TException {
11219
      // check for required fields
11220
    }
11221
 
11222
  }
11223
 
483 rajveer 11224
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
11225
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 11226
 
11227
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
11228
 
11229
    private long transactionId;
11230
 
11231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11232
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11233
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 11234
 
11235
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11236
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11237
 
11238
      static {
11239
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11240
          byId.put((int)field._thriftId, field);
11241
          byName.put(field.getFieldName(), field);
11242
        }
11243
      }
11244
 
11245
      /**
11246
       * Find the _Fields constant that matches fieldId, or null if its not found.
11247
       */
11248
      public static _Fields findByThriftId(int fieldId) {
11249
        return byId.get(fieldId);
11250
      }
11251
 
11252
      /**
11253
       * Find the _Fields constant that matches fieldId, throwing an exception
11254
       * if it is not found.
11255
       */
11256
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11257
        _Fields fields = findByThriftId(fieldId);
11258
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11259
        return fields;
11260
      }
11261
 
11262
      /**
11263
       * Find the _Fields constant that matches name, or null if its not found.
11264
       */
11265
      public static _Fields findByName(String name) {
11266
        return byName.get(name);
11267
      }
11268
 
11269
      private final short _thriftId;
11270
      private final String _fieldName;
11271
 
11272
      _Fields(short thriftId, String fieldName) {
11273
        _thriftId = thriftId;
11274
        _fieldName = fieldName;
11275
      }
11276
 
11277
      public short getThriftFieldId() {
11278
        return _thriftId;
11279
      }
11280
 
11281
      public String getFieldName() {
11282
        return _fieldName;
11283
      }
11284
    }
11285
 
11286
    // isset id assignments
11287
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 11288
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 11289
 
11290
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11291
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
11292
          new FieldValueMetaData(TType.I64)));
11293
    }});
11294
 
11295
    static {
483 rajveer 11296
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 11297
    }
11298
 
483 rajveer 11299
    public getOrdersForTransaction_args() {
68 ashish 11300
    }
11301
 
483 rajveer 11302
    public getOrdersForTransaction_args(
11303
      long transactionId)
68 ashish 11304
    {
11305
      this();
11306
      this.transactionId = transactionId;
11307
      setTransactionIdIsSet(true);
11308
    }
11309
 
11310
    /**
11311
     * Performs a deep copy on <i>other</i>.
11312
     */
483 rajveer 11313
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 11314
      __isset_bit_vector.clear();
11315
      __isset_bit_vector.or(other.__isset_bit_vector);
11316
      this.transactionId = other.transactionId;
11317
    }
11318
 
483 rajveer 11319
    public getOrdersForTransaction_args deepCopy() {
11320
      return new getOrdersForTransaction_args(this);
68 ashish 11321
    }
11322
 
11323
    @Deprecated
483 rajveer 11324
    public getOrdersForTransaction_args clone() {
11325
      return new getOrdersForTransaction_args(this);
68 ashish 11326
    }
11327
 
11328
    public long getTransactionId() {
11329
      return this.transactionId;
11330
    }
11331
 
483 rajveer 11332
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 11333
      this.transactionId = transactionId;
11334
      setTransactionIdIsSet(true);
11335
      return this;
11336
    }
11337
 
11338
    public void unsetTransactionId() {
11339
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
11340
    }
11341
 
11342
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
11343
    public boolean isSetTransactionId() {
11344
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
11345
    }
11346
 
11347
    public void setTransactionIdIsSet(boolean value) {
11348
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
11349
    }
11350
 
11351
    public void setFieldValue(_Fields field, Object value) {
11352
      switch (field) {
11353
      case TRANSACTION_ID:
11354
        if (value == null) {
11355
          unsetTransactionId();
11356
        } else {
11357
          setTransactionId((Long)value);
11358
        }
11359
        break;
11360
 
11361
      }
11362
    }
11363
 
11364
    public void setFieldValue(int fieldID, Object value) {
11365
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11366
    }
11367
 
11368
    public Object getFieldValue(_Fields field) {
11369
      switch (field) {
11370
      case TRANSACTION_ID:
11371
        return new Long(getTransactionId());
11372
 
11373
      }
11374
      throw new IllegalStateException();
11375
    }
11376
 
11377
    public Object getFieldValue(int fieldId) {
11378
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11379
    }
11380
 
11381
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11382
    public boolean isSet(_Fields field) {
11383
      switch (field) {
11384
      case TRANSACTION_ID:
11385
        return isSetTransactionId();
11386
      }
11387
      throw new IllegalStateException();
11388
    }
11389
 
11390
    public boolean isSet(int fieldID) {
11391
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11392
    }
11393
 
11394
    @Override
11395
    public boolean equals(Object that) {
11396
      if (that == null)
11397
        return false;
483 rajveer 11398
      if (that instanceof getOrdersForTransaction_args)
11399
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 11400
      return false;
11401
    }
11402
 
483 rajveer 11403
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 11404
      if (that == null)
11405
        return false;
11406
 
11407
      boolean this_present_transactionId = true;
11408
      boolean that_present_transactionId = true;
11409
      if (this_present_transactionId || that_present_transactionId) {
11410
        if (!(this_present_transactionId && that_present_transactionId))
11411
          return false;
11412
        if (this.transactionId != that.transactionId)
11413
          return false;
11414
      }
11415
 
11416
      return true;
11417
    }
11418
 
11419
    @Override
11420
    public int hashCode() {
11421
      return 0;
11422
    }
11423
 
483 rajveer 11424
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 11425
      if (!getClass().equals(other.getClass())) {
11426
        return getClass().getName().compareTo(other.getClass().getName());
11427
      }
11428
 
11429
      int lastComparison = 0;
483 rajveer 11430
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 11431
 
11432
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
11433
      if (lastComparison != 0) {
11434
        return lastComparison;
11435
      }
11436
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
11437
      if (lastComparison != 0) {
11438
        return lastComparison;
11439
      }
11440
      return 0;
11441
    }
11442
 
11443
    public void read(TProtocol iprot) throws TException {
11444
      TField field;
11445
      iprot.readStructBegin();
11446
      while (true)
11447
      {
11448
        field = iprot.readFieldBegin();
11449
        if (field.type == TType.STOP) { 
11450
          break;
11451
        }
11452
        _Fields fieldId = _Fields.findByThriftId(field.id);
11453
        if (fieldId == null) {
11454
          TProtocolUtil.skip(iprot, field.type);
11455
        } else {
11456
          switch (fieldId) {
11457
            case TRANSACTION_ID:
11458
              if (field.type == TType.I64) {
11459
                this.transactionId = iprot.readI64();
11460
                setTransactionIdIsSet(true);
11461
              } else { 
11462
                TProtocolUtil.skip(iprot, field.type);
11463
              }
11464
              break;
11465
          }
11466
          iprot.readFieldEnd();
11467
        }
11468
      }
11469
      iprot.readStructEnd();
11470
      validate();
11471
    }
11472
 
11473
    public void write(TProtocol oprot) throws TException {
11474
      validate();
11475
 
11476
      oprot.writeStructBegin(STRUCT_DESC);
11477
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
11478
      oprot.writeI64(this.transactionId);
11479
      oprot.writeFieldEnd();
11480
      oprot.writeFieldStop();
11481
      oprot.writeStructEnd();
11482
    }
11483
 
11484
    @Override
11485
    public String toString() {
483 rajveer 11486
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 11487
      boolean first = true;
11488
 
11489
      sb.append("transactionId:");
11490
      sb.append(this.transactionId);
11491
      first = false;
11492
      sb.append(")");
11493
      return sb.toString();
11494
    }
11495
 
11496
    public void validate() throws TException {
11497
      // check for required fields
11498
    }
11499
 
11500
  }
11501
 
483 rajveer 11502
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
11503
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 11504
 
483 rajveer 11505
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 11506
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11507
 
483 rajveer 11508
    private List<Order> success;
68 ashish 11509
    private TransactionServiceException ex;
11510
 
11511
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11512
    public enum _Fields implements TFieldIdEnum {
11513
      SUCCESS((short)0, "success"),
11514
      EX((short)1, "ex");
11515
 
11516
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11518
 
11519
      static {
11520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11521
          byId.put((int)field._thriftId, field);
11522
          byName.put(field.getFieldName(), field);
11523
        }
11524
      }
11525
 
11526
      /**
11527
       * Find the _Fields constant that matches fieldId, or null if its not found.
11528
       */
11529
      public static _Fields findByThriftId(int fieldId) {
11530
        return byId.get(fieldId);
11531
      }
11532
 
11533
      /**
11534
       * Find the _Fields constant that matches fieldId, throwing an exception
11535
       * if it is not found.
11536
       */
11537
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11538
        _Fields fields = findByThriftId(fieldId);
11539
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11540
        return fields;
11541
      }
11542
 
11543
      /**
11544
       * Find the _Fields constant that matches name, or null if its not found.
11545
       */
11546
      public static _Fields findByName(String name) {
11547
        return byName.get(name);
11548
      }
11549
 
11550
      private final short _thriftId;
11551
      private final String _fieldName;
11552
 
11553
      _Fields(short thriftId, String fieldName) {
11554
        _thriftId = thriftId;
11555
        _fieldName = fieldName;
11556
      }
11557
 
11558
      public short getThriftFieldId() {
11559
        return _thriftId;
11560
      }
11561
 
11562
      public String getFieldName() {
11563
        return _fieldName;
11564
      }
11565
    }
11566
 
11567
    // isset id assignments
11568
 
11569
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11570
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 11571
          new ListMetaData(TType.LIST, 
11572
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 11573
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11574
          new FieldValueMetaData(TType.STRUCT)));
11575
    }});
11576
 
11577
    static {
483 rajveer 11578
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 11579
    }
11580
 
483 rajveer 11581
    public getOrdersForTransaction_result() {
68 ashish 11582
    }
11583
 
483 rajveer 11584
    public getOrdersForTransaction_result(
11585
      List<Order> success,
68 ashish 11586
      TransactionServiceException ex)
11587
    {
11588
      this();
11589
      this.success = success;
11590
      this.ex = ex;
11591
    }
11592
 
11593
    /**
11594
     * Performs a deep copy on <i>other</i>.
11595
     */
483 rajveer 11596
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
11597
      if (other.isSetSuccess()) {
11598
        List<Order> __this__success = new ArrayList<Order>();
11599
        for (Order other_element : other.success) {
11600
          __this__success.add(new Order(other_element));
11601
        }
11602
        this.success = __this__success;
11603
      }
68 ashish 11604
      if (other.isSetEx()) {
11605
        this.ex = new TransactionServiceException(other.ex);
11606
      }
11607
    }
11608
 
483 rajveer 11609
    public getOrdersForTransaction_result deepCopy() {
11610
      return new getOrdersForTransaction_result(this);
68 ashish 11611
    }
11612
 
11613
    @Deprecated
483 rajveer 11614
    public getOrdersForTransaction_result clone() {
11615
      return new getOrdersForTransaction_result(this);
68 ashish 11616
    }
11617
 
483 rajveer 11618
    public int getSuccessSize() {
11619
      return (this.success == null) ? 0 : this.success.size();
11620
    }
11621
 
11622
    public java.util.Iterator<Order> getSuccessIterator() {
11623
      return (this.success == null) ? null : this.success.iterator();
11624
    }
11625
 
11626
    public void addToSuccess(Order elem) {
11627
      if (this.success == null) {
11628
        this.success = new ArrayList<Order>();
11629
      }
11630
      this.success.add(elem);
11631
    }
11632
 
11633
    public List<Order> getSuccess() {
68 ashish 11634
      return this.success;
11635
    }
11636
 
483 rajveer 11637
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 11638
      this.success = success;
11639
      return this;
11640
    }
11641
 
11642
    public void unsetSuccess() {
483 rajveer 11643
      this.success = null;
68 ashish 11644
    }
11645
 
11646
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11647
    public boolean isSetSuccess() {
483 rajveer 11648
      return this.success != null;
68 ashish 11649
    }
11650
 
11651
    public void setSuccessIsSet(boolean value) {
483 rajveer 11652
      if (!value) {
11653
        this.success = null;
11654
      }
68 ashish 11655
    }
11656
 
11657
    public TransactionServiceException getEx() {
11658
      return this.ex;
11659
    }
11660
 
483 rajveer 11661
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 11662
      this.ex = ex;
11663
      return this;
11664
    }
11665
 
11666
    public void unsetEx() {
11667
      this.ex = null;
11668
    }
11669
 
11670
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11671
    public boolean isSetEx() {
11672
      return this.ex != null;
11673
    }
11674
 
11675
    public void setExIsSet(boolean value) {
11676
      if (!value) {
11677
        this.ex = null;
11678
      }
11679
    }
11680
 
11681
    public void setFieldValue(_Fields field, Object value) {
11682
      switch (field) {
11683
      case SUCCESS:
11684
        if (value == null) {
11685
          unsetSuccess();
11686
        } else {
483 rajveer 11687
          setSuccess((List<Order>)value);
68 ashish 11688
        }
11689
        break;
11690
 
11691
      case EX:
11692
        if (value == null) {
11693
          unsetEx();
11694
        } else {
11695
          setEx((TransactionServiceException)value);
11696
        }
11697
        break;
11698
 
11699
      }
11700
    }
11701
 
11702
    public void setFieldValue(int fieldID, Object value) {
11703
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11704
    }
11705
 
11706
    public Object getFieldValue(_Fields field) {
11707
      switch (field) {
11708
      case SUCCESS:
483 rajveer 11709
        return getSuccess();
68 ashish 11710
 
11711
      case EX:
11712
        return getEx();
11713
 
11714
      }
11715
      throw new IllegalStateException();
11716
    }
11717
 
11718
    public Object getFieldValue(int fieldId) {
11719
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11720
    }
11721
 
11722
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11723
    public boolean isSet(_Fields field) {
11724
      switch (field) {
11725
      case SUCCESS:
11726
        return isSetSuccess();
11727
      case EX:
11728
        return isSetEx();
11729
      }
11730
      throw new IllegalStateException();
11731
    }
11732
 
11733
    public boolean isSet(int fieldID) {
11734
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11735
    }
11736
 
11737
    @Override
11738
    public boolean equals(Object that) {
11739
      if (that == null)
11740
        return false;
483 rajveer 11741
      if (that instanceof getOrdersForTransaction_result)
11742
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 11743
      return false;
11744
    }
11745
 
483 rajveer 11746
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 11747
      if (that == null)
11748
        return false;
11749
 
483 rajveer 11750
      boolean this_present_success = true && this.isSetSuccess();
11751
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 11752
      if (this_present_success || that_present_success) {
11753
        if (!(this_present_success && that_present_success))
11754
          return false;
483 rajveer 11755
        if (!this.success.equals(that.success))
68 ashish 11756
          return false;
11757
      }
11758
 
11759
      boolean this_present_ex = true && this.isSetEx();
11760
      boolean that_present_ex = true && that.isSetEx();
11761
      if (this_present_ex || that_present_ex) {
11762
        if (!(this_present_ex && that_present_ex))
11763
          return false;
11764
        if (!this.ex.equals(that.ex))
11765
          return false;
11766
      }
11767
 
11768
      return true;
11769
    }
11770
 
11771
    @Override
11772
    public int hashCode() {
11773
      return 0;
11774
    }
11775
 
483 rajveer 11776
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 11777
      if (!getClass().equals(other.getClass())) {
11778
        return getClass().getName().compareTo(other.getClass().getName());
11779
      }
11780
 
11781
      int lastComparison = 0;
483 rajveer 11782
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 11783
 
11784
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11785
      if (lastComparison != 0) {
11786
        return lastComparison;
11787
      }
11788
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11789
      if (lastComparison != 0) {
11790
        return lastComparison;
11791
      }
11792
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11793
      if (lastComparison != 0) {
11794
        return lastComparison;
11795
      }
11796
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11797
      if (lastComparison != 0) {
11798
        return lastComparison;
11799
      }
11800
      return 0;
11801
    }
11802
 
11803
    public void read(TProtocol iprot) throws TException {
11804
      TField field;
11805
      iprot.readStructBegin();
11806
      while (true)
11807
      {
11808
        field = iprot.readFieldBegin();
11809
        if (field.type == TType.STOP) { 
11810
          break;
11811
        }
11812
        _Fields fieldId = _Fields.findByThriftId(field.id);
11813
        if (fieldId == null) {
11814
          TProtocolUtil.skip(iprot, field.type);
11815
        } else {
11816
          switch (fieldId) {
11817
            case SUCCESS:
483 rajveer 11818
              if (field.type == TType.LIST) {
11819
                {
1022 varun.gupt 11820
                  TList _list24 = iprot.readListBegin();
11821
                  this.success = new ArrayList<Order>(_list24.size);
11822
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 11823
                  {
1022 varun.gupt 11824
                    Order _elem26;
11825
                    _elem26 = new Order();
11826
                    _elem26.read(iprot);
11827
                    this.success.add(_elem26);
483 rajveer 11828
                  }
11829
                  iprot.readListEnd();
11830
                }
68 ashish 11831
              } else { 
11832
                TProtocolUtil.skip(iprot, field.type);
11833
              }
11834
              break;
11835
            case EX:
11836
              if (field.type == TType.STRUCT) {
11837
                this.ex = new TransactionServiceException();
11838
                this.ex.read(iprot);
11839
              } else { 
11840
                TProtocolUtil.skip(iprot, field.type);
11841
              }
11842
              break;
11843
          }
11844
          iprot.readFieldEnd();
11845
        }
11846
      }
11847
      iprot.readStructEnd();
11848
      validate();
11849
    }
11850
 
11851
    public void write(TProtocol oprot) throws TException {
11852
      oprot.writeStructBegin(STRUCT_DESC);
11853
 
11854
      if (this.isSetSuccess()) {
11855
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 11856
        {
11857
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 11858
          for (Order _iter27 : this.success)
483 rajveer 11859
          {
1022 varun.gupt 11860
            _iter27.write(oprot);
483 rajveer 11861
          }
11862
          oprot.writeListEnd();
11863
        }
68 ashish 11864
        oprot.writeFieldEnd();
11865
      } else if (this.isSetEx()) {
11866
        oprot.writeFieldBegin(EX_FIELD_DESC);
11867
        this.ex.write(oprot);
11868
        oprot.writeFieldEnd();
11869
      }
11870
      oprot.writeFieldStop();
11871
      oprot.writeStructEnd();
11872
    }
11873
 
11874
    @Override
11875
    public String toString() {
483 rajveer 11876
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 11877
      boolean first = true;
11878
 
11879
      sb.append("success:");
483 rajveer 11880
      if (this.success == null) {
11881
        sb.append("null");
11882
      } else {
11883
        sb.append(this.success);
11884
      }
68 ashish 11885
      first = false;
11886
      if (!first) sb.append(", ");
11887
      sb.append("ex:");
11888
      if (this.ex == null) {
11889
        sb.append("null");
11890
      } else {
11891
        sb.append(this.ex);
11892
      }
11893
      first = false;
11894
      sb.append(")");
11895
      return sb.toString();
11896
    }
11897
 
11898
    public void validate() throws TException {
11899
      // check for required fields
11900
    }
11901
 
11902
  }
11903
 
483 rajveer 11904
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
11905
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 11906
 
483 rajveer 11907
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
11908
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
11909
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
11910
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 11911
 
483 rajveer 11912
    private long customerId;
11913
    private long from_date;
11914
    private long to_date;
11915
    private OrderStatus status;
68 ashish 11916
 
11917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11918
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11919
      CUSTOMER_ID((short)1, "customerId"),
11920
      FROM_DATE((short)2, "from_date"),
11921
      TO_DATE((short)3, "to_date"),
11922
      /**
11923
       * 
11924
       * @see OrderStatus
11925
       */
11926
      STATUS((short)4, "status");
68 ashish 11927
 
11928
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11929
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11930
 
11931
      static {
11932
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11933
          byId.put((int)field._thriftId, field);
11934
          byName.put(field.getFieldName(), field);
11935
        }
11936
      }
11937
 
11938
      /**
11939
       * Find the _Fields constant that matches fieldId, or null if its not found.
11940
       */
11941
      public static _Fields findByThriftId(int fieldId) {
11942
        return byId.get(fieldId);
11943
      }
11944
 
11945
      /**
11946
       * Find the _Fields constant that matches fieldId, throwing an exception
11947
       * if it is not found.
11948
       */
11949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11950
        _Fields fields = findByThriftId(fieldId);
11951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11952
        return fields;
11953
      }
11954
 
11955
      /**
11956
       * Find the _Fields constant that matches name, or null if its not found.
11957
       */
11958
      public static _Fields findByName(String name) {
11959
        return byName.get(name);
11960
      }
11961
 
11962
      private final short _thriftId;
11963
      private final String _fieldName;
11964
 
11965
      _Fields(short thriftId, String fieldName) {
11966
        _thriftId = thriftId;
11967
        _fieldName = fieldName;
11968
      }
11969
 
11970
      public short getThriftFieldId() {
11971
        return _thriftId;
11972
      }
11973
 
11974
      public String getFieldName() {
11975
        return _fieldName;
11976
      }
11977
    }
11978
 
11979
    // isset id assignments
483 rajveer 11980
    private static final int __CUSTOMERID_ISSET_ID = 0;
11981
    private static final int __FROM_DATE_ISSET_ID = 1;
11982
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 11983
    private BitSet __isset_bit_vector = new BitSet(3);
11984
 
11985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11986
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 11987
          new FieldValueMetaData(TType.I64)));
483 rajveer 11988
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 11989
          new FieldValueMetaData(TType.I64)));
483 rajveer 11990
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 11991
          new FieldValueMetaData(TType.I64)));
483 rajveer 11992
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11993
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 11994
    }});
11995
 
11996
    static {
483 rajveer 11997
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 11998
    }
11999
 
483 rajveer 12000
    public getOrdersForCustomer_args() {
68 ashish 12001
    }
12002
 
483 rajveer 12003
    public getOrdersForCustomer_args(
12004
      long customerId,
12005
      long from_date,
12006
      long to_date,
12007
      OrderStatus status)
68 ashish 12008
    {
12009
      this();
483 rajveer 12010
      this.customerId = customerId;
12011
      setCustomerIdIsSet(true);
12012
      this.from_date = from_date;
12013
      setFrom_dateIsSet(true);
12014
      this.to_date = to_date;
12015
      setTo_dateIsSet(true);
12016
      this.status = status;
68 ashish 12017
    }
12018
 
12019
    /**
12020
     * Performs a deep copy on <i>other</i>.
12021
     */
483 rajveer 12022
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 12023
      __isset_bit_vector.clear();
12024
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12025
      this.customerId = other.customerId;
12026
      this.from_date = other.from_date;
12027
      this.to_date = other.to_date;
12028
      if (other.isSetStatus()) {
12029
        this.status = other.status;
12030
      }
68 ashish 12031
    }
12032
 
483 rajveer 12033
    public getOrdersForCustomer_args deepCopy() {
12034
      return new getOrdersForCustomer_args(this);
68 ashish 12035
    }
12036
 
12037
    @Deprecated
483 rajveer 12038
    public getOrdersForCustomer_args clone() {
12039
      return new getOrdersForCustomer_args(this);
68 ashish 12040
    }
12041
 
483 rajveer 12042
    public long getCustomerId() {
12043
      return this.customerId;
68 ashish 12044
    }
12045
 
483 rajveer 12046
    public getOrdersForCustomer_args setCustomerId(long customerId) {
12047
      this.customerId = customerId;
12048
      setCustomerIdIsSet(true);
68 ashish 12049
      return this;
12050
    }
12051
 
483 rajveer 12052
    public void unsetCustomerId() {
12053
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 12054
    }
12055
 
483 rajveer 12056
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
12057
    public boolean isSetCustomerId() {
12058
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 12059
    }
12060
 
483 rajveer 12061
    public void setCustomerIdIsSet(boolean value) {
12062
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 12063
    }
12064
 
483 rajveer 12065
    public long getFrom_date() {
12066
      return this.from_date;
68 ashish 12067
    }
12068
 
483 rajveer 12069
    public getOrdersForCustomer_args setFrom_date(long from_date) {
12070
      this.from_date = from_date;
12071
      setFrom_dateIsSet(true);
68 ashish 12072
      return this;
12073
    }
12074
 
483 rajveer 12075
    public void unsetFrom_date() {
12076
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 12077
    }
12078
 
483 rajveer 12079
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
12080
    public boolean isSetFrom_date() {
12081
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 12082
    }
12083
 
483 rajveer 12084
    public void setFrom_dateIsSet(boolean value) {
12085
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 12086
    }
12087
 
483 rajveer 12088
    public long getTo_date() {
12089
      return this.to_date;
68 ashish 12090
    }
12091
 
483 rajveer 12092
    public getOrdersForCustomer_args setTo_date(long to_date) {
12093
      this.to_date = to_date;
12094
      setTo_dateIsSet(true);
68 ashish 12095
      return this;
12096
    }
12097
 
483 rajveer 12098
    public void unsetTo_date() {
12099
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 12100
    }
12101
 
483 rajveer 12102
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
12103
    public boolean isSetTo_date() {
12104
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 12105
    }
12106
 
483 rajveer 12107
    public void setTo_dateIsSet(boolean value) {
12108
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 12109
    }
12110
 
483 rajveer 12111
    /**
12112
     * 
12113
     * @see OrderStatus
12114
     */
12115
    public OrderStatus getStatus() {
12116
      return this.status;
12117
    }
12118
 
12119
    /**
12120
     * 
12121
     * @see OrderStatus
12122
     */
12123
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
12124
      this.status = status;
12125
      return this;
12126
    }
12127
 
12128
    public void unsetStatus() {
12129
      this.status = null;
12130
    }
12131
 
12132
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
12133
    public boolean isSetStatus() {
12134
      return this.status != null;
12135
    }
12136
 
12137
    public void setStatusIsSet(boolean value) {
12138
      if (!value) {
12139
        this.status = null;
12140
      }
12141
    }
12142
 
68 ashish 12143
    public void setFieldValue(_Fields field, Object value) {
12144
      switch (field) {
483 rajveer 12145
      case CUSTOMER_ID:
68 ashish 12146
        if (value == null) {
483 rajveer 12147
          unsetCustomerId();
68 ashish 12148
        } else {
483 rajveer 12149
          setCustomerId((Long)value);
68 ashish 12150
        }
12151
        break;
12152
 
483 rajveer 12153
      case FROM_DATE:
68 ashish 12154
        if (value == null) {
483 rajveer 12155
          unsetFrom_date();
68 ashish 12156
        } else {
483 rajveer 12157
          setFrom_date((Long)value);
68 ashish 12158
        }
12159
        break;
12160
 
483 rajveer 12161
      case TO_DATE:
68 ashish 12162
        if (value == null) {
483 rajveer 12163
          unsetTo_date();
68 ashish 12164
        } else {
483 rajveer 12165
          setTo_date((Long)value);
68 ashish 12166
        }
12167
        break;
12168
 
483 rajveer 12169
      case STATUS:
12170
        if (value == null) {
12171
          unsetStatus();
12172
        } else {
12173
          setStatus((OrderStatus)value);
12174
        }
12175
        break;
12176
 
68 ashish 12177
      }
12178
    }
12179
 
12180
    public void setFieldValue(int fieldID, Object value) {
12181
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12182
    }
12183
 
12184
    public Object getFieldValue(_Fields field) {
12185
      switch (field) {
483 rajveer 12186
      case CUSTOMER_ID:
12187
        return new Long(getCustomerId());
68 ashish 12188
 
483 rajveer 12189
      case FROM_DATE:
12190
        return new Long(getFrom_date());
68 ashish 12191
 
483 rajveer 12192
      case TO_DATE:
12193
        return new Long(getTo_date());
68 ashish 12194
 
483 rajveer 12195
      case STATUS:
12196
        return getStatus();
12197
 
68 ashish 12198
      }
12199
      throw new IllegalStateException();
12200
    }
12201
 
12202
    public Object getFieldValue(int fieldId) {
12203
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12204
    }
12205
 
12206
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12207
    public boolean isSet(_Fields field) {
12208
      switch (field) {
483 rajveer 12209
      case CUSTOMER_ID:
12210
        return isSetCustomerId();
12211
      case FROM_DATE:
12212
        return isSetFrom_date();
12213
      case TO_DATE:
12214
        return isSetTo_date();
12215
      case STATUS:
12216
        return isSetStatus();
68 ashish 12217
      }
12218
      throw new IllegalStateException();
12219
    }
12220
 
12221
    public boolean isSet(int fieldID) {
12222
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12223
    }
12224
 
12225
    @Override
12226
    public boolean equals(Object that) {
12227
      if (that == null)
12228
        return false;
483 rajveer 12229
      if (that instanceof getOrdersForCustomer_args)
12230
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 12231
      return false;
12232
    }
12233
 
483 rajveer 12234
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 12235
      if (that == null)
12236
        return false;
12237
 
483 rajveer 12238
      boolean this_present_customerId = true;
12239
      boolean that_present_customerId = true;
12240
      if (this_present_customerId || that_present_customerId) {
12241
        if (!(this_present_customerId && that_present_customerId))
68 ashish 12242
          return false;
483 rajveer 12243
        if (this.customerId != that.customerId)
68 ashish 12244
          return false;
12245
      }
12246
 
483 rajveer 12247
      boolean this_present_from_date = true;
12248
      boolean that_present_from_date = true;
12249
      if (this_present_from_date || that_present_from_date) {
12250
        if (!(this_present_from_date && that_present_from_date))
68 ashish 12251
          return false;
483 rajveer 12252
        if (this.from_date != that.from_date)
68 ashish 12253
          return false;
12254
      }
12255
 
483 rajveer 12256
      boolean this_present_to_date = true;
12257
      boolean that_present_to_date = true;
12258
      if (this_present_to_date || that_present_to_date) {
12259
        if (!(this_present_to_date && that_present_to_date))
68 ashish 12260
          return false;
483 rajveer 12261
        if (this.to_date != that.to_date)
68 ashish 12262
          return false;
12263
      }
12264
 
483 rajveer 12265
      boolean this_present_status = true && this.isSetStatus();
12266
      boolean that_present_status = true && that.isSetStatus();
12267
      if (this_present_status || that_present_status) {
12268
        if (!(this_present_status && that_present_status))
12269
          return false;
12270
        if (!this.status.equals(that.status))
12271
          return false;
12272
      }
12273
 
68 ashish 12274
      return true;
12275
    }
12276
 
12277
    @Override
12278
    public int hashCode() {
12279
      return 0;
12280
    }
12281
 
483 rajveer 12282
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 12283
      if (!getClass().equals(other.getClass())) {
12284
        return getClass().getName().compareTo(other.getClass().getName());
12285
      }
12286
 
12287
      int lastComparison = 0;
483 rajveer 12288
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 12289
 
483 rajveer 12290
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 12291
      if (lastComparison != 0) {
12292
        return lastComparison;
12293
      }
483 rajveer 12294
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 12295
      if (lastComparison != 0) {
12296
        return lastComparison;
12297
      }
483 rajveer 12298
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 12299
      if (lastComparison != 0) {
12300
        return lastComparison;
12301
      }
483 rajveer 12302
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 12303
      if (lastComparison != 0) {
12304
        return lastComparison;
12305
      }
483 rajveer 12306
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 12307
      if (lastComparison != 0) {
12308
        return lastComparison;
12309
      }
483 rajveer 12310
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 12311
      if (lastComparison != 0) {
12312
        return lastComparison;
12313
      }
483 rajveer 12314
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12315
      if (lastComparison != 0) {
12316
        return lastComparison;
12317
      }
12318
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12319
      if (lastComparison != 0) {
12320
        return lastComparison;
12321
      }
68 ashish 12322
      return 0;
12323
    }
12324
 
12325
    public void read(TProtocol iprot) throws TException {
12326
      TField field;
12327
      iprot.readStructBegin();
12328
      while (true)
12329
      {
12330
        field = iprot.readFieldBegin();
12331
        if (field.type == TType.STOP) { 
12332
          break;
12333
        }
12334
        _Fields fieldId = _Fields.findByThriftId(field.id);
12335
        if (fieldId == null) {
12336
          TProtocolUtil.skip(iprot, field.type);
12337
        } else {
12338
          switch (fieldId) {
483 rajveer 12339
            case CUSTOMER_ID:
68 ashish 12340
              if (field.type == TType.I64) {
483 rajveer 12341
                this.customerId = iprot.readI64();
12342
                setCustomerIdIsSet(true);
68 ashish 12343
              } else { 
12344
                TProtocolUtil.skip(iprot, field.type);
12345
              }
12346
              break;
483 rajveer 12347
            case FROM_DATE:
68 ashish 12348
              if (field.type == TType.I64) {
483 rajveer 12349
                this.from_date = iprot.readI64();
12350
                setFrom_dateIsSet(true);
68 ashish 12351
              } else { 
12352
                TProtocolUtil.skip(iprot, field.type);
12353
              }
12354
              break;
483 rajveer 12355
            case TO_DATE:
68 ashish 12356
              if (field.type == TType.I64) {
483 rajveer 12357
                this.to_date = iprot.readI64();
12358
                setTo_dateIsSet(true);
68 ashish 12359
              } else { 
12360
                TProtocolUtil.skip(iprot, field.type);
12361
              }
12362
              break;
483 rajveer 12363
            case STATUS:
12364
              if (field.type == TType.I32) {
12365
                this.status = OrderStatus.findByValue(iprot.readI32());
12366
              } else { 
12367
                TProtocolUtil.skip(iprot, field.type);
12368
              }
12369
              break;
68 ashish 12370
          }
12371
          iprot.readFieldEnd();
12372
        }
12373
      }
12374
      iprot.readStructEnd();
12375
      validate();
12376
    }
12377
 
12378
    public void write(TProtocol oprot) throws TException {
12379
      validate();
12380
 
12381
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12382
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
12383
      oprot.writeI64(this.customerId);
68 ashish 12384
      oprot.writeFieldEnd();
483 rajveer 12385
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
12386
      oprot.writeI64(this.from_date);
68 ashish 12387
      oprot.writeFieldEnd();
483 rajveer 12388
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
12389
      oprot.writeI64(this.to_date);
68 ashish 12390
      oprot.writeFieldEnd();
483 rajveer 12391
      if (this.status != null) {
12392
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12393
        oprot.writeI32(this.status.getValue());
12394
        oprot.writeFieldEnd();
12395
      }
68 ashish 12396
      oprot.writeFieldStop();
12397
      oprot.writeStructEnd();
12398
    }
12399
 
12400
    @Override
12401
    public String toString() {
483 rajveer 12402
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 12403
      boolean first = true;
12404
 
483 rajveer 12405
      sb.append("customerId:");
12406
      sb.append(this.customerId);
68 ashish 12407
      first = false;
12408
      if (!first) sb.append(", ");
483 rajveer 12409
      sb.append("from_date:");
12410
      sb.append(this.from_date);
68 ashish 12411
      first = false;
12412
      if (!first) sb.append(", ");
483 rajveer 12413
      sb.append("to_date:");
12414
      sb.append(this.to_date);
68 ashish 12415
      first = false;
483 rajveer 12416
      if (!first) sb.append(", ");
12417
      sb.append("status:");
12418
      if (this.status == null) {
12419
        sb.append("null");
12420
      } else {
12421
        String status_name = status.name();
12422
        if (status_name != null) {
12423
          sb.append(status_name);
12424
          sb.append(" (");
12425
        }
12426
        sb.append(this.status);
12427
        if (status_name != null) {
12428
          sb.append(")");
12429
        }
12430
      }
12431
      first = false;
68 ashish 12432
      sb.append(")");
12433
      return sb.toString();
12434
    }
12435
 
12436
    public void validate() throws TException {
12437
      // check for required fields
12438
    }
12439
 
12440
  }
12441
 
483 rajveer 12442
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
12443
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 12444
 
483 rajveer 12445
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12446
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12447
 
483 rajveer 12448
    private List<Order> success;
68 ashish 12449
    private TransactionServiceException ex;
12450
 
12451
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12452
    public enum _Fields implements TFieldIdEnum {
12453
      SUCCESS((short)0, "success"),
12454
      EX((short)1, "ex");
12455
 
12456
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12458
 
12459
      static {
12460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12461
          byId.put((int)field._thriftId, field);
12462
          byName.put(field.getFieldName(), field);
12463
        }
12464
      }
12465
 
12466
      /**
12467
       * Find the _Fields constant that matches fieldId, or null if its not found.
12468
       */
12469
      public static _Fields findByThriftId(int fieldId) {
12470
        return byId.get(fieldId);
12471
      }
12472
 
12473
      /**
12474
       * Find the _Fields constant that matches fieldId, throwing an exception
12475
       * if it is not found.
12476
       */
12477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12478
        _Fields fields = findByThriftId(fieldId);
12479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12480
        return fields;
12481
      }
12482
 
12483
      /**
12484
       * Find the _Fields constant that matches name, or null if its not found.
12485
       */
12486
      public static _Fields findByName(String name) {
12487
        return byName.get(name);
12488
      }
12489
 
12490
      private final short _thriftId;
12491
      private final String _fieldName;
12492
 
12493
      _Fields(short thriftId, String fieldName) {
12494
        _thriftId = thriftId;
12495
        _fieldName = fieldName;
12496
      }
12497
 
12498
      public short getThriftFieldId() {
12499
        return _thriftId;
12500
      }
12501
 
12502
      public String getFieldName() {
12503
        return _fieldName;
12504
      }
12505
    }
12506
 
12507
    // isset id assignments
12508
 
12509
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12510
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12511
          new ListMetaData(TType.LIST, 
12512
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12513
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12514
          new FieldValueMetaData(TType.STRUCT)));
12515
    }});
12516
 
12517
    static {
483 rajveer 12518
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 12519
    }
12520
 
483 rajveer 12521
    public getOrdersForCustomer_result() {
68 ashish 12522
    }
12523
 
483 rajveer 12524
    public getOrdersForCustomer_result(
12525
      List<Order> success,
68 ashish 12526
      TransactionServiceException ex)
12527
    {
12528
      this();
12529
      this.success = success;
12530
      this.ex = ex;
12531
    }
12532
 
12533
    /**
12534
     * Performs a deep copy on <i>other</i>.
12535
     */
483 rajveer 12536
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
12537
      if (other.isSetSuccess()) {
12538
        List<Order> __this__success = new ArrayList<Order>();
12539
        for (Order other_element : other.success) {
12540
          __this__success.add(new Order(other_element));
12541
        }
12542
        this.success = __this__success;
12543
      }
68 ashish 12544
      if (other.isSetEx()) {
12545
        this.ex = new TransactionServiceException(other.ex);
12546
      }
12547
    }
12548
 
483 rajveer 12549
    public getOrdersForCustomer_result deepCopy() {
12550
      return new getOrdersForCustomer_result(this);
68 ashish 12551
    }
12552
 
12553
    @Deprecated
483 rajveer 12554
    public getOrdersForCustomer_result clone() {
12555
      return new getOrdersForCustomer_result(this);
68 ashish 12556
    }
12557
 
483 rajveer 12558
    public int getSuccessSize() {
12559
      return (this.success == null) ? 0 : this.success.size();
12560
    }
12561
 
12562
    public java.util.Iterator<Order> getSuccessIterator() {
12563
      return (this.success == null) ? null : this.success.iterator();
12564
    }
12565
 
12566
    public void addToSuccess(Order elem) {
12567
      if (this.success == null) {
12568
        this.success = new ArrayList<Order>();
12569
      }
12570
      this.success.add(elem);
12571
    }
12572
 
12573
    public List<Order> getSuccess() {
68 ashish 12574
      return this.success;
12575
    }
12576
 
483 rajveer 12577
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 12578
      this.success = success;
12579
      return this;
12580
    }
12581
 
12582
    public void unsetSuccess() {
483 rajveer 12583
      this.success = null;
68 ashish 12584
    }
12585
 
12586
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12587
    public boolean isSetSuccess() {
483 rajveer 12588
      return this.success != null;
68 ashish 12589
    }
12590
 
12591
    public void setSuccessIsSet(boolean value) {
483 rajveer 12592
      if (!value) {
12593
        this.success = null;
12594
      }
68 ashish 12595
    }
12596
 
12597
    public TransactionServiceException getEx() {
12598
      return this.ex;
12599
    }
12600
 
483 rajveer 12601
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 12602
      this.ex = ex;
12603
      return this;
12604
    }
12605
 
12606
    public void unsetEx() {
12607
      this.ex = null;
12608
    }
12609
 
12610
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12611
    public boolean isSetEx() {
12612
      return this.ex != null;
12613
    }
12614
 
12615
    public void setExIsSet(boolean value) {
12616
      if (!value) {
12617
        this.ex = null;
12618
      }
12619
    }
12620
 
12621
    public void setFieldValue(_Fields field, Object value) {
12622
      switch (field) {
12623
      case SUCCESS:
12624
        if (value == null) {
12625
          unsetSuccess();
12626
        } else {
483 rajveer 12627
          setSuccess((List<Order>)value);
68 ashish 12628
        }
12629
        break;
12630
 
12631
      case EX:
12632
        if (value == null) {
12633
          unsetEx();
12634
        } else {
12635
          setEx((TransactionServiceException)value);
12636
        }
12637
        break;
12638
 
12639
      }
12640
    }
12641
 
12642
    public void setFieldValue(int fieldID, Object value) {
12643
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12644
    }
12645
 
12646
    public Object getFieldValue(_Fields field) {
12647
      switch (field) {
12648
      case SUCCESS:
483 rajveer 12649
        return getSuccess();
68 ashish 12650
 
12651
      case EX:
12652
        return getEx();
12653
 
12654
      }
12655
      throw new IllegalStateException();
12656
    }
12657
 
12658
    public Object getFieldValue(int fieldId) {
12659
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12660
    }
12661
 
12662
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12663
    public boolean isSet(_Fields field) {
12664
      switch (field) {
12665
      case SUCCESS:
12666
        return isSetSuccess();
12667
      case EX:
12668
        return isSetEx();
12669
      }
12670
      throw new IllegalStateException();
12671
    }
12672
 
12673
    public boolean isSet(int fieldID) {
12674
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12675
    }
12676
 
12677
    @Override
12678
    public boolean equals(Object that) {
12679
      if (that == null)
12680
        return false;
483 rajveer 12681
      if (that instanceof getOrdersForCustomer_result)
12682
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 12683
      return false;
12684
    }
12685
 
483 rajveer 12686
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 12687
      if (that == null)
12688
        return false;
12689
 
483 rajveer 12690
      boolean this_present_success = true && this.isSetSuccess();
12691
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12692
      if (this_present_success || that_present_success) {
12693
        if (!(this_present_success && that_present_success))
12694
          return false;
483 rajveer 12695
        if (!this.success.equals(that.success))
68 ashish 12696
          return false;
12697
      }
12698
 
12699
      boolean this_present_ex = true && this.isSetEx();
12700
      boolean that_present_ex = true && that.isSetEx();
12701
      if (this_present_ex || that_present_ex) {
12702
        if (!(this_present_ex && that_present_ex))
12703
          return false;
12704
        if (!this.ex.equals(that.ex))
12705
          return false;
12706
      }
12707
 
12708
      return true;
12709
    }
12710
 
12711
    @Override
12712
    public int hashCode() {
12713
      return 0;
12714
    }
12715
 
483 rajveer 12716
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 12717
      if (!getClass().equals(other.getClass())) {
12718
        return getClass().getName().compareTo(other.getClass().getName());
12719
      }
12720
 
12721
      int lastComparison = 0;
483 rajveer 12722
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 12723
 
12724
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12725
      if (lastComparison != 0) {
12726
        return lastComparison;
12727
      }
12728
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12729
      if (lastComparison != 0) {
12730
        return lastComparison;
12731
      }
12732
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12733
      if (lastComparison != 0) {
12734
        return lastComparison;
12735
      }
12736
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12737
      if (lastComparison != 0) {
12738
        return lastComparison;
12739
      }
12740
      return 0;
12741
    }
12742
 
12743
    public void read(TProtocol iprot) throws TException {
12744
      TField field;
12745
      iprot.readStructBegin();
12746
      while (true)
12747
      {
12748
        field = iprot.readFieldBegin();
12749
        if (field.type == TType.STOP) { 
12750
          break;
12751
        }
12752
        _Fields fieldId = _Fields.findByThriftId(field.id);
12753
        if (fieldId == null) {
12754
          TProtocolUtil.skip(iprot, field.type);
12755
        } else {
12756
          switch (fieldId) {
12757
            case SUCCESS:
483 rajveer 12758
              if (field.type == TType.LIST) {
12759
                {
1022 varun.gupt 12760
                  TList _list28 = iprot.readListBegin();
12761
                  this.success = new ArrayList<Order>(_list28.size);
12762
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 12763
                  {
1022 varun.gupt 12764
                    Order _elem30;
12765
                    _elem30 = new Order();
12766
                    _elem30.read(iprot);
12767
                    this.success.add(_elem30);
483 rajveer 12768
                  }
12769
                  iprot.readListEnd();
12770
                }
68 ashish 12771
              } else { 
12772
                TProtocolUtil.skip(iprot, field.type);
12773
              }
12774
              break;
12775
            case EX:
12776
              if (field.type == TType.STRUCT) {
12777
                this.ex = new TransactionServiceException();
12778
                this.ex.read(iprot);
12779
              } else { 
12780
                TProtocolUtil.skip(iprot, field.type);
12781
              }
12782
              break;
12783
          }
12784
          iprot.readFieldEnd();
12785
        }
12786
      }
12787
      iprot.readStructEnd();
12788
      validate();
12789
    }
12790
 
12791
    public void write(TProtocol oprot) throws TException {
12792
      oprot.writeStructBegin(STRUCT_DESC);
12793
 
12794
      if (this.isSetSuccess()) {
12795
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12796
        {
12797
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12798
          for (Order _iter31 : this.success)
483 rajveer 12799
          {
1022 varun.gupt 12800
            _iter31.write(oprot);
483 rajveer 12801
          }
12802
          oprot.writeListEnd();
12803
        }
68 ashish 12804
        oprot.writeFieldEnd();
12805
      } else if (this.isSetEx()) {
12806
        oprot.writeFieldBegin(EX_FIELD_DESC);
12807
        this.ex.write(oprot);
12808
        oprot.writeFieldEnd();
12809
      }
12810
      oprot.writeFieldStop();
12811
      oprot.writeStructEnd();
12812
    }
12813
 
12814
    @Override
12815
    public String toString() {
483 rajveer 12816
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 12817
      boolean first = true;
12818
 
12819
      sb.append("success:");
483 rajveer 12820
      if (this.success == null) {
12821
        sb.append("null");
12822
      } else {
12823
        sb.append(this.success);
12824
      }
68 ashish 12825
      first = false;
12826
      if (!first) sb.append(", ");
12827
      sb.append("ex:");
12828
      if (this.ex == null) {
12829
        sb.append("null");
12830
      } else {
12831
        sb.append(this.ex);
12832
      }
12833
      first = false;
12834
      sb.append(")");
12835
      return sb.toString();
12836
    }
12837
 
12838
    public void validate() throws TException {
12839
      // check for required fields
12840
    }
12841
 
12842
  }
12843
 
483 rajveer 12844
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
12845
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 12846
 
483 rajveer 12847
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 12848
 
483 rajveer 12849
    private Order order;
68 ashish 12850
 
12851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12852
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12853
      ORDER((short)1, "order");
68 ashish 12854
 
12855
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12857
 
12858
      static {
12859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12860
          byId.put((int)field._thriftId, field);
12861
          byName.put(field.getFieldName(), field);
12862
        }
12863
      }
12864
 
12865
      /**
12866
       * Find the _Fields constant that matches fieldId, or null if its not found.
12867
       */
12868
      public static _Fields findByThriftId(int fieldId) {
12869
        return byId.get(fieldId);
12870
      }
12871
 
12872
      /**
12873
       * Find the _Fields constant that matches fieldId, throwing an exception
12874
       * if it is not found.
12875
       */
12876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12877
        _Fields fields = findByThriftId(fieldId);
12878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12879
        return fields;
12880
      }
12881
 
12882
      /**
12883
       * Find the _Fields constant that matches name, or null if its not found.
12884
       */
12885
      public static _Fields findByName(String name) {
12886
        return byName.get(name);
12887
      }
12888
 
12889
      private final short _thriftId;
12890
      private final String _fieldName;
12891
 
12892
      _Fields(short thriftId, String fieldName) {
12893
        _thriftId = thriftId;
12894
        _fieldName = fieldName;
12895
      }
12896
 
12897
      public short getThriftFieldId() {
12898
        return _thriftId;
12899
      }
12900
 
12901
      public String getFieldName() {
12902
        return _fieldName;
12903
      }
12904
    }
12905
 
12906
    // isset id assignments
12907
 
12908
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12909
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
12910
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 12911
    }});
12912
 
12913
    static {
483 rajveer 12914
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 12915
    }
12916
 
483 rajveer 12917
    public createOrder_args() {
68 ashish 12918
    }
12919
 
483 rajveer 12920
    public createOrder_args(
12921
      Order order)
68 ashish 12922
    {
12923
      this();
483 rajveer 12924
      this.order = order;
68 ashish 12925
    }
12926
 
12927
    /**
12928
     * Performs a deep copy on <i>other</i>.
12929
     */
483 rajveer 12930
    public createOrder_args(createOrder_args other) {
12931
      if (other.isSetOrder()) {
12932
        this.order = new Order(other.order);
12933
      }
68 ashish 12934
    }
12935
 
483 rajveer 12936
    public createOrder_args deepCopy() {
12937
      return new createOrder_args(this);
68 ashish 12938
    }
12939
 
12940
    @Deprecated
483 rajveer 12941
    public createOrder_args clone() {
12942
      return new createOrder_args(this);
68 ashish 12943
    }
12944
 
483 rajveer 12945
    public Order getOrder() {
12946
      return this.order;
68 ashish 12947
    }
12948
 
483 rajveer 12949
    public createOrder_args setOrder(Order order) {
12950
      this.order = order;
68 ashish 12951
      return this;
12952
    }
12953
 
483 rajveer 12954
    public void unsetOrder() {
12955
      this.order = null;
68 ashish 12956
    }
12957
 
483 rajveer 12958
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
12959
    public boolean isSetOrder() {
12960
      return this.order != null;
68 ashish 12961
    }
12962
 
483 rajveer 12963
    public void setOrderIsSet(boolean value) {
12964
      if (!value) {
12965
        this.order = null;
12966
      }
68 ashish 12967
    }
12968
 
12969
    public void setFieldValue(_Fields field, Object value) {
12970
      switch (field) {
483 rajveer 12971
      case ORDER:
68 ashish 12972
        if (value == null) {
483 rajveer 12973
          unsetOrder();
68 ashish 12974
        } else {
483 rajveer 12975
          setOrder((Order)value);
68 ashish 12976
        }
12977
        break;
12978
 
12979
      }
12980
    }
12981
 
12982
    public void setFieldValue(int fieldID, Object value) {
12983
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12984
    }
12985
 
12986
    public Object getFieldValue(_Fields field) {
12987
      switch (field) {
483 rajveer 12988
      case ORDER:
12989
        return getOrder();
68 ashish 12990
 
12991
      }
12992
      throw new IllegalStateException();
12993
    }
12994
 
12995
    public Object getFieldValue(int fieldId) {
12996
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12997
    }
12998
 
12999
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13000
    public boolean isSet(_Fields field) {
13001
      switch (field) {
483 rajveer 13002
      case ORDER:
13003
        return isSetOrder();
68 ashish 13004
      }
13005
      throw new IllegalStateException();
13006
    }
13007
 
13008
    public boolean isSet(int fieldID) {
13009
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13010
    }
13011
 
13012
    @Override
13013
    public boolean equals(Object that) {
13014
      if (that == null)
13015
        return false;
483 rajveer 13016
      if (that instanceof createOrder_args)
13017
        return this.equals((createOrder_args)that);
68 ashish 13018
      return false;
13019
    }
13020
 
483 rajveer 13021
    public boolean equals(createOrder_args that) {
68 ashish 13022
      if (that == null)
13023
        return false;
13024
 
483 rajveer 13025
      boolean this_present_order = true && this.isSetOrder();
13026
      boolean that_present_order = true && that.isSetOrder();
13027
      if (this_present_order || that_present_order) {
13028
        if (!(this_present_order && that_present_order))
68 ashish 13029
          return false;
483 rajveer 13030
        if (!this.order.equals(that.order))
68 ashish 13031
          return false;
13032
      }
13033
 
13034
      return true;
13035
    }
13036
 
13037
    @Override
13038
    public int hashCode() {
13039
      return 0;
13040
    }
13041
 
483 rajveer 13042
    public int compareTo(createOrder_args other) {
68 ashish 13043
      if (!getClass().equals(other.getClass())) {
13044
        return getClass().getName().compareTo(other.getClass().getName());
13045
      }
13046
 
13047
      int lastComparison = 0;
483 rajveer 13048
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 13049
 
483 rajveer 13050
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 13051
      if (lastComparison != 0) {
13052
        return lastComparison;
13053
      }
483 rajveer 13054
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 13055
      if (lastComparison != 0) {
13056
        return lastComparison;
13057
      }
13058
      return 0;
13059
    }
13060
 
13061
    public void read(TProtocol iprot) throws TException {
13062
      TField field;
13063
      iprot.readStructBegin();
13064
      while (true)
13065
      {
13066
        field = iprot.readFieldBegin();
13067
        if (field.type == TType.STOP) { 
13068
          break;
13069
        }
13070
        _Fields fieldId = _Fields.findByThriftId(field.id);
13071
        if (fieldId == null) {
13072
          TProtocolUtil.skip(iprot, field.type);
13073
        } else {
13074
          switch (fieldId) {
483 rajveer 13075
            case ORDER:
13076
              if (field.type == TType.STRUCT) {
13077
                this.order = new Order();
13078
                this.order.read(iprot);
68 ashish 13079
              } else { 
13080
                TProtocolUtil.skip(iprot, field.type);
13081
              }
13082
              break;
13083
          }
13084
          iprot.readFieldEnd();
13085
        }
13086
      }
13087
      iprot.readStructEnd();
13088
      validate();
13089
    }
13090
 
13091
    public void write(TProtocol oprot) throws TException {
13092
      validate();
13093
 
13094
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13095
      if (this.order != null) {
13096
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
13097
        this.order.write(oprot);
13098
        oprot.writeFieldEnd();
13099
      }
68 ashish 13100
      oprot.writeFieldStop();
13101
      oprot.writeStructEnd();
13102
    }
13103
 
13104
    @Override
13105
    public String toString() {
483 rajveer 13106
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 13107
      boolean first = true;
13108
 
483 rajveer 13109
      sb.append("order:");
13110
      if (this.order == null) {
13111
        sb.append("null");
13112
      } else {
13113
        sb.append(this.order);
13114
      }
68 ashish 13115
      first = false;
13116
      sb.append(")");
13117
      return sb.toString();
13118
    }
13119
 
13120
    public void validate() throws TException {
13121
      // check for required fields
13122
    }
13123
 
13124
  }
13125
 
483 rajveer 13126
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
13127
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 13128
 
483 rajveer 13129
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 13130
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13131
 
483 rajveer 13132
    private long success;
68 ashish 13133
    private TransactionServiceException ex;
13134
 
13135
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13136
    public enum _Fields implements TFieldIdEnum {
13137
      SUCCESS((short)0, "success"),
13138
      EX((short)1, "ex");
13139
 
13140
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13141
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13142
 
13143
      static {
13144
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13145
          byId.put((int)field._thriftId, field);
13146
          byName.put(field.getFieldName(), field);
13147
        }
13148
      }
13149
 
13150
      /**
13151
       * Find the _Fields constant that matches fieldId, or null if its not found.
13152
       */
13153
      public static _Fields findByThriftId(int fieldId) {
13154
        return byId.get(fieldId);
13155
      }
13156
 
13157
      /**
13158
       * Find the _Fields constant that matches fieldId, throwing an exception
13159
       * if it is not found.
13160
       */
13161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13162
        _Fields fields = findByThriftId(fieldId);
13163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13164
        return fields;
13165
      }
13166
 
13167
      /**
13168
       * Find the _Fields constant that matches name, or null if its not found.
13169
       */
13170
      public static _Fields findByName(String name) {
13171
        return byName.get(name);
13172
      }
13173
 
13174
      private final short _thriftId;
13175
      private final String _fieldName;
13176
 
13177
      _Fields(short thriftId, String fieldName) {
13178
        _thriftId = thriftId;
13179
        _fieldName = fieldName;
13180
      }
13181
 
13182
      public short getThriftFieldId() {
13183
        return _thriftId;
13184
      }
13185
 
13186
      public String getFieldName() {
13187
        return _fieldName;
13188
      }
13189
    }
13190
 
13191
    // isset id assignments
13192
    private static final int __SUCCESS_ISSET_ID = 0;
13193
    private BitSet __isset_bit_vector = new BitSet(1);
13194
 
13195
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13196
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13197
          new FieldValueMetaData(TType.I64)));
68 ashish 13198
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13199
          new FieldValueMetaData(TType.STRUCT)));
13200
    }});
13201
 
13202
    static {
483 rajveer 13203
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 13204
    }
13205
 
483 rajveer 13206
    public createOrder_result() {
68 ashish 13207
    }
13208
 
483 rajveer 13209
    public createOrder_result(
13210
      long success,
68 ashish 13211
      TransactionServiceException ex)
13212
    {
13213
      this();
13214
      this.success = success;
13215
      setSuccessIsSet(true);
13216
      this.ex = ex;
13217
    }
13218
 
13219
    /**
13220
     * Performs a deep copy on <i>other</i>.
13221
     */
483 rajveer 13222
    public createOrder_result(createOrder_result other) {
68 ashish 13223
      __isset_bit_vector.clear();
13224
      __isset_bit_vector.or(other.__isset_bit_vector);
13225
      this.success = other.success;
13226
      if (other.isSetEx()) {
13227
        this.ex = new TransactionServiceException(other.ex);
13228
      }
13229
    }
13230
 
483 rajveer 13231
    public createOrder_result deepCopy() {
13232
      return new createOrder_result(this);
68 ashish 13233
    }
13234
 
13235
    @Deprecated
483 rajveer 13236
    public createOrder_result clone() {
13237
      return new createOrder_result(this);
68 ashish 13238
    }
13239
 
483 rajveer 13240
    public long getSuccess() {
68 ashish 13241
      return this.success;
13242
    }
13243
 
483 rajveer 13244
    public createOrder_result setSuccess(long success) {
68 ashish 13245
      this.success = success;
13246
      setSuccessIsSet(true);
13247
      return this;
13248
    }
13249
 
13250
    public void unsetSuccess() {
13251
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13252
    }
13253
 
13254
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13255
    public boolean isSetSuccess() {
13256
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13257
    }
13258
 
13259
    public void setSuccessIsSet(boolean value) {
13260
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13261
    }
13262
 
13263
    public TransactionServiceException getEx() {
13264
      return this.ex;
13265
    }
13266
 
483 rajveer 13267
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 13268
      this.ex = ex;
13269
      return this;
13270
    }
13271
 
13272
    public void unsetEx() {
13273
      this.ex = null;
13274
    }
13275
 
13276
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13277
    public boolean isSetEx() {
13278
      return this.ex != null;
13279
    }
13280
 
13281
    public void setExIsSet(boolean value) {
13282
      if (!value) {
13283
        this.ex = null;
13284
      }
13285
    }
13286
 
13287
    public void setFieldValue(_Fields field, Object value) {
13288
      switch (field) {
13289
      case SUCCESS:
13290
        if (value == null) {
13291
          unsetSuccess();
13292
        } else {
483 rajveer 13293
          setSuccess((Long)value);
68 ashish 13294
        }
13295
        break;
13296
 
13297
      case EX:
13298
        if (value == null) {
13299
          unsetEx();
13300
        } else {
13301
          setEx((TransactionServiceException)value);
13302
        }
13303
        break;
13304
 
13305
      }
13306
    }
13307
 
13308
    public void setFieldValue(int fieldID, Object value) {
13309
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13310
    }
13311
 
13312
    public Object getFieldValue(_Fields field) {
13313
      switch (field) {
13314
      case SUCCESS:
483 rajveer 13315
        return new Long(getSuccess());
68 ashish 13316
 
13317
      case EX:
13318
        return getEx();
13319
 
13320
      }
13321
      throw new IllegalStateException();
13322
    }
13323
 
13324
    public Object getFieldValue(int fieldId) {
13325
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13326
    }
13327
 
13328
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13329
    public boolean isSet(_Fields field) {
13330
      switch (field) {
13331
      case SUCCESS:
13332
        return isSetSuccess();
13333
      case EX:
13334
        return isSetEx();
13335
      }
13336
      throw new IllegalStateException();
13337
    }
13338
 
13339
    public boolean isSet(int fieldID) {
13340
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13341
    }
13342
 
13343
    @Override
13344
    public boolean equals(Object that) {
13345
      if (that == null)
13346
        return false;
483 rajveer 13347
      if (that instanceof createOrder_result)
13348
        return this.equals((createOrder_result)that);
68 ashish 13349
      return false;
13350
    }
13351
 
483 rajveer 13352
    public boolean equals(createOrder_result that) {
68 ashish 13353
      if (that == null)
13354
        return false;
13355
 
13356
      boolean this_present_success = true;
13357
      boolean that_present_success = true;
13358
      if (this_present_success || that_present_success) {
13359
        if (!(this_present_success && that_present_success))
13360
          return false;
13361
        if (this.success != that.success)
13362
          return false;
13363
      }
13364
 
13365
      boolean this_present_ex = true && this.isSetEx();
13366
      boolean that_present_ex = true && that.isSetEx();
13367
      if (this_present_ex || that_present_ex) {
13368
        if (!(this_present_ex && that_present_ex))
13369
          return false;
13370
        if (!this.ex.equals(that.ex))
13371
          return false;
13372
      }
13373
 
13374
      return true;
13375
    }
13376
 
13377
    @Override
13378
    public int hashCode() {
13379
      return 0;
13380
    }
13381
 
483 rajveer 13382
    public int compareTo(createOrder_result other) {
68 ashish 13383
      if (!getClass().equals(other.getClass())) {
13384
        return getClass().getName().compareTo(other.getClass().getName());
13385
      }
13386
 
13387
      int lastComparison = 0;
483 rajveer 13388
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 13389
 
13390
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13391
      if (lastComparison != 0) {
13392
        return lastComparison;
13393
      }
13394
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13395
      if (lastComparison != 0) {
13396
        return lastComparison;
13397
      }
13398
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13399
      if (lastComparison != 0) {
13400
        return lastComparison;
13401
      }
13402
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13403
      if (lastComparison != 0) {
13404
        return lastComparison;
13405
      }
13406
      return 0;
13407
    }
13408
 
13409
    public void read(TProtocol iprot) throws TException {
13410
      TField field;
13411
      iprot.readStructBegin();
13412
      while (true)
13413
      {
13414
        field = iprot.readFieldBegin();
13415
        if (field.type == TType.STOP) { 
13416
          break;
13417
        }
13418
        _Fields fieldId = _Fields.findByThriftId(field.id);
13419
        if (fieldId == null) {
13420
          TProtocolUtil.skip(iprot, field.type);
13421
        } else {
13422
          switch (fieldId) {
13423
            case SUCCESS:
483 rajveer 13424
              if (field.type == TType.I64) {
13425
                this.success = iprot.readI64();
68 ashish 13426
                setSuccessIsSet(true);
13427
              } else { 
13428
                TProtocolUtil.skip(iprot, field.type);
13429
              }
13430
              break;
13431
            case EX:
13432
              if (field.type == TType.STRUCT) {
13433
                this.ex = new TransactionServiceException();
13434
                this.ex.read(iprot);
13435
              } else { 
13436
                TProtocolUtil.skip(iprot, field.type);
13437
              }
13438
              break;
13439
          }
13440
          iprot.readFieldEnd();
13441
        }
13442
      }
13443
      iprot.readStructEnd();
13444
      validate();
13445
    }
13446
 
13447
    public void write(TProtocol oprot) throws TException {
13448
      oprot.writeStructBegin(STRUCT_DESC);
13449
 
13450
      if (this.isSetSuccess()) {
13451
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13452
        oprot.writeI64(this.success);
68 ashish 13453
        oprot.writeFieldEnd();
13454
      } else if (this.isSetEx()) {
13455
        oprot.writeFieldBegin(EX_FIELD_DESC);
13456
        this.ex.write(oprot);
13457
        oprot.writeFieldEnd();
13458
      }
13459
      oprot.writeFieldStop();
13460
      oprot.writeStructEnd();
13461
    }
13462
 
13463
    @Override
13464
    public String toString() {
483 rajveer 13465
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 13466
      boolean first = true;
13467
 
13468
      sb.append("success:");
13469
      sb.append(this.success);
13470
      first = false;
13471
      if (!first) sb.append(", ");
13472
      sb.append("ex:");
13473
      if (this.ex == null) {
13474
        sb.append("null");
13475
      } else {
13476
        sb.append(this.ex);
13477
      }
13478
      first = false;
13479
      sb.append(")");
13480
      return sb.toString();
13481
    }
13482
 
13483
    public void validate() throws TException {
13484
      // check for required fields
13485
    }
13486
 
13487
  }
13488
 
483 rajveer 13489
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
13490
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 13491
 
483 rajveer 13492
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 13493
 
483 rajveer 13494
    private long id;
68 ashish 13495
 
13496
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13497
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13498
      ID((short)1, "id");
68 ashish 13499
 
13500
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13501
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13502
 
13503
      static {
13504
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13505
          byId.put((int)field._thriftId, field);
13506
          byName.put(field.getFieldName(), field);
13507
        }
13508
      }
13509
 
13510
      /**
13511
       * Find the _Fields constant that matches fieldId, or null if its not found.
13512
       */
13513
      public static _Fields findByThriftId(int fieldId) {
13514
        return byId.get(fieldId);
13515
      }
13516
 
13517
      /**
13518
       * Find the _Fields constant that matches fieldId, throwing an exception
13519
       * if it is not found.
13520
       */
13521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13522
        _Fields fields = findByThriftId(fieldId);
13523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13524
        return fields;
13525
      }
13526
 
13527
      /**
13528
       * Find the _Fields constant that matches name, or null if its not found.
13529
       */
13530
      public static _Fields findByName(String name) {
13531
        return byName.get(name);
13532
      }
13533
 
13534
      private final short _thriftId;
13535
      private final String _fieldName;
13536
 
13537
      _Fields(short thriftId, String fieldName) {
13538
        _thriftId = thriftId;
13539
        _fieldName = fieldName;
13540
      }
13541
 
13542
      public short getThriftFieldId() {
13543
        return _thriftId;
13544
      }
13545
 
13546
      public String getFieldName() {
13547
        return _fieldName;
13548
      }
13549
    }
13550
 
13551
    // isset id assignments
483 rajveer 13552
    private static final int __ID_ISSET_ID = 0;
13553
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 13554
 
13555
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13556
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 13557
          new FieldValueMetaData(TType.I64)));
13558
    }});
13559
 
13560
    static {
483 rajveer 13561
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 13562
    }
13563
 
483 rajveer 13564
    public getOrder_args() {
68 ashish 13565
    }
13566
 
483 rajveer 13567
    public getOrder_args(
13568
      long id)
68 ashish 13569
    {
13570
      this();
483 rajveer 13571
      this.id = id;
13572
      setIdIsSet(true);
68 ashish 13573
    }
13574
 
13575
    /**
13576
     * Performs a deep copy on <i>other</i>.
13577
     */
483 rajveer 13578
    public getOrder_args(getOrder_args other) {
68 ashish 13579
      __isset_bit_vector.clear();
13580
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 13581
      this.id = other.id;
68 ashish 13582
    }
13583
 
483 rajveer 13584
    public getOrder_args deepCopy() {
13585
      return new getOrder_args(this);
68 ashish 13586
    }
13587
 
13588
    @Deprecated
483 rajveer 13589
    public getOrder_args clone() {
13590
      return new getOrder_args(this);
68 ashish 13591
    }
13592
 
483 rajveer 13593
    public long getId() {
13594
      return this.id;
68 ashish 13595
    }
13596
 
483 rajveer 13597
    public getOrder_args setId(long id) {
13598
      this.id = id;
13599
      setIdIsSet(true);
68 ashish 13600
      return this;
13601
    }
13602
 
483 rajveer 13603
    public void unsetId() {
13604
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 13605
    }
13606
 
483 rajveer 13607
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
13608
    public boolean isSetId() {
13609
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 13610
    }
13611
 
483 rajveer 13612
    public void setIdIsSet(boolean value) {
13613
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 13614
    }
13615
 
13616
    public void setFieldValue(_Fields field, Object value) {
13617
      switch (field) {
483 rajveer 13618
      case ID:
68 ashish 13619
        if (value == null) {
483 rajveer 13620
          unsetId();
68 ashish 13621
        } else {
483 rajveer 13622
          setId((Long)value);
68 ashish 13623
        }
13624
        break;
13625
 
13626
      }
13627
    }
13628
 
13629
    public void setFieldValue(int fieldID, Object value) {
13630
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13631
    }
13632
 
13633
    public Object getFieldValue(_Fields field) {
13634
      switch (field) {
483 rajveer 13635
      case ID:
13636
        return new Long(getId());
68 ashish 13637
 
13638
      }
13639
      throw new IllegalStateException();
13640
    }
13641
 
13642
    public Object getFieldValue(int fieldId) {
13643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13644
    }
13645
 
13646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13647
    public boolean isSet(_Fields field) {
13648
      switch (field) {
483 rajveer 13649
      case ID:
13650
        return isSetId();
68 ashish 13651
      }
13652
      throw new IllegalStateException();
13653
    }
13654
 
13655
    public boolean isSet(int fieldID) {
13656
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13657
    }
13658
 
13659
    @Override
13660
    public boolean equals(Object that) {
13661
      if (that == null)
13662
        return false;
483 rajveer 13663
      if (that instanceof getOrder_args)
13664
        return this.equals((getOrder_args)that);
68 ashish 13665
      return false;
13666
    }
13667
 
483 rajveer 13668
    public boolean equals(getOrder_args that) {
68 ashish 13669
      if (that == null)
13670
        return false;
13671
 
483 rajveer 13672
      boolean this_present_id = true;
13673
      boolean that_present_id = true;
13674
      if (this_present_id || that_present_id) {
13675
        if (!(this_present_id && that_present_id))
68 ashish 13676
          return false;
483 rajveer 13677
        if (this.id != that.id)
68 ashish 13678
          return false;
13679
      }
13680
 
13681
      return true;
13682
    }
13683
 
13684
    @Override
13685
    public int hashCode() {
13686
      return 0;
13687
    }
13688
 
483 rajveer 13689
    public int compareTo(getOrder_args other) {
68 ashish 13690
      if (!getClass().equals(other.getClass())) {
13691
        return getClass().getName().compareTo(other.getClass().getName());
13692
      }
13693
 
13694
      int lastComparison = 0;
483 rajveer 13695
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 13696
 
483 rajveer 13697
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 13698
      if (lastComparison != 0) {
13699
        return lastComparison;
13700
      }
483 rajveer 13701
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 13702
      if (lastComparison != 0) {
13703
        return lastComparison;
13704
      }
13705
      return 0;
13706
    }
13707
 
13708
    public void read(TProtocol iprot) throws TException {
13709
      TField field;
13710
      iprot.readStructBegin();
13711
      while (true)
13712
      {
13713
        field = iprot.readFieldBegin();
13714
        if (field.type == TType.STOP) { 
13715
          break;
13716
        }
13717
        _Fields fieldId = _Fields.findByThriftId(field.id);
13718
        if (fieldId == null) {
13719
          TProtocolUtil.skip(iprot, field.type);
13720
        } else {
13721
          switch (fieldId) {
483 rajveer 13722
            case ID:
68 ashish 13723
              if (field.type == TType.I64) {
483 rajveer 13724
                this.id = iprot.readI64();
13725
                setIdIsSet(true);
68 ashish 13726
              } else { 
13727
                TProtocolUtil.skip(iprot, field.type);
13728
              }
13729
              break;
13730
          }
13731
          iprot.readFieldEnd();
13732
        }
13733
      }
13734
      iprot.readStructEnd();
13735
      validate();
13736
    }
13737
 
13738
    public void write(TProtocol oprot) throws TException {
13739
      validate();
13740
 
13741
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13742
      oprot.writeFieldBegin(ID_FIELD_DESC);
13743
      oprot.writeI64(this.id);
68 ashish 13744
      oprot.writeFieldEnd();
13745
      oprot.writeFieldStop();
13746
      oprot.writeStructEnd();
13747
    }
13748
 
13749
    @Override
13750
    public String toString() {
483 rajveer 13751
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 13752
      boolean first = true;
13753
 
483 rajveer 13754
      sb.append("id:");
13755
      sb.append(this.id);
68 ashish 13756
      first = false;
13757
      sb.append(")");
13758
      return sb.toString();
13759
    }
13760
 
13761
    public void validate() throws TException {
13762
      // check for required fields
13763
    }
13764
 
13765
  }
13766
 
483 rajveer 13767
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
13768
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 13769
 
483 rajveer 13770
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 13771
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13772
 
483 rajveer 13773
    private Order success;
68 ashish 13774
    private TransactionServiceException ex;
13775
 
13776
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13777
    public enum _Fields implements TFieldIdEnum {
13778
      SUCCESS((short)0, "success"),
13779
      EX((short)1, "ex");
13780
 
13781
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13782
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13783
 
13784
      static {
13785
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13786
          byId.put((int)field._thriftId, field);
13787
          byName.put(field.getFieldName(), field);
13788
        }
13789
      }
13790
 
13791
      /**
13792
       * Find the _Fields constant that matches fieldId, or null if its not found.
13793
       */
13794
      public static _Fields findByThriftId(int fieldId) {
13795
        return byId.get(fieldId);
13796
      }
13797
 
13798
      /**
13799
       * Find the _Fields constant that matches fieldId, throwing an exception
13800
       * if it is not found.
13801
       */
13802
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13803
        _Fields fields = findByThriftId(fieldId);
13804
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13805
        return fields;
13806
      }
13807
 
13808
      /**
13809
       * Find the _Fields constant that matches name, or null if its not found.
13810
       */
13811
      public static _Fields findByName(String name) {
13812
        return byName.get(name);
13813
      }
13814
 
13815
      private final short _thriftId;
13816
      private final String _fieldName;
13817
 
13818
      _Fields(short thriftId, String fieldName) {
13819
        _thriftId = thriftId;
13820
        _fieldName = fieldName;
13821
      }
13822
 
13823
      public short getThriftFieldId() {
13824
        return _thriftId;
13825
      }
13826
 
13827
      public String getFieldName() {
13828
        return _fieldName;
13829
      }
13830
    }
13831
 
13832
    // isset id assignments
13833
 
13834
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13835
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13836
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13837
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13838
          new FieldValueMetaData(TType.STRUCT)));
13839
    }});
13840
 
13841
    static {
483 rajveer 13842
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 13843
    }
13844
 
483 rajveer 13845
    public getOrder_result() {
68 ashish 13846
    }
13847
 
483 rajveer 13848
    public getOrder_result(
13849
      Order success,
68 ashish 13850
      TransactionServiceException ex)
13851
    {
13852
      this();
13853
      this.success = success;
13854
      this.ex = ex;
13855
    }
13856
 
13857
    /**
13858
     * Performs a deep copy on <i>other</i>.
13859
     */
483 rajveer 13860
    public getOrder_result(getOrder_result other) {
13861
      if (other.isSetSuccess()) {
13862
        this.success = new Order(other.success);
13863
      }
68 ashish 13864
      if (other.isSetEx()) {
13865
        this.ex = new TransactionServiceException(other.ex);
13866
      }
13867
    }
13868
 
483 rajveer 13869
    public getOrder_result deepCopy() {
13870
      return new getOrder_result(this);
68 ashish 13871
    }
13872
 
13873
    @Deprecated
483 rajveer 13874
    public getOrder_result clone() {
13875
      return new getOrder_result(this);
68 ashish 13876
    }
13877
 
483 rajveer 13878
    public Order getSuccess() {
68 ashish 13879
      return this.success;
13880
    }
13881
 
483 rajveer 13882
    public getOrder_result setSuccess(Order success) {
68 ashish 13883
      this.success = success;
13884
      return this;
13885
    }
13886
 
13887
    public void unsetSuccess() {
483 rajveer 13888
      this.success = null;
68 ashish 13889
    }
13890
 
13891
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13892
    public boolean isSetSuccess() {
483 rajveer 13893
      return this.success != null;
68 ashish 13894
    }
13895
 
13896
    public void setSuccessIsSet(boolean value) {
483 rajveer 13897
      if (!value) {
13898
        this.success = null;
13899
      }
68 ashish 13900
    }
13901
 
13902
    public TransactionServiceException getEx() {
13903
      return this.ex;
13904
    }
13905
 
483 rajveer 13906
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 13907
      this.ex = ex;
13908
      return this;
13909
    }
13910
 
13911
    public void unsetEx() {
13912
      this.ex = null;
13913
    }
13914
 
13915
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13916
    public boolean isSetEx() {
13917
      return this.ex != null;
13918
    }
13919
 
13920
    public void setExIsSet(boolean value) {
13921
      if (!value) {
13922
        this.ex = null;
13923
      }
13924
    }
13925
 
13926
    public void setFieldValue(_Fields field, Object value) {
13927
      switch (field) {
13928
      case SUCCESS:
13929
        if (value == null) {
13930
          unsetSuccess();
13931
        } else {
483 rajveer 13932
          setSuccess((Order)value);
68 ashish 13933
        }
13934
        break;
13935
 
13936
      case EX:
13937
        if (value == null) {
13938
          unsetEx();
13939
        } else {
13940
          setEx((TransactionServiceException)value);
13941
        }
13942
        break;
13943
 
13944
      }
13945
    }
13946
 
13947
    public void setFieldValue(int fieldID, Object value) {
13948
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13949
    }
13950
 
13951
    public Object getFieldValue(_Fields field) {
13952
      switch (field) {
13953
      case SUCCESS:
483 rajveer 13954
        return getSuccess();
68 ashish 13955
 
13956
      case EX:
13957
        return getEx();
13958
 
13959
      }
13960
      throw new IllegalStateException();
13961
    }
13962
 
13963
    public Object getFieldValue(int fieldId) {
13964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13965
    }
13966
 
13967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13968
    public boolean isSet(_Fields field) {
13969
      switch (field) {
13970
      case SUCCESS:
13971
        return isSetSuccess();
13972
      case EX:
13973
        return isSetEx();
13974
      }
13975
      throw new IllegalStateException();
13976
    }
13977
 
13978
    public boolean isSet(int fieldID) {
13979
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13980
    }
13981
 
13982
    @Override
13983
    public boolean equals(Object that) {
13984
      if (that == null)
13985
        return false;
483 rajveer 13986
      if (that instanceof getOrder_result)
13987
        return this.equals((getOrder_result)that);
68 ashish 13988
      return false;
13989
    }
13990
 
483 rajveer 13991
    public boolean equals(getOrder_result that) {
68 ashish 13992
      if (that == null)
13993
        return false;
13994
 
483 rajveer 13995
      boolean this_present_success = true && this.isSetSuccess();
13996
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13997
      if (this_present_success || that_present_success) {
13998
        if (!(this_present_success && that_present_success))
13999
          return false;
483 rajveer 14000
        if (!this.success.equals(that.success))
68 ashish 14001
          return false;
14002
      }
14003
 
14004
      boolean this_present_ex = true && this.isSetEx();
14005
      boolean that_present_ex = true && that.isSetEx();
14006
      if (this_present_ex || that_present_ex) {
14007
        if (!(this_present_ex && that_present_ex))
14008
          return false;
14009
        if (!this.ex.equals(that.ex))
14010
          return false;
14011
      }
14012
 
14013
      return true;
14014
    }
14015
 
14016
    @Override
14017
    public int hashCode() {
14018
      return 0;
14019
    }
14020
 
483 rajveer 14021
    public int compareTo(getOrder_result other) {
68 ashish 14022
      if (!getClass().equals(other.getClass())) {
14023
        return getClass().getName().compareTo(other.getClass().getName());
14024
      }
14025
 
14026
      int lastComparison = 0;
483 rajveer 14027
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 14028
 
14029
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14030
      if (lastComparison != 0) {
14031
        return lastComparison;
14032
      }
14033
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14034
      if (lastComparison != 0) {
14035
        return lastComparison;
14036
      }
14037
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14038
      if (lastComparison != 0) {
14039
        return lastComparison;
14040
      }
14041
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14042
      if (lastComparison != 0) {
14043
        return lastComparison;
14044
      }
14045
      return 0;
14046
    }
14047
 
14048
    public void read(TProtocol iprot) throws TException {
14049
      TField field;
14050
      iprot.readStructBegin();
14051
      while (true)
14052
      {
14053
        field = iprot.readFieldBegin();
14054
        if (field.type == TType.STOP) { 
14055
          break;
14056
        }
14057
        _Fields fieldId = _Fields.findByThriftId(field.id);
14058
        if (fieldId == null) {
14059
          TProtocolUtil.skip(iprot, field.type);
14060
        } else {
14061
          switch (fieldId) {
14062
            case SUCCESS:
483 rajveer 14063
              if (field.type == TType.STRUCT) {
14064
                this.success = new Order();
14065
                this.success.read(iprot);
68 ashish 14066
              } else { 
14067
                TProtocolUtil.skip(iprot, field.type);
14068
              }
14069
              break;
14070
            case EX:
14071
              if (field.type == TType.STRUCT) {
14072
                this.ex = new TransactionServiceException();
14073
                this.ex.read(iprot);
14074
              } else { 
14075
                TProtocolUtil.skip(iprot, field.type);
14076
              }
14077
              break;
14078
          }
14079
          iprot.readFieldEnd();
14080
        }
14081
      }
14082
      iprot.readStructEnd();
14083
      validate();
14084
    }
14085
 
14086
    public void write(TProtocol oprot) throws TException {
14087
      oprot.writeStructBegin(STRUCT_DESC);
14088
 
14089
      if (this.isSetSuccess()) {
14090
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14091
        this.success.write(oprot);
68 ashish 14092
        oprot.writeFieldEnd();
14093
      } else if (this.isSetEx()) {
14094
        oprot.writeFieldBegin(EX_FIELD_DESC);
14095
        this.ex.write(oprot);
14096
        oprot.writeFieldEnd();
14097
      }
14098
      oprot.writeFieldStop();
14099
      oprot.writeStructEnd();
14100
    }
14101
 
14102
    @Override
14103
    public String toString() {
483 rajveer 14104
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 14105
      boolean first = true;
14106
 
14107
      sb.append("success:");
483 rajveer 14108
      if (this.success == null) {
14109
        sb.append("null");
14110
      } else {
14111
        sb.append(this.success);
14112
      }
68 ashish 14113
      first = false;
14114
      if (!first) sb.append(", ");
14115
      sb.append("ex:");
14116
      if (this.ex == null) {
14117
        sb.append("null");
14118
      } else {
14119
        sb.append(this.ex);
14120
      }
14121
      first = false;
14122
      sb.append(")");
14123
      return sb.toString();
14124
    }
14125
 
14126
    public void validate() throws TException {
14127
      // check for required fields
14128
    }
14129
 
14130
  }
14131
 
483 rajveer 14132
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
14133
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 14134
 
483 rajveer 14135
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 14136
 
483 rajveer 14137
    private long orderId;
68 ashish 14138
 
14139
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14140
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14141
      ORDER_ID((short)1, "orderId");
68 ashish 14142
 
14143
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14145
 
14146
      static {
14147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14148
          byId.put((int)field._thriftId, field);
14149
          byName.put(field.getFieldName(), field);
14150
        }
14151
      }
14152
 
14153
      /**
14154
       * Find the _Fields constant that matches fieldId, or null if its not found.
14155
       */
14156
      public static _Fields findByThriftId(int fieldId) {
14157
        return byId.get(fieldId);
14158
      }
14159
 
14160
      /**
14161
       * Find the _Fields constant that matches fieldId, throwing an exception
14162
       * if it is not found.
14163
       */
14164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14165
        _Fields fields = findByThriftId(fieldId);
14166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14167
        return fields;
14168
      }
14169
 
14170
      /**
14171
       * Find the _Fields constant that matches name, or null if its not found.
14172
       */
14173
      public static _Fields findByName(String name) {
14174
        return byName.get(name);
14175
      }
14176
 
14177
      private final short _thriftId;
14178
      private final String _fieldName;
14179
 
14180
      _Fields(short thriftId, String fieldName) {
14181
        _thriftId = thriftId;
14182
        _fieldName = fieldName;
14183
      }
14184
 
14185
      public short getThriftFieldId() {
14186
        return _thriftId;
14187
      }
14188
 
14189
      public String getFieldName() {
14190
        return _fieldName;
14191
      }
14192
    }
14193
 
14194
    // isset id assignments
483 rajveer 14195
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 14196
    private BitSet __isset_bit_vector = new BitSet(1);
14197
 
14198
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14199
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 14200
          new FieldValueMetaData(TType.I64)));
14201
    }});
14202
 
14203
    static {
483 rajveer 14204
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 14205
    }
14206
 
483 rajveer 14207
    public getLineItemsForOrder_args() {
68 ashish 14208
    }
14209
 
483 rajveer 14210
    public getLineItemsForOrder_args(
14211
      long orderId)
68 ashish 14212
    {
14213
      this();
483 rajveer 14214
      this.orderId = orderId;
14215
      setOrderIdIsSet(true);
68 ashish 14216
    }
14217
 
14218
    /**
14219
     * Performs a deep copy on <i>other</i>.
14220
     */
483 rajveer 14221
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 14222
      __isset_bit_vector.clear();
14223
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14224
      this.orderId = other.orderId;
68 ashish 14225
    }
14226
 
483 rajveer 14227
    public getLineItemsForOrder_args deepCopy() {
14228
      return new getLineItemsForOrder_args(this);
68 ashish 14229
    }
14230
 
14231
    @Deprecated
483 rajveer 14232
    public getLineItemsForOrder_args clone() {
14233
      return new getLineItemsForOrder_args(this);
68 ashish 14234
    }
14235
 
483 rajveer 14236
    public long getOrderId() {
14237
      return this.orderId;
68 ashish 14238
    }
14239
 
483 rajveer 14240
    public getLineItemsForOrder_args setOrderId(long orderId) {
14241
      this.orderId = orderId;
14242
      setOrderIdIsSet(true);
68 ashish 14243
      return this;
14244
    }
14245
 
483 rajveer 14246
    public void unsetOrderId() {
14247
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 14248
    }
14249
 
483 rajveer 14250
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14251
    public boolean isSetOrderId() {
14252
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 14253
    }
14254
 
483 rajveer 14255
    public void setOrderIdIsSet(boolean value) {
14256
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 14257
    }
14258
 
14259
    public void setFieldValue(_Fields field, Object value) {
14260
      switch (field) {
483 rajveer 14261
      case ORDER_ID:
68 ashish 14262
        if (value == null) {
483 rajveer 14263
          unsetOrderId();
68 ashish 14264
        } else {
483 rajveer 14265
          setOrderId((Long)value);
68 ashish 14266
        }
14267
        break;
14268
 
14269
      }
14270
    }
14271
 
14272
    public void setFieldValue(int fieldID, Object value) {
14273
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14274
    }
14275
 
14276
    public Object getFieldValue(_Fields field) {
14277
      switch (field) {
483 rajveer 14278
      case ORDER_ID:
14279
        return new Long(getOrderId());
68 ashish 14280
 
14281
      }
14282
      throw new IllegalStateException();
14283
    }
14284
 
14285
    public Object getFieldValue(int fieldId) {
14286
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14287
    }
14288
 
14289
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14290
    public boolean isSet(_Fields field) {
14291
      switch (field) {
483 rajveer 14292
      case ORDER_ID:
14293
        return isSetOrderId();
68 ashish 14294
      }
14295
      throw new IllegalStateException();
14296
    }
14297
 
14298
    public boolean isSet(int fieldID) {
14299
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14300
    }
14301
 
14302
    @Override
14303
    public boolean equals(Object that) {
14304
      if (that == null)
14305
        return false;
483 rajveer 14306
      if (that instanceof getLineItemsForOrder_args)
14307
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 14308
      return false;
14309
    }
14310
 
483 rajveer 14311
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 14312
      if (that == null)
14313
        return false;
14314
 
483 rajveer 14315
      boolean this_present_orderId = true;
14316
      boolean that_present_orderId = true;
14317
      if (this_present_orderId || that_present_orderId) {
14318
        if (!(this_present_orderId && that_present_orderId))
68 ashish 14319
          return false;
483 rajveer 14320
        if (this.orderId != that.orderId)
68 ashish 14321
          return false;
14322
      }
14323
 
14324
      return true;
14325
    }
14326
 
14327
    @Override
14328
    public int hashCode() {
14329
      return 0;
14330
    }
14331
 
483 rajveer 14332
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 14333
      if (!getClass().equals(other.getClass())) {
14334
        return getClass().getName().compareTo(other.getClass().getName());
14335
      }
14336
 
14337
      int lastComparison = 0;
483 rajveer 14338
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 14339
 
483 rajveer 14340
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 14341
      if (lastComparison != 0) {
14342
        return lastComparison;
14343
      }
483 rajveer 14344
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 14345
      if (lastComparison != 0) {
14346
        return lastComparison;
14347
      }
14348
      return 0;
14349
    }
14350
 
14351
    public void read(TProtocol iprot) throws TException {
14352
      TField field;
14353
      iprot.readStructBegin();
14354
      while (true)
14355
      {
14356
        field = iprot.readFieldBegin();
14357
        if (field.type == TType.STOP) { 
14358
          break;
14359
        }
14360
        _Fields fieldId = _Fields.findByThriftId(field.id);
14361
        if (fieldId == null) {
14362
          TProtocolUtil.skip(iprot, field.type);
14363
        } else {
14364
          switch (fieldId) {
483 rajveer 14365
            case ORDER_ID:
68 ashish 14366
              if (field.type == TType.I64) {
483 rajveer 14367
                this.orderId = iprot.readI64();
14368
                setOrderIdIsSet(true);
68 ashish 14369
              } else { 
14370
                TProtocolUtil.skip(iprot, field.type);
14371
              }
14372
              break;
14373
          }
14374
          iprot.readFieldEnd();
14375
        }
14376
      }
14377
      iprot.readStructEnd();
14378
      validate();
14379
    }
14380
 
14381
    public void write(TProtocol oprot) throws TException {
14382
      validate();
14383
 
14384
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14385
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14386
      oprot.writeI64(this.orderId);
68 ashish 14387
      oprot.writeFieldEnd();
14388
      oprot.writeFieldStop();
14389
      oprot.writeStructEnd();
14390
    }
14391
 
14392
    @Override
14393
    public String toString() {
483 rajveer 14394
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 14395
      boolean first = true;
14396
 
483 rajveer 14397
      sb.append("orderId:");
14398
      sb.append(this.orderId);
68 ashish 14399
      first = false;
14400
      sb.append(")");
14401
      return sb.toString();
14402
    }
14403
 
14404
    public void validate() throws TException {
14405
      // check for required fields
14406
    }
14407
 
14408
  }
14409
 
483 rajveer 14410
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
14411
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 14412
 
483 rajveer 14413
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 14414
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14415
 
483 rajveer 14416
    private List<LineItem> success;
68 ashish 14417
    private TransactionServiceException ex;
14418
 
14419
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14420
    public enum _Fields implements TFieldIdEnum {
14421
      SUCCESS((short)0, "success"),
14422
      EX((short)1, "ex");
14423
 
14424
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14425
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14426
 
14427
      static {
14428
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14429
          byId.put((int)field._thriftId, field);
14430
          byName.put(field.getFieldName(), field);
14431
        }
14432
      }
14433
 
14434
      /**
14435
       * Find the _Fields constant that matches fieldId, or null if its not found.
14436
       */
14437
      public static _Fields findByThriftId(int fieldId) {
14438
        return byId.get(fieldId);
14439
      }
14440
 
14441
      /**
14442
       * Find the _Fields constant that matches fieldId, throwing an exception
14443
       * if it is not found.
14444
       */
14445
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14446
        _Fields fields = findByThriftId(fieldId);
14447
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14448
        return fields;
14449
      }
14450
 
14451
      /**
14452
       * Find the _Fields constant that matches name, or null if its not found.
14453
       */
14454
      public static _Fields findByName(String name) {
14455
        return byName.get(name);
14456
      }
14457
 
14458
      private final short _thriftId;
14459
      private final String _fieldName;
14460
 
14461
      _Fields(short thriftId, String fieldName) {
14462
        _thriftId = thriftId;
14463
        _fieldName = fieldName;
14464
      }
14465
 
14466
      public short getThriftFieldId() {
14467
        return _thriftId;
14468
      }
14469
 
14470
      public String getFieldName() {
14471
        return _fieldName;
14472
      }
14473
    }
14474
 
14475
    // isset id assignments
14476
 
14477
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14478
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14479
          new ListMetaData(TType.LIST, 
14480
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 14481
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14482
          new FieldValueMetaData(TType.STRUCT)));
14483
    }});
14484
 
14485
    static {
483 rajveer 14486
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 14487
    }
14488
 
483 rajveer 14489
    public getLineItemsForOrder_result() {
68 ashish 14490
    }
14491
 
483 rajveer 14492
    public getLineItemsForOrder_result(
14493
      List<LineItem> success,
68 ashish 14494
      TransactionServiceException ex)
14495
    {
14496
      this();
14497
      this.success = success;
14498
      this.ex = ex;
14499
    }
14500
 
14501
    /**
14502
     * Performs a deep copy on <i>other</i>.
14503
     */
483 rajveer 14504
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
14505
      if (other.isSetSuccess()) {
14506
        List<LineItem> __this__success = new ArrayList<LineItem>();
14507
        for (LineItem other_element : other.success) {
14508
          __this__success.add(new LineItem(other_element));
14509
        }
14510
        this.success = __this__success;
14511
      }
68 ashish 14512
      if (other.isSetEx()) {
14513
        this.ex = new TransactionServiceException(other.ex);
14514
      }
14515
    }
14516
 
483 rajveer 14517
    public getLineItemsForOrder_result deepCopy() {
14518
      return new getLineItemsForOrder_result(this);
68 ashish 14519
    }
14520
 
14521
    @Deprecated
483 rajveer 14522
    public getLineItemsForOrder_result clone() {
14523
      return new getLineItemsForOrder_result(this);
68 ashish 14524
    }
14525
 
483 rajveer 14526
    public int getSuccessSize() {
14527
      return (this.success == null) ? 0 : this.success.size();
14528
    }
14529
 
14530
    public java.util.Iterator<LineItem> getSuccessIterator() {
14531
      return (this.success == null) ? null : this.success.iterator();
14532
    }
14533
 
14534
    public void addToSuccess(LineItem elem) {
14535
      if (this.success == null) {
14536
        this.success = new ArrayList<LineItem>();
14537
      }
14538
      this.success.add(elem);
14539
    }
14540
 
14541
    public List<LineItem> getSuccess() {
68 ashish 14542
      return this.success;
14543
    }
14544
 
483 rajveer 14545
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 14546
      this.success = success;
14547
      return this;
14548
    }
14549
 
14550
    public void unsetSuccess() {
483 rajveer 14551
      this.success = null;
68 ashish 14552
    }
14553
 
14554
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14555
    public boolean isSetSuccess() {
483 rajveer 14556
      return this.success != null;
68 ashish 14557
    }
14558
 
14559
    public void setSuccessIsSet(boolean value) {
483 rajveer 14560
      if (!value) {
14561
        this.success = null;
14562
      }
68 ashish 14563
    }
14564
 
14565
    public TransactionServiceException getEx() {
14566
      return this.ex;
14567
    }
14568
 
483 rajveer 14569
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 14570
      this.ex = ex;
14571
      return this;
14572
    }
14573
 
14574
    public void unsetEx() {
14575
      this.ex = null;
14576
    }
14577
 
14578
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14579
    public boolean isSetEx() {
14580
      return this.ex != null;
14581
    }
14582
 
14583
    public void setExIsSet(boolean value) {
14584
      if (!value) {
14585
        this.ex = null;
14586
      }
14587
    }
14588
 
14589
    public void setFieldValue(_Fields field, Object value) {
14590
      switch (field) {
14591
      case SUCCESS:
14592
        if (value == null) {
14593
          unsetSuccess();
14594
        } else {
483 rajveer 14595
          setSuccess((List<LineItem>)value);
68 ashish 14596
        }
14597
        break;
14598
 
14599
      case EX:
14600
        if (value == null) {
14601
          unsetEx();
14602
        } else {
14603
          setEx((TransactionServiceException)value);
14604
        }
14605
        break;
14606
 
14607
      }
14608
    }
14609
 
14610
    public void setFieldValue(int fieldID, Object value) {
14611
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14612
    }
14613
 
14614
    public Object getFieldValue(_Fields field) {
14615
      switch (field) {
14616
      case SUCCESS:
483 rajveer 14617
        return getSuccess();
68 ashish 14618
 
14619
      case EX:
14620
        return getEx();
14621
 
14622
      }
14623
      throw new IllegalStateException();
14624
    }
14625
 
14626
    public Object getFieldValue(int fieldId) {
14627
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14628
    }
14629
 
14630
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14631
    public boolean isSet(_Fields field) {
14632
      switch (field) {
14633
      case SUCCESS:
14634
        return isSetSuccess();
14635
      case EX:
14636
        return isSetEx();
14637
      }
14638
      throw new IllegalStateException();
14639
    }
14640
 
14641
    public boolean isSet(int fieldID) {
14642
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14643
    }
14644
 
14645
    @Override
14646
    public boolean equals(Object that) {
14647
      if (that == null)
14648
        return false;
483 rajveer 14649
      if (that instanceof getLineItemsForOrder_result)
14650
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 14651
      return false;
14652
    }
14653
 
483 rajveer 14654
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 14655
      if (that == null)
14656
        return false;
14657
 
483 rajveer 14658
      boolean this_present_success = true && this.isSetSuccess();
14659
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 14660
      if (this_present_success || that_present_success) {
14661
        if (!(this_present_success && that_present_success))
14662
          return false;
483 rajveer 14663
        if (!this.success.equals(that.success))
68 ashish 14664
          return false;
14665
      }
14666
 
14667
      boolean this_present_ex = true && this.isSetEx();
14668
      boolean that_present_ex = true && that.isSetEx();
14669
      if (this_present_ex || that_present_ex) {
14670
        if (!(this_present_ex && that_present_ex))
14671
          return false;
14672
        if (!this.ex.equals(that.ex))
14673
          return false;
14674
      }
14675
 
14676
      return true;
14677
    }
14678
 
14679
    @Override
14680
    public int hashCode() {
14681
      return 0;
14682
    }
14683
 
483 rajveer 14684
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 14685
      if (!getClass().equals(other.getClass())) {
14686
        return getClass().getName().compareTo(other.getClass().getName());
14687
      }
14688
 
14689
      int lastComparison = 0;
483 rajveer 14690
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 14691
 
14692
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14693
      if (lastComparison != 0) {
14694
        return lastComparison;
14695
      }
14696
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14697
      if (lastComparison != 0) {
14698
        return lastComparison;
14699
      }
14700
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14701
      if (lastComparison != 0) {
14702
        return lastComparison;
14703
      }
14704
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14705
      if (lastComparison != 0) {
14706
        return lastComparison;
14707
      }
14708
      return 0;
14709
    }
14710
 
14711
    public void read(TProtocol iprot) throws TException {
14712
      TField field;
14713
      iprot.readStructBegin();
14714
      while (true)
14715
      {
14716
        field = iprot.readFieldBegin();
14717
        if (field.type == TType.STOP) { 
14718
          break;
14719
        }
14720
        _Fields fieldId = _Fields.findByThriftId(field.id);
14721
        if (fieldId == null) {
14722
          TProtocolUtil.skip(iprot, field.type);
14723
        } else {
14724
          switch (fieldId) {
14725
            case SUCCESS:
483 rajveer 14726
              if (field.type == TType.LIST) {
14727
                {
1022 varun.gupt 14728
                  TList _list32 = iprot.readListBegin();
14729
                  this.success = new ArrayList<LineItem>(_list32.size);
14730
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 14731
                  {
1022 varun.gupt 14732
                    LineItem _elem34;
14733
                    _elem34 = new LineItem();
14734
                    _elem34.read(iprot);
14735
                    this.success.add(_elem34);
483 rajveer 14736
                  }
14737
                  iprot.readListEnd();
14738
                }
68 ashish 14739
              } else { 
14740
                TProtocolUtil.skip(iprot, field.type);
14741
              }
14742
              break;
14743
            case EX:
14744
              if (field.type == TType.STRUCT) {
14745
                this.ex = new TransactionServiceException();
14746
                this.ex.read(iprot);
14747
              } else { 
14748
                TProtocolUtil.skip(iprot, field.type);
14749
              }
14750
              break;
14751
          }
14752
          iprot.readFieldEnd();
14753
        }
14754
      }
14755
      iprot.readStructEnd();
14756
      validate();
14757
    }
14758
 
14759
    public void write(TProtocol oprot) throws TException {
14760
      oprot.writeStructBegin(STRUCT_DESC);
14761
 
14762
      if (this.isSetSuccess()) {
14763
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14764
        {
14765
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 14766
          for (LineItem _iter35 : this.success)
483 rajveer 14767
          {
1022 varun.gupt 14768
            _iter35.write(oprot);
483 rajveer 14769
          }
14770
          oprot.writeListEnd();
14771
        }
68 ashish 14772
        oprot.writeFieldEnd();
14773
      } else if (this.isSetEx()) {
14774
        oprot.writeFieldBegin(EX_FIELD_DESC);
14775
        this.ex.write(oprot);
14776
        oprot.writeFieldEnd();
14777
      }
14778
      oprot.writeFieldStop();
14779
      oprot.writeStructEnd();
14780
    }
14781
 
14782
    @Override
14783
    public String toString() {
483 rajveer 14784
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 14785
      boolean first = true;
14786
 
14787
      sb.append("success:");
483 rajveer 14788
      if (this.success == null) {
14789
        sb.append("null");
14790
      } else {
14791
        sb.append(this.success);
14792
      }
68 ashish 14793
      first = false;
14794
      if (!first) sb.append(", ");
14795
      sb.append("ex:");
14796
      if (this.ex == null) {
14797
        sb.append("null");
14798
      } else {
14799
        sb.append(this.ex);
14800
      }
14801
      first = false;
14802
      sb.append(")");
14803
      return sb.toString();
14804
    }
14805
 
14806
    public void validate() throws TException {
14807
      // check for required fields
14808
    }
14809
 
14810
  }
14811
 
758 chandransh 14812
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
14813
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
14814
 
14815
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
14816
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
14817
 
14818
    private long warehouseId;
14819
    private long providerId;
14820
 
14821
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14822
    public enum _Fields implements TFieldIdEnum {
14823
      WAREHOUSE_ID((short)1, "warehouseId"),
14824
      PROVIDER_ID((short)2, "providerId");
14825
 
14826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14828
 
14829
      static {
14830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14831
          byId.put((int)field._thriftId, field);
14832
          byName.put(field.getFieldName(), field);
14833
        }
14834
      }
14835
 
14836
      /**
14837
       * Find the _Fields constant that matches fieldId, or null if its not found.
14838
       */
14839
      public static _Fields findByThriftId(int fieldId) {
14840
        return byId.get(fieldId);
14841
      }
14842
 
14843
      /**
14844
       * Find the _Fields constant that matches fieldId, throwing an exception
14845
       * if it is not found.
14846
       */
14847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14848
        _Fields fields = findByThriftId(fieldId);
14849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14850
        return fields;
14851
      }
14852
 
14853
      /**
14854
       * Find the _Fields constant that matches name, or null if its not found.
14855
       */
14856
      public static _Fields findByName(String name) {
14857
        return byName.get(name);
14858
      }
14859
 
14860
      private final short _thriftId;
14861
      private final String _fieldName;
14862
 
14863
      _Fields(short thriftId, String fieldName) {
14864
        _thriftId = thriftId;
14865
        _fieldName = fieldName;
14866
      }
14867
 
14868
      public short getThriftFieldId() {
14869
        return _thriftId;
14870
      }
14871
 
14872
      public String getFieldName() {
14873
        return _fieldName;
14874
      }
14875
    }
14876
 
14877
    // isset id assignments
14878
    private static final int __WAREHOUSEID_ISSET_ID = 0;
14879
    private static final int __PROVIDERID_ISSET_ID = 1;
14880
    private BitSet __isset_bit_vector = new BitSet(2);
14881
 
14882
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14883
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
14884
          new FieldValueMetaData(TType.I64)));
14885
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
14886
          new FieldValueMetaData(TType.I64)));
14887
    }});
14888
 
14889
    static {
14890
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
14891
    }
14892
 
14893
    public markOrdersAsManifested_args() {
14894
    }
14895
 
14896
    public markOrdersAsManifested_args(
14897
      long warehouseId,
14898
      long providerId)
14899
    {
14900
      this();
14901
      this.warehouseId = warehouseId;
14902
      setWarehouseIdIsSet(true);
14903
      this.providerId = providerId;
14904
      setProviderIdIsSet(true);
14905
    }
14906
 
14907
    /**
14908
     * Performs a deep copy on <i>other</i>.
14909
     */
14910
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
14911
      __isset_bit_vector.clear();
14912
      __isset_bit_vector.or(other.__isset_bit_vector);
14913
      this.warehouseId = other.warehouseId;
14914
      this.providerId = other.providerId;
14915
    }
14916
 
14917
    public markOrdersAsManifested_args deepCopy() {
14918
      return new markOrdersAsManifested_args(this);
14919
    }
14920
 
14921
    @Deprecated
14922
    public markOrdersAsManifested_args clone() {
14923
      return new markOrdersAsManifested_args(this);
14924
    }
14925
 
14926
    public long getWarehouseId() {
14927
      return this.warehouseId;
14928
    }
14929
 
14930
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
14931
      this.warehouseId = warehouseId;
14932
      setWarehouseIdIsSet(true);
14933
      return this;
14934
    }
14935
 
14936
    public void unsetWarehouseId() {
14937
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
14938
    }
14939
 
14940
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
14941
    public boolean isSetWarehouseId() {
14942
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
14943
    }
14944
 
14945
    public void setWarehouseIdIsSet(boolean value) {
14946
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
14947
    }
14948
 
14949
    public long getProviderId() {
14950
      return this.providerId;
14951
    }
14952
 
14953
    public markOrdersAsManifested_args setProviderId(long providerId) {
14954
      this.providerId = providerId;
14955
      setProviderIdIsSet(true);
14956
      return this;
14957
    }
14958
 
14959
    public void unsetProviderId() {
14960
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
14961
    }
14962
 
14963
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
14964
    public boolean isSetProviderId() {
14965
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
14966
    }
14967
 
14968
    public void setProviderIdIsSet(boolean value) {
14969
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
14970
    }
14971
 
14972
    public void setFieldValue(_Fields field, Object value) {
14973
      switch (field) {
14974
      case WAREHOUSE_ID:
14975
        if (value == null) {
14976
          unsetWarehouseId();
14977
        } else {
14978
          setWarehouseId((Long)value);
14979
        }
14980
        break;
14981
 
14982
      case PROVIDER_ID:
14983
        if (value == null) {
14984
          unsetProviderId();
14985
        } else {
14986
          setProviderId((Long)value);
14987
        }
14988
        break;
14989
 
14990
      }
14991
    }
14992
 
14993
    public void setFieldValue(int fieldID, Object value) {
14994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14995
    }
14996
 
14997
    public Object getFieldValue(_Fields field) {
14998
      switch (field) {
14999
      case WAREHOUSE_ID:
15000
        return new Long(getWarehouseId());
15001
 
15002
      case PROVIDER_ID:
15003
        return new Long(getProviderId());
15004
 
15005
      }
15006
      throw new IllegalStateException();
15007
    }
15008
 
15009
    public Object getFieldValue(int fieldId) {
15010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15011
    }
15012
 
15013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15014
    public boolean isSet(_Fields field) {
15015
      switch (field) {
15016
      case WAREHOUSE_ID:
15017
        return isSetWarehouseId();
15018
      case PROVIDER_ID:
15019
        return isSetProviderId();
15020
      }
15021
      throw new IllegalStateException();
15022
    }
15023
 
15024
    public boolean isSet(int fieldID) {
15025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15026
    }
15027
 
15028
    @Override
15029
    public boolean equals(Object that) {
15030
      if (that == null)
15031
        return false;
15032
      if (that instanceof markOrdersAsManifested_args)
15033
        return this.equals((markOrdersAsManifested_args)that);
15034
      return false;
15035
    }
15036
 
15037
    public boolean equals(markOrdersAsManifested_args that) {
15038
      if (that == null)
15039
        return false;
15040
 
15041
      boolean this_present_warehouseId = true;
15042
      boolean that_present_warehouseId = true;
15043
      if (this_present_warehouseId || that_present_warehouseId) {
15044
        if (!(this_present_warehouseId && that_present_warehouseId))
15045
          return false;
15046
        if (this.warehouseId != that.warehouseId)
15047
          return false;
15048
      }
15049
 
15050
      boolean this_present_providerId = true;
15051
      boolean that_present_providerId = true;
15052
      if (this_present_providerId || that_present_providerId) {
15053
        if (!(this_present_providerId && that_present_providerId))
15054
          return false;
15055
        if (this.providerId != that.providerId)
15056
          return false;
15057
      }
15058
 
15059
      return true;
15060
    }
15061
 
15062
    @Override
15063
    public int hashCode() {
15064
      return 0;
15065
    }
15066
 
15067
    public int compareTo(markOrdersAsManifested_args other) {
15068
      if (!getClass().equals(other.getClass())) {
15069
        return getClass().getName().compareTo(other.getClass().getName());
15070
      }
15071
 
15072
      int lastComparison = 0;
15073
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
15074
 
15075
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
15076
      if (lastComparison != 0) {
15077
        return lastComparison;
15078
      }
15079
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
15080
      if (lastComparison != 0) {
15081
        return lastComparison;
15082
      }
15083
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
15084
      if (lastComparison != 0) {
15085
        return lastComparison;
15086
      }
15087
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
15088
      if (lastComparison != 0) {
15089
        return lastComparison;
15090
      }
15091
      return 0;
15092
    }
15093
 
15094
    public void read(TProtocol iprot) throws TException {
15095
      TField field;
15096
      iprot.readStructBegin();
15097
      while (true)
15098
      {
15099
        field = iprot.readFieldBegin();
15100
        if (field.type == TType.STOP) { 
15101
          break;
15102
        }
15103
        _Fields fieldId = _Fields.findByThriftId(field.id);
15104
        if (fieldId == null) {
15105
          TProtocolUtil.skip(iprot, field.type);
15106
        } else {
15107
          switch (fieldId) {
15108
            case WAREHOUSE_ID:
15109
              if (field.type == TType.I64) {
15110
                this.warehouseId = iprot.readI64();
15111
                setWarehouseIdIsSet(true);
15112
              } else { 
15113
                TProtocolUtil.skip(iprot, field.type);
15114
              }
15115
              break;
15116
            case PROVIDER_ID:
15117
              if (field.type == TType.I64) {
15118
                this.providerId = iprot.readI64();
15119
                setProviderIdIsSet(true);
15120
              } else { 
15121
                TProtocolUtil.skip(iprot, field.type);
15122
              }
15123
              break;
15124
          }
15125
          iprot.readFieldEnd();
15126
        }
15127
      }
15128
      iprot.readStructEnd();
15129
      validate();
15130
    }
15131
 
15132
    public void write(TProtocol oprot) throws TException {
15133
      validate();
15134
 
15135
      oprot.writeStructBegin(STRUCT_DESC);
15136
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
15137
      oprot.writeI64(this.warehouseId);
15138
      oprot.writeFieldEnd();
15139
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
15140
      oprot.writeI64(this.providerId);
15141
      oprot.writeFieldEnd();
15142
      oprot.writeFieldStop();
15143
      oprot.writeStructEnd();
15144
    }
15145
 
15146
    @Override
15147
    public String toString() {
15148
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
15149
      boolean first = true;
15150
 
15151
      sb.append("warehouseId:");
15152
      sb.append(this.warehouseId);
15153
      first = false;
15154
      if (!first) sb.append(", ");
15155
      sb.append("providerId:");
15156
      sb.append(this.providerId);
15157
      first = false;
15158
      sb.append(")");
15159
      return sb.toString();
15160
    }
15161
 
15162
    public void validate() throws TException {
15163
      // check for required fields
15164
    }
15165
 
15166
  }
15167
 
15168
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
15169
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
15170
 
15171
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15172
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15173
 
15174
    private boolean success;
15175
    private TransactionServiceException ex;
15176
 
15177
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15178
    public enum _Fields implements TFieldIdEnum {
15179
      SUCCESS((short)0, "success"),
15180
      EX((short)1, "ex");
15181
 
15182
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15183
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15184
 
15185
      static {
15186
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15187
          byId.put((int)field._thriftId, field);
15188
          byName.put(field.getFieldName(), field);
15189
        }
15190
      }
15191
 
15192
      /**
15193
       * Find the _Fields constant that matches fieldId, or null if its not found.
15194
       */
15195
      public static _Fields findByThriftId(int fieldId) {
15196
        return byId.get(fieldId);
15197
      }
15198
 
15199
      /**
15200
       * Find the _Fields constant that matches fieldId, throwing an exception
15201
       * if it is not found.
15202
       */
15203
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15204
        _Fields fields = findByThriftId(fieldId);
15205
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15206
        return fields;
15207
      }
15208
 
15209
      /**
15210
       * Find the _Fields constant that matches name, or null if its not found.
15211
       */
15212
      public static _Fields findByName(String name) {
15213
        return byName.get(name);
15214
      }
15215
 
15216
      private final short _thriftId;
15217
      private final String _fieldName;
15218
 
15219
      _Fields(short thriftId, String fieldName) {
15220
        _thriftId = thriftId;
15221
        _fieldName = fieldName;
15222
      }
15223
 
15224
      public short getThriftFieldId() {
15225
        return _thriftId;
15226
      }
15227
 
15228
      public String getFieldName() {
15229
        return _fieldName;
15230
      }
15231
    }
15232
 
15233
    // isset id assignments
15234
    private static final int __SUCCESS_ISSET_ID = 0;
15235
    private BitSet __isset_bit_vector = new BitSet(1);
15236
 
15237
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15238
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15239
          new FieldValueMetaData(TType.BOOL)));
15240
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15241
          new FieldValueMetaData(TType.STRUCT)));
15242
    }});
15243
 
15244
    static {
15245
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
15246
    }
15247
 
15248
    public markOrdersAsManifested_result() {
15249
    }
15250
 
15251
    public markOrdersAsManifested_result(
15252
      boolean success,
15253
      TransactionServiceException ex)
15254
    {
15255
      this();
15256
      this.success = success;
15257
      setSuccessIsSet(true);
15258
      this.ex = ex;
15259
    }
15260
 
15261
    /**
15262
     * Performs a deep copy on <i>other</i>.
15263
     */
15264
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
15265
      __isset_bit_vector.clear();
15266
      __isset_bit_vector.or(other.__isset_bit_vector);
15267
      this.success = other.success;
15268
      if (other.isSetEx()) {
15269
        this.ex = new TransactionServiceException(other.ex);
15270
      }
15271
    }
15272
 
15273
    public markOrdersAsManifested_result deepCopy() {
15274
      return new markOrdersAsManifested_result(this);
15275
    }
15276
 
15277
    @Deprecated
15278
    public markOrdersAsManifested_result clone() {
15279
      return new markOrdersAsManifested_result(this);
15280
    }
15281
 
15282
    public boolean isSuccess() {
15283
      return this.success;
15284
    }
15285
 
15286
    public markOrdersAsManifested_result setSuccess(boolean success) {
15287
      this.success = success;
15288
      setSuccessIsSet(true);
15289
      return this;
15290
    }
15291
 
15292
    public void unsetSuccess() {
15293
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15294
    }
15295
 
15296
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15297
    public boolean isSetSuccess() {
15298
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15299
    }
15300
 
15301
    public void setSuccessIsSet(boolean value) {
15302
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15303
    }
15304
 
15305
    public TransactionServiceException getEx() {
15306
      return this.ex;
15307
    }
15308
 
15309
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
15310
      this.ex = ex;
15311
      return this;
15312
    }
15313
 
15314
    public void unsetEx() {
15315
      this.ex = null;
15316
    }
15317
 
15318
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15319
    public boolean isSetEx() {
15320
      return this.ex != null;
15321
    }
15322
 
15323
    public void setExIsSet(boolean value) {
15324
      if (!value) {
15325
        this.ex = null;
15326
      }
15327
    }
15328
 
15329
    public void setFieldValue(_Fields field, Object value) {
15330
      switch (field) {
15331
      case SUCCESS:
15332
        if (value == null) {
15333
          unsetSuccess();
15334
        } else {
15335
          setSuccess((Boolean)value);
15336
        }
15337
        break;
15338
 
15339
      case EX:
15340
        if (value == null) {
15341
          unsetEx();
15342
        } else {
15343
          setEx((TransactionServiceException)value);
15344
        }
15345
        break;
15346
 
15347
      }
15348
    }
15349
 
15350
    public void setFieldValue(int fieldID, Object value) {
15351
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15352
    }
15353
 
15354
    public Object getFieldValue(_Fields field) {
15355
      switch (field) {
15356
      case SUCCESS:
15357
        return new Boolean(isSuccess());
15358
 
15359
      case EX:
15360
        return getEx();
15361
 
15362
      }
15363
      throw new IllegalStateException();
15364
    }
15365
 
15366
    public Object getFieldValue(int fieldId) {
15367
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15368
    }
15369
 
15370
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15371
    public boolean isSet(_Fields field) {
15372
      switch (field) {
15373
      case SUCCESS:
15374
        return isSetSuccess();
15375
      case EX:
15376
        return isSetEx();
15377
      }
15378
      throw new IllegalStateException();
15379
    }
15380
 
15381
    public boolean isSet(int fieldID) {
15382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15383
    }
15384
 
15385
    @Override
15386
    public boolean equals(Object that) {
15387
      if (that == null)
15388
        return false;
15389
      if (that instanceof markOrdersAsManifested_result)
15390
        return this.equals((markOrdersAsManifested_result)that);
15391
      return false;
15392
    }
15393
 
15394
    public boolean equals(markOrdersAsManifested_result that) {
15395
      if (that == null)
15396
        return false;
15397
 
15398
      boolean this_present_success = true;
15399
      boolean that_present_success = true;
15400
      if (this_present_success || that_present_success) {
15401
        if (!(this_present_success && that_present_success))
15402
          return false;
15403
        if (this.success != that.success)
15404
          return false;
15405
      }
15406
 
15407
      boolean this_present_ex = true && this.isSetEx();
15408
      boolean that_present_ex = true && that.isSetEx();
15409
      if (this_present_ex || that_present_ex) {
15410
        if (!(this_present_ex && that_present_ex))
15411
          return false;
15412
        if (!this.ex.equals(that.ex))
15413
          return false;
15414
      }
15415
 
15416
      return true;
15417
    }
15418
 
15419
    @Override
15420
    public int hashCode() {
15421
      return 0;
15422
    }
15423
 
15424
    public int compareTo(markOrdersAsManifested_result other) {
15425
      if (!getClass().equals(other.getClass())) {
15426
        return getClass().getName().compareTo(other.getClass().getName());
15427
      }
15428
 
15429
      int lastComparison = 0;
15430
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
15431
 
15432
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15433
      if (lastComparison != 0) {
15434
        return lastComparison;
15435
      }
15436
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15437
      if (lastComparison != 0) {
15438
        return lastComparison;
15439
      }
15440
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15441
      if (lastComparison != 0) {
15442
        return lastComparison;
15443
      }
15444
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15445
      if (lastComparison != 0) {
15446
        return lastComparison;
15447
      }
15448
      return 0;
15449
    }
15450
 
15451
    public void read(TProtocol iprot) throws TException {
15452
      TField field;
15453
      iprot.readStructBegin();
15454
      while (true)
15455
      {
15456
        field = iprot.readFieldBegin();
15457
        if (field.type == TType.STOP) { 
15458
          break;
15459
        }
15460
        _Fields fieldId = _Fields.findByThriftId(field.id);
15461
        if (fieldId == null) {
15462
          TProtocolUtil.skip(iprot, field.type);
15463
        } else {
15464
          switch (fieldId) {
15465
            case SUCCESS:
15466
              if (field.type == TType.BOOL) {
15467
                this.success = iprot.readBool();
15468
                setSuccessIsSet(true);
15469
              } else { 
15470
                TProtocolUtil.skip(iprot, field.type);
15471
              }
15472
              break;
15473
            case EX:
15474
              if (field.type == TType.STRUCT) {
15475
                this.ex = new TransactionServiceException();
15476
                this.ex.read(iprot);
15477
              } else { 
15478
                TProtocolUtil.skip(iprot, field.type);
15479
              }
15480
              break;
15481
          }
15482
          iprot.readFieldEnd();
15483
        }
15484
      }
15485
      iprot.readStructEnd();
15486
      validate();
15487
    }
15488
 
15489
    public void write(TProtocol oprot) throws TException {
15490
      oprot.writeStructBegin(STRUCT_DESC);
15491
 
15492
      if (this.isSetSuccess()) {
15493
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15494
        oprot.writeBool(this.success);
15495
        oprot.writeFieldEnd();
15496
      } else if (this.isSetEx()) {
15497
        oprot.writeFieldBegin(EX_FIELD_DESC);
15498
        this.ex.write(oprot);
15499
        oprot.writeFieldEnd();
15500
      }
15501
      oprot.writeFieldStop();
15502
      oprot.writeStructEnd();
15503
    }
15504
 
15505
    @Override
15506
    public String toString() {
15507
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
15508
      boolean first = true;
15509
 
15510
      sb.append("success:");
15511
      sb.append(this.success);
15512
      first = false;
15513
      if (!first) sb.append(", ");
15514
      sb.append("ex:");
15515
      if (this.ex == null) {
15516
        sb.append("null");
15517
      } else {
15518
        sb.append(this.ex);
15519
      }
15520
      first = false;
15521
      sb.append(")");
15522
      return sb.toString();
15523
    }
15524
 
15525
    public void validate() throws TException {
15526
      // check for required fields
15527
    }
15528
 
15529
  }
15530
 
1114 chandransh 15531
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
15532
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
15533
 
15534
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
15535
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
15536
 
15537
    private long providerId;
15538
    private Map<String,Long> pickupDetails;
15539
 
15540
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15541
    public enum _Fields implements TFieldIdEnum {
15542
      PROVIDER_ID((short)1, "providerId"),
15543
      PICKUP_DETAILS((short)2, "pickupDetails");
15544
 
15545
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15546
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15547
 
15548
      static {
15549
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15550
          byId.put((int)field._thriftId, field);
15551
          byName.put(field.getFieldName(), field);
15552
        }
15553
      }
15554
 
15555
      /**
15556
       * Find the _Fields constant that matches fieldId, or null if its not found.
15557
       */
15558
      public static _Fields findByThriftId(int fieldId) {
15559
        return byId.get(fieldId);
15560
      }
15561
 
15562
      /**
15563
       * Find the _Fields constant that matches fieldId, throwing an exception
15564
       * if it is not found.
15565
       */
15566
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15567
        _Fields fields = findByThriftId(fieldId);
15568
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15569
        return fields;
15570
      }
15571
 
15572
      /**
15573
       * Find the _Fields constant that matches name, or null if its not found.
15574
       */
15575
      public static _Fields findByName(String name) {
15576
        return byName.get(name);
15577
      }
15578
 
15579
      private final short _thriftId;
15580
      private final String _fieldName;
15581
 
15582
      _Fields(short thriftId, String fieldName) {
15583
        _thriftId = thriftId;
15584
        _fieldName = fieldName;
15585
      }
15586
 
15587
      public short getThriftFieldId() {
15588
        return _thriftId;
15589
      }
15590
 
15591
      public String getFieldName() {
15592
        return _fieldName;
15593
      }
15594
    }
15595
 
15596
    // isset id assignments
15597
    private static final int __PROVIDERID_ISSET_ID = 0;
15598
    private BitSet __isset_bit_vector = new BitSet(1);
15599
 
15600
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15601
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
15602
          new FieldValueMetaData(TType.I64)));
15603
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
15604
          new MapMetaData(TType.MAP, 
15605
              new FieldValueMetaData(TType.STRING), 
15606
              new FieldValueMetaData(TType.I64))));
15607
    }});
15608
 
15609
    static {
15610
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
15611
    }
15612
 
15613
    public markOrdersAsPickedUp_args() {
15614
    }
15615
 
15616
    public markOrdersAsPickedUp_args(
15617
      long providerId,
15618
      Map<String,Long> pickupDetails)
15619
    {
15620
      this();
15621
      this.providerId = providerId;
15622
      setProviderIdIsSet(true);
15623
      this.pickupDetails = pickupDetails;
15624
    }
15625
 
15626
    /**
15627
     * Performs a deep copy on <i>other</i>.
15628
     */
15629
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
15630
      __isset_bit_vector.clear();
15631
      __isset_bit_vector.or(other.__isset_bit_vector);
15632
      this.providerId = other.providerId;
15633
      if (other.isSetPickupDetails()) {
15634
        Map<String,Long> __this__pickupDetails = new HashMap<String,Long>();
15635
        for (Map.Entry<String, Long> other_element : other.pickupDetails.entrySet()) {
15636
 
15637
          String other_element_key = other_element.getKey();
15638
          Long other_element_value = other_element.getValue();
15639
 
15640
          String __this__pickupDetails_copy_key = other_element_key;
15641
 
15642
          Long __this__pickupDetails_copy_value = other_element_value;
15643
 
15644
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
15645
        }
15646
        this.pickupDetails = __this__pickupDetails;
15647
      }
15648
    }
15649
 
15650
    public markOrdersAsPickedUp_args deepCopy() {
15651
      return new markOrdersAsPickedUp_args(this);
15652
    }
15653
 
15654
    @Deprecated
15655
    public markOrdersAsPickedUp_args clone() {
15656
      return new markOrdersAsPickedUp_args(this);
15657
    }
15658
 
15659
    public long getProviderId() {
15660
      return this.providerId;
15661
    }
15662
 
15663
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
15664
      this.providerId = providerId;
15665
      setProviderIdIsSet(true);
15666
      return this;
15667
    }
15668
 
15669
    public void unsetProviderId() {
15670
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
15671
    }
15672
 
15673
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
15674
    public boolean isSetProviderId() {
15675
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
15676
    }
15677
 
15678
    public void setProviderIdIsSet(boolean value) {
15679
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
15680
    }
15681
 
15682
    public int getPickupDetailsSize() {
15683
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
15684
    }
15685
 
15686
    public void putToPickupDetails(String key, long val) {
15687
      if (this.pickupDetails == null) {
15688
        this.pickupDetails = new HashMap<String,Long>();
15689
      }
15690
      this.pickupDetails.put(key, val);
15691
    }
15692
 
15693
    public Map<String,Long> getPickupDetails() {
15694
      return this.pickupDetails;
15695
    }
15696
 
15697
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,Long> pickupDetails) {
15698
      this.pickupDetails = pickupDetails;
15699
      return this;
15700
    }
15701
 
15702
    public void unsetPickupDetails() {
15703
      this.pickupDetails = null;
15704
    }
15705
 
15706
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
15707
    public boolean isSetPickupDetails() {
15708
      return this.pickupDetails != null;
15709
    }
15710
 
15711
    public void setPickupDetailsIsSet(boolean value) {
15712
      if (!value) {
15713
        this.pickupDetails = null;
15714
      }
15715
    }
15716
 
15717
    public void setFieldValue(_Fields field, Object value) {
15718
      switch (field) {
15719
      case PROVIDER_ID:
15720
        if (value == null) {
15721
          unsetProviderId();
15722
        } else {
15723
          setProviderId((Long)value);
15724
        }
15725
        break;
15726
 
15727
      case PICKUP_DETAILS:
15728
        if (value == null) {
15729
          unsetPickupDetails();
15730
        } else {
15731
          setPickupDetails((Map<String,Long>)value);
15732
        }
15733
        break;
15734
 
15735
      }
15736
    }
15737
 
15738
    public void setFieldValue(int fieldID, Object value) {
15739
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15740
    }
15741
 
15742
    public Object getFieldValue(_Fields field) {
15743
      switch (field) {
15744
      case PROVIDER_ID:
15745
        return new Long(getProviderId());
15746
 
15747
      case PICKUP_DETAILS:
15748
        return getPickupDetails();
15749
 
15750
      }
15751
      throw new IllegalStateException();
15752
    }
15753
 
15754
    public Object getFieldValue(int fieldId) {
15755
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15756
    }
15757
 
15758
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15759
    public boolean isSet(_Fields field) {
15760
      switch (field) {
15761
      case PROVIDER_ID:
15762
        return isSetProviderId();
15763
      case PICKUP_DETAILS:
15764
        return isSetPickupDetails();
15765
      }
15766
      throw new IllegalStateException();
15767
    }
15768
 
15769
    public boolean isSet(int fieldID) {
15770
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15771
    }
15772
 
15773
    @Override
15774
    public boolean equals(Object that) {
15775
      if (that == null)
15776
        return false;
15777
      if (that instanceof markOrdersAsPickedUp_args)
15778
        return this.equals((markOrdersAsPickedUp_args)that);
15779
      return false;
15780
    }
15781
 
15782
    public boolean equals(markOrdersAsPickedUp_args that) {
15783
      if (that == null)
15784
        return false;
15785
 
15786
      boolean this_present_providerId = true;
15787
      boolean that_present_providerId = true;
15788
      if (this_present_providerId || that_present_providerId) {
15789
        if (!(this_present_providerId && that_present_providerId))
15790
          return false;
15791
        if (this.providerId != that.providerId)
15792
          return false;
15793
      }
15794
 
15795
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
15796
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
15797
      if (this_present_pickupDetails || that_present_pickupDetails) {
15798
        if (!(this_present_pickupDetails && that_present_pickupDetails))
15799
          return false;
15800
        if (!this.pickupDetails.equals(that.pickupDetails))
15801
          return false;
15802
      }
15803
 
15804
      return true;
15805
    }
15806
 
15807
    @Override
15808
    public int hashCode() {
15809
      return 0;
15810
    }
15811
 
15812
    public void read(TProtocol iprot) throws TException {
15813
      TField field;
15814
      iprot.readStructBegin();
15815
      while (true)
15816
      {
15817
        field = iprot.readFieldBegin();
15818
        if (field.type == TType.STOP) { 
15819
          break;
15820
        }
15821
        _Fields fieldId = _Fields.findByThriftId(field.id);
15822
        if (fieldId == null) {
15823
          TProtocolUtil.skip(iprot, field.type);
15824
        } else {
15825
          switch (fieldId) {
15826
            case PROVIDER_ID:
15827
              if (field.type == TType.I64) {
15828
                this.providerId = iprot.readI64();
15829
                setProviderIdIsSet(true);
15830
              } else { 
15831
                TProtocolUtil.skip(iprot, field.type);
15832
              }
15833
              break;
15834
            case PICKUP_DETAILS:
15835
              if (field.type == TType.MAP) {
15836
                {
15837
                  TMap _map36 = iprot.readMapBegin();
15838
                  this.pickupDetails = new HashMap<String,Long>(2*_map36.size);
15839
                  for (int _i37 = 0; _i37 < _map36.size; ++_i37)
15840
                  {
15841
                    String _key38;
15842
                    long _val39;
15843
                    _key38 = iprot.readString();
15844
                    _val39 = iprot.readI64();
15845
                    this.pickupDetails.put(_key38, _val39);
15846
                  }
15847
                  iprot.readMapEnd();
15848
                }
15849
              } else { 
15850
                TProtocolUtil.skip(iprot, field.type);
15851
              }
15852
              break;
15853
          }
15854
          iprot.readFieldEnd();
15855
        }
15856
      }
15857
      iprot.readStructEnd();
15858
      validate();
15859
    }
15860
 
15861
    public void write(TProtocol oprot) throws TException {
15862
      validate();
15863
 
15864
      oprot.writeStructBegin(STRUCT_DESC);
15865
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
15866
      oprot.writeI64(this.providerId);
15867
      oprot.writeFieldEnd();
15868
      if (this.pickupDetails != null) {
15869
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
15870
        {
15871
          oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.pickupDetails.size()));
15872
          for (Map.Entry<String, Long> _iter40 : this.pickupDetails.entrySet())
15873
          {
15874
            oprot.writeString(_iter40.getKey());
15875
            oprot.writeI64(_iter40.getValue());
15876
          }
15877
          oprot.writeMapEnd();
15878
        }
15879
        oprot.writeFieldEnd();
15880
      }
15881
      oprot.writeFieldStop();
15882
      oprot.writeStructEnd();
15883
    }
15884
 
15885
    @Override
15886
    public String toString() {
15887
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
15888
      boolean first = true;
15889
 
15890
      sb.append("providerId:");
15891
      sb.append(this.providerId);
15892
      first = false;
15893
      if (!first) sb.append(", ");
15894
      sb.append("pickupDetails:");
15895
      if (this.pickupDetails == null) {
15896
        sb.append("null");
15897
      } else {
15898
        sb.append(this.pickupDetails);
15899
      }
15900
      first = false;
15901
      sb.append(")");
15902
      return sb.toString();
15903
    }
15904
 
15905
    public void validate() throws TException {
15906
      // check for required fields
15907
    }
15908
 
15909
  }
15910
 
15911
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
15912
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
15913
 
15914
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15915
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15916
 
15917
    private List<Order> success;
15918
    private TransactionServiceException ex;
15919
 
15920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15921
    public enum _Fields implements TFieldIdEnum {
15922
      SUCCESS((short)0, "success"),
15923
      EX((short)1, "ex");
15924
 
15925
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15926
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15927
 
15928
      static {
15929
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15930
          byId.put((int)field._thriftId, field);
15931
          byName.put(field.getFieldName(), field);
15932
        }
15933
      }
15934
 
15935
      /**
15936
       * Find the _Fields constant that matches fieldId, or null if its not found.
15937
       */
15938
      public static _Fields findByThriftId(int fieldId) {
15939
        return byId.get(fieldId);
15940
      }
15941
 
15942
      /**
15943
       * Find the _Fields constant that matches fieldId, throwing an exception
15944
       * if it is not found.
15945
       */
15946
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15947
        _Fields fields = findByThriftId(fieldId);
15948
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15949
        return fields;
15950
      }
15951
 
15952
      /**
15953
       * Find the _Fields constant that matches name, or null if its not found.
15954
       */
15955
      public static _Fields findByName(String name) {
15956
        return byName.get(name);
15957
      }
15958
 
15959
      private final short _thriftId;
15960
      private final String _fieldName;
15961
 
15962
      _Fields(short thriftId, String fieldName) {
15963
        _thriftId = thriftId;
15964
        _fieldName = fieldName;
15965
      }
15966
 
15967
      public short getThriftFieldId() {
15968
        return _thriftId;
15969
      }
15970
 
15971
      public String getFieldName() {
15972
        return _fieldName;
15973
      }
15974
    }
15975
 
15976
    // isset id assignments
15977
 
15978
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15979
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15980
          new ListMetaData(TType.LIST, 
15981
              new StructMetaData(TType.STRUCT, Order.class))));
15982
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15983
          new FieldValueMetaData(TType.STRUCT)));
15984
    }});
15985
 
15986
    static {
15987
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
15988
    }
15989
 
15990
    public markOrdersAsPickedUp_result() {
15991
    }
15992
 
15993
    public markOrdersAsPickedUp_result(
15994
      List<Order> success,
15995
      TransactionServiceException ex)
15996
    {
15997
      this();
15998
      this.success = success;
15999
      this.ex = ex;
16000
    }
16001
 
16002
    /**
16003
     * Performs a deep copy on <i>other</i>.
16004
     */
16005
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
16006
      if (other.isSetSuccess()) {
16007
        List<Order> __this__success = new ArrayList<Order>();
16008
        for (Order other_element : other.success) {
16009
          __this__success.add(new Order(other_element));
16010
        }
16011
        this.success = __this__success;
16012
      }
16013
      if (other.isSetEx()) {
16014
        this.ex = new TransactionServiceException(other.ex);
16015
      }
16016
    }
16017
 
16018
    public markOrdersAsPickedUp_result deepCopy() {
16019
      return new markOrdersAsPickedUp_result(this);
16020
    }
16021
 
16022
    @Deprecated
16023
    public markOrdersAsPickedUp_result clone() {
16024
      return new markOrdersAsPickedUp_result(this);
16025
    }
16026
 
16027
    public int getSuccessSize() {
16028
      return (this.success == null) ? 0 : this.success.size();
16029
    }
16030
 
16031
    public java.util.Iterator<Order> getSuccessIterator() {
16032
      return (this.success == null) ? null : this.success.iterator();
16033
    }
16034
 
16035
    public void addToSuccess(Order elem) {
16036
      if (this.success == null) {
16037
        this.success = new ArrayList<Order>();
16038
      }
16039
      this.success.add(elem);
16040
    }
16041
 
16042
    public List<Order> getSuccess() {
16043
      return this.success;
16044
    }
16045
 
16046
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
16047
      this.success = success;
16048
      return this;
16049
    }
16050
 
16051
    public void unsetSuccess() {
16052
      this.success = null;
16053
    }
16054
 
16055
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16056
    public boolean isSetSuccess() {
16057
      return this.success != null;
16058
    }
16059
 
16060
    public void setSuccessIsSet(boolean value) {
16061
      if (!value) {
16062
        this.success = null;
16063
      }
16064
    }
16065
 
16066
    public TransactionServiceException getEx() {
16067
      return this.ex;
16068
    }
16069
 
16070
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
16071
      this.ex = ex;
16072
      return this;
16073
    }
16074
 
16075
    public void unsetEx() {
16076
      this.ex = null;
16077
    }
16078
 
16079
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16080
    public boolean isSetEx() {
16081
      return this.ex != null;
16082
    }
16083
 
16084
    public void setExIsSet(boolean value) {
16085
      if (!value) {
16086
        this.ex = null;
16087
      }
16088
    }
16089
 
16090
    public void setFieldValue(_Fields field, Object value) {
16091
      switch (field) {
16092
      case SUCCESS:
16093
        if (value == null) {
16094
          unsetSuccess();
16095
        } else {
16096
          setSuccess((List<Order>)value);
16097
        }
16098
        break;
16099
 
16100
      case EX:
16101
        if (value == null) {
16102
          unsetEx();
16103
        } else {
16104
          setEx((TransactionServiceException)value);
16105
        }
16106
        break;
16107
 
16108
      }
16109
    }
16110
 
16111
    public void setFieldValue(int fieldID, Object value) {
16112
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16113
    }
16114
 
16115
    public Object getFieldValue(_Fields field) {
16116
      switch (field) {
16117
      case SUCCESS:
16118
        return getSuccess();
16119
 
16120
      case EX:
16121
        return getEx();
16122
 
16123
      }
16124
      throw new IllegalStateException();
16125
    }
16126
 
16127
    public Object getFieldValue(int fieldId) {
16128
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16129
    }
16130
 
16131
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16132
    public boolean isSet(_Fields field) {
16133
      switch (field) {
16134
      case SUCCESS:
16135
        return isSetSuccess();
16136
      case EX:
16137
        return isSetEx();
16138
      }
16139
      throw new IllegalStateException();
16140
    }
16141
 
16142
    public boolean isSet(int fieldID) {
16143
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16144
    }
16145
 
16146
    @Override
16147
    public boolean equals(Object that) {
16148
      if (that == null)
16149
        return false;
16150
      if (that instanceof markOrdersAsPickedUp_result)
16151
        return this.equals((markOrdersAsPickedUp_result)that);
16152
      return false;
16153
    }
16154
 
16155
    public boolean equals(markOrdersAsPickedUp_result that) {
16156
      if (that == null)
16157
        return false;
16158
 
16159
      boolean this_present_success = true && this.isSetSuccess();
16160
      boolean that_present_success = true && that.isSetSuccess();
16161
      if (this_present_success || that_present_success) {
16162
        if (!(this_present_success && that_present_success))
16163
          return false;
16164
        if (!this.success.equals(that.success))
16165
          return false;
16166
      }
16167
 
16168
      boolean this_present_ex = true && this.isSetEx();
16169
      boolean that_present_ex = true && that.isSetEx();
16170
      if (this_present_ex || that_present_ex) {
16171
        if (!(this_present_ex && that_present_ex))
16172
          return false;
16173
        if (!this.ex.equals(that.ex))
16174
          return false;
16175
      }
16176
 
16177
      return true;
16178
    }
16179
 
16180
    @Override
16181
    public int hashCode() {
16182
      return 0;
16183
    }
16184
 
16185
    public int compareTo(markOrdersAsPickedUp_result other) {
16186
      if (!getClass().equals(other.getClass())) {
16187
        return getClass().getName().compareTo(other.getClass().getName());
16188
      }
16189
 
16190
      int lastComparison = 0;
16191
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
16192
 
16193
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16194
      if (lastComparison != 0) {
16195
        return lastComparison;
16196
      }
16197
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16198
      if (lastComparison != 0) {
16199
        return lastComparison;
16200
      }
16201
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16202
      if (lastComparison != 0) {
16203
        return lastComparison;
16204
      }
16205
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16206
      if (lastComparison != 0) {
16207
        return lastComparison;
16208
      }
16209
      return 0;
16210
    }
16211
 
16212
    public void read(TProtocol iprot) throws TException {
16213
      TField field;
16214
      iprot.readStructBegin();
16215
      while (true)
16216
      {
16217
        field = iprot.readFieldBegin();
16218
        if (field.type == TType.STOP) { 
16219
          break;
16220
        }
16221
        _Fields fieldId = _Fields.findByThriftId(field.id);
16222
        if (fieldId == null) {
16223
          TProtocolUtil.skip(iprot, field.type);
16224
        } else {
16225
          switch (fieldId) {
16226
            case SUCCESS:
16227
              if (field.type == TType.LIST) {
16228
                {
16229
                  TList _list41 = iprot.readListBegin();
16230
                  this.success = new ArrayList<Order>(_list41.size);
16231
                  for (int _i42 = 0; _i42 < _list41.size; ++_i42)
16232
                  {
16233
                    Order _elem43;
16234
                    _elem43 = new Order();
16235
                    _elem43.read(iprot);
16236
                    this.success.add(_elem43);
16237
                  }
16238
                  iprot.readListEnd();
16239
                }
16240
              } else { 
16241
                TProtocolUtil.skip(iprot, field.type);
16242
              }
16243
              break;
16244
            case EX:
16245
              if (field.type == TType.STRUCT) {
16246
                this.ex = new TransactionServiceException();
16247
                this.ex.read(iprot);
16248
              } else { 
16249
                TProtocolUtil.skip(iprot, field.type);
16250
              }
16251
              break;
16252
          }
16253
          iprot.readFieldEnd();
16254
        }
16255
      }
16256
      iprot.readStructEnd();
16257
      validate();
16258
    }
16259
 
16260
    public void write(TProtocol oprot) throws TException {
16261
      oprot.writeStructBegin(STRUCT_DESC);
16262
 
16263
      if (this.isSetSuccess()) {
16264
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16265
        {
16266
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16267
          for (Order _iter44 : this.success)
16268
          {
16269
            _iter44.write(oprot);
16270
          }
16271
          oprot.writeListEnd();
16272
        }
16273
        oprot.writeFieldEnd();
16274
      } else if (this.isSetEx()) {
16275
        oprot.writeFieldBegin(EX_FIELD_DESC);
16276
        this.ex.write(oprot);
16277
        oprot.writeFieldEnd();
16278
      }
16279
      oprot.writeFieldStop();
16280
      oprot.writeStructEnd();
16281
    }
16282
 
16283
    @Override
16284
    public String toString() {
16285
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
16286
      boolean first = true;
16287
 
16288
      sb.append("success:");
16289
      if (this.success == null) {
16290
        sb.append("null");
16291
      } else {
16292
        sb.append(this.success);
16293
      }
16294
      first = false;
16295
      if (!first) sb.append(", ");
16296
      sb.append("ex:");
16297
      if (this.ex == null) {
16298
        sb.append("null");
16299
      } else {
16300
        sb.append(this.ex);
16301
      }
16302
      first = false;
16303
      sb.append(")");
16304
      return sb.toString();
16305
    }
16306
 
16307
    public void validate() throws TException {
16308
      // check for required fields
16309
    }
16310
 
16311
  }
16312
 
305 ashish 16313
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
16314
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
16315
 
483 rajveer 16316
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 16317
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
16318
 
483 rajveer 16319
    private long orderId;
305 ashish 16320
    private boolean valid;
16321
 
16322
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16323
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16324
      ORDER_ID((short)1, "orderId"),
305 ashish 16325
      VALID((short)2, "valid");
16326
 
16327
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16329
 
16330
      static {
16331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16332
          byId.put((int)field._thriftId, field);
16333
          byName.put(field.getFieldName(), field);
16334
        }
16335
      }
16336
 
16337
      /**
16338
       * Find the _Fields constant that matches fieldId, or null if its not found.
16339
       */
16340
      public static _Fields findByThriftId(int fieldId) {
16341
        return byId.get(fieldId);
16342
      }
16343
 
16344
      /**
16345
       * Find the _Fields constant that matches fieldId, throwing an exception
16346
       * if it is not found.
16347
       */
16348
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16349
        _Fields fields = findByThriftId(fieldId);
16350
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16351
        return fields;
16352
      }
16353
 
16354
      /**
16355
       * Find the _Fields constant that matches name, or null if its not found.
16356
       */
16357
      public static _Fields findByName(String name) {
16358
        return byName.get(name);
16359
      }
16360
 
16361
      private final short _thriftId;
16362
      private final String _fieldName;
16363
 
16364
      _Fields(short thriftId, String fieldName) {
16365
        _thriftId = thriftId;
16366
        _fieldName = fieldName;
16367
      }
16368
 
16369
      public short getThriftFieldId() {
16370
        return _thriftId;
16371
      }
16372
 
16373
      public String getFieldName() {
16374
        return _fieldName;
16375
      }
16376
    }
16377
 
16378
    // isset id assignments
483 rajveer 16379
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 16380
    private static final int __VALID_ISSET_ID = 1;
16381
    private BitSet __isset_bit_vector = new BitSet(2);
16382
 
16383
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16384
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 16385
          new FieldValueMetaData(TType.I64)));
16386
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
16387
          new FieldValueMetaData(TType.BOOL)));
16388
    }});
16389
 
16390
    static {
16391
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
16392
    }
16393
 
16394
    public getAlerts_args() {
16395
    }
16396
 
16397
    public getAlerts_args(
483 rajveer 16398
      long orderId,
305 ashish 16399
      boolean valid)
16400
    {
16401
      this();
483 rajveer 16402
      this.orderId = orderId;
16403
      setOrderIdIsSet(true);
305 ashish 16404
      this.valid = valid;
16405
      setValidIsSet(true);
16406
    }
16407
 
16408
    /**
16409
     * Performs a deep copy on <i>other</i>.
16410
     */
16411
    public getAlerts_args(getAlerts_args other) {
16412
      __isset_bit_vector.clear();
16413
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 16414
      this.orderId = other.orderId;
305 ashish 16415
      this.valid = other.valid;
16416
    }
16417
 
16418
    public getAlerts_args deepCopy() {
16419
      return new getAlerts_args(this);
16420
    }
16421
 
16422
    @Deprecated
16423
    public getAlerts_args clone() {
16424
      return new getAlerts_args(this);
16425
    }
16426
 
483 rajveer 16427
    public long getOrderId() {
16428
      return this.orderId;
305 ashish 16429
    }
16430
 
483 rajveer 16431
    public getAlerts_args setOrderId(long orderId) {
16432
      this.orderId = orderId;
16433
      setOrderIdIsSet(true);
305 ashish 16434
      return this;
16435
    }
16436
 
483 rajveer 16437
    public void unsetOrderId() {
16438
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 16439
    }
16440
 
483 rajveer 16441
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16442
    public boolean isSetOrderId() {
16443
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 16444
    }
16445
 
483 rajveer 16446
    public void setOrderIdIsSet(boolean value) {
16447
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 16448
    }
16449
 
16450
    public boolean isValid() {
16451
      return this.valid;
16452
    }
16453
 
16454
    public getAlerts_args setValid(boolean valid) {
16455
      this.valid = valid;
16456
      setValidIsSet(true);
16457
      return this;
16458
    }
16459
 
16460
    public void unsetValid() {
16461
      __isset_bit_vector.clear(__VALID_ISSET_ID);
16462
    }
16463
 
16464
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
16465
    public boolean isSetValid() {
16466
      return __isset_bit_vector.get(__VALID_ISSET_ID);
16467
    }
16468
 
16469
    public void setValidIsSet(boolean value) {
16470
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
16471
    }
16472
 
16473
    public void setFieldValue(_Fields field, Object value) {
16474
      switch (field) {
483 rajveer 16475
      case ORDER_ID:
305 ashish 16476
        if (value == null) {
483 rajveer 16477
          unsetOrderId();
305 ashish 16478
        } else {
483 rajveer 16479
          setOrderId((Long)value);
305 ashish 16480
        }
16481
        break;
16482
 
16483
      case VALID:
16484
        if (value == null) {
16485
          unsetValid();
16486
        } else {
16487
          setValid((Boolean)value);
16488
        }
16489
        break;
16490
 
16491
      }
16492
    }
16493
 
16494
    public void setFieldValue(int fieldID, Object value) {
16495
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16496
    }
16497
 
16498
    public Object getFieldValue(_Fields field) {
16499
      switch (field) {
483 rajveer 16500
      case ORDER_ID:
16501
        return new Long(getOrderId());
305 ashish 16502
 
16503
      case VALID:
16504
        return new Boolean(isValid());
16505
 
16506
      }
16507
      throw new IllegalStateException();
16508
    }
16509
 
16510
    public Object getFieldValue(int fieldId) {
16511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16512
    }
16513
 
16514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16515
    public boolean isSet(_Fields field) {
16516
      switch (field) {
483 rajveer 16517
      case ORDER_ID:
16518
        return isSetOrderId();
305 ashish 16519
      case VALID:
16520
        return isSetValid();
16521
      }
16522
      throw new IllegalStateException();
16523
    }
16524
 
16525
    public boolean isSet(int fieldID) {
16526
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16527
    }
16528
 
16529
    @Override
16530
    public boolean equals(Object that) {
16531
      if (that == null)
16532
        return false;
16533
      if (that instanceof getAlerts_args)
16534
        return this.equals((getAlerts_args)that);
16535
      return false;
16536
    }
16537
 
16538
    public boolean equals(getAlerts_args that) {
16539
      if (that == null)
16540
        return false;
16541
 
483 rajveer 16542
      boolean this_present_orderId = true;
16543
      boolean that_present_orderId = true;
16544
      if (this_present_orderId || that_present_orderId) {
16545
        if (!(this_present_orderId && that_present_orderId))
305 ashish 16546
          return false;
483 rajveer 16547
        if (this.orderId != that.orderId)
305 ashish 16548
          return false;
16549
      }
16550
 
16551
      boolean this_present_valid = true;
16552
      boolean that_present_valid = true;
16553
      if (this_present_valid || that_present_valid) {
16554
        if (!(this_present_valid && that_present_valid))
16555
          return false;
16556
        if (this.valid != that.valid)
16557
          return false;
16558
      }
16559
 
16560
      return true;
16561
    }
16562
 
16563
    @Override
16564
    public int hashCode() {
16565
      return 0;
16566
    }
16567
 
16568
    public int compareTo(getAlerts_args other) {
16569
      if (!getClass().equals(other.getClass())) {
16570
        return getClass().getName().compareTo(other.getClass().getName());
16571
      }
16572
 
16573
      int lastComparison = 0;
16574
      getAlerts_args typedOther = (getAlerts_args)other;
16575
 
483 rajveer 16576
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 16577
      if (lastComparison != 0) {
16578
        return lastComparison;
16579
      }
483 rajveer 16580
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 16581
      if (lastComparison != 0) {
16582
        return lastComparison;
16583
      }
16584
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
16585
      if (lastComparison != 0) {
16586
        return lastComparison;
16587
      }
16588
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
16589
      if (lastComparison != 0) {
16590
        return lastComparison;
16591
      }
16592
      return 0;
16593
    }
16594
 
16595
    public void read(TProtocol iprot) throws TException {
16596
      TField field;
16597
      iprot.readStructBegin();
16598
      while (true)
16599
      {
16600
        field = iprot.readFieldBegin();
16601
        if (field.type == TType.STOP) { 
16602
          break;
16603
        }
16604
        _Fields fieldId = _Fields.findByThriftId(field.id);
16605
        if (fieldId == null) {
16606
          TProtocolUtil.skip(iprot, field.type);
16607
        } else {
16608
          switch (fieldId) {
483 rajveer 16609
            case ORDER_ID:
305 ashish 16610
              if (field.type == TType.I64) {
483 rajveer 16611
                this.orderId = iprot.readI64();
16612
                setOrderIdIsSet(true);
305 ashish 16613
              } else { 
16614
                TProtocolUtil.skip(iprot, field.type);
16615
              }
16616
              break;
16617
            case VALID:
16618
              if (field.type == TType.BOOL) {
16619
                this.valid = iprot.readBool();
16620
                setValidIsSet(true);
16621
              } else { 
16622
                TProtocolUtil.skip(iprot, field.type);
16623
              }
16624
              break;
16625
          }
16626
          iprot.readFieldEnd();
16627
        }
16628
      }
16629
      iprot.readStructEnd();
16630
      validate();
16631
    }
16632
 
16633
    public void write(TProtocol oprot) throws TException {
16634
      validate();
16635
 
16636
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16637
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16638
      oprot.writeI64(this.orderId);
305 ashish 16639
      oprot.writeFieldEnd();
16640
      oprot.writeFieldBegin(VALID_FIELD_DESC);
16641
      oprot.writeBool(this.valid);
16642
      oprot.writeFieldEnd();
16643
      oprot.writeFieldStop();
16644
      oprot.writeStructEnd();
16645
    }
16646
 
16647
    @Override
16648
    public String toString() {
16649
      StringBuilder sb = new StringBuilder("getAlerts_args(");
16650
      boolean first = true;
16651
 
483 rajveer 16652
      sb.append("orderId:");
16653
      sb.append(this.orderId);
305 ashish 16654
      first = false;
16655
      if (!first) sb.append(", ");
16656
      sb.append("valid:");
16657
      sb.append(this.valid);
16658
      first = false;
16659
      sb.append(")");
16660
      return sb.toString();
16661
    }
16662
 
16663
    public void validate() throws TException {
16664
      // check for required fields
16665
    }
16666
 
16667
  }
16668
 
16669
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
16670
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
16671
 
16672
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16673
 
16674
    private List<Alert> success;
16675
 
16676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16677
    public enum _Fields implements TFieldIdEnum {
16678
      SUCCESS((short)0, "success");
16679
 
16680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16682
 
16683
      static {
16684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16685
          byId.put((int)field._thriftId, field);
16686
          byName.put(field.getFieldName(), field);
16687
        }
16688
      }
16689
 
16690
      /**
16691
       * Find the _Fields constant that matches fieldId, or null if its not found.
16692
       */
16693
      public static _Fields findByThriftId(int fieldId) {
16694
        return byId.get(fieldId);
16695
      }
16696
 
16697
      /**
16698
       * Find the _Fields constant that matches fieldId, throwing an exception
16699
       * if it is not found.
16700
       */
16701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16702
        _Fields fields = findByThriftId(fieldId);
16703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16704
        return fields;
16705
      }
16706
 
16707
      /**
16708
       * Find the _Fields constant that matches name, or null if its not found.
16709
       */
16710
      public static _Fields findByName(String name) {
16711
        return byName.get(name);
16712
      }
16713
 
16714
      private final short _thriftId;
16715
      private final String _fieldName;
16716
 
16717
      _Fields(short thriftId, String fieldName) {
16718
        _thriftId = thriftId;
16719
        _fieldName = fieldName;
16720
      }
16721
 
16722
      public short getThriftFieldId() {
16723
        return _thriftId;
16724
      }
16725
 
16726
      public String getFieldName() {
16727
        return _fieldName;
16728
      }
16729
    }
16730
 
16731
    // isset id assignments
16732
 
16733
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16734
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16735
          new ListMetaData(TType.LIST, 
16736
              new StructMetaData(TType.STRUCT, Alert.class))));
16737
    }});
16738
 
16739
    static {
16740
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
16741
    }
16742
 
16743
    public getAlerts_result() {
16744
    }
16745
 
16746
    public getAlerts_result(
16747
      List<Alert> success)
16748
    {
16749
      this();
16750
      this.success = success;
16751
    }
16752
 
16753
    /**
16754
     * Performs a deep copy on <i>other</i>.
16755
     */
16756
    public getAlerts_result(getAlerts_result other) {
16757
      if (other.isSetSuccess()) {
16758
        List<Alert> __this__success = new ArrayList<Alert>();
16759
        for (Alert other_element : other.success) {
16760
          __this__success.add(new Alert(other_element));
16761
        }
16762
        this.success = __this__success;
16763
      }
16764
    }
16765
 
16766
    public getAlerts_result deepCopy() {
16767
      return new getAlerts_result(this);
16768
    }
16769
 
16770
    @Deprecated
16771
    public getAlerts_result clone() {
16772
      return new getAlerts_result(this);
16773
    }
16774
 
16775
    public int getSuccessSize() {
16776
      return (this.success == null) ? 0 : this.success.size();
16777
    }
16778
 
16779
    public java.util.Iterator<Alert> getSuccessIterator() {
16780
      return (this.success == null) ? null : this.success.iterator();
16781
    }
16782
 
16783
    public void addToSuccess(Alert elem) {
16784
      if (this.success == null) {
16785
        this.success = new ArrayList<Alert>();
16786
      }
16787
      this.success.add(elem);
16788
    }
16789
 
16790
    public List<Alert> getSuccess() {
16791
      return this.success;
16792
    }
16793
 
16794
    public getAlerts_result setSuccess(List<Alert> success) {
16795
      this.success = success;
16796
      return this;
16797
    }
16798
 
16799
    public void unsetSuccess() {
16800
      this.success = null;
16801
    }
16802
 
16803
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16804
    public boolean isSetSuccess() {
16805
      return this.success != null;
16806
    }
16807
 
16808
    public void setSuccessIsSet(boolean value) {
16809
      if (!value) {
16810
        this.success = null;
16811
      }
16812
    }
16813
 
16814
    public void setFieldValue(_Fields field, Object value) {
16815
      switch (field) {
16816
      case SUCCESS:
16817
        if (value == null) {
16818
          unsetSuccess();
16819
        } else {
16820
          setSuccess((List<Alert>)value);
16821
        }
16822
        break;
16823
 
16824
      }
16825
    }
16826
 
16827
    public void setFieldValue(int fieldID, Object value) {
16828
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16829
    }
16830
 
16831
    public Object getFieldValue(_Fields field) {
16832
      switch (field) {
16833
      case SUCCESS:
16834
        return getSuccess();
16835
 
16836
      }
16837
      throw new IllegalStateException();
16838
    }
16839
 
16840
    public Object getFieldValue(int fieldId) {
16841
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16842
    }
16843
 
16844
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16845
    public boolean isSet(_Fields field) {
16846
      switch (field) {
16847
      case SUCCESS:
16848
        return isSetSuccess();
16849
      }
16850
      throw new IllegalStateException();
16851
    }
16852
 
16853
    public boolean isSet(int fieldID) {
16854
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16855
    }
16856
 
16857
    @Override
16858
    public boolean equals(Object that) {
16859
      if (that == null)
16860
        return false;
16861
      if (that instanceof getAlerts_result)
16862
        return this.equals((getAlerts_result)that);
16863
      return false;
16864
    }
16865
 
16866
    public boolean equals(getAlerts_result that) {
16867
      if (that == null)
16868
        return false;
16869
 
16870
      boolean this_present_success = true && this.isSetSuccess();
16871
      boolean that_present_success = true && that.isSetSuccess();
16872
      if (this_present_success || that_present_success) {
16873
        if (!(this_present_success && that_present_success))
16874
          return false;
16875
        if (!this.success.equals(that.success))
16876
          return false;
16877
      }
16878
 
16879
      return true;
16880
    }
16881
 
16882
    @Override
16883
    public int hashCode() {
16884
      return 0;
16885
    }
16886
 
16887
    public int compareTo(getAlerts_result other) {
16888
      if (!getClass().equals(other.getClass())) {
16889
        return getClass().getName().compareTo(other.getClass().getName());
16890
      }
16891
 
16892
      int lastComparison = 0;
16893
      getAlerts_result typedOther = (getAlerts_result)other;
16894
 
16895
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16896
      if (lastComparison != 0) {
16897
        return lastComparison;
16898
      }
16899
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16900
      if (lastComparison != 0) {
16901
        return lastComparison;
16902
      }
16903
      return 0;
16904
    }
16905
 
16906
    public void read(TProtocol iprot) throws TException {
16907
      TField field;
16908
      iprot.readStructBegin();
16909
      while (true)
16910
      {
16911
        field = iprot.readFieldBegin();
16912
        if (field.type == TType.STOP) { 
16913
          break;
16914
        }
16915
        _Fields fieldId = _Fields.findByThriftId(field.id);
16916
        if (fieldId == null) {
16917
          TProtocolUtil.skip(iprot, field.type);
16918
        } else {
16919
          switch (fieldId) {
16920
            case SUCCESS:
16921
              if (field.type == TType.LIST) {
16922
                {
1114 chandransh 16923
                  TList _list45 = iprot.readListBegin();
16924
                  this.success = new ArrayList<Alert>(_list45.size);
16925
                  for (int _i46 = 0; _i46 < _list45.size; ++_i46)
305 ashish 16926
                  {
1114 chandransh 16927
                    Alert _elem47;
16928
                    _elem47 = new Alert();
16929
                    _elem47.read(iprot);
16930
                    this.success.add(_elem47);
305 ashish 16931
                  }
16932
                  iprot.readListEnd();
16933
                }
16934
              } else { 
16935
                TProtocolUtil.skip(iprot, field.type);
16936
              }
16937
              break;
16938
          }
16939
          iprot.readFieldEnd();
16940
        }
16941
      }
16942
      iprot.readStructEnd();
16943
      validate();
16944
    }
16945
 
16946
    public void write(TProtocol oprot) throws TException {
16947
      oprot.writeStructBegin(STRUCT_DESC);
16948
 
16949
      if (this.isSetSuccess()) {
16950
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16951
        {
16952
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1114 chandransh 16953
          for (Alert _iter48 : this.success)
305 ashish 16954
          {
1114 chandransh 16955
            _iter48.write(oprot);
305 ashish 16956
          }
16957
          oprot.writeListEnd();
16958
        }
16959
        oprot.writeFieldEnd();
16960
      }
16961
      oprot.writeFieldStop();
16962
      oprot.writeStructEnd();
16963
    }
16964
 
16965
    @Override
16966
    public String toString() {
16967
      StringBuilder sb = new StringBuilder("getAlerts_result(");
16968
      boolean first = true;
16969
 
16970
      sb.append("success:");
16971
      if (this.success == null) {
16972
        sb.append("null");
16973
      } else {
16974
        sb.append(this.success);
16975
      }
16976
      first = false;
16977
      sb.append(")");
16978
      return sb.toString();
16979
    }
16980
 
16981
    public void validate() throws TException {
16982
      // check for required fields
16983
    }
16984
 
16985
  }
16986
 
16987
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
16988
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
16989
 
483 rajveer 16990
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 16991
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
16992
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
16993
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
16994
 
483 rajveer 16995
    private long orderId;
305 ashish 16996
    private boolean unset;
16997
    private long type;
16998
    private String comment;
16999
 
17000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17001
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17002
      ORDER_ID((short)1, "orderId"),
305 ashish 17003
      UNSET((short)2, "unset"),
17004
      TYPE((short)3, "type"),
17005
      COMMENT((short)4, "comment");
17006
 
17007
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17008
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17009
 
17010
      static {
17011
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17012
          byId.put((int)field._thriftId, field);
17013
          byName.put(field.getFieldName(), field);
17014
        }
17015
      }
17016
 
17017
      /**
17018
       * Find the _Fields constant that matches fieldId, or null if its not found.
17019
       */
17020
      public static _Fields findByThriftId(int fieldId) {
17021
        return byId.get(fieldId);
17022
      }
17023
 
17024
      /**
17025
       * Find the _Fields constant that matches fieldId, throwing an exception
17026
       * if it is not found.
17027
       */
17028
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17029
        _Fields fields = findByThriftId(fieldId);
17030
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17031
        return fields;
17032
      }
17033
 
17034
      /**
17035
       * Find the _Fields constant that matches name, or null if its not found.
17036
       */
17037
      public static _Fields findByName(String name) {
17038
        return byName.get(name);
17039
      }
17040
 
17041
      private final short _thriftId;
17042
      private final String _fieldName;
17043
 
17044
      _Fields(short thriftId, String fieldName) {
17045
        _thriftId = thriftId;
17046
        _fieldName = fieldName;
17047
      }
17048
 
17049
      public short getThriftFieldId() {
17050
        return _thriftId;
17051
      }
17052
 
17053
      public String getFieldName() {
17054
        return _fieldName;
17055
      }
17056
    }
17057
 
17058
    // isset id assignments
483 rajveer 17059
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 17060
    private static final int __UNSET_ISSET_ID = 1;
17061
    private static final int __TYPE_ISSET_ID = 2;
17062
    private BitSet __isset_bit_vector = new BitSet(3);
17063
 
17064
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17065
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 17066
          new FieldValueMetaData(TType.I64)));
17067
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
17068
          new FieldValueMetaData(TType.BOOL)));
17069
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
17070
          new FieldValueMetaData(TType.I64)));
17071
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
17072
          new FieldValueMetaData(TType.STRING)));
17073
    }});
17074
 
17075
    static {
17076
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
17077
    }
17078
 
17079
    public setAlert_args() {
17080
    }
17081
 
17082
    public setAlert_args(
483 rajveer 17083
      long orderId,
305 ashish 17084
      boolean unset,
17085
      long type,
17086
      String comment)
17087
    {
17088
      this();
483 rajveer 17089
      this.orderId = orderId;
17090
      setOrderIdIsSet(true);
305 ashish 17091
      this.unset = unset;
17092
      setUnsetIsSet(true);
17093
      this.type = type;
17094
      setTypeIsSet(true);
17095
      this.comment = comment;
17096
    }
17097
 
17098
    /**
17099
     * Performs a deep copy on <i>other</i>.
17100
     */
17101
    public setAlert_args(setAlert_args other) {
17102
      __isset_bit_vector.clear();
17103
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17104
      this.orderId = other.orderId;
305 ashish 17105
      this.unset = other.unset;
17106
      this.type = other.type;
17107
      if (other.isSetComment()) {
17108
        this.comment = other.comment;
17109
      }
17110
    }
17111
 
17112
    public setAlert_args deepCopy() {
17113
      return new setAlert_args(this);
17114
    }
17115
 
17116
    @Deprecated
17117
    public setAlert_args clone() {
17118
      return new setAlert_args(this);
17119
    }
17120
 
483 rajveer 17121
    public long getOrderId() {
17122
      return this.orderId;
305 ashish 17123
    }
17124
 
483 rajveer 17125
    public setAlert_args setOrderId(long orderId) {
17126
      this.orderId = orderId;
17127
      setOrderIdIsSet(true);
305 ashish 17128
      return this;
17129
    }
17130
 
483 rajveer 17131
    public void unsetOrderId() {
17132
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 17133
    }
17134
 
483 rajveer 17135
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17136
    public boolean isSetOrderId() {
17137
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 17138
    }
17139
 
483 rajveer 17140
    public void setOrderIdIsSet(boolean value) {
17141
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 17142
    }
17143
 
17144
    public boolean isUnset() {
17145
      return this.unset;
17146
    }
17147
 
17148
    public setAlert_args setUnset(boolean unset) {
17149
      this.unset = unset;
17150
      setUnsetIsSet(true);
17151
      return this;
17152
    }
17153
 
17154
    public void unsetUnset() {
17155
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
17156
    }
17157
 
17158
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
17159
    public boolean isSetUnset() {
17160
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
17161
    }
17162
 
17163
    public void setUnsetIsSet(boolean value) {
17164
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
17165
    }
17166
 
17167
    public long getType() {
17168
      return this.type;
17169
    }
17170
 
17171
    public setAlert_args setType(long type) {
17172
      this.type = type;
17173
      setTypeIsSet(true);
17174
      return this;
17175
    }
17176
 
17177
    public void unsetType() {
17178
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
17179
    }
17180
 
17181
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
17182
    public boolean isSetType() {
17183
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
17184
    }
17185
 
17186
    public void setTypeIsSet(boolean value) {
17187
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
17188
    }
17189
 
17190
    public String getComment() {
17191
      return this.comment;
17192
    }
17193
 
17194
    public setAlert_args setComment(String comment) {
17195
      this.comment = comment;
17196
      return this;
17197
    }
17198
 
17199
    public void unsetComment() {
17200
      this.comment = null;
17201
    }
17202
 
17203
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
17204
    public boolean isSetComment() {
17205
      return this.comment != null;
17206
    }
17207
 
17208
    public void setCommentIsSet(boolean value) {
17209
      if (!value) {
17210
        this.comment = null;
17211
      }
17212
    }
17213
 
17214
    public void setFieldValue(_Fields field, Object value) {
17215
      switch (field) {
483 rajveer 17216
      case ORDER_ID:
305 ashish 17217
        if (value == null) {
483 rajveer 17218
          unsetOrderId();
305 ashish 17219
        } else {
483 rajveer 17220
          setOrderId((Long)value);
305 ashish 17221
        }
17222
        break;
17223
 
17224
      case UNSET:
17225
        if (value == null) {
17226
          unsetUnset();
17227
        } else {
17228
          setUnset((Boolean)value);
17229
        }
17230
        break;
17231
 
17232
      case TYPE:
17233
        if (value == null) {
17234
          unsetType();
17235
        } else {
17236
          setType((Long)value);
17237
        }
17238
        break;
17239
 
17240
      case COMMENT:
17241
        if (value == null) {
17242
          unsetComment();
17243
        } else {
17244
          setComment((String)value);
17245
        }
17246
        break;
17247
 
17248
      }
17249
    }
17250
 
17251
    public void setFieldValue(int fieldID, Object value) {
17252
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17253
    }
17254
 
17255
    public Object getFieldValue(_Fields field) {
17256
      switch (field) {
483 rajveer 17257
      case ORDER_ID:
17258
        return new Long(getOrderId());
305 ashish 17259
 
17260
      case UNSET:
17261
        return new Boolean(isUnset());
17262
 
17263
      case TYPE:
17264
        return new Long(getType());
17265
 
17266
      case COMMENT:
17267
        return getComment();
17268
 
17269
      }
17270
      throw new IllegalStateException();
17271
    }
17272
 
17273
    public Object getFieldValue(int fieldId) {
17274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17275
    }
17276
 
17277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17278
    public boolean isSet(_Fields field) {
17279
      switch (field) {
483 rajveer 17280
      case ORDER_ID:
17281
        return isSetOrderId();
305 ashish 17282
      case UNSET:
17283
        return isSetUnset();
17284
      case TYPE:
17285
        return isSetType();
17286
      case COMMENT:
17287
        return isSetComment();
17288
      }
17289
      throw new IllegalStateException();
17290
    }
17291
 
17292
    public boolean isSet(int fieldID) {
17293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17294
    }
17295
 
17296
    @Override
17297
    public boolean equals(Object that) {
17298
      if (that == null)
17299
        return false;
17300
      if (that instanceof setAlert_args)
17301
        return this.equals((setAlert_args)that);
17302
      return false;
17303
    }
17304
 
17305
    public boolean equals(setAlert_args that) {
17306
      if (that == null)
17307
        return false;
17308
 
483 rajveer 17309
      boolean this_present_orderId = true;
17310
      boolean that_present_orderId = true;
17311
      if (this_present_orderId || that_present_orderId) {
17312
        if (!(this_present_orderId && that_present_orderId))
305 ashish 17313
          return false;
483 rajveer 17314
        if (this.orderId != that.orderId)
305 ashish 17315
          return false;
17316
      }
17317
 
17318
      boolean this_present_unset = true;
17319
      boolean that_present_unset = true;
17320
      if (this_present_unset || that_present_unset) {
17321
        if (!(this_present_unset && that_present_unset))
17322
          return false;
17323
        if (this.unset != that.unset)
17324
          return false;
17325
      }
17326
 
17327
      boolean this_present_type = true;
17328
      boolean that_present_type = true;
17329
      if (this_present_type || that_present_type) {
17330
        if (!(this_present_type && that_present_type))
17331
          return false;
17332
        if (this.type != that.type)
17333
          return false;
17334
      }
17335
 
17336
      boolean this_present_comment = true && this.isSetComment();
17337
      boolean that_present_comment = true && that.isSetComment();
17338
      if (this_present_comment || that_present_comment) {
17339
        if (!(this_present_comment && that_present_comment))
17340
          return false;
17341
        if (!this.comment.equals(that.comment))
17342
          return false;
17343
      }
17344
 
17345
      return true;
17346
    }
17347
 
17348
    @Override
17349
    public int hashCode() {
17350
      return 0;
17351
    }
17352
 
17353
    public int compareTo(setAlert_args other) {
17354
      if (!getClass().equals(other.getClass())) {
17355
        return getClass().getName().compareTo(other.getClass().getName());
17356
      }
17357
 
17358
      int lastComparison = 0;
17359
      setAlert_args typedOther = (setAlert_args)other;
17360
 
483 rajveer 17361
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 17362
      if (lastComparison != 0) {
17363
        return lastComparison;
17364
      }
483 rajveer 17365
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 17366
      if (lastComparison != 0) {
17367
        return lastComparison;
17368
      }
17369
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
17370
      if (lastComparison != 0) {
17371
        return lastComparison;
17372
      }
17373
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
17374
      if (lastComparison != 0) {
17375
        return lastComparison;
17376
      }
17377
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
17378
      if (lastComparison != 0) {
17379
        return lastComparison;
17380
      }
17381
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
17382
      if (lastComparison != 0) {
17383
        return lastComparison;
17384
      }
17385
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
17386
      if (lastComparison != 0) {
17387
        return lastComparison;
17388
      }
17389
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
17390
      if (lastComparison != 0) {
17391
        return lastComparison;
17392
      }
17393
      return 0;
17394
    }
17395
 
17396
    public void read(TProtocol iprot) throws TException {
17397
      TField field;
17398
      iprot.readStructBegin();
17399
      while (true)
17400
      {
17401
        field = iprot.readFieldBegin();
17402
        if (field.type == TType.STOP) { 
17403
          break;
17404
        }
17405
        _Fields fieldId = _Fields.findByThriftId(field.id);
17406
        if (fieldId == null) {
17407
          TProtocolUtil.skip(iprot, field.type);
17408
        } else {
17409
          switch (fieldId) {
483 rajveer 17410
            case ORDER_ID:
305 ashish 17411
              if (field.type == TType.I64) {
483 rajveer 17412
                this.orderId = iprot.readI64();
17413
                setOrderIdIsSet(true);
305 ashish 17414
              } else { 
17415
                TProtocolUtil.skip(iprot, field.type);
17416
              }
17417
              break;
17418
            case UNSET:
17419
              if (field.type == TType.BOOL) {
17420
                this.unset = iprot.readBool();
17421
                setUnsetIsSet(true);
17422
              } else { 
17423
                TProtocolUtil.skip(iprot, field.type);
17424
              }
17425
              break;
17426
            case TYPE:
17427
              if (field.type == TType.I64) {
17428
                this.type = iprot.readI64();
17429
                setTypeIsSet(true);
17430
              } else { 
17431
                TProtocolUtil.skip(iprot, field.type);
17432
              }
17433
              break;
17434
            case COMMENT:
17435
              if (field.type == TType.STRING) {
17436
                this.comment = iprot.readString();
17437
              } else { 
17438
                TProtocolUtil.skip(iprot, field.type);
17439
              }
17440
              break;
17441
          }
17442
          iprot.readFieldEnd();
17443
        }
17444
      }
17445
      iprot.readStructEnd();
17446
      validate();
17447
    }
17448
 
17449
    public void write(TProtocol oprot) throws TException {
17450
      validate();
17451
 
17452
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17453
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
17454
      oprot.writeI64(this.orderId);
305 ashish 17455
      oprot.writeFieldEnd();
17456
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
17457
      oprot.writeBool(this.unset);
17458
      oprot.writeFieldEnd();
17459
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
17460
      oprot.writeI64(this.type);
17461
      oprot.writeFieldEnd();
17462
      if (this.comment != null) {
17463
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
17464
        oprot.writeString(this.comment);
17465
        oprot.writeFieldEnd();
17466
      }
17467
      oprot.writeFieldStop();
17468
      oprot.writeStructEnd();
17469
    }
17470
 
17471
    @Override
17472
    public String toString() {
17473
      StringBuilder sb = new StringBuilder("setAlert_args(");
17474
      boolean first = true;
17475
 
483 rajveer 17476
      sb.append("orderId:");
17477
      sb.append(this.orderId);
305 ashish 17478
      first = false;
17479
      if (!first) sb.append(", ");
17480
      sb.append("unset:");
17481
      sb.append(this.unset);
17482
      first = false;
17483
      if (!first) sb.append(", ");
17484
      sb.append("type:");
17485
      sb.append(this.type);
17486
      first = false;
17487
      if (!first) sb.append(", ");
17488
      sb.append("comment:");
17489
      if (this.comment == null) {
17490
        sb.append("null");
17491
      } else {
17492
        sb.append(this.comment);
17493
      }
17494
      first = false;
17495
      sb.append(")");
17496
      return sb.toString();
17497
    }
17498
 
17499
    public void validate() throws TException {
17500
      // check for required fields
17501
    }
17502
 
17503
  }
17504
 
17505
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
17506
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
17507
 
17508
 
17509
 
17510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17511
    public enum _Fields implements TFieldIdEnum {
17512
;
17513
 
17514
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17515
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17516
 
17517
      static {
17518
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17519
          byId.put((int)field._thriftId, field);
17520
          byName.put(field.getFieldName(), field);
17521
        }
17522
      }
17523
 
17524
      /**
17525
       * Find the _Fields constant that matches fieldId, or null if its not found.
17526
       */
17527
      public static _Fields findByThriftId(int fieldId) {
17528
        return byId.get(fieldId);
17529
      }
17530
 
17531
      /**
17532
       * Find the _Fields constant that matches fieldId, throwing an exception
17533
       * if it is not found.
17534
       */
17535
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17536
        _Fields fields = findByThriftId(fieldId);
17537
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17538
        return fields;
17539
      }
17540
 
17541
      /**
17542
       * Find the _Fields constant that matches name, or null if its not found.
17543
       */
17544
      public static _Fields findByName(String name) {
17545
        return byName.get(name);
17546
      }
17547
 
17548
      private final short _thriftId;
17549
      private final String _fieldName;
17550
 
17551
      _Fields(short thriftId, String fieldName) {
17552
        _thriftId = thriftId;
17553
        _fieldName = fieldName;
17554
      }
17555
 
17556
      public short getThriftFieldId() {
17557
        return _thriftId;
17558
      }
17559
 
17560
      public String getFieldName() {
17561
        return _fieldName;
17562
      }
17563
    }
17564
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17565
    }});
17566
 
17567
    static {
17568
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
17569
    }
17570
 
17571
    public setAlert_result() {
17572
    }
17573
 
17574
    /**
17575
     * Performs a deep copy on <i>other</i>.
17576
     */
17577
    public setAlert_result(setAlert_result other) {
17578
    }
17579
 
17580
    public setAlert_result deepCopy() {
17581
      return new setAlert_result(this);
17582
    }
17583
 
17584
    @Deprecated
17585
    public setAlert_result clone() {
17586
      return new setAlert_result(this);
17587
    }
17588
 
17589
    public void setFieldValue(_Fields field, Object value) {
17590
      switch (field) {
17591
      }
17592
    }
17593
 
17594
    public void setFieldValue(int fieldID, Object value) {
17595
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17596
    }
17597
 
17598
    public Object getFieldValue(_Fields field) {
17599
      switch (field) {
17600
      }
17601
      throw new IllegalStateException();
17602
    }
17603
 
17604
    public Object getFieldValue(int fieldId) {
17605
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17606
    }
17607
 
17608
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17609
    public boolean isSet(_Fields field) {
17610
      switch (field) {
17611
      }
17612
      throw new IllegalStateException();
17613
    }
17614
 
17615
    public boolean isSet(int fieldID) {
17616
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17617
    }
17618
 
17619
    @Override
17620
    public boolean equals(Object that) {
17621
      if (that == null)
17622
        return false;
17623
      if (that instanceof setAlert_result)
17624
        return this.equals((setAlert_result)that);
17625
      return false;
17626
    }
17627
 
17628
    public boolean equals(setAlert_result that) {
17629
      if (that == null)
17630
        return false;
17631
 
17632
      return true;
17633
    }
17634
 
17635
    @Override
17636
    public int hashCode() {
17637
      return 0;
17638
    }
17639
 
17640
    public int compareTo(setAlert_result other) {
17641
      if (!getClass().equals(other.getClass())) {
17642
        return getClass().getName().compareTo(other.getClass().getName());
17643
      }
17644
 
17645
      int lastComparison = 0;
17646
      setAlert_result typedOther = (setAlert_result)other;
17647
 
17648
      return 0;
17649
    }
17650
 
17651
    public void read(TProtocol iprot) throws TException {
17652
      TField field;
17653
      iprot.readStructBegin();
17654
      while (true)
17655
      {
17656
        field = iprot.readFieldBegin();
17657
        if (field.type == TType.STOP) { 
17658
          break;
17659
        }
17660
        _Fields fieldId = _Fields.findByThriftId(field.id);
17661
        if (fieldId == null) {
17662
          TProtocolUtil.skip(iprot, field.type);
17663
        } else {
17664
          switch (fieldId) {
17665
          }
17666
          iprot.readFieldEnd();
17667
        }
17668
      }
17669
      iprot.readStructEnd();
17670
      validate();
17671
    }
17672
 
17673
    public void write(TProtocol oprot) throws TException {
17674
      oprot.writeStructBegin(STRUCT_DESC);
17675
 
17676
      oprot.writeFieldStop();
17677
      oprot.writeStructEnd();
17678
    }
17679
 
17680
    @Override
17681
    public String toString() {
17682
      StringBuilder sb = new StringBuilder("setAlert_result(");
17683
      boolean first = true;
17684
 
17685
      sb.append(")");
17686
      return sb.toString();
17687
    }
17688
 
17689
    public void validate() throws TException {
17690
      // check for required fields
17691
    }
17692
 
17693
  }
17694
 
68 ashish 17695
}